Class GeomPipelineEnumProc

3DS Max Plug-In SDK

Class GeomPipelineEnumProc

See Also: Class InterfaceServer, Class INode, Class Object, Class Modifier, , Class IDerivedObject, Class ModContext, Class NotifyCollapseEnumProc.

class GeomPipelineEnumProc : public InterfaceServer

Description:

This class and its associated global functions are available in release 4.0 and later only.

This is the callback object for the global geometry pipeline enumeration functions. The single proc() method of this class is called as the enumeration takes place.

The following functions are not methods of this class but are available for use with it to begin the enumeration:

These all start a pipeline enumeration down the pipeline towards the baseobject and over the baseobjects' branches in case it is a compound object. A pipleine enumeration can be started from a Node, an Object or from a Modifier.

Function:

int EnumGeomPipeline(GeomPipelineEnumProc *gpep, INode *start, bool includeEmptyDOs = false);

Remarks:

The global function begins an enumeration of the geometry pipeline using the specified node.

Parameters:

GeomPipelineEnumProc *gpep

Points to the callback object to process the enumeration.

INode *start

Points to the node to start the enumeration.

bool includeEmptyDOs = false

In case the flag includeEmptyDOs is declared as true, the proc will be called even for DerivedObjects, that don't contain any modifiers. In that case the object pointer will be NULL, the derObj pointer will contain the DerivedObject and the index will be -1.

Return Value:

One of the following values:

PIPE_ENUM_CONTINUE

PIPE_ENUM_STOP

Function:

int EnumGeomPipeline(GeomPipelineEnumProc *gpep, Object *start, bool includeEmptyDOs = false);

Remarks:

The global function begins an enumeration of the geometry pipeline using the specified object.

Parameters:

GeomPipelineEnumProc *gpep

Points to the callback object to process the enumeration.

Object *start

Points to the object to start the enumeration.

bool includeEmptyDOs = false

In case the flag includeEmptyDOs is declared as true, the proc will be called even for DerivedObjects, that don't contain any modifiers. In that case the object pointer will be NULL, the derObj pointer will contain the DerivedObject and the index will be -1.

Return Value:

One of the following values:

PIPE_ENUM_CONTINUE

PIPE_ENUM_STOP

Function:

int EnumGeomPipeline(GeomPipelineEnumProc *gpep, IDerivedObject *start, int modIndex = 0, bool includeEmptyDOs = false);

Remarks:

The global function begins an enumeration of the geometry pipeline using the specified derived object and modifier index. The caller of this method has to provide the IDerviedObject the Modifier is applied to and the index of the Modifier in the IDerivedObject. Developers can use the method Modifier::GetIDerivedObject() in order to get the IDerviedObject and the index, given a modifier and a ModContext.

Parameters:

GeomPipelineEnumProc *gpep

Points to the callback object to process the enumeration.

IDerivedObject *start

Points to the derived object to start the enumeration.

int modIndex = 0

The zero based index of the modifier in the derived object to start with.

bool includeEmptyDOs = false

In case the flag includeEmptyDOs is declared as true, the proc will be called even for DerivedObjects, that don't contain any modifiers. In that case the object pointer will be NULL, the derObj pointer will contain the DerivedObject and the index will be -1.

Return Value:

One of the following values:

PIPE_ENUM_CONTINUE

PIPE_ENUM_STOP

Methods:

public:

Prototype:

virtual PipeEnumResult proc(ReferenceTarget *object, IDerivedObject *derObj, int index)=0;

Remarks:

This is the callback procedure for pipeline enumeration. The ReferenceTarget passed to the proc can be a Node, Modifier or Object. In case it is a Modifier the parameter derObj contains the DerivedObject and the index is the index of this modifier in the DerivedObject. In all other cases derObj is NULL and index is 0.

Parameters:

ReferenceTarget *object

Points to the item in the geometry pipeline. This can be a Node, Modifier or Object.

IDerivedObject *derObj

If object above is a Modifier this points to the derived object.

int index

If object aive is a Modifier this is the index of this modifier in the DerivedObject.

Return Value:

One of the following values which determines how the enumeration proceeds:

PIPE_ENUM_CONTINUE

Specifies to continue the enumeration.

PIPE_ENUM_STOP

Specifies to halt the enumeration.