API reference · 05
Connectivity
A connectivity maps each instance of one primitive to instances of another primitive.
The examples create connectivity objects with primitive.addConnectivity. This connectivity describes the relationship between each tetrahedra to the vertices.
tetrahedra_to_vertices = tetrahedra.addConnectivity("to_vertices", to=vertices, data=tet_indices, dimension=4)
updateConnectivity
updateConnectivity(value)Update the connectivity value with an array.
| Parameter | Type | Description |
|---|---|---|
value |
numpy.ndarray, list[list[int]], or pycuda.gpuarray.GPUArray |
New target indices. Values are stored as flattened unsigned 32-bit integers on the GPU. |
Example
point_point_collision_pairs.updateConnectivity(collision_pairs.reshape((-1, 2)))
Returns: None.
Properties
| Property | Type | Description |
|---|---|---|
name |
str |
Connectivity identifier supplied to primitive.addConnectivity. |
fullName |
str |
Identifier containing the source primitive, target primitive, and connectivity name. |
fromPrimitive |
primitive | Source primitive whose instances own the mapping rows. |
toPrimitive |
primitive | Target primitive indexed by the mapping values. |
value |
pycuda.gpuarray.GPUArray |
Flattened target indices stored as uint32 on the GPU. |
dimension |
int |
Number of target indices per source instance; 0 denotes variable width. |
mesh |
mesh | Mesh shared by the source and target primitives. |
scene |
scene | Scene reached through the shared mesh. |
type |
str |
Always "connectivity". |