3ds Max C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MSObjectXtnd< TYPE, MS_SUPER > Class Template Reference

#include <mxsPlugin.h>

+ Inheritance diagram for MSObjectXtnd< TYPE, MS_SUPER >:

Public Member Functions

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

Public Attributes

TYPE * delegate
 

Constructor & Destructor Documentation

◆ MSObjectXtnd()

MSObjectXtnd ( )
inline
554: MS_SUPER() {}

Member Function Documentation

◆ DeleteThis()

void DeleteThis ( )
override

◆ get_delegate()

ReferenceTarget * get_delegate ( )
inlineoverride
557{ return delegate; }
TYPE * delegate
Definition: mxsPlugin.h:550

◆ GetClassName()

void GetClassName ( MSTR s,
bool  localized 
) const
inlineoverride
560{ s = (localized) ? MS_SUPER::pc->ClassName() : MS_SUPER::pc->NonLocalizedClassName(); }

◆ ClassID()

Class_ID ClassID ( )
inlineoverride
561{ return MS_SUPER::pc->class_id; }

◆ FreeCaches()

void FreeCaches ( )
inlineoverride
562{ }; // { delegate->FreeCaches(); }

◆ NumSubs()

int NumSubs ( )
inlineoverride
563{ return MS_SUPER::pblocks.Count() + 1; }

◆ SubAnim()

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

◆ SubAnimName()

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

◆ NumParamBlocks()

int NumParamBlocks ( )
inlineoverride
577{ return MS_SUPER::pblocks.Count(); }

◆ GetParamBlock()

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

◆ GetParamBlockByID()

IParamBlock2 * GetParamBlockByID ( BlockID  id)
inlineoverride
579{ return MSPlugin::GetParamBlockByID(id); }
ScripterExport IParamBlock2 * GetParamBlockByID(BlockID id)

◆ GetInterface() [1/2]

void * GetInterface ( ULONG  id)
inlineoverride
580{ if (id == I_MAXSCRIPTPLUGIN) return (MSPlugin*)this; return MS_SUPER::GetInterface(id); }
Definition: mxsPlugin.h:348
#define I_MAXSCRIPTPLUGIN
An Animatable supporting this interface is a MSPlugin.
Definition: AnimatableInterfaceIDs.h:64

◆ GetInterface() [2/2]

BaseInterface * GetInterface ( Interface_ID  id)
inlineoverride
581{ return MS_SUPER::GetInterface(id); }

◆ NumRefs()

int NumRefs ( )
override

◆ GetReference()

RefTargetHandle GetReference ( int  i)
override

◆ SetReference()

void SetReference ( int  i,
RefTargetHandle  rtarg 
)
override

◆ GetObjectName()

const MCHAR * GetObjectName ( bool  localized = true) const
inlineoverride
589{ return (localized) ? MS_SUPER::pc->ClassName() : MS_SUPER::pc->NonLocalizedClassName(); }

◆ BeginEditParams()

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

◆ EndEditParams()

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

◆ HitTest()

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

◆ Display()

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

◆ GetObjectDisplayRequirement()

unsigned long GetObjectDisplayRequirement ( ) const
override

◆ PrepareDisplay()

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

◆ UpdatePerNodeItems()

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

◆ UpdatePerViewItems()

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

◆ GetRenderItems()

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

◆ GetWorldBoundBox()

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

◆ GetLocalBoundBox()

void GetLocalBoundBox ( TimeValue  t,
INode inode,
ViewExp vpt,
Box3 &  box 
)
inlineoverride
614{ delegate->GetLocalBoundBox(t, inode, vpt, box ); }

◆ Snap()

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

◆ GetCreateMouseCallBack()

CreateMouseCallBack * GetCreateMouseCallBack ( )
override

◆ HasUVW()

BOOL HasUVW ( )
inlineoverride
617{ return delegate->HasUVW(); }

◆ SetGenUVW()

void SetGenUVW ( BOOL  sw)
inlineoverride
618{ delegate->SetGenUVW(sw); }

◆ SetExtendedDisplay()

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

◆ Eval()

ObjectState Eval ( TimeValue  time)
override

◆ InitNodeName()

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

◆ ObjectValidity()

Interval ObjectValidity ( TimeValue  t)
override

◆ CanConvertToType()

int CanConvertToType ( Class_ID  obtype)
inlineoverride
626 {
627 if (obtype == anyObjectClassID)
628 return TRUE;
629 return delegate->CanConvertToType(obtype);
630 }
CoreExport Class_ID anyObjectClassID
A modifier specifying this Class ID as its input type takes any object type as input.

◆ ConvertToType()

Object * ConvertToType ( TimeValue  t,
Class_ID  obtype 
)
inlineoverride
632 {
633 if (obtype == anyObjectClassID)
634 return this;
635 // CAL-10/1/2002: Don't return the delegate, because it might be deleted.
636 // Return a copy of the delegate instead. (422964)
637 Object* obj = delegate->ConvertToType(t, obtype);
638 if (obj == delegate)
639 {
640 obj = delegate->MakeShallowCopy(OBJ_CHANNELS);
641 obj->LockChannels(OBJ_CHANNELS); //if we shallow copy these channels they need to be locked since they will get double deleted
642 }
643 return obj;
644 }
The object class is the base class for all objects.
Definition: object.h:1418
void LockChannels(ChannelMask channels)
Implemented by the System.
Definition: object.h:1538
const ChannelMask OBJ_CHANNELS
All geometry channels.
Definition: channels.h:97

◆ GetCollapseTypes()

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

◆ GetDeformBBox()

void GetDeformBBox ( TimeValue  t,
Box3 &  box,
Matrix3 *  tm,
BOOL  useSel 
)
inlineoverride
646{ delegate->GetDeformBBox(t, box, tm, useSel); }

◆ IntersectRay()

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

Member Data Documentation

◆ delegate

TYPE* delegate