GizmoObject Class Reference
 
 
 
GizmoObject Class Reference

#include <gizmo.h>

Inheritance diagram for GizmoObject:
HelperObject Object BaseObject ReferenceTarget ReferenceMaker Animatable InterfaceServer Noncopyable MaxHeapOperators MaxHeapOperators BoxGizmoObject CylGizmoObject SphereGizmoObject

Class Description

See also:
Class HelperObject, Class IParamMap, Class IParamBlock, Class Interface, Class ParamDimension.

Description:
This is the base class for the creation of atmospheric gizmo objects. It provides implementations of most of the methods needed. Developers will probably want to provide their own implementations of BeginEditParams() and EndEditParams() and call the GizmoObject implementations from within their implementation. See the source code for GizmoObject in /MAXSDK/SAMPLES/HOWTO/MISC/GIZMO.CPP to see how the base class methods are implemented.

Note that developers must use the data members below as the base class code relies on these being used.
Data Members:
IParamBlock *pblock;

This is a pointer to the parameter block that should be used to manage the animated parameters of the gizmo object.

static IParamMap *pmapParam;

This is a pointer to the parameter map that should be used to manage the user interface for the gizmo object.

static IObjParam *ip;

This is the interface pointer for the gizmo object.

static GizmoObject *editOb;

This is a pointer to the current gizmo object being edited in the command panel. When BeginEditParams() is called, this pointer is set to the this pointer of the GizmoObject being edited.

Public Member Functions

CoreExport  GizmoObject ()
CoreExport  ~GizmoObject ()
CoreExport void  BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev)
CoreExport void  EndEditParams (IObjParam *ip, ULONG flags, Animatable *next)
CoreExport int  HitTest (TimeValue t, INode *inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt)
  This method is called to determine if the specified screen point intersects the item.
CoreExport int  Display (TimeValue t, INode *inode, ViewExp *vpt, int flags)
  This is called by the system to have the item display itself (perform a quick render in viewport, using the current TM).
ObjectState  Eval (TimeValue time)
  This method is called to evaluate the object and return the result as an ObjectState.
void  InitNodeName (MSTR &s)
  Implemented by the System.
CoreExport int  CanConvertToType (Class_ID obtype)
  Indicates whether the object can be converted to the specified type.
CoreExport Object ConvertToType (TimeValue t, Class_ID obtype)
  This method converts this object to the type specified and returns a pointer it.
CoreExport void  GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box)
  This method returns the world space bounding box for Objects (see below for the Sub-object gizmo or Modifiers gizmo version).
CoreExport void  GetLocalBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box)
  This is the object space bounding box, the box in the object's local coordinates.
CoreExport void  GetDeformBBox (TimeValue t, Box3 &box, Matrix3 *tm, BOOL useSel)
  This method computes the bounding box in the objects local coordinates or the optional space defined by tm.
int  NumSubs ()
Animatable SubAnim (int i)
MSTR  SubAnimName (int i)
int  NumRefs ()
  Returns the total number of references this ReferenceMaker can hold.
RefTargetHandle  GetReference (int i)
  Returns the 'i-th' reference.
CoreExport RefResult  NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message)
  Receives and responds to messages.
Interval  ObjectValidity (TimeValue t)
virtual void  InvalidateUI ()
virtual ParamDimension GetParameterDim (int pbIndex)
virtual MSTR  GetParameterName (int pbIndex)
virtual void  DrawGizmo (TimeValue t, GraphicsWindow *gw)
virtual Point3  WireColor ()
virtual void  GetBoundBox (Matrix3 &mat, TimeValue t, Box3 &box)

Public Attributes

IParamBlock pblock

Static Public Attributes

static IParamMap pmapParam
static IObjParam ip
static CoreExport GizmoObject editOb

Protected Member Functions

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

Constructor & Destructor Documentation

CoreExport GizmoObject ( )
Remarks:
Constructor. The parameter block pointer is set to NULL.
CoreExport ~GizmoObject ( )
Remarks:
Destructor. All references are deleted from the gizmo object.

Member Function Documentation

CoreExport void BeginEditParams ( IObjParam ip,
ULONG  flags,
Animatable prev 
) [virtual]
Remarks:
This method is called by the system when the user may edit the item's (object, modifier, controller, etc.) parameters.
Parameters:
ip Interface pointer. The developer can use it to call methods such as AddRollupPage(). Note that this pointer is only valid between BeginEditParams() and EndEditParams(). It should not be used outside this interval.
flags Describe which branch of the command panel or dialog the item is being edited in. The following are possible values:

BEGIN_EDIT_CREATE
Indicates an item is being edited in the create branch.

BEGIN_EDIT_MOTION
Indicates a controller is being edited in the motion branch.

BEGIN_EDIT_HIERARCHY
Indicates a controller is being edited in the Pivot subtask of the hierarchy branch.

BEGIN_EDIT_IK
Indicates a controller is being edited in the IK subtask of the hierarchy branch.

BEGIN_EDIT_LINKINFO
Indicates a controller is being edited in the Link Info subtask of the hierarchy branch.

prev Pointer to an Animatable object. This parameter may be used in the motion and hierarchy branches of the command panel. This pointer allows a plug-in to look at the ClassID of the previous item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel, but simply update the values displayed in the UI fields. This prevents the UI from 'flickering' when the current item begins its edit. For example, if you are in the motion branch and are looking at an item's PRS controller values, and then select another item that is displayed with a PRS controller, the UI will not change - only the values displayed in the fields will change. If however you selected a target camera that has a lookat controller (not a PRS controller) the UI will change because a different set of parameters need to be displayed. Note that for items that are edited in the modifier branch this field can be ignored.

Reimplemented from Animatable.

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

CoreExport void EndEditParams ( IObjParam ip,
ULONG  flags,
Animatable next 
) [virtual]
Remarks:
This method is called when the user is finished editing an objects parameters. The system passes a flag into the EndEditParams() method to indicate if the rollup page should be removed. If this flag is TRUE, the plug-in must un-register the rollup page, and delete it from the panel.
Parameters:
ip An interface pointer. The developer may use the interface pointer to call methods such as DeleteRollupPage().

flags The following flag may be set:

END_EDIT_REMOVEUI
If TRUE, the item's user interface should be removed.

next Animatable pointer. Can be used in the motion and hierarchy branches of the command panel. It allows a plug-in to look at the ClassID of the next item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel. Note that for items that are edited in the modifier branch this field can be ignored.

Reimplemented from Animatable.

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

CoreExport int HitTest ( TimeValue  t,
INode inode,
int  type,
int  crossing,
int  flags,
IPoint2 p,
ViewExp vpt 
) [virtual]

This method is called to determine if the specified screen point intersects the item.

The method returns nonzero if the item was hit; otherwise 0.

Parameters:
t The time to perform the hit test.
inode A pointer to the node to test.
type The type of hit testing to perform. See Scene and Node Hit Test Types. for details.
crossing The state of the crossing setting. If TRUE crossing selection is on.
flags The hit test flags. See Scene and Node Hit Testing Flags for details.
p The screen point to test.
vpt An interface pointer that may be used to call methods associated with the viewports.
Returns:
Nonzero if the item was hit; otherwise 0.

Reimplemented from BaseObject.

CoreExport int Display ( TimeValue  t,
INode inode,
ViewExp vpt,
int  flags 
) [virtual]

This is called by the system to have the item display itself (perform a quick render in viewport, using the current TM).

Note: For this method to be called the object's validity interval must be invalid at the specified time t. If the interval is valid, the system may not call this method since it thinks the display is already valid.

Parameters:
t The time to display the object.
inode The node to display.
vpt An interface pointer that may be used to call methods associated with the viewports.
flags See Display Flags.
Returns:
The return value is not currently used.

Reimplemented from BaseObject.

ObjectState Eval ( TimeValue  t ) [inline, virtual]

This method is called to evaluate the object and return the result as an ObjectState.

When the system has a pointer to an object it doesn't know if it's a procedural object or a derived object. So it calls Eval() on it and gets back an ObjectState. A derived object managed by the system may have to call Eval() on its input for example. A plug-in (like a procedural object) typically just returns itself. A plug-in that does not just return itself is the Morph Object (/MAXSDK/SAMPLES/OBJECTS/MORPHOBJ.CPP). This object uses a morph controller to compute a new object and fill in an ObjectState which it returns.

Parameters:
t Specifies the time to evaluate the object.
Returns:
The result of evaluating the object as an ObjectState.
Sample Code:
Typically this method is implemented as follows:
        { return ObjectState(this); }

Implements Object.

{return ObjectState(this);}
void InitNodeName ( MSTR s ) [inline, virtual]

Implemented by the System.

Sets the default node name to "Helper".

Reimplemented from HelperObject.

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

{s = GetObjectName();}          
CoreExport int CanConvertToType ( Class_ID  obtype ) [virtual]

Indicates whether the object can be converted to the specified type.

If the object returns nonzero to indicate it can be converted to the specified type, it must handle converting to and returning an object of that type from ConvertToType().

See also:
Class ObjectConverter for additional details on converting objects between types.
Parameters:
obtype The Class_ID of the type of object to convert to. See Class Class_ID, List of Class_IDs.
Returns:
Nonzero if the object can be converted to the specified type; otherwise 0.
Default Implementation:
{ return 0; }

Reimplemented from Object.

CoreExport Object* ConvertToType ( TimeValue  t,
Class_ID  obtype 
) [virtual]

This method converts this object to the type specified and returns a pointer it.

Note that if ConvertToType() returns a new object it should be a completely different object with no ties (pointers or references) to the original.

See also:
class ObjectConverter for additional details on converting objects between types.
The following is an issue that developers of world space modifiers need to
be aware of if the world space modifier specifies anything but generic deformable objects as its input type. In other words, if a world space modifier, in its implementation of Modifier::InputType(), doesn't specifically return defObjectClassID then the following issue regarding the 3ds Max pipeline needs to be considered. Developers of other plug-ins that don't meet this condition don't need to be concerned with this issue.
World space modifiers that work on anything other than generic deformable
objects are responsible for transforming the points of the object they modify into world space using the ObjectState TM. To understand why this is necessary, consider how 3ds Max applies the node transformation to the object flowing down the pipeline.
In the geometry pipeline architecture, the node in the scene has its
transformation applied to the object in the pipeline at the transition between the last object space modifier and the first world space modifier. The node transformation is what places the object in the scene -- thus this is what puts the object in world space. The system does this by transforming the points of the object in the pipeline by the node transformation. This is only possible however for deformable objects. Deformable objects are those that support the Object::IsDeformable(), NumPoints(), GetPoint() and SetPoint() methods. These deformable objects can be deformed by the system using these methods, and thus the system can modify the points to put them in world space itself.
If a world space modifier does not specify that it works on deformable
objects, the system is unable to transform the points of the object into world space. What it does instead is apply the transformation to the ObjectState TM. In this case, a world space modifier is responsible for transforming the points of the object into world space itself, and then setting the ObjectState TM to the identity. There is an example of this in the sample code for the Bomb space warp. The Bomb operates on TriObjects and implements InputType() as { return Class_ID(TRIOBJ_CLASS_ID,0); }. Since it doesn't specifically return defObjectClassID, it is thus responsible for transforming the points of the object into world space itself. It does this in its implementation of ModifyObject() as follows:
        if (os->GetTM())
        {
                Matrix3 tm = *(os->GetTM());
                for (int i=0; i<triOb->mesh.getNumVerts(); i++) {
                        triOb->mesh.verts[i] = triOb->mesh.verts[i] *tm;
                }
                os->obj->UpdateValidity(GEOM_CHAN_NUM,os->tmValid());
                os->SetTM(NULL,FOREVER);
        }
As the code above shows, the Bomb checks if the ObjectState TM is non-NULL. If it is, the points of the object are still not in world space and thus must be transformed. It does this by looping through the points of the TriObject and multiplying each point by the ObjectState TM. When it is done, it sets the ObjectState TM to NULL to indicate the points are now in world space. This ensure that any later WSMs will not transform the points with this matrix again.
For the Bomb world space modifier this is not a problem since it specifies
in its implementation of ChannelsChanged() that it will operate on the geometry channel (PART_GEOM). Certain world space modifiers may not normally specify PART_GEOM in their implementation of ChannelsChanged(). Consider the camera mapping world space modifier. Its function is to apply mapping coordinates to the object it is applied to. Thus it would normally only specify PART_TEXMAP for ChannelsChanged(). However, since it operates directly on TriObjects, just like the Bomb, the system cannot transform the points into world space, and therefore the camera mapping modifier must do so in its implementation of ModifyObject(). But since it is actually altering the points of the object by putting them into world space it is altering the geometry channel. Therefore, it should really specify PART_GEOM | PART_TEXMAP in its implementation of ChannelsChanged(). If it didn't do this, but went ahead and modified the points of the object anyway, it would be transforming not copies of the points, but the original points stored back in an earlier cache or even the base object.
This is the issue developers need to be aware of. To state this in simple
terms then: Any world space modifier that needs to put the points of the object into world space (since it doesn't implement InputType() as defObjectClassID) needs to specify PART_GEOM in its implementation of ChannelsChanged().
Parameters:
t The time at which to convert.
obtype The Class_ID of the type of object to convert to. See Class Class_ID, List of Class_IDs.
Returns:
A pointer to an object of type obtype.
Default Implementation:
{ return NULL; }
Sample Code:
The following code shows how a TriObject can be retrieved from a node. Note on the code that if you call ConvertToType() on an object and it returns a pointer other than itself, you are responsible for deleting that object.
        // Retrieve the TriObject from the node
        int deleteIt;
        TriObject *triObject = GetTriObjectFromNode(ip->GetSelNode(0),deleteIt);
        // Use the TriObject if available
        if (!triObject) return;
        // ...
        // Delete it when done...
        if (deleteIt) triObject->DeleteMe();
        
        // Return a pointer to a TriObject given an INode or return NULL
        // if the node cannot be converted to a TriObject
        TriObject *Utility::GetTriObjectFromNode(INode *node, int &deleteIt)
        {
                deleteIt = FALSE;
                Object *obj = node->EvalWorldState(0).obj;
                if (obj->CanConvertToType(Class_ID(TRIOBJ_CLASS_ID, 0))) {
                        TriObject *tri = (TriObject *) obj->ConvertToType(0,Class_ID(TRIOBJ_CLASS_ID, 0));
        // Note that the TriObject should only be deleted
        // if the pointer to it is not equal to the object
        // pointer that called ConvertToType()
                        if (obj != tri) 
                                deleteIt = TRUE;
                        return tri;
                }
                else {
                        return NULL;
                }
        }

Reimplemented from Object.

CoreExport void GetWorldBoundBox ( TimeValue  t,
INode inode,
ViewExp vp,
Box3 box 
) [virtual]

This method returns the world space bounding box for Objects (see below for the Sub-object gizmo or Modifiers gizmo version).

The bounding box returned by this method does not need to be precise. It should however be calculated rapidly. The object can handle this by transforming the 8 points of its local bounding box into world space and take the minimums and maximums of the result. Although this isn't necessarily the tightest bounding box of the objects points in world space, it is close enough.

Parameters:
t The time to compute the bounding box.
inode The node to calculate the bounding box for.
vp An interface pointer that can be used to call methods associated with the viewports.
box Contains the returned bounding box.

Reimplemented from BaseObject.

CoreExport void GetLocalBoundBox ( TimeValue  t,
INode inode,
ViewExp vp,
Box3 box 
) [virtual]

This is the object space bounding box, the box in the object's local coordinates.

The system expects that requesting the object space bounding box will be fast.

Parameters:
t The time to retrieve the bounding box.
inode The node to calculate the bounding box for.
vp An interface pointer that may be used to call methods associated with the viewports.
box Contains the returned bounding box.

Reimplemented from BaseObject.

CoreExport void GetDeformBBox ( TimeValue  t,
Box3 box,
Matrix3 tm,
BOOL  useSel 
) [virtual]

This method computes the bounding box in the objects local coordinates or the optional space defined by tm.

Note: If you are looking for a precise bounding box, use this method and pass in the node's object TM (INode::GetObjectTM()) as the matrix.

Parameters:
t The time to compute the box.
box A reference to a box the result is stored in.
tm This is an alternate coordinate system used to compute the box. If the tm is not NULL this matrix should be used in the computation of the result.
useSel If TRUE, the bounding box of selected sub-elements should be computed; otherwise the entire object should be used.

Reimplemented from Object.

int NumSubs ( ) [inline, virtual]
Remarks:
The system uses a virtual array mechanism to access the sub-anims of a plug-in. This method returns the total number of sub-anims maintained by the plug-in. If a plug-in is using a parameter block to manage its parameters it should just return 1 for all the parameters directed by the parameter block.
Returns:
The number of sub-anims used by the plug-in.
Default Implementation:
{ return 0; }

Reimplemented from Animatable.

{ return 1; }
Animatable* SubAnim ( int  i ) [inline, 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 Animatable.

{ return (Animatable*) pblock; }
MSTR SubAnimName ( int  i ) [inline, virtual]
Remarks:
This method returns the name of the 'i-th' sub-anim to appear in track view. The system has no idea what name to assign to the sub-anim (it only knows it by the virtual array index), so this method is called to retrieve the name to display. Developer need to make sure the 'i-th' SubAnim() is non-NULL or this method will fail.
Parameters:
i The index of the parameter name to return
Returns:
The name of the 'i-th' parameter.

Reimplemented from Animatable.

{return _M("Parameters");}
int NumRefs ( ) [inline, virtual]

Returns the total number of references this ReferenceMaker can hold.

The plugin implements this method to indicate the total number of of references it can make. This includes all references whether they are NULL (inactive) or non-NULL (active) at the time when this method is called. A plugin can hold a variable number of references, thus the return value of this method is not to be cached and reused by client code.

Returns:
The total number of references this plugin can hold. The default implementation is return 0.

Reimplemented from ReferenceMaker.

{return 1;}
RefTargetHandle GetReference ( int  i ) [inline, 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 ReferenceMaker.

{return (ReferenceTarget*)pblock;}
virtual void SetReference ( int  i,
RefTargetHandle  rtarg 
) [inline, 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 ReferenceMaker.

{pblock=(IParamBlock*)rtarg;}           
CoreExport RefResult NotifyRefChanged ( Interval  changeInt,
RefTargetHandle  hTarget,
PartID partID,
RefMessage  message 
) [virtual]

Receives and responds to messages.

A plugin which makes references must implement a method to receive and respond to messages broadcast by its dependents. This is done by implementing NotifyRefChanged(). The plugin developer usually implements this method as a switch statement where each case is one of the messages the plugin needs to respond to. The Method StdNotifyRefChanged calls this, which can change the partID to new value. If it doesn't depend on the particular message& partID, it should return REF_DONTCARE.

  • For developer that need to update a dialog box with data about an object you reference note the following related to this method: This method may be called many times. For instance, say you have a dialog box that displays data about an object you reference. This method will get called many time during the drag operations on that object. If you updated the display every time you'd wind up with a lot of 'flicker' in the dialog box. Rather than updating the dialog box each time, you should just invalidate the window in response to the NotifyRefChanged() call. Then, as the user drags the mouse your window will still receive paint messages. If the scene is complex the user may have to pause (but not let up on the mouse) to allow the paint message to go through since they have a low priority. This is the way many windows in 3ds Max work.
Parameters:
changeInt - This is the interval of time over which the message is active. Currently, all plug-ins will receive FOREVER for this interval.
hTarget - This is the handle of the reference target the message was sent by. The reference maker uses this handle to know specifically which reference target sent the message.
partID - This contains information specific to the message passed in. Some messages don't use the partID at all. See the section List of Reference Messages for more information about the meaning of the partID for some common messages.
message - The message parameters passed into this method is the specific message which needs to be handled.
Returns:
The return value from this method is of type RefResult. This is usually REF_SUCCEED indicating the message was processed. Sometimes, the return value may be REF_STOP. This return value is used to stop the message from being propagated to the dependents of the item.

Implements ReferenceMaker.

Interval ObjectValidity ( TimeValue  t ) [inline, virtual]
Remarks:
Returns the validity interval of the gizmo object around the specified time.
Parameters:
TimeValue t

Specifies the time at which the gizmo validity is returned.
Default Implementation:
{return FOREVER;}

Reimplemented from Object.

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

{return FOREVER;}               
virtual void InvalidateUI ( ) [inline, virtual]
Remarks:
Invalidates the user interface for the gizmo so it will get redrawn on the next screen update.
Default Implementation:
{}
Sample Code:
This is the code from the Sphere GizmoObject implementation of this method. Note that it simply calls Invalidate() on the parameter map.

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

{}
virtual ParamDimension* GetParameterDim ( int  pbIndex ) [inline, virtual]
Remarks:
Returns the dimension of the parameter whose parameter block index is passed.
Parameters:
int pbIndex

Specifies which parameter name to return.
Default Implementation:
{return defaultDim;}
Sample Code:
                ParamDimension *SphereGizmoObject::GetParameterDim(int pbIndex) {
                        switch (pbIndex) {
                                case PB_GIZMO_RADIUS: return stdWorldDim;
                                default: return defaultDim;
                        }
                }

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

{return defaultDim;}
virtual MSTR GetParameterName ( int  pbIndex ) [inline, virtual]
Remarks:
Returns the name of the parameter whose parameter block index is passed.
Parameters:
int pbIndex

Specifies which parameter name to return.
Default Implementation:
{return MSTR(_M("Parameter"));}

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

{return MSTR(_M("Parameter"));}
virtual void DrawGizmo ( TimeValue  t,
GraphicsWindow gw 
) [inline, virtual]
Remarks:
This method is called to draw the gizmo at the specified time into the specified viewport.
Parameters:
TimeValue t

The time to draw the gizmo.

GraphicsWindow *gw

The GraphicsWindow associated with the viewport in which to draw the gizmo.
Default Implementation:
{}

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

{}
virtual Point3 WireColor ( ) [inline, virtual]
Remarks:
Returns the wire frame color for the gizmo in the viewports.
Default Implementation:
{return Point3(1,1,0);}
virtual void GetBoundBox ( Matrix3 mat,
TimeValue  t,
Box3 box 
) [inline, virtual]
Remarks:
Returns the bounding box for the gizmo, as transformed by the matrix passed, at the time passed.
Parameters:
Matrix3 &mat

The points of the gizmo object should be transformed by this matrix before the bounding box is computed from them.

TimeValue t

The time to compute the bounding box.

Box3 &box

The result is stored here.
Default Implementation:
{}
Sample Code:
                void SphereGizmoObject::GetBoundBox(Matrix3 &mat, TimeValue t, Box3 &box) {
                        float radius;
                        int hemi;
                        pblock->GetValue(PB_GIZMO_RADIUS,t,radius,FOREVER);
                        pblock->GetValue(PB_GIZMO_HEMI,t,hemi,FOREVER);
                        BoxLineProc proc(&mat);
                        DrawSphere(proc,radius,hemi);
                        box += proc.Box();
                }

Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.

{}

Member Data Documentation