Interface representing a freeform surface. More...
#include <ifreeform_surface.h>
Public Member Functions | |
Methods related to surfaces | |
virtual Uint32 | get_surfaces_size () const =0 |
Returns the number of surfaces. More... | |
virtual ISurface * | add_surface ()=0 |
Adds and returns a new surface. More... | |
virtual const ISurface * | access_surface (Surface_handle_struct s) const =0 |
Returns a surface (const). More... | |
virtual ISurface * | edit_surface (Surface_handle_struct s)=0 |
Returns a surface (mutable). More... | |
virtual Sint32 | remove_surface (Surface_handle_struct s)=0 |
Removes a surface. More... | |
Methods related to per-primitive attributes | |
virtual bool | has_attribute (Mesh_attribute_name name) const =0 |
Indicates whether the freeform surface has a particular mesh attribute. More... | |
virtual IAttribute_vector * | create_attribute_vector (Mesh_attribute_name name, Uint32 dim=1)=0 |
Creates a per-primitive mesh attribute. More... | |
virtual const IAttribute_vector * | access_attribute_vector (Mesh_attribute_name name) const =0 |
Returns a per-primitive mesh attribute. More... | |
virtual IAttribute_vector * | edit_attribute_vector (Mesh_attribute_name name)=0 |
Detaches and returns a per-primitive mesh attribute. More... | |
virtual Sint32 | attach_attribute_vector (IAttribute_vector *attribute_vector)=0 |
Attaches a given per-primitive mesh attribute to the freeform surface. More... | |
virtual Sint32 | remove_attribute_vector (Mesh_attribute_name name)=0 |
Removes a per-primitive mesh attribute. More... | |
Methods related to the bounding box | |
virtual Bbox3_struct | get_bbox () const =0 |
Returns the bounding box of the freeform surface. More... | |
virtual Bbox3_struct | get_tight_bbox (const Float64_4_4_struct &transformation_matrix) const =0 |
Returns the bounding box of the freeform surface after transformation. More... | |
Methods related to displacement | |
virtual void | set_maximum_displacement (Float32 displacement)=0 |
Sets the maximum displacement of the freeform surface. More... | |
virtual Float32 | get_maximum_displacement () const =0 |
Returns the maximum displacement of the freeform surface. More... | |
Public Member Functions inherited from mi::neuraylib::IScene_element | |
virtual Element_type | get_element_type () const =0 |
Indicates the actual scene element represented by interfaces derived from this interface. More... | |
Public Member Functions inherited from mi::neuraylib::IAttribute_set | |
virtual IData * | create_attribute (const char *name, const char *type)=0 |
Creates a new attribute name of the type type . More... | |
template<class T> | |
T * | create_attribute (const char *name, const char *type) |
Creates a new attribute name of the type type . More... | |
template<class T> | |
T * | create_attribute (const char *name) |
Creates a new attribute name of the type T . More... | |
virtual bool | destroy_attribute (const char *name)=0 |
Destroys the attribute name . More... | |
virtual const IData * | access_attribute (const char *name) const =0 |
Returns a const pointer to the attribute name . More... | |
template<class T> | |
const T * | access_attribute (const char *name) const |
Returns a const pointer to the attribute name . More... | |
virtual IData * | edit_attribute (const char *name)=0 |
Returns a mutable pointer to the attribute name . More... | |
template<class T> | |
T * | edit_attribute (const char *name) |
Returns a mutable pointer to the attribute name . More... | |
virtual bool | is_attribute (const char *name) const =0 |
Indicates existence of an attribute. More... | |
virtual const char * | get_attribute_type_name (const char *name) const =0 |
Returns the type of an attribute. More... | |
virtual Sint32 | set_attribute_propagation (const char *name, Propagation_type value)=0 |
Sets the propagation type of the attribute name . More... | |
virtual Propagation_type | get_attribute_propagation (const char *name) const =0 |
Returns the propagation type of the attribute name . More... | |
virtual const char * | enumerate_attributes (Sint32 index) const =0 |
Returns the name of the attribute indicated by index . More... | |
Public Member Functions inherited from mi::base::IInterface | |
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... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x5b54fda0, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0x8a2a4da9, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0x1bcb8d48, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | IID |
Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x5b54fda0, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x8a2a4da9, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x1bcb8d48, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
Interface representing a freeform surface.
Conceptually, a freeform surface object consists of several surfaces (see mi::neuraylib::ISurface). Due to a current limitation, only one surface is supported.
Surfaces are stored with consecutive indices, starting with the index 0. For type safety, surface indices are represented using mi::neuraylib::Surface_handle instead of plain integers.
In addition to regular attributes (see mi::neuraylib::IAttribute_set), freeform surfaces can also have mesh attributes. In contrast to regular attributes which exist only once per object, mesh attributes are always a vector of values with one vector element per primitive, per point, or per vertex (see mi::neuraylib::Mesh_attribute_name and mi::neuraylib::IAttribute_vector for details).
For freeform surfaces, only per-primitive mesh attributes are supported (the primitives are the the individual surfaces). Texture spaces are represented via so-called texture surfaces. Other per-point or per-vertex mesh attributes are not supported for freeform surfaces.
See also the "approx"
and "approx_curve"
attributes on mi::neuraylib::IAttribute_set for information how to control the tessellation of the freeform surface.
|
pure virtual |
Returns a per-primitive mesh attribute.
name | The name of the attribute, see Mesh_attribute_name. The attribute must be a per-primitive attribute. |
NULL
in case of failure.
|
pure virtual |
Returns a surface (const).
|
pure virtual |
Adds and returns a new surface.
|
pure virtual |
Attaches a given per-primitive mesh attribute to the freeform surface.
The attribute vector must not be used any longer after it has been attached.
NULL
pointer).
|
pure virtual |
Creates a per-primitive mesh attribute.
The attribute is not yet attached to the freeform surface. It needs to be attached before it is released.
name | The name of the attribute, see Mesh_attribute_name. The attribute must be a per-primitive attribute. |
dim | Dimension of an attribute value. Only used for those attributes that have user specifiable dimensions. |
NULL
in case of failure.
|
pure virtual |
Detaches and returns a per-primitive mesh attribute.
The attribute needs to be reattached before it is released. Otherwise, the attribute is effectively removed from the freeform surface.
name | The name of the attribute, see Mesh_attribute_name. The attribute must be a per-primitive attribute. |
NULL
in case of failure.
|
pure virtual |
Returns a surface (mutable).
|
pure virtual |
Returns the bounding box of the freeform surface.
|
pure virtual |
Returns the maximum displacement of the freeform surface.
|
pure virtual |
Returns the number of surfaces.
|
pure virtual |
Returns the bounding box of the freeform surface after transformation.
transformation_matrix | The world-to-object space transformation matrix that is applied to the object before the bounding box is computed. |
|
pure virtual |
Indicates whether the freeform surface has a particular mesh attribute.
name | The name of the attribute to query, see Mesh_attribute_name. |
true
if the freeform surface has this attribute, false
otherwise.
|
pure virtual |
Removes a per-primitive mesh attribute.
name | The name of the attribute, see Mesh_attribute_name. The attribute must be a per-primitive attribute. |
|
pure virtual |
Removes a surface.
Note that the surface IDs of the following surfaces are decreased by 1.
|
pure virtual |
Sets the maximum displacement of the freeform surface.
This value is the maximum absolute value of any displacement applied to the object (defaults to 0.0). The bounding box of the object will be expanded all around by this value.