3ds Max C++ API Reference
MSObjectXtnd< TYPE, MS_SUPER > Class Template Reference

#include <mxsPlugin.h>

+ Inheritance diagram for MSObjectXtnd< TYPE, MS_SUPER >:

Public Member Functions

void DeleteThis ()
 
 MSObjectXtnd ()
 
ReferenceTargetget_delegate ()
 
void GetClassName (MSTR &s, bool localized=true) const override
 
Class_ID ClassID ()
 
void FreeCaches ()
 
int NumSubs ()
 
AnimatableSubAnim (int i)
 
MSTR SubAnimName (int i, bool localized=true) override
 
int NumParamBlocks ()
 
IParamBlock2GetParamBlock (int i)
 
IParamBlock2GetParamBlockByID (BlockID id)
 
voidGetInterface (ULONG id)
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
int NumRefs ()
 
RefTargetHandle GetReference (int i)
 
void SetReference (int i, RefTargetHandle rtarg)
 
const MCHARGetObjectName (bool localized=true) const override
 
void BeginEditParams (IObjParam *objParam, ULONG vflags, Animatable *pPrev)
 
void EndEditParams (IObjParam *objParam, ULONG vflags, Animatable *pNext)
 
int HitTest (TimeValue t, INode *inode, int type, int crossing, int vflags, IPoint2 *p, ViewExp *vpt)
 
int Display (TimeValue t, INode *inode, ViewExp *vpt, int vflags)
 
virtual unsigned long GetObjectDisplayRequirement () const
 
virtual bool PrepareDisplay (const MaxSDK::Graphics::UpdateDisplayContext &prepareDisplayContext)
 
virtual bool UpdatePerNodeItems (const MaxSDK::Graphics::UpdateDisplayContext &updateDisplayContext, MaxSDK::Graphics::UpdateNodeContext &nodeContext, MaxSDK::Graphics::IRenderItemContainer &targetRenderItemContainer)
 
virtual bool UpdatePerViewItems (const MaxSDK::Graphics::UpdateDisplayContext &updateDisplayContext, MaxSDK::Graphics::UpdateNodeContext &nodeContext, MaxSDK::Graphics::UpdateViewContext &viewContext, MaxSDK::Graphics::IRenderItemContainer &targetRenderItemContainer)
 
const MaxSDK::Graphics::RenderItemHandleArrayGetRenderItems () const
 
void GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box)
 
void GetLocalBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box)
 
void Snap (TimeValue t, INode *inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt)
 
CreateMouseCallBackGetCreateMouseCallBack ()
 
BOOL HasUVW ()
 
void SetGenUVW (BOOL sw)
 
void SetExtendedDisplay (int vflags)
 
ObjectState Eval (TimeValue time)
 
void InitNodeName (MSTR &s)
 
Interval ObjectValidity (TimeValue t)
 
int CanConvertToType (Class_ID obtype)
 
ObjectConvertToType (TimeValue t, Class_ID obtype)
 
void GetCollapseTypes (Tab< Class_ID > &clist, Tab< MSTR * > &nlist)
 
void GetDeformBBox (TimeValue t, Box3 &box, Matrix3 *tm, BOOL useSel)
 
int IntersectRay (TimeValue t, Ray &r, float &at, Point3 &norm)
 

Public Attributes

TYPE * delegate
 

Constructor & Destructor Documentation

◆ MSObjectXtnd()

MSObjectXtnd ( )
inline
552 : MS_SUPER() {}

Member Function Documentation

◆ DeleteThis()

void DeleteThis ( )

◆ get_delegate()

ReferenceTarget* get_delegate ( )
inline
555 { return delegate; }
TYPE * delegate
Definition: mxsPlugin.h:548

◆ GetClassName()

void GetClassName ( MSTR s,
bool  localized = true 
) const
inlineoverride
558 { UNUSED_PARAM(localized); s = MS_SUPER::pc->name->to_string(); } // non-localized name
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18

◆ ClassID()

Class_ID ClassID ( )
inline
559 { return MS_SUPER::pc->class_id; }

◆ FreeCaches()

void FreeCaches ( )
inline
560 { }; // { delegate->FreeCaches(); }

◆ NumSubs()

int NumSubs ( )
inline
561 { return MS_SUPER::pblocks.Count() + 1; }

◆ SubAnim()

Animatable* SubAnim ( int  i)
inline
562 { if (i == 0) return delegate; else return MS_SUPER::pblocks[i-1]; }

◆ SubAnimName()

MSTR SubAnimName ( int  i,
bool  localized = true 
)
inlineoverride
564  {
565  if (i == 0)
566  {
567  return delegate->GetObjectName(localized);
568  }
569  else if (MS_SUPER::pblocks[i - 1]->GetDesc()->local_name != 0)
570  {
571  return localized ? MS_SUPER::pblocks[i - 1]->GetLocalName() : MS_SUPER::pblocks[i - 1]->GetDesc()->int_name.data();
572  }
573  else
574  {
575  return _T("");
576  }
577  }

◆ NumParamBlocks()

int NumParamBlocks ( )
inline
578 { return MS_SUPER::pblocks.Count(); }

◆ GetParamBlock()

IParamBlock2* GetParamBlock ( int  i)
inline
579 { return MS_SUPER::pblocks[i]; }

◆ GetParamBlockByID()

IParamBlock2* GetParamBlockByID ( BlockID  id)
inline
580 { return MSPlugin::GetParamBlockByID(id); }
ScripterExport IParamBlock2 * GetParamBlockByID(BlockID id)

◆ GetInterface() [1/2]

void* GetInterface ( ULONG  id)
inline
581 { if (id == I_MAXSCRIPTPLUGIN) return (MSPlugin*)this; else return MS_SUPER::GetInterface(id); }
CoreExport FPInterface * GetInterface(SClass_ID super, Class_ID cls, Interface_ID id)
Get ID'd interface from ClassDesc for given class/sclass.
Definition: mxsPlugin.h:350
#define I_MAXSCRIPTPLUGIN
An Animatable supporting this interface is a MSPlugin.
Definition: AnimatableInterfaceIDs.h:67

◆ GetInterface() [2/2]

virtual BaseInterface* GetInterface ( Interface_ID  id)
inlinevirtual
584  {
586  // GetInterface(Interface_ID) was added after the MAX 4
587  // SDK shipped. This did not break the SDK because
588  // it only calls the base class implementation. If you add
589  // any other code here, plugins compiled with the MAX 4 SDK
590  // that derive from MSObjectXtnd and call Base class
591  // implementations of GetInterface(Interface_ID), will not call
592  // that code in this routine. This means that the interface
593  // you are adding will not be exposed for these objects,
594  // and could have unexpected results.
595  return MS_SUPER::GetInterface(id);
597  }

◆ NumRefs()

int NumRefs ( )

◆ GetReference()

RefTargetHandle GetReference ( int  i)

◆ SetReference()

void SetReference ( int  i,
RefTargetHandle  rtarg 
)

◆ GetObjectName()

const MCHAR* GetObjectName ( bool  localized = true) const
inlineoverride
608 { return MS_SUPER::pc->name->to_string(); } // non-localized name

◆ BeginEditParams()

void BeginEditParams ( IObjParam objParam,
ULONG  vflags,
Animatable pPrev 
)

◆ EndEditParams()

void EndEditParams ( IObjParam objParam,
ULONG  vflags,
Animatable pNext 
)

◆ HitTest()

int HitTest ( TimeValue  t,
INode inode,
int  type,
int  crossing,
int  vflags,
IPoint2 p,
ViewExp vpt 
)
inline
612  { return delegate->HitTest(t, inode, type, crossing, vflags, p, vpt); }

◆ Display()

int Display ( TimeValue  t,
INode inode,
ViewExp vpt,
int  vflags 
)
inline
614  { return delegate->Display(t, inode, vpt, vflags); }

◆ GetObjectDisplayRequirement()

virtual unsigned long GetObjectDisplayRequirement ( ) const
virtual

◆ PrepareDisplay()

virtual bool PrepareDisplay ( const MaxSDK::Graphics::UpdateDisplayContext prepareDisplayContext)
virtual

◆ UpdatePerNodeItems()

virtual bool UpdatePerNodeItems ( const MaxSDK::Graphics::UpdateDisplayContext updateDisplayContext,
MaxSDK::Graphics::UpdateNodeContext nodeContext,
MaxSDK::Graphics::IRenderItemContainer targetRenderItemContainer 
)
virtual

◆ UpdatePerViewItems()

virtual bool UpdatePerViewItems ( const MaxSDK::Graphics::UpdateDisplayContext updateDisplayContext,
MaxSDK::Graphics::UpdateNodeContext nodeContext,
MaxSDK::Graphics::UpdateViewContext viewContext,
MaxSDK::Graphics::IRenderItemContainer targetRenderItemContainer 
)
virtual

◆ GetRenderItems()

const MaxSDK::Graphics::RenderItemHandleArray& GetRenderItems ( ) const
inline
631  { return delegate->GetRenderItems(); }

◆ GetWorldBoundBox()

void GetWorldBoundBox ( TimeValue  t,
INode inode,
ViewExp vpt,
Box3 box 
)
inline
632 { delegate->GetWorldBoundBox(t, inode, vpt, box); }
MAXClass box

◆ GetLocalBoundBox()

void GetLocalBoundBox ( TimeValue  t,
INode inode,
ViewExp vpt,
Box3 box 
)
inline
633 { delegate->GetLocalBoundBox(t, inode, vpt, box ); }

◆ Snap()

void Snap ( TimeValue  t,
INode inode,
SnapInfo snap,
IPoint2 p,
ViewExp vpt 
)
inline
634 { delegate->Snap(t, inode, snap, p, vpt); }

◆ GetCreateMouseCallBack()

CreateMouseCallBack* GetCreateMouseCallBack ( )

◆ HasUVW()

BOOL HasUVW ( )
inline
636 { return delegate->HasUVW(); }

◆ SetGenUVW()

void SetGenUVW ( BOOL  sw)
inline
637 { delegate->SetGenUVW(sw); }

◆ SetExtendedDisplay()

void SetExtendedDisplay ( int  vflags)
inline
638 { delegate->SetExtendedDisplay( vflags); } // for setting mode-dependent display attributes

◆ Eval()

ObjectState Eval ( TimeValue  time)

◆ InitNodeName()

void InitNodeName ( MSTR s)
inline
642 {s = GetObjectName(true);} // non-localized name
const MCHAR * GetObjectName(bool localized=true) const override
Definition: mxsPlugin.h:608

◆ ObjectValidity()

Interval ObjectValidity ( TimeValue  t)

◆ CanConvertToType()

int CanConvertToType ( Class_ID  obtype)
inline
644 { return delegate->CanConvertToType(obtype); }

◆ ConvertToType()

Object* ConvertToType ( TimeValue  t,
Class_ID  obtype 
)
inline
645  {
646  // CAL-10/1/2002: Don't return the delegate, because it might be deleted.
647  // Return a copy of the delegate instead. (422964)
648  Object* obj = delegate->ConvertToType(t, obtype);
649  if (obj == delegate)
650  {
651  obj = delegate->MakeShallowCopy(OBJ_CHANNELS);
652  obj->LockChannels(OBJ_CHANNELS); //if we shallow copy these channels they need to be locked since they will get double deleted
653  }
654  return obj;
655  }
The object class is the base class for all objects.
Definition: object.h:1428
void LockChannels(ChannelMask channels)
Implemented by the System.
Definition: object.h:1548
const ChannelMask OBJ_CHANNELS
All geometry channels.
Definition: channels.h:97

◆ GetCollapseTypes()

void GetCollapseTypes ( Tab< Class_ID > &  clist,
Tab< MSTR * > &  nlist 
)
inline
656 { delegate->GetCollapseTypes(clist, nlist); }

◆ GetDeformBBox()

void GetDeformBBox ( TimeValue  t,
Box3 box,
Matrix3 tm,
BOOL  useSel 
)
inline
657 { delegate->GetDeformBBox(t, box, tm, useSel); }

◆ IntersectRay()

int IntersectRay ( TimeValue  t,
Ray r,
float &  at,
Point3 norm 
)
inline
658 { return delegate->IntersectRay(t, r, at, norm); }

Member Data Documentation

◆ delegate

TYPE* delegate