The CustomPrimitive class represents a custom primitive object. A custom primitive object is an implicit primitive where the representation is fully defined by user. Defining the representation is done via the callbacks (_Define, _DefineLayout, _PPGEvent, _Draw, _BoundingBox, _ConvertToGeom) for Custom Primitive.
A custom primitive object can be created using the GetPrim command. It can be converted into a PolygonMesh using the SIConvert command if the ConvertToGeom callback is specified.
See the custom primitive example in the SDK workgroup for examples on how to define a custom primitive object.
#include <xsi_customprimitive.h>
Public Member Functions | |
CustomPrimitive () | |
~CustomPrimitive () | |
CustomPrimitive (const CRef &in_ref) | |
CustomPrimitive (const CustomPrimitive &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
CustomPrimitive & | operator= (const CustomPrimitive &in_obj) |
CustomPrimitive & | operator= (const CRef &in_ref) |
CStatus | AddParameter (const CRef &in_paramdef, Parameter &io_parameter) |
CStatus | RemoveParameter (const Parameter &in_param) |
CustomPrimitive | ( | ) |
Default constructor.
~CustomPrimitive | ( | ) |
Default destructor.
CustomPrimitive | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
CustomPrimitive | ( | const CustomPrimitive & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from Primitive.
siClassID GetClassID | ( | ) | const [virtual] |
CustomPrimitive& operator= | ( | const CustomPrimitive & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
CustomPrimitive& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from Primitive.
Adds a new parameter to the custom primitive object.
in_paramdef | The parameter definition (created via Factory::CreateParamDef) |
io_parameter | Returns the new Parameter object. |
Removes the specified parameter from the custom primitive.
in_param | Parameter to remove. |