|
|
virtual Uint32 | polygons_size () const =0 |
| Returns the number of polygons. More...
|
|
virtual Uint32 | polygon_corners_size (Polygon_handle_struct p) const =0 |
| Returns the number of vertices for a given polygon p . More...
|
|
virtual Sint32 | set_polygon_indices (Polygon_handle_struct p, const Uint32 *indices)=0 |
| Sets the vertex indices of a polygon. More...
|
|
virtual Sint32 | set_polygon_indices (Polygon_handle_struct p, Uint32 v0, Uint32 v1, Uint32 v2)=0 |
| Sets the vertex indices of a triangle. More...
|
|
virtual Sint32 | set_polygon_indices (Polygon_handle_struct p, Uint32 v0, Uint32 v1, Uint32 v2, Uint32 v3)=0 |
| Sets the vertex indices of a quad. More...
|
|
virtual Uint32 | get_polygon_index (Polygon_handle_struct p, Uint32 vertex) const =0 |
| Returns the index at the vertex vertex of polygon p . More...
|
|
virtual bool | is_valid_connectivity () const =0 |
| Indicates whether this connectivity is valid. More...
|
|
|
virtual bool | has_attribute (Mesh_attribute_name name) const =0 |
| Indicates whether the connectivity has a particular mesh attribute. More...
|
|
virtual IAttribute_vector * | create_attribute_vector (Mesh_attribute_name name, Uint32 dim=1) const =0 |
| Creates a non-per-primitive mesh attribute. More...
|
|
virtual const IAttribute_vector * | access_attribute_vector (Mesh_attribute_name name) const =0 |
| Returns a non-per-primitive mesh attribute. More...
|
|
virtual IAttribute_vector * | edit_attribute_vector (Mesh_attribute_name name)=0 |
| Detaches and returns a non-per-primitive mesh attribute. More...
|
|
virtual Sint32 | attach_attribute_vector (IAttribute_vector *attr)=0 |
| Attaches a given non-per-primitive mesh attribute to the mesh. More...
|
|
virtual Sint32 | remove_attribute_vector (Mesh_attribute_name name)=0 |
| Removes a non-per-primitive mesh attribute. More...
|
|
|
virtual Connectivity_map_type | get_map_type () const =0 |
| Returns the type of the connectivity. More...
|
|
virtual bool | is_hole (Polygon_handle_struct p) const =0 |
| Indicates whether the polygon p represents a hole. More...
|
|
virtual Uint32 | retain () const =0 |
| Increments the reference count. More...
|
|
virtual Uint32 | release () const =0 |
| Decrements the reference count. More...
|
|
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
| Acquires a const interface from another. More...
|
|
template<class T> |
const T * | get_interface () const |
| Acquires a const interface from another. More...
|
|
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
| Acquires a mutable interface from another. More...
|
|
template<class T> |
T * | get_interface () |
| Acquires a mutable interface from another. More...
|
|
virtual Uuid | get_iid () const =0 |
| Returns the interface ID of the most derived interface. More...
|
|
A connectivity class for polygon mesh geometry and their attributes.
A polygon connectivity maps vertices of a polygon mesh to indices. The vertices of the polygon mesh are identified by a pair of a polygon handle and a (local) vertex index in [0,polygon_corners_size()). Connectivities may have attached attribute vectors which use the connectivity information.
The meaning of the index associated with each vertex of the mesh is as follows: If the connectivity is the mesh connectivity, then this index identifies the point that belongs to a given vertex. Otherwise, the connectivity is called custom connectivity, and the index identifies an entry in an attribute vector that is associated with the given vertex. Note that attribute vectors can also be attached to the mesh connectivity (in which case an entry in the attribute vector is associated with the point mapped to the given vertex).
Attributes that have the same topological layout as the geometry typically use the mesh connectivity, e.g., normals for every point in the mesh. It is also possible to use an attribute connectivity with the same mapping as the mesh connectivity, however, using the mesh connectivity is more efficient. The use of a separate custom connectivity is necessary if the topological layout of the attribute is different from the geometry, e.g., for texture spaces with seams. Custom connectivities can also be useful to reduce the size of the attribute vector by sharing the same attribute value, e.g., for sharing the same normal between many points because of flat regions in the mesh.
Since the number of polygons is dictated by the mesh that the connectivity is associated with, it can only be changed by corresponding calls to the mi::neuraylib::IPolygon_mesh instance. It is possible to add points and polygons and to set the indices of the connectivities in alternating order, if so desired. The only constraint is that the largest connectivity index is smaller than the number of points (for the mesh connectivity) and smaller than the sizes of the attached attribute vectors (for all connectivities).
To create mesh attributes with the same connectivity, you can use a single connectivity and attach all these attributes to the same connectivity. However, when the mesh is retrieved from the DB no guarantee is given whether the attributes still share the connectivity or not.
- Note
- You must not release the mesh from which this connectivity was obtained before you release the connectivity.
- See also
- mi::neuraylib::IPolygon_mesh
-
mi::neuraylib::IAttribute_vector