Public Member Functions

IDerivedObject Class Reference

This reference page is linked to from the following overview topics: Pipeline Overview, World-Space Modifiers.


Search for all occurrences

Detailed Description

See also:
Class Object, Class ModContext, Class Modifier, Class INode, Geometry Pipeline System.

Description:
This class provides an interface into derived objects. Methods of this class are provided so developers can access the modifier stack, add and delete modifiers, etc. All methods of this class are implemented by the system.

To use this interface you must #include the following file:

#include "modstack.h"

To get an IDerivedObject pointer from the pipeline of a node in the scene first retrieve the object reference using INode::GetOjbectRef(). Given this Object pointer check its SuperClassID to see if it is GEN_DERIVOB_CLASS_ID. If it is, you can cast it to an IDerivedObject.

Note: The following functions are not part of class IDerivedObject but are available for use in conjunction with its methods.

#include <modstack.h>

Inheritance diagram for IDerivedObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  AddModifier (Modifier *mod, ModContext *mc=NULL, int before=0)=0
virtual void  DeleteModifier (int index=0)=0
virtual int  NumModifiers ()=0
virtual Object GetObjRef ()=0
virtual RefResult  ReferenceObject (Object *pob)=0
virtual Modifier GetModifier (int index)=0
virtual void  SetModifier (int index, Modifier *mod)=0
virtual ModContext GetModContext (int index)=0
virtual ObjectState  Eval (TimeValue t, int modIndex=0)=0
void  NotifyTarget (int msg, RefMakerHandle rm)
virtual CoreExport void *  GetInterface (ULONG id)
  Inherited from Animatable.

Member Function Documentation

virtual void AddModifier ( Modifier mod,
ModContext mc = NULL,
int  before = 0 
) [pure virtual]
Remarks:
Adds a modifier to this derived object.
Parameters:
Modifier *mod

The modifier to add.

ModContext *mc=NULL

The mod context for the modifier.

int before=0

If this value is set to 0 then the modifier will be placed at the end of the pipeline (top of stack). If this value is set to NumModifiers() then the modifier will be placed at the start of the pipeline (bottom of stack).
virtual void DeleteModifier ( int  index = 0 ) [pure virtual]
Remarks:
Deletes the specified modifier from the stack.
Parameters:
int index=0

The index of the modifier to delete.
virtual int NumModifiers ( ) [pure virtual]
Remarks:
Returns the number of modifiers this derived object has.
virtual Object* GetObjRef ( ) [pure virtual]
Remarks:
Gets the object that this derived object references. This is the next object down in the stack and may be the base object.
Returns:
The object that this derived object references.
virtual RefResult ReferenceObject ( Object pob ) [pure virtual]
Remarks:
Sets the object that this derived object references. This is the next object down in the stack and may be the base object.
Parameters:
Object *pob

The object that this derived object should reference.
Returns:
One of the following values:

REF_SUCCEED

REF_FAIL
virtual Modifier* GetModifier ( int  index ) [pure virtual]
Remarks:
Returns the modifier specified by the index.
Parameters:
int index

The index of the modifier to return.
virtual void SetModifier ( int  index,
Modifier mod 
) [pure virtual]
Remarks:
This method replaces the modifier in the stack whose index is passed.
Parameters:
int index

The index of the modifier in the stack.

Modifier *mod

The modifier that will replace it.
virtual ModContext* GetModContext ( int  index ) [pure virtual]
Remarks:
Returns the ModContext of the specified modifier.
Parameters:
int index

The index of the modifier in the stack.
virtual ObjectState Eval ( TimeValue  t,
int  modIndex = 0 
) [pure virtual]
Remarks:
This method is available in release 4.0 and later only.

This method allows you to evaluate the pipeline starting with a specific modifier index. Prior to version 4.0 you had to turn all the modApps off, evaluate and then turn them on again. Now this can be easily done by specifying the modifier index.
Parameters:
TimeValue t

Specifies the time to evaluate the object.

int modIndex = 0

The index of the modifier.
Returns:
The result of evaluating the object as an ObjectState.
void NotifyTarget ( int  msg,
RefMakerHandle  rm 
) [inline]
virtual CoreExport void* GetInterface ( ULONG  id ) [virtual]

Inherited from Animatable.

Returns a pointer to the interface.

Parameters:
id - The id of the interface.
Returns:
A Pointer to the Interface

Reimplemented from Object.


IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject
IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject IDerivedObject