3ds Max C++ API Reference
Loading...
Searching...
No Matches
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
572: MS_SUPER() {}

Member Function Documentation

◆ DeleteThis()

void DeleteThis ( )
override

◆ get_delegate()

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

◆ GetClassName()

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

◆ ClassID()

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

◆ FreeCaches()

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

◆ NumSubs()

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

◆ SubAnim()

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

◆ SubAnimName()

MSTR SubAnimName ( int  i,
bool  localized = true 
)
inlineoverride
584 {
585 if (i == 0)
586 {
587 return delegate->GetObjectName(localized);
588 }
589 if (MS_SUPER::pblocks[i - 1]->GetDesc()->local_name != 0)
590 {
591 return localized ? MS_SUPER::pblocks[i - 1]->GetLocalName() : MS_SUPER::pblocks[i - 1]->GetDesc()->int_name.data();
592 }
593 return _T("");
594 }

◆ NumParamBlocks()

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

◆ GetParamBlock()

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

◆ GetParamBlockByID()

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

◆ GetInterface() [1/2]

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

◆ GetInterface() [2/2]

BaseInterface * GetInterface ( Interface_ID  id)
inlineoverride
601 {
603 // GetInterface(Interface_ID) was added after the MAX 4
604 // SDK shipped. This did not break the SDK because
605 // it only calls the base class implementation. If you add
606 // any other code here, plugins compiled with the MAX 4 SDK
607 // that derive from MSObjectXtnd and call Base class
608 // implementations of GetInterface(Interface_ID), will not call
609 // that code in this routine. This means that the interface
610 // you are adding will not be exposed for these objects,
611 // and could have unexpected results.
612 return MS_SUPER::GetInterface(id);
614 }

◆ 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
622{ 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
626 { return delegate->HitTest(t, inode, type, crossing, vflags, p, vpt); }

◆ Display()

int Display ( TimeValue  t,
INode inode,
ViewExp vpt,
int  vflags 
)
inlineoverride
628 { 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
645 { return delegate->GetRenderItems(); }

◆ GetWorldBoundBox()

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

◆ GetLocalBoundBox()

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

◆ Snap()

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

◆ GetCreateMouseCallBack()

CreateMouseCallBack * GetCreateMouseCallBack ( )
override

◆ HasUVW()

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

◆ SetGenUVW()

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

◆ SetExtendedDisplay()

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

◆ Eval()

ObjectState Eval ( TimeValue  time)
override

◆ InitNodeName()

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

◆ ObjectValidity()

Interval ObjectValidity ( TimeValue  t)
override

◆ CanConvertToType()

int CanConvertToType ( Class_ID  obtype)
inlineoverride
659 {
660 if (obtype == anyObjectClassID)
661 return TRUE;
662 return delegate->CanConvertToType(obtype);
663 }
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
665 {
666 if (obtype == anyObjectClassID)
667 return this;
668 // CAL-10/1/2002: Don't return the delegate, because it might be deleted.
669 // Return a copy of the delegate instead. (422964)
670 Object* obj = delegate->ConvertToType(t, obtype);
671 if (obj == delegate)
672 {
673 obj = delegate->MakeShallowCopy(OBJ_CHANNELS);
674 obj->LockChannels(OBJ_CHANNELS); //if we shallow copy these channels they need to be locked since they will get double deleted
675 }
676 return obj;
677 }
The object class is the base class for all objects.
Definition: object.h:1431
void LockChannels(ChannelMask channels)
Implemented by the System.
Definition: object.h:1551
const ChannelMask OBJ_CHANNELS
All geometry channels.
Definition: channels.h:97

◆ GetCollapseTypes()

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

◆ GetDeformBBox()

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

◆ IntersectRay()

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

Member Data Documentation

◆ delegate

TYPE* delegate