#include <gizmo.h>
Public Member Functions |
|
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) |
Protected Member Functions |
|
virtual void | SetReference (int i, RefTargetHandle rtarg) |
Stores a
ReferenceTarget as its 'i-th' reference`. |
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().
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.
: CoreExport RefResult NotifyRefChanged(Interval changeInt,RefTargetHandle hTarget,
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.
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. |
Implements ReferenceMaker.
Interval ObjectValidity | ( | TimeValue | t | ) | [inline, virtual] |
Reimplemented from Object.
Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.
{}
virtual void InvalidateUI | ( | ) | [inline, virtual] |
void SphereGizmoObject::InvalidateUI() { if (pmapParam) pmapParam->Invalidate(); }
Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.
{return defaultDim;}
virtual ParamDimension* GetParameterDim | ( | int | pbIndex | ) | [inline, virtual] |
ParamDimension *SphereGizmoObject::GetParameterDim(int pbIndex) { switch (pbIndex) { case PB_GIZMO_RADIUS: return stdWorldDim; default: return defaultDim; } }
Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.
{return MSTR(_M("Parameter"));}
virtual MSTR GetParameterName | ( | int | pbIndex | ) | [inline, virtual] |
Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.
{}
virtual void DrawGizmo | ( | TimeValue | t, |
GraphicsWindow * | gw | ||
) | [inline, virtual] |
Reimplemented in SphereGizmoObject, CylGizmoObject, and BoxGizmoObject.
{ return GetUIColor(COLOR_ATMOS_APPARATUS); } // mjm - 4.20.99
virtual Point3 WireColor | ( | ) | [inline, virtual] |
{}
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.