3ds Max C++ API Reference
CollisionPlane Class Reference

#include <icollision.h>

+ Inheritance diagram for CollisionPlane:

Public Member Functions

 CollisionPlane ()
 
 ~CollisionPlane ()
 
int SuppportedCollisions ()
 
void PreFrame (TimeValue t, TimeValue dt)
 
void PostFrame (TimeValue t, TimeValue dt)
 
BOOL CheckCollision (TimeValue t, Point3 pos, Point3 vel, float dt, float &at, Point3 &hitPoint, Point3 &norm, Point3 &friction, Point3 &inheritedVel)
 
BOOL CheckCollision (TimeValue t, Point3 pos, float radius, Point3 vel, float dt, float &at, Point3 &hitPoint, Point3 &norm, Point3 &friction, Point3 &inheritedVel)
 
BOOL CheckCollision (TimeValue t, Box3 box, Point3 vel, float dt, float &at, Point3 &hitPoint, Point3 &norm, Point3 &friction, Point3 &inheritedVel)
 
BOOL CheckCollision (TimeValue t, Point3 edgeA, Point3 edgeB, Point3 vel, float dt, float &at, Point3 &hitPoint, Point3 &norm, Point3 &friction, Point3 &inheritedVel)
 
void SetWidth (TimeValue t, float w)
 
void SetHeight (TimeValue t, float h)
 
void SetQuality (TimeValue t, int q)
 
void SetNode (TimeValue t, INode *n)
 
void SetWidth (Control *c)
 
void SetHeight (Control *c)
 
void SetQuality (Control *c)
 
void DeleteThis ()
 
Class_ID ClassID ()
 
SClass_ID SuperClassID ()
 
virtual void GetClassName (MSTR &s, bool localized=true) const override
 Retrieves the name of the plugin class. More...
 
int NumParamBlocks ()
 return number of ParamBlocks in this instance More...
 
IParamBlock2GetParamBlock (int i)
 return i'th ParamBlock More...
 
IParamBlock2GetParamBlockByID (BlockID id)
 return ParamBlock given ID More...
 
int NumRefs ()
 
RefTargetHandle GetReference (int i)
 
RefTargetHandle Clone (RemapDir &remap)
 
RefResult NotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message, BOOL propagate)
 
- Public Member Functions inherited from ReferenceTarget
virtual BOOL IsRefTarget ()
 Checks if this is a ReferenceTarget. More...
 
CoreExport RefResult TestForLoop (const Interval &refInterval, RefMakerHandle hmaker)
 Tests for a cyclical reference. More...
 
CoreExport BOOL HasDependents ()
 Checks if a ReferenceTarget has references. More...
 
CoreExport BOOL HasRealDependents ()
 Checks if this has Real (Strong) Dependents. More...
 
void BeginDependencyTest ()
 Starts Dependency Test. More...
 
BOOL EndDependencyTest ()
 Ends Dependency Test. More...
 
virtual void RefAdded (RefMakerHandle rm)
 Called after a reference is made to a target. More...
 
virtual void RefAddedUndoRedo (RefMakerHandle rm)
 Called after a reference is made to a target because of undo or redo. More...
 
virtual void RefDeleted ()
 Called after a references to this is deleted. More...
 
virtual void RefDeletedUndoRedo ()
 Called after a references to this is deleted because of undo or redo. More...
 
CoreExport RefResult DeleteAllRefsToMe ()
 Deletes all references to this ReferenceTarget. More...
 
CoreExport RefResult TransferReferences (RefTargetHandle oldTarget, BOOL delOld=FALSE)
 Transfers all the references from oldTarget to this. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
virtual CoreExport void BaseClone (ReferenceTarget *from, ReferenceTarget *to, RemapDir &remap)
 This method copies base class data from an object to its clone. More...
 
virtual CoreExport RefResult NotifyDependents (const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=NULL, NotifyDependentsOption notifyDependentsOption=REFNOTIFY_ALLOW_OPTIMIZATIONS)
 Notify all dependent RefMakers concerned with the message. More...
 
void FlagDependents (TimeValue t, PartID which=PART_PUT_IN_FG)
 This sends the REFMSG_FLAGDEPENDENTS message up the pipeline. More...
 
virtual void NotifyForeground (TimeValue t)
 This method is called to flag dependents into the FG. More...
 
virtual void NotifyTarget (int message, ReferenceMaker *hMaker)
 Sends messages to ReferenceTargets. More...
 
virtual CoreExport voidGetInterface (ULONG id)
 Inherited from Animatable. More...
 
virtual CoreExport BaseInterfaceGetInterface (Interface_ID id)
 Inherited from Animatable. More...
 
CoreExport ReferenceTarget ()
 Constructor. More...
 
virtual CoreExport RefResult AutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
CoreExport RefResult MaybeAutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
- Public Member Functions inherited from ReferenceMaker
CoreExport RefResult ReplaceReference (int which, RefTargetHandle newtarg, BOOL delOld=TRUE)
 Used when cloning reference makers. More...
 
CoreExport RefResult DeleteAllRefsFromMe ()
 Deletes all references from this ReferenceMaker. More...
 
CoreExport RefResult DeleteAllRefs ()
 Deletes all references both to and from this item. More...
 
CoreExport RefResult DeleteReference (int i)
 Deletes the specified reference. More...
 
virtual BOOL CanTransferReference (int i)
 Tells whether this reference can be transfered. More...
 
CoreExport ReferenceSaveManagerGetReferenceSaveManager ()
 Access the ReferenceSaveManager of this ReferenceMaker. More...
 
virtual CoreExport IOResult Save (ISave *isave)
 Called for saving data. More...
 
virtual CoreExport IOResult Load (ILoad *iload)
 Called for loading data. More...
 
virtual int RemapRefOnLoad (int iref)
 Used to load old files with references. More...
 
virtual CoreExport void RescaleWorldUnits (float f)
 Rescale size of all world units in reference hierarchy. More...
 
virtual CoreExport void EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags)
 Enumerate auxiliary files (e.g. bitmaps) More...
 
virtual CoreExport void SaveEnum (SaveEnumProc &sep, BOOL isNodeCall=0)
 The default save enumeration. More...
 
virtual CoreExport bool SpecifySaveReferences (ReferenceSaveManager &referenceSaveManager)
 Used to specify reference slot remapping during scene file save. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
CoreExport bool EnumRefHierarchy (RefEnumProc &proc, bool includeCustAttribs=true, bool includeIndirectRefs=true, bool includeNonPersistentRefs=true, bool preventDuplicatesViaFlag=true)
 This method provides a general purpose reference enumerator. More...
 
CoreExport int FindRef (RefTargetHandle rtarg)
 Get the index of the ReferenceTarget. More...
 
virtual BOOL IsRefMaker ()
 Tells whether it is a ReferenceMaker. More...
 
virtual BOOL IsRealDependency (ReferenceTarget *rtarg)
 Returns whether this is a "real" (strong) dependency or not. More...
 
virtual BOOL ShouldPersistWeakRef (RefTargetHandle rtarg)
 Specifies whether a weak reference is to be persisted on a partial load or save. More...
 
CoreExport ReferenceMaker ()
 Constructor. More...
 
CoreExport void DeleteMe ()
 Deletes an instance of this class. More...
 
- Public Member Functions inherited from Animatable
virtual void FreeCaches ()
 
virtual int NumChildren ()
 
virtual AnimatableChildAnim (int i)
 
virtual CoreExport MSTR NodeName ()
 
virtual void EditTrack ()
 
virtual CoreExport BOOL SubAnimSetKeyBufferPresent (int subNum)
 returns true if the sub-anim has a "Set Key" buffer present More...
 
virtual BOOL SetKeyBufferPresent ()
 returns true if there is a "Set Key" buffer present More...
 
virtual CoreExport void SubAnimCommitSetKeyBuffer (TimeValue t, int subNum)
 Commit any "Set Key" buffers on the given sub-anim. More...
 
virtual void CommitSetKeyBuffer (TimeValue t)
 Commit any "Set Key" buffers. More...
 
virtual CoreExport void SubAnimRevertSetKeyBuffer (int subNum)
 Revert any "Set Key" buffers on the given sub-anim. More...
 
virtual void RevertSetKeyBuffer ()
 Revert any "Set Key" buffers. More...
 
virtual LRESULT CALLBACK TrackViewWinProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 This function is obsolete. More...
 
virtual bool IsParamBlockDesc2Used (ParamBlockDesc2 *desc)
 Returns true if the passed description is being used. More...
 
virtual bool GetMacroRecorderName (bool used_as_rhs_value, MSTR &objectSpecifiedName)
 This method is called to access the object specified name to use for the Maxscript macrorecorder. More...
 
CoreExport Animatable ()
 Constructor. More...
 
virtual void GetClassName (MSTR &s) MAX_SEALED
 
MSTR ClassName (bool localized=true) const
 Returns the name of the plugin class. More...
 
virtual void BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev=NULL)
 
virtual void EndEditParams (IObjParam *ip, ULONG flags, Animatable *next=NULL)
 
virtual CoreExport void ReleaseInterface (ULONG id, void *i)
 
virtual CoreExport int SetProperty (ULONG id, void *data)
 
virtual CoreExport voidGetProperty (ULONG id)
 
CoreExport void AppendProperty (AnimProperty *prop)
 A function to directly add arbitrary properties to this object developers should ensure that the properties ID does not conflict with any Max-specific IDs. More...
 
CoreExport AnimPropertyFindProperty (DWORD id)
 Find any property. More...
 
CoreExport void AddAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid, DWORD len, void *data)
 Adds application/plugin specific (custom) data to an Animatable. More...
 
CoreExport AppDataChunkGetAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Retrieves the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport BOOL RemoveAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Deletes the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport void ClearAllAppData ()
 Deletes all application/plugin specific (custom) data stored with an Animatable. More...
 
virtual int NumSubs ()
 
virtual AnimatableSubAnim (int i)
 
virtual MSTR SubAnimName (int i) MAX_SEALED
 
virtual CoreExport MSTR SubAnimName (int i, bool localized)
 
virtual BOOL CanDeleteSubAnim (int i)
 
virtual void DeleteSubAnim (int i)
 
virtual DWORD GetSubAnimCurveColor (int subNum)
 
virtual int SubNumToRefNum (int subNum)
 
virtual BOOL CanCopyAnim ()
 
CoreExport int HasSubElements (int type=0)
 
virtual int GetSubFCurveExtents (int subNum, ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 The values max and min should be initialized before calling this function. More...
 
virtual ParamDimensionGetParamDimension (int i)
 
virtual BOOL SelectSubAnim (int subNum)
 
virtual BOOL BypassTreeView ()
 
virtual BOOL BypassTrackBar ()
 
virtual BOOL BypassPropertyLevel ()
 
virtual BOOL InvisibleProperty ()
 
virtual int NumKeys ()
 
virtual TimeValue GetKeyTime (int index)
 
virtual int GetKeyIndex (TimeValue t)
 
virtual BOOL GetNextKeyTime (TimeValue t, DWORD flags, TimeValue &nt)
 
virtual void CopyKeysFromTime (TimeValue src, TimeValue dst, DWORD flags)
 
virtual void DeleteKeyAtTime (TimeValue t)
 
virtual BOOL IsKeyAtTime (TimeValue t, DWORD flags)
 
virtual int GetKeyTimes (Tab< TimeValue > &times, Interval range, DWORD flags)
 
virtual int GetKeySelState (BitArray &sel, Interval range, DWORD flags)
 
CoreExport void OpenTreeEntry (int type, DWORD tv)
 
CoreExport void CloseTreeEntry (int type, DWORD tv)
 
CoreExport int IsTreeEntryOpen (int type, DWORD tv)
 
CoreExport BOOL GetSelInTrackView (DWORD tv)
 
CoreExport void SetSelInTrackView (DWORD tv, BOOL sel)
 
CoreExport BOOL InTrackViewSelSet (int which)
 
CoreExport void SetTrackViewSelSet (int which, BOOL inOut)
 
virtual BOOL AssignController (Animatable *control, int subAnim)
 
virtual BOOL CanAssignController (int subAnim)
 Return true if we can reassign the subanim specified. More...
 
virtual BOOL CanMakeUnique ()
 
CoreExport int EnumAnimTree (AnimEnum *animEnum, Animatable *client, int subNum)
 
virtual int RenderBegin (TimeValue t, ULONG flags=0)
 
virtual int RenderEnd (TimeValue t)
 
virtual CoreExport Interval GetTimeRange (DWORD flags)
 
virtual void EditTimeRange (Interval range, DWORD flags)
 
virtual void DeleteTime (Interval iv, DWORD flags)
 
virtual void ReverseTime (Interval iv, DWORD flags)
 
virtual void ScaleTime (Interval iv, float s)
 
virtual void InsertTime (TimeValue ins, TimeValue amount)
 
virtual BOOL SupportTimeOperations ()
 
virtual CoreExport void MapKeys (TimeMap *map, DWORD flags)
 
virtual void DeleteKeys (DWORD flags)
 
virtual void DeleteKeyByIndex (int index)
 
virtual void SelectKeys (TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubKeys (int subNum, TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubCurve (int subNum, BOOL sel)
 
virtual void SelectKeyByIndex (int i, BOOL sel)
 
virtual BOOL IsKeySelected (int i)
 
virtual void FlagKey (TrackHitRecord hit)
 
virtual int GetFlagKeyIndex ()
 
virtual int NumSelKeys ()
 
virtual void CloneSelectedKeys (BOOL offset=FALSE)
 
virtual void AddNewKey (TimeValue t, DWORD flags)
 
virtual void MoveKeys (ParamDimensionBase *dim, float delta, DWORD flags)
 
virtual void ScaleKeyValues (ParamDimensionBase *dim, float origin, float scale, DWORD flags)
 
virtual void SelectCurve (BOOL sel)
 
virtual BOOL IsCurveSelected ()
 Returns TRUE if the function curve is selected; otherwise returns FALSE. More...
 
virtual BOOL IsSubCurveSelected (int subNum)
 Returns the selected state of the sub-curve whose index is passed. More...
 
virtual int GetSelKeyCoords (TimeValue &t, float &val, DWORD flags)
 
virtual void SetSelKeyCoords (TimeValue t, float val, DWORD flags)
 
virtual int SetSelKeyCoordsExpr (ParamDimension *dim, const MCHAR *timeExpr, const MCHAR *valExpr, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, int dx, int dy, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, float angle, float length, DWORD flags)
 
virtual CoreExport BOOL IsAnimated ()
 
virtual BOOL CanCopyTrack (Interval iv, DWORD flags)
 
virtual BOOL CanPasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopyTrack (Interval iv, DWORD flags)
 
virtual void PasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual BOOL CanCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual BOOL CanPasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual void PasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual int GetTrackVSpace (int lineHeight)
 
virtual int HitTestTrack (TrackHitTab &hits, Rect &rcHit, Rect &rcTrack, float zoom, int scroll, DWORD flags)
 
virtual int PaintTrack (ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
virtual int PaintSubTrack (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
virtual int PaintFCurves (ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestFCurves (ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int PaintSubFCurves (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestSubFCurves (int subNum, ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual void EditTrackParams (TimeValue t, ParamDimensionBase *dim, const MCHAR *pname, HWND hParent, IObjParam *ip, DWORD flags)
 
virtual int TrackParamsType ()
 
virtual int GetFCurveExtents (ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 This method is called to calculate the largest and smallest values of the anim. More...
 
CoreExport void AddNoteTrack (NoteTrack *note)
 
CoreExport void DeleteNoteTrack (NoteTrack *note, BOOL delNote=TRUE)
 
CoreExport BOOL HasNoteTracks ()
 
CoreExport int NumNoteTracks ()
 
CoreExport NoteTrackGetNoteTrack (int i)
 
virtual void FreeAllBitmaps ()
 
virtual void GetSystemNodes (INodeTab &nodes, SysNodeContext Context)
 
virtual BOOL IsSubClassOf (Class_ID classID)
 returns true if the animatable has sub-classed off the given class More...
 
virtual CoreExport void MouseCycleCompleted (TimeValue t)
 
virtual CoreExport void MouseCycleStarted (TimeValue t)
 
CoreExport bool SvSaveData (ISave *isave, USHORT id)
 
CoreExport bool SvLoadData (ILoad *iLoad)
 
CoreExport DWORD SvGetRefIndex ()
 
CoreExport void SvSetRefIndex (DWORD i)
 
CoreExport bool SvDeleteRefIndex ()
 
virtual CoreExport SvGraphNodeReference SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
CoreExport SvGraphNodeReference SvStdTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
virtual CoreExport bool SvCanInitiateLink (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanConcludeLink (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeChild)
 
virtual CoreExport MSTR SvGetName (IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)
 
virtual CoreExport bool SvCanSetName (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvSetName (IGraphObjectManager *gom, IGraphNode *gNode, const MSTR &name)
 
virtual CoreExport bool SvCanRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 Called when the user deletes this object in the schematic view... More...
 
virtual CoreExport bool SvIsSelected (IGraphObjectManager *gom, IGraphNode *gNode)
 Returns true if the object is selected in its schematic view. More...
 
virtual CoreExport bool SvIsHighlighted (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvHighlightColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvGetSwatchColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvIsInactive (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvLinkChild (IGraphObjectManager *gom, IGraphNode *gNodeThis, IGraphNode *gNodeChild)
 
virtual CoreExport bool SvHandleDoubleClick (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MultiSelectCallbackSvGetMultiSelectCallback (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanSelect (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvEditProperties (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetTip (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRefTip (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeMaker)
 
virtual CoreExport bool SvCanDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRelTip (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns a string to be displayed in the tip window in the schematic view for a relationship from "gNodeMaker" to "gNodeTarget"... More...
 
virtual CoreExport bool SvCanDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns true if this object can respond to the SvDetachRel(...) method... More...
 
virtual CoreExport bool SvDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Detach this relationship. More...
 
virtual CoreExport bool SvHandleRelDoubleClick (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Called when this relationship is double-clicked in the schematic view... More...
 
CoreExport ICustAttribContainerGetCustAttribContainer ()
 This method returns a pointer to the custom attributes container interface class. More...
 
CoreExport void AllocCustAttribContainer ()
 This method allocates space for a custom attributes container. More...
 
CoreExport void DeleteCustAttribContainer ()
 This method deletes space used by a custom attributes container. More...
 
void SetAFlag (DWORD mask)
 
void ClearAFlag (DWORD mask)
 Clears one or more bits in the Animatable flags. More...
 
bool TestAFlag (DWORD mask) const
 Tests one or more bits in the Animatable flags. More...
 
void SetAFlagEx (DWORD mask)
 Sets one or more bits in the Animatable extended flags. More...
 
void ClearAFlagEx (DWORD mask)
 Clears one or more bits in the Animatable extended flags. More...
 
bool TestAFlagEx (DWORD mask) const
 Tests one or more bits in the Animatable extended flags. More...
 
CoreExport bool TestFlagBit (int index)
 Tests the specified flag bit. More...
 
CoreExport void SetFlagBit (int index, bool newValue=true)
 Sets the specified flag bit. More...
 
CoreExport void ClearFlagBit (int index)
 Clears the specified flag bit. More...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Public Attributes

IParamBlock2pblock
 
Interval validity
 
Matrix3 tm
 
Matrix3 invtm
 
Matrix3 prevInvTm
 
int initialTime
 
Tab< Matrix3invTmList
 
float width
 
float height
 
int quality
 

Protected Member Functions

virtual void SetReference (int i, RefTargetHandle rtarg)
 
- Protected Member Functions inherited from ReferenceTarget
virtual CoreExport int DoEnumDependentsImpl (DependentEnumProc *dep)
 Method to perform an enumeration on a ReferenceTarget. More...
 
virtual CoreExport ~ReferenceTarget ()=0
 Destructor. More...
 
- Protected Member Functions inherited from ReferenceMaker
virtual CoreExport ~ReferenceMaker ()=0
 Destructor. More...
 
void BlockEval ()
 Validates a given reference link between this reference maker and its reference target. More...
 
void UnblockEval ()
 Validates a given reference link between this reference maker and its reference target. More...
 
int Evaluating ()
 Validates a given reference link between this reference maker and its reference target. More...
 
CoreExport RefResult StdNotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID partID, RefMessage message, BOOL propagate, NotifyDependentsOption notifyDependentsOption)
 Validates a given reference link between this reference maker and its reference target. More...
 
- Protected Member Functions inherited from Animatable
virtual CoreExport ~Animatable ()=0
 Destructor. More...
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Animatable
static CoreExport BOOL IsDeleted (Animatable *anim)
 Debug method to determine whether an object has been deleted. More...
 
static CoreExport AnimHandle GetHandleByAnim (Animatable *anim)
 Get the unique handle for an Animatable object. More...
 
static CoreExport AnimatableGetAnimByHandle (AnimHandle handle)
 Get an Animatable object from its unique handle. More...
 
static CoreExport AnimHandle GetNextHandle ()
 Get the unique handle for the next Animatable object to be created. More...
 
static CoreExport void EnumerateAllAnimatables (EnumAnimList &enumProcObject)
 Enumerator to enumerate across all animatables. More...
 
static CoreExport bool RegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool RegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport int RequestFlagBit ()
 Requests an unique flag bit index. More...
 
static CoreExport void ReleaseFlagBit (int index)
 Releases the flag bit index. More...
 
static CoreExport void ClearFlagBitInAllAnimatables (int index)
 Clears the specified flag bit in all Animatables. More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from Animatable
static const AnimHandle kInvalidAnimHandle = 0
 
- Protected Attributes inherited from Animatable
DWORD aflag
 
AnimPropertyList aprops
 

Detailed Description

See also
Class ICollision, Class CollisionOps, Class CollisionSphere, Class CollisionVNormal, Class CollisionMesh, Class Box3, Class Point3, Class IParamBlock2, Class INode, Class Control

Description:
This class represents the planar collision object with the ClassID defined as PLANAR_COLLISION_ID. This class allows you to define a plane in space and determine if a particle hit it.
Data Members:
private:

INode *node;

The associated node.

IParamBlock2 *pblock;

The parameter block data. You can use the following enum parameter ID's:

collisionplane_width

collisionplane_height

collisionplane_quality

collisionplane_node

Interval validity;

The validity interval.

Matrix3 tm;

The plane's TM.

Matrix3 invtm;

The inverse TM.

Matrix3 prevInvTm;

The cached previous inverse TM.

int initialTime;

The initial time.

Tab<Matrix3> invTmList;

The table of inverse TM's.

float width, height;

The width and height of the plane.

int quality;

The collision quality value.

Constructor & Destructor Documentation

◆ CollisionPlane()

Remarks
Constructor.

◆ ~CollisionPlane()

Remarks
Destructor.

Member Function Documentation

◆ SuppportedCollisions()

int SuppportedCollisions ( )
inlinevirtual
Remarks
This method determines the type of collisions that are supported.
Returns
One of the following;

POINT_COLLISION for point collision, currently supported.

SPHERE_COLLISION for spherical collision, currently not supported.

BOX_COLLISION for box collision, currently not supported.

EDGE_COLLISION for edge collision, currently not supported.
Default Implementation:
{ return POINT_COLLISION; }

Implements ICollision.

459  {
460  return POINT_COLLISION;
461  }
#define POINT_COLLISION
Definition: icollision.h:36

◆ PreFrame()

void PreFrame ( TimeValue  t,
TimeValue  dt 
)
virtual
Remarks
This method will be called once before the checkcollision is called for each frame which allows you to do any required initialization.
Parameters:
TimeValue t

The time at which to initialize.

TimeValue dt

The delta of time the particle wil travel.

Implements ICollision.

◆ PostFrame()

void PostFrame ( TimeValue  t,
TimeValue  dt 
)
inlinevirtual
Remarks
This method will be called at the end of each frame solve to allow you to destroy and deallocate any data you no longer need.
Parameters:
TimeValue t

The time at which to initialize.

TimeValue dt

The delta of time the particle wil travel.
Default Implementation:
{}

Implements ICollision.

480 {}

◆ CheckCollision() [1/4]

BOOL CheckCollision ( TimeValue  t,
Point3  pos,
Point3  vel,
float  dt,
float &  at,
Point3 hitPoint,
Point3 norm,
Point3 friction,
Point3 inheritedVel 
)
virtual
Remarks
This method will be called to execute a point to surface collision and compute the time at which the particle hit the surface.
Parameters:
TimeValue t

The end time of the particle.

Point3 pos

The position of the particle in world space.

Point3 vel

The velocity of the particle in world space.

float dt

The delta of time that the particle travels (t-dt being the start of time of the particle)

float &at

The point in time that the collision occurs with respect to the dt.

Point3 &hitPoint

The point of collision.

Point3 &norm

The bounce vector component of the final velocity.

Point3 &friction

The friction vector component of the final velocity.

Point3 inheritedVel

The approximated amount of velocity inherited from the motion of the deflector.
Returns
TRUE if there's a collision, otherwise FALSE.

Implements ICollision.

◆ CheckCollision() [2/4]

BOOL CheckCollision ( TimeValue  t,
Point3  pos,
float  radius,
Point3  vel,
float  dt,
float &  at,
Point3 hitPoint,
Point3 norm,
Point3 friction,
Point3 inheritedVel 
)
inlinevirtual
Remarks
This method will be called to execute a sphere to surface collision and compute the time at which the particle hit the surface.
Parameters:
TimeValue t

The end time of the particle.

Point3 pos

The position of the particle in world space.

float radius

The radius of the sphere.

Point3 vel

The velocity of the particle in world space.

float dt

The delta of time that the particle travels (t-dt being the start of time of the particle)

float &at

The point in time that the collision occurs with respect to the dt.

Point3 &hitPoint

The point of collision.

Point3 &norm

The bounce vector component of the final velocity.

Point3 &friction

The friction vector component of the final velocity.

Point3 inheritedVel

The approximated amount of velocity inherited from the motion of the deflector.
Returns
TRUE if there's a collision, otherwise FALSE.

Implements ICollision.

539  {
540  return FALSE;
541  }

◆ CheckCollision() [3/4]

BOOL CheckCollision ( TimeValue  t,
Box3  box,
Point3  vel,
float  dt,
float &  at,
Point3 hitPoint,
Point3 norm,
Point3 friction,
Point3 inheritedVel 
)
inlinevirtual
Remarks
This method will be called to execute a box to surface collision and compute the time at which the particle hit the surface.
Parameters:
TimeValue t

The end time of the particle.

Box3 box

The box itself.

Point3 vel

The velocity of the particle in world space.

float dt

The delta of time that the particle travels (t-dt being the start of time of the particle)

float &at

The point in time that the collision occurs with respect to the dt.

Point3 &hitPoint

The point of collision.

Point3 &norm

The bounce vector component of the final velocity.

Point3 &friction

The friction vector component of the final velocity.

Point3 inheritedVel

The approximated amount of velocity inherited from the motion of the deflector.
Returns
TRUE if there's a collision, otherwise FALSE.

Implements ICollision.

571  {
572  return FALSE;
573  }

◆ CheckCollision() [4/4]

BOOL CheckCollision ( TimeValue  t,
Point3  edgeA,
Point3  edgeB,
Point3  vel,
float  dt,
float &  at,
Point3 hitPoint,
Point3 norm,
Point3 friction,
Point3 inheritedVel 
)
inlinevirtual
Remarks
This method will be called to execute an edge to surface collision and compute the time at which the particle hit the surface.
Parameters:
TimeValue t

The end time of the particle.

Point3 edgeA

The first edge.

Point3 edgeB

The second edge.

Point3 vel

The velocity of the particle in world space.

float dt

The delta of time that the particle travels (t-dt being the start of time of the particle)

float &at

The point in time that the collision occurs with respect to the dt.

Point3 &hitPoint

The point of collision.

Point3 &norm

The bounce vector component of the final velocity.

Point3 &friction

The friction vector component of the final velocity.

Point3 inheritedVel

The approximated amount of velocity inherited from the motion of the deflector.
Returns
TRUE if there's a collision, otherwise FALSE.

Implements ICollision.

604  {
605  return FALSE;
606  }

◆ SetWidth() [1/2]

void SetWidth ( TimeValue  t,
float  w 
)
inline
Remarks
Sets the width of the plane.
Parameters:
TimeValue t

The time at which to set the width.

float w

The width.
Default Implementation:
{ pblock->SetValue(collisionplane_width,t,w); }
IParamBlock2 * pblock
Definition: icollision.h:440
virtual Control * GetControllerByID(ParamID id, int tabIndex=0)=0
Gets a pointer to the controller of the specified parameter.
virtual BOOL SetValue(ParamID id, TimeValue t, float v, int tabIndex=0)=0
@ collisionplane_width
Definition: icollision.h:394

◆ SetHeight() [1/2]

void SetHeight ( TimeValue  t,
float  h 
)
inline
Remarks
Sets the height of the plane.
Parameters:
TimeValue t

The time at which to set the height.

float h

The height.
Default Implementation:
{ pblock->SetValue(collisionplane_height,t,h); }
@ collisionplane_height
Definition: icollision.h:395

◆ SetQuality() [1/2]

void SetQuality ( TimeValue  t,
int  q 
)
inline
Remarks
Sets the quality of the solve. This is the maximum number of iterations the solver will take to find the hit point. The lower quality the mire likely a particle will leak through the surface but the faster the solver will be.
Parameters:
TimeValue t

The time at which to set the quality.

int q

The quality value.
Default Implementation:
{ pblock->SetValue(collisionplane_quality,t,q); }
@ collisionplane_quality
Definition: icollision.h:396

◆ SetNode()

void SetNode ( TimeValue  t,
INode n 
)
inline
Remarks
Sets the node which drives the TM to put the plane in world space.
Parameters:
TimeValue t

The time at which to set the node.

INode *n

The node to set.
Default Implementation:
{ pblock->SetValue(collisionplane_node,t,n); node = n; }
650  {
651  {
652  HoldSuspend hs;
654  }
655  node = n;
656 }
Definition: hold.h:331
@ collisionplane_node
Definition: icollision.h:397

◆ SetWidth() [2/2]

void SetWidth ( Control c)
inline
Remarks
Sets the controller for the plane width.
Parameters:
Control *c

A pointer to the controller to set.
Default Implementation:
{ pblock->SetControllerByID(collisionplane_width,0,c); }
virtual void SetControllerByID(ParamID id, int tabIndex, Control *c, BOOL preserveFrame0Value=TRUE)
Sets the parameter with the given id to the specified controller.
Definition: iparamb2.h:1601

◆ SetHeight() [2/2]

void SetHeight ( Control c)
inline
Remarks
Sets the controller for the plane height.
Parameters:
Control *c

A pointer to the controller to set.
Default Implementation:
{ pblock->SetControllerByID(collisionplane_height,0,c); }

◆ SetQuality() [2/2]

void SetQuality ( Control c)
inline
Remarks
Sets the quality of the solve. This is the maximum number of iterations the solver will take to find the hit point. The lower quality the mire likely a particle will leak through the surface but the faster the solver will be.
Parameters:
Control *c

A pointer to the controller to set.
Default Implementation:
{ pblock->SetControllerByID(collisionplane_quality,0,c); }

◆ DeleteThis()

void DeleteThis ( )
virtual
Remarks
Self deletion.
Default Implementation:
{ delete this; }

Reimplemented from Animatable.

◆ ClassID()

Class_ID ClassID ( )
inlinevirtual
Remarks
This method returns the class ID.
Default Implementation:
{return PLANAR_COLLISION_ID;}

Reimplemented from Animatable.

702 {return PLANAR_COLLISION_ID;}
#define PLANAR_COLLISION_ID
Definition: icollision.h:24

◆ SuperClassID()

SClass_ID SuperClassID ( )
inlinevirtual
Remarks
This method returns the super class ID.
Default Implementation:
{return REF_MAKER_CLASS_ID;}

Reimplemented from ReferenceTarget.

706 {return REF_MAKER_CLASS_ID;}
#define REF_MAKER_CLASS_ID
ReferenceMaker super-class ID.
Definition: plugapi.h:404

◆ GetClassName()

virtual void GetClassName ( MSTR s,
bool  localized = true 
) const
inlineoverridevirtual

Retrieves the name of the plugin class.

Parameters
sReference to a string filled in with the name of the plugin class
localizedIf true, then the class name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the class name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the class name in English.

Reimplemented from ReferenceTarget.

711 { UNUSED_PARAM(localized); s = _M("CollisionPlane"); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67

◆ NumParamBlocks()

int NumParamBlocks ( )
inlinevirtual

return number of ParamBlocks in this instance

Reimplemented from Animatable.

714 { return 1; }

◆ GetParamBlock()

IParamBlock2* GetParamBlock ( int  i)
inlinevirtual

return i'th ParamBlock

Reimplemented from Animatable.

716 { return pblock; } // only one

◆ GetParamBlockByID()

IParamBlock2* GetParamBlockByID ( BlockID  id)
inlinevirtual

return ParamBlock given ID

Reimplemented from Animatable.

718 { return (pblock->ID() == id) ? pblock : NULL; }
#define NULL
Definition: autoptr.h:18
virtual BlockID ID()=0

◆ NumRefs()

int NumRefs ( )
inlinevirtual
Remarks
This method returns the number of references.
Default Implementation:
{ return 1; }

Reimplemented from ReferenceMaker.

724 { return 1; }

◆ GetReference()

RefTargetHandle GetReference ( int  i)
inlinevirtual
Remarks
This method returns the I-th parameter block.
Default Implementation:
{ return pblock; }

Reimplemented from ReferenceMaker.

728 { return pblock; }

◆ SetReference()

virtual void SetReference ( int  i,
RefTargetHandle  rtarg 
)
inlineprotectedvirtual
Remarks
This method allows you to set the I-th parameter block.
Parameters:
int i

The I-th parameter block to set.

RefTargetHandle rtarg

The reference target handle to the parameter block.
Default Implementation:
{pblock = (IParamBlock2*)rtarg;}

Reimplemented from ReferenceMaker.

738 {pblock = (IParamBlock2*)rtarg;}
Definition: iparamb2.h:279

◆ Clone()

RefTargetHandle Clone ( RemapDir remap)
virtual
Remarks
This method is called to have the plug-in clone itself. This method should copy both the data structure and all the data residing in the data structure of this reference target. The plug-in should clone all its references as well.
Parameters:
RemapDir &remap

This class is used for remapping references during a Clone. See Class RemapDir.
Returns
A pointer to the cloned item.

Reimplemented from ReferenceTarget.

◆ NotifyRefChanged()

RefResult NotifyRefChanged ( const Interval changeInt,
RefTargetHandle  hTarget,
PartID partID,
RefMessage  message,
BOOL  propagate 
)
virtual
Remarks
A plug-in which makes references must implement this method to receive and respond to messages broadcast by its dependents.
Parameters
changeInt- This is the interval of time over which the message is active.
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 Reference Messages and PartID for more information.
message- The msg parameters passed into this method is the specific message which needs to be handled. See Reference Messages.
propagate- If called through ReferenceMaker::NotifyDependents(), the value of 'propagate' passed to it. Used if calling NotifyDependents() from within NotifyRefChanged()
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.

Member Data Documentation

◆ pblock

IParamBlock2* pblock

◆ validity

Interval validity

◆ tm

Matrix3 tm

◆ invtm

Matrix3 invtm

◆ prevInvTm

Matrix3 prevInvTm

◆ initialTime

int initialTime

◆ invTmList

Tab<Matrix3> invTmList

◆ width

float width

◆ height

float height

◆ quality

int quality