Interface representing a subdivision surface. More...
Public Member Functions | |
Methods related to triangles and quads | |
virtual Uint32 | triangles_size () const =0 |
Returns the number of triangles in the mesh. More... |
|
virtual Uint32 | triangles_capacity () const =0 |
Returns the number of triangles for which space is allocated in the mesh. More... |
|
virtual void | reserve_triangles (Uint32 n)=0 |
Reserves space for at least n triangles. More... |
|
virtual Uint32 | quads_size () const =0 |
Returns the number of quads in the mesh. More... |
|
virtual Uint32 | quads_capacity () const =0 |
Returns the number of quads for which space is allocated in the mesh. More... |
|
virtual void | reserve_quads (Uint32 n)=0 |
Reserves space for at least n quads. More... |
|
Methods related to creases | |
virtual Sint32 | set_crease_value (Polygon_handle_struct p, Uint32 index, Float32 value)=0 |
Sets crease values for an edge. More... |
|
virtual Float32 | get_crease_value (Polygon_handle_struct p, Uint32 index) const =0 |
Returns crease values for an edge. More... |
|
virtual Sint32 | set_crease_values (Polygon_handle_struct p, const Float32 *values)=0 |
Sets crease values for all edges of a polygon. More... |
|
virtual const Float32 * | get_crease_values (Polygon_handle_struct p) const =0 |
Returns crease values for all edges of a polygon. More... |
|
virtual IArray * | get_inconsistent_crease_values () const =0 |
Checks all crease values for consistency and returns inconsistent values. More... |
|
Methods related to vertex features | |
virtual Sint32 | set_vertex_feature (Uint32 index, Vertex_feature feature)=0 |
Sets a vertex feature. More... |
|
virtual Vertex_feature | get_vertex_feature (Uint32 index) const =0 |
Returns a vertex features. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x6a65666a, 0x849d, 0x4081, 0xaa, 0x32, 0xb3, 0xa1, 0xeb, 0xa0, 0x6f, 0xe2, neuraylib::IPolygon_mesh > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, neuraylib::IPolygon_mesh > |
Self |
Own type. More... |
|
typedef Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11 > |
IID |
Declares the interface ID (IID) of this interface. More... |
|
Static Public Member Functions inherited from mi::base::Interface_declare< 0x6a65666a, 0x849d, 0x4081, 0xaa, 0x32, 0xb3, 0xa1, 0xeb, 0xa0, 0x6f, 0xe2, neuraylib::IPolygon_mesh > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
Interface representing a subdivision surface.
Subdivision surfaces are smooth surfaces that are represented by a coarse control mesh. The smooth surface is the limit surface that results from recursive application of a subdivision process that splits each polygon into smaller polygons that are a better approximation of the limit surface than the input polygon.
The control mesh is represented as a polygon mesh with the limitation that only triangles and quads are supported. Holes are not supported, either. Additionally, vertices may be flagged as smooth (the default) or as corners. For each edge it is possible to set a crease value that defines its sharpness.
Note: If quads have already been added and per-primitive attribute vectors are attached, adding another triangle needs time linear in the number of quads. Thus, it is recommended to either first add the triangles and then the quads, or to detach the per-primitive attribute vectors if a large number of triangles is to be added later.
See also the "approx"
attribute on mi::neuraylib::IAttribute_set for information how to control the approximation of the limit surface.
|
pure virtual |
Returns crease values for an edge.
p | The polygon to return the crease values for. |
index | The edge to return the crease value for. Edge i is the edge from vertex i to vertex i+1 . |
p
is out of bounds, or -3.0 if index
is out of bounds.
|
pure virtual |
Returns crease values for all edges of a polygon.
p | The polygon to return the crease values for. |
p
being a triangle or quad), or NULL
if p
is out of bounds, or no crease values for the given polygon are specified. The first value is for the edge from vertex 0 to vertex 1, and so on.
|
pure virtual |
Checks all crease values for consistency and returns inconsistent values.
The array elements are of type "Crease_info[]" and describe all inconsistent crease values for a particular edge. The type "Crease_info" is a structure with the following members:
It stores the crease value that was set via the given polygon and its edge index.
NULL
if the mesh connectivity is not attached.
|
pure virtual |
Returns a vertex features.
index | The index of the point to return the vertex feature for. |
index
(undefined if index
is out of bounds).
|
pure virtual |
Returns the number of quads for which space is allocated in the mesh.
One can add quads_capacity() - quads_size() many quads to the mesh before internal reallocation may become necessary.
|
pure virtual |
Returns the number of quads in the mesh.
|
pure virtual |
Reserves space for at least n
quads.
Sets the internal capacity to at least n
quads before reallocation may become necessary. The number of quads currently stored is not changed by this method.
|
pure virtual |
Reserves space for at least n
triangles.
Sets the internal capacity to at least n
triangles before reallocation may become necessary. The number of triangles currently stored is not changed by this method.
|
pure virtual |
Sets crease values for an edge.
p
, this method sets them to 0.0.p | The polygon to set the crease values for. |
index | The edge to set the crease value for. Edge i is the edge from vertex i to vertex i+1 . |
value | The new crease value. |
p
is out of bounds.index
is out of bounds.value
is not in the interval [0, 1].
|
pure virtual |
Sets crease values for all edges of a polygon.
p | The polygon to set the crease values for. |
values | The array of values (3 or 4 values depending on p being a triangle or quad). The first value is for the edge from vertex 0 to vertex 1, and so on. |
NULL
pointer).p
is out of bounds.
|
pure virtual |
Sets a vertex feature.
index | The index of the point to set the vertex feature for. |
feature | The desired feature. |
index
is out of bounds.feature
.
|
pure virtual |
Returns the number of triangles for which space is allocated in the mesh.
One can add triangles_capacity() - triangles_size() many triangles to the mesh before internal reallocation may become necessary.
|
pure virtual |
Returns the number of triangles in the mesh.