CustomPrimitiveContext Class Reference
 
 
 
CustomPrimitiveContext Class Reference

This reference page is linked to from the following overview topics: Softimage 2014.


#include <xsi_customprimitivecontext.h>


Class Description

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.

See also:
CustomPrimitive, PluginRegistrar
Since:
12.0 (2014)
Inheritance diagram for CustomPrimitiveContext:
Context CBase

List of all members.

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

Constructor & Destructor Documentation

Default constructor.

Default destructor.

CustomPrimitiveContext ( const CRef in_ref )

Constructor.

Parameters:
in_ref Constant reference object.

Copy constructor.

Parameters:
in_obj Constant 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_ClassID Class type.
Returns:
True if the class is compatible, false otherwise.

Reimplemented from Context.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from Context.

CustomPrimitiveContext& operator= ( const CustomPrimitiveContext in_obj )

Creates an object from another object.

Parameters:
in_obj Constant class object.
Returns:
The new CustomPrimitiveContext 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.

Parameters:
in_ref Constant class object.
Returns:
The new CustomPrimitiveContext 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.

Returns:
A reference to the XSI object being written

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