Sub-Object Centers and TMs

Module description

New way of dealing with sub object coordinate systems.

Plug-in enumerates its centers or TMs and calls the callback once for each. NOTE:cb->Center() should be called the same number of times and in the same order as cb->TM() NOTE: The SubObjAxisCallback class is defined in animatable and used in both the controller version and this version of GetSubObjectCenters() and GetSubObjectTMs()

Functions

virtual void GetSubObjectCenters (SubObjAxisCallback *cb, TimeValue t, INode *node, ModContext *mc)
 When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis. More...
 
virtual void GetSubObjectTMs (SubObjAxisCallback *cb, TimeValue t, INode *node, ModContext *mc)
 When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis. More...
 
virtual void NotifyPreCollapse (INode *node, IDerivedObject *derObj, int index)
 This method is called before a modifier or object is collapsed. More...
 
virtual void NotifyPostCollapse (INode *node, Object *obj, IDerivedObject *derObj, int index)
 This method is called after a modifier or object is collapsed. More...
 
virtual int NumSubObjTypes ()
 Objects and modifiers that support subobjects have to overwrite this method - as well as GetSubObjType() - and return a class derived from ISubObjType in GetSubObjType(). More...
 
virtual ISubObjTypeGetSubObjType (int i)
 Returns a pointer to the sub-object type for the sub-object whose index is passed. More...
 
virtual CoreExport int GetSubObjectLevel ()
 This method returns an integer which indicates the current sub-object level of the modifier or base object. More...
 

Function Documentation

virtual void GetSubObjectCenters ( SubObjAxisCallback cb,
TimeValue  t,
INode node,
ModContext mc 
)
inlinevirtual

When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis.

This method specifies the position of the center. The plug-in enumerates its centers and calls the callback cb once for each.

Parameters
cbThe callback object whose methods may be called. See Class SubObjAxisCallback.
tThe time to enumerate the centers.
nodeA pointer to the node.
mcA pointer to the ModContext.

Reimplemented in PatchObject, SplineShape, and SimpleMod.

1003 {}
virtual void GetSubObjectTMs ( SubObjAxisCallback cb,
TimeValue  t,
INode node,
ModContext mc 
)
inlinevirtual

When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis.

This method returns the axis system of the reference coordinate system. The plug-in enumerates its TMs and calls the callback cb once for each. See Sub-Object Coordinate Systems.

Parameters
cbThe callback object whose methods may be called.
tThe time to enumerate the TMs.
nodeA pointer to the node.
mcA pointer to the ModContext.

Reimplemented in PatchObject, SplineShape, and SimpleMod.

1015 {}
virtual void NotifyPreCollapse ( INode node,
IDerivedObject derObj,
int  index 
)
inlinevirtual

This method is called before a modifier or object is collapsed.

See also
Class NotifyCollapseEnumProc.
Parameters
nodePoints to the node for the object being collapsed.
derObjIf the object associated with node above is a Modifier this points to the derived object.If it's an object then this is NULL.
indexIf the object associated with node above is a Modifier this is the index of this modifier in the DerivedObject.. If it's an object then this is 0.
1096 {};
virtual void NotifyPostCollapse ( INode node,
Object obj,
IDerivedObject derObj,
int  index 
)
inlinevirtual

This method is called after a modifier or object is collapsed.

See also
Class NotifyCollapseEnumProc.
Parameters
nodePoints to the node for the object being collapsed.
obj
derObjIf the object associated with node above is a Modifier this points to the derived object. If it's an object then this is NULL.
indexIf the object associated with node above is a Modifier this is the index of this modifier in the DerivedObject. If it's an object then this is 0.
1106 {};
virtual int NumSubObjTypes ( )
inlinevirtual

Objects and modifiers that support subobjects have to overwrite this method - as well as GetSubObjType() - and return a class derived from ISubObjType in GetSubObjType().

Developers can use the GenSubObjType for convenience. If the parameter passed into GetSubObjType is -1, the system requests a ISubObjType, for the current SubObjectLevel that flows up the modifier stack. If the subobject selection of the modifier or base object does not affect the subobj selection that flows up the stack, the method must return NULL. See meshsel.cpp for a sample implementation.

Returns
The number of sub-object types supported by the object or modifier.

Reimplemented in PatchObject, SplineShape, and SimpleMod.

1119 { return 0;}
virtual ISubObjType* GetSubObjType ( int  i)
inlinevirtual

Returns a pointer to the sub-object type for the sub-object whose index is passed.

If the parameter i passed is -1 the system requests an ISubObjType for the current SubObjectLevel that flows up the modifier stack. If the subobject selection of the modifier or base object does not affect the sub-object selection that flows up the stack NULL must be returned. See the sample code in /MAXSDK/SAMPLES/MODIFIERS/MESHSEL.CPP.

Parameters
iThe zero based index of the sub-object type to get. See the remarks above.
Returns
The sub-object type. See Class ISubObjType.

Reimplemented in PatchObject, SplineShape, and SimpleMod.

1130 { return NULL; }
#define NULL
Definition: autoptr.h:20
virtual CoreExport int GetSubObjectLevel ( )
virtual

This method returns an integer which indicates the current sub-object level of the modifier or base object.

Returns
A value of 0 indicates object level. A value of 1 through NumSubObjTypes() are the sub-object levels in the same order as they are returned by GetSubObjType(int i) (with an offset of 1 of course).