Public Member Functions | Public Attributes | Protected Member Functions

SimpleMod2 Class Reference

This reference page is linked to from the following overview topics: Geometry Modifiers, Simple Modifiers, Exposing and Managing References, Writing Modifier Plug-ins, Managing Modifier Parameters.


Search for all occurrences

Detailed Description

Base class for parameter block 2 (PB2) based object space modifiers.

Note:
Description:
This class is available in release 3.0 and later only.

This is a base class that is intended to be derived from, rather than be instantiated directly.

It manages the same references as class SimpleMod, but it's PB2 based. For more information see class SimpleMod.

#include <simpmod.h>

Inheritance diagram for SimpleMod2:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  SimpleMod2 ()
CoreExport RefTargetHandle  GetReference (int i)
  Returns the 'i-th' reference.
CoreExport Animatable SubAnim (int i)

Public Attributes

IParamBlock2 pblock2

Protected Member Functions

virtual CoreExport  ~SimpleMod2 ()
virtual CoreExport void  SetReference (int i, RefTargetHandle rtarg)
  Stores a ReferenceTarget as its 'i-th' reference`.

Constructor & Destructor Documentation

virtual CoreExport ~SimpleMod2 ( ) [protected, virtual]
SimpleMod2 ( ) [inline]
{ pblock2 = NULL; }

Member Function Documentation

CoreExport RefTargetHandle GetReference ( int  i ) [virtual]

Returns the 'i-th' reference.

The plugin implements this method to return its 'i-th' reference. The plug-in simply keeps track of its references using an integer index for each one. This method is normally called by the system.

Parameters:
i - The index of the reference to retrieve. Valid values are from 0 to NumRefs()-1.
Returns:
The reference handle of the 'i-th' reference. Note that different calls to this method with the same 'i' value can result in different reference handles being retrieved, as the plugin changes the scene objects it references as its 'i-th' reference.

Reimplemented from SimpleMod.

virtual CoreExport void SetReference ( int  i,
RefTargetHandle  rtarg 
) [protected, virtual]

Stores a ReferenceTarget as its 'i-th' reference`.

The plugin implements this method to store the reference handle passed to it as its 'i-th' reference. In its implementation of this method, the plugin should simply assign the reference handle passed in as a parameter to the member variable that holds the 'i-th' reference. Other reference handling methods such as ReferenceMaker::DeleteReference(), or ReferenceMaker::ReplaceReference() should not be called from within this method. The plugin itself or other plugins should not call this method directly. The system will call this method when a new reference is created or an existing one is replaced by calling ReferenceMaker::ReplaceReference().

Parameters:
i - The index of the reference to store. Valid values are from 0 to NumRefs()-1.
rtarg - The reference handle to store.

Reimplemented from SimpleMod.

CoreExport Animatable* SubAnim ( int  i ) [virtual]
Remarks:
This method returns a pointer to the 'i-th' sub-anim. If a plug-in is using a parameter block to manage all its parameters it should just return a pointer to the parameter block itself from this method. This method may return NULL so developers need to check the return value before calling other sub anim methods (such as SubAnimName()).
Parameters:
i This is the index of the sub-anim to return.
Default Implementation:
{ return NULL };

Reimplemented from SimpleMod.


Member Data Documentation


SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2
SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2 SimpleMod2