This class is provided as the context object in the CustomPrimitive ConvertToGeom callback for a CustomPrimitive object (see PluginRegistrar::RegisterCustomPrimitive).
The Context::GetUserData and Context::PutUserData functions provide a convenient way to store non-persisted, per-instance state information for the custom primitive. A common pattern is to use user data to store a pointer to C++ objects that actually implement the custom primitive algorithm and store its state.
#include <xsi_customprimitivecontext.h>
Public Member Functions | |
CustomPrimitiveContext () | |
~CustomPrimitiveContext () | |
CustomPrimitiveContext (const CRef &in_ref) | |
CustomPrimitiveContext (const CustomPrimitiveContext &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
CustomPrimitiveContext & | operator= (const CustomPrimitiveContext &in_obj) |
CustomPrimitiveContext & | operator= (const CRef &in_ref) |
CRef | GetGeometry () const |
Default constructor.
Default destructor.
CustomPrimitiveContext | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | Constant reference object. |
CustomPrimitiveContext | ( | const CustomPrimitiveContext & | 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 Context.
siClassID GetClassID | ( | ) | const [virtual] |
CustomPrimitiveContext& operator= | ( | const CustomPrimitiveContext & | in_obj | ) |
Creates an object from another object.
in_obj | Constant class object. |
CustomPrimitiveContext& 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 Context.
CRef GetGeometry | ( | ) | const |
Returns the output geometry during the ConvertToGeom callback. This will only be valid during the ConvertToGeom callback. The callback can then populate the geometry as necessary to complete the conversion.