#include <dummy.h>
Public Member Functions |
|
CoreExport | DummyObject () |
CoreExport Box3 | GetBox () const |
CoreExport void | SetBox (Box3 &b) |
CoreExport void | SetColor (Point3 color) |
CoreExport void | EnableDisplay () |
CoreExport void | DisableDisplay () |
CoreExport void | SetValidity (Interval v) |
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 void | Snap (TimeValue t, INode *inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt) |
Checks the point passed for a snap and
updates the SnapInfo
structure. |
|
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). |
|
CoreExport CreateMouseCallBack * | GetCreateMouseCallBack () |
This method allows the system to retrieve a
callback object used in creating an object in the 3D viewports.
|
|
CoreExport RefTargetHandle | Clone (RemapDir &remap) |
This method is used by 3ds Max to clone an
object. |
|
Interval | ObjectValidity (TimeValue t) |
This method returns the validity interval of
the object as a whole at the specified time. |
|
CoreExport 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. |
|
int | DoOwnSelectHilite () |
If an object wants to draw itself in the 3D
viewports in its selected state in some custom manner this method
should return nonzero. |
|
int | IsRenderable () |
Implemented by the System. |
|
MCHAR * | GetObjectName () |
CoreExport void | GetWorldBoundBox (TimeValue t, INode *mat, 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 *mat, 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=FALSE) |
This method computes the bounding box in the
objects local coordinates or the optional space defined by tm.
|
|
CoreExport IOResult | Save (ISave *isave) |
Called for saving data. |
|
CoreExport IOResult | Load (ILoad *iload) |
Called for loading data. |
|
CoreExport void | RescaleWorldUnits (float f) |
Rescale size of all world units in reference
hierarchy. |
|
CoreExport void | DeleteThis () |
Deletes an instance of this class. |
|
Class_ID | ClassID () |
Retrieves a constant that uniquely
identifies the plugin class. |
|
void | GetClassName (MSTR &s) |
Retrieves the name of the plugin class.
|
|
int | IsKeyable () |
LRESULT CALLBACK | TrackViewWinProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
This function is obsolete. |
|
Friends |
|
class | LuminaireObject |
class | LuminaireObjectCreateCallBack |
class | DummyObjectCreateCallBack |
class | CharacterObject |
INT_PTR CALLBACK | DummyParamDialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) |
CoreExport DummyObject | ( | ) |
CoreExport Box3 GetBox | ( | ) | const |
CoreExport void SetBox | ( | Box3 & | b | ) |
CoreExport void SetColor | ( | Point3 | color | ) |
CoreExport void EnableDisplay | ( | ) |
CoreExport void DisableDisplay | ( | ) |
CoreExport void SetValidity | ( | Interval | v | ) |
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.
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. |
Reimplemented from BaseObject.
CoreExport void Snap | ( | TimeValue | t, |
INode * | inode, | ||
SnapInfo * | snap, | ||
IPoint2 * | p, | ||
ViewExp * | vpt | ||
) | [virtual] |
Checks the point passed for a snap and updates the SnapInfo structure.
t | The time to check. |
inode | The node to check. |
snap | The snap info structure to update. |
p | The screen point to check. |
vpt | An interface pointer that may be used to call methods associated with the viewports. |
Reimplemented from BaseObject.
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.
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. |
Reimplemented from BaseObject.
CoreExport CreateMouseCallBack* GetCreateMouseCallBack | ( | ) | [virtual] |
This method allows the system to retrieve a callback object used in creating an object in the 3D viewports.
This method returns a pointer to an instance of a class derived from CreateMouseCallBack. This class has a method proc() which is where the programmer defines the user/mouse interaction during the object creation phase.
Implements BaseObject.
CoreExport RefTargetHandle Clone | ( | RemapDir & | remap | ) | [virtual] |
This method is used by 3ds Max to clone an object.
class MyDerivedPlugin : public MyBasePlugin { const int MY_REFERENCE = 1; ReferenceTarget* Clone(RemapDir& remap) { ReferenceTarget* result = new MyDerivedPlugin(); BaseClone(this, result, remap); return result; } void BaseClone(ReferenceTarget* from, ReferenceTarget* to, RemapDir& remap) { if (!to || !from || from == to) return; MyBasePlugin::BaseClone(from, to, remap); to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE))); } };
This method should not be directly called by plug-ins. Instead, either RemapDir::CloneRef() or CloneRefHierachy() should be used to perform cloning. These methods ensure that the mapping from the original object to the clone is added to the RemapDir used for cloning, which may be used during backpatch operations
remap | - A RemapDir instance used for remapping references during a Clone. |
Reimplemented from ReferenceTarget.
Interval ObjectValidity | ( | TimeValue | t | ) | [inline, virtual] |
This method returns the validity interval of the object as a whole at the specified time.
t | The time to compute the validity interval. |
Reimplemented from Object.
{ return valid; }
CoreExport ObjectState Eval | ( | TimeValue | t | ) | [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.
t | Specifies the time to evaluate the object. |
{ return ObjectState(this); }
Implements Object.
void InitNodeName | ( | MSTR & | s | ) | [virtual] |
int DoOwnSelectHilite | ( | ) | [inline, virtual] |
If an object wants to draw itself in the 3D viewports in its selected state in some custom manner this method should return nonzero.
If this item returns nonzero, the BaseObject::Display() method should respect the selected state of the object when it draws itself. If this method returns zero the system will use its standard method of showing the object as selected.
Reimplemented from Object.
{return 1; }
int IsRenderable | ( | ) | [inline, virtual] |
Implemented by the System.
Returns 0 to indicate this object type may not be rendered.
Reimplemented from HelperObject.
{ return 0; }
MCHAR* GetObjectName | ( | ) | [virtual] |
Reimplemented from BaseObject.
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.
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.
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.
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 =
FALSE |
||
) | [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.
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.
Called for saving data.
Called by the system to allow the plugin to save its data.
isave | - This pointer may be used to call methods to write data to disk. See the section on Loading and Saving for an overview of the load/save process. |
Reimplemented from ReferenceMaker.
Called for loading data.
Called by the system to allow the plug-in to load its data. See the section on Loading and Saving for an overview of the load - save process.
iload | - This interface pointer may be used to call methods to read data from disk. |
Reimplemented from ReferenceMaker.
CoreExport void RescaleWorldUnits | ( | float | f | ) | [virtual] |
Rescale size of all world units in reference hierarchy.
This method is available in release 2.0 and later only. Must call ClearAFlagInHierarchy(rm, A_WORK1) or ClearAFlagInAllAnimatables(A_WORK1) before doing this on a reference hierarchy. This may be implemented to rescale the size of all world units in a reference hierarchy. Developers must call
before doing this on a reference hierarchy.
f | - The scale factor. |
Reimplemented from ReferenceMaker.
CoreExport void DeleteThis | ( | ) | [virtual] |
Deletes an instance of this class.
3ds Max calls this method when it needs to delete a plugin object (an instance of a class derived from Animatable). Similarly, plugins that need to delete instances of an Animatable or a class directly derived from it via an Animatable pointer, should call this method instead of calling directly operator delete. Following these rules will ensure that the same memory manager is used to allocate and deallocate the object. The default implementation of this method deletes the object. Plugin instances that never need to be deleted from the heap can overwrite this method to do nothing.
Reimplemented from Animatable.
Class_ID ClassID | ( | ) | [inline, virtual] |
Retrieves a constant that uniquely identifies the plugin class.
This method must return the unique ID for the plugin class. If two ClassIDs conflict, the system will only load the first conflicting one it finds. A program (gencid.exe) is provided to generate unique class id values.
Reimplemented from Animatable.
{ return dummyClassID; }
void GetClassName | ( | MSTR & | s | ) | [virtual] |
Retrieves the name of the plugin class.
This name is usually used internally for debugging purposes. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.
s | Reference to a string filled in with the name of the plugin class |
Reimplemented from ReferenceTarget.
int IsKeyable | ( | ) | [inline] |
{ return 1;}
LRESULT CALLBACK TrackViewWinProc | ( | HWND | hwnd, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [inline, virtual] |
friend class LuminaireObject
[friend] |
friend class LuminaireObjectCreateCallBack
[friend] |
friend class DummyObjectCreateCallBack
[friend] |
friend class CharacterObject
[friend] |
INT_PTR CALLBACK DummyParamDialogProc | ( | HWND | hDlg, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [friend] |