Public Member Functions
CustomPrimitive Class Reference

Detailed Description

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.

See also:
PluginRegistrar::RegisterPrimitive, Primitive
Since:
12.0 (2014)

#include <xsi_customprimitive.h>

Inheritance diagram for CustomPrimitive:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CustomPrimitive ()
 ~CustomPrimitive ()
 CustomPrimitive (const CRef &in_ref)
 CustomPrimitive (const CustomPrimitive &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
CustomPrimitiveoperator= (const CustomPrimitive &in_obj)
CustomPrimitiveoperator= (const CRef &in_ref)
CStatus AddParameter (const CRef &in_paramdef, Parameter &io_parameter)
CStatus RemoveParameter (const Parameter &in_param)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

CustomPrimitive ( const CRef in_ref)

Constructor.

Parameters:
in_refconstant reference object.
CustomPrimitive ( const CustomPrimitive in_obj)

Copy constructor.

Parameters:
in_objconstant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID) const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassIDclass type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from Primitive.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from Primitive.

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.

Parameters:
in_objconstant class object.
Returns:
The new CustomPrimitive 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.

Parameters:
in_refconstant class object.
Returns:
The new CustomPrimitive object.

Reimplemented from Primitive.

CStatus AddParameter ( const CRef in_paramdef,
Parameter io_parameter 
)

Adds a new parameter to the custom primitive object.

Parameters:
in_paramdefThe parameter definition (created via Factory::CreateParamDef)
io_parameterReturns the new Parameter object.
Returns:
CStatus::OK success
CStatus::Fail failure
Since:
12.0 (2014)
CStatus RemoveParameter ( const Parameter in_param)

Removes the specified parameter from the custom primitive.

Parameters:
in_paramParameter to remove.
Returns:
CStatus::OK success
CStatus::Fail failure
Since:
12.0 (2014)

The documentation for this class was generated from the following file: