Public Member Functions | Public Attributes

MSObjectXtnd< TYPE, MS_SUPER > Class Template Reference

Search for all occurrences

template<class TYPE, class MS_SUPER>
class MSObjectXtnd< TYPE, MS_SUPER >

#include <mxsPlugin.h>

List of all members.

Public Member Functions

void  DeleteThis ()
  MSObjectXtnd ()
ReferenceTarget get_delegate ()
void  GetClassName (MSTR &s)
Class_ID  ClassID ()
void  FreeCaches ()
int  NumSubs ()
Animatable SubAnim (int i)
MSTR  SubAnimName (int i)
int  NumParamBlocks ()
IParamBlock2 GetParamBlock (int i)
IParamBlock2 GetParamBlockByID (BlockID id)
void *  GetInterface (ULONG id)
virtual BaseInterface GetInterface (Interface_ID id)
int  NumRefs ()
RefTargetHandle  GetReference (int i)
void  SetReference (int i, RefTargetHandle rtarg)
MCHAR *  GetObjectName ()
void  BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev)
void  EndEditParams (IObjParam *ip, ULONG flags, Animatable *next)
int  HitTest (TimeValue t, INode *inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt)
int  Display (TimeValue t, INode *inode, ViewExp *vpt, int flags)
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)
CreateMouseCallBack GetCreateMouseCallBack ()
BOOL  HasUVW ()
void  SetGenUVW (BOOL sw)
void  SetExtendedDisplay (int flags)
ObjectState  Eval (TimeValue time)
void  InitNodeName (MSTR &s)
Interval  ObjectValidity (TimeValue t)
int  CanConvertToType (Class_ID obtype)
Object ConvertToType (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 ( ) [inline]
: MS_SUPER() {}

Member Function Documentation

void DeleteThis ( )
ReferenceTarget* get_delegate ( ) [inline]
void GetClassName ( MSTR s ) [inline]
{ s = MSTR(pc->class_name->to_string()); }  
Class_ID ClassID ( ) [inline]
{ return pc->class_id; }
void FreeCaches ( ) [inline]
{ }; // { delegate->FreeCaches(); }         
int NumSubs ( ) [inline]
{ return pblocks.Count() + 1; }  
Animatable* SubAnim ( int  i ) [inline]
{ if (i == 0) return delegate; else return pblocks[i-1]; }
MSTR SubAnimName ( int  i ) [inline]
{ if (i == 0) return delegate->GetObjectName(); else return pblocks[i-1]->GetLocalName(); }
int NumParamBlocks ( ) [inline]
{ return pblocks.Count(); }
IParamBlock2* GetParamBlock ( int  i ) [inline]
{ return pblocks[i]; }
IParamBlock2* GetParamBlockByID ( BlockID  id ) [inline]
void* GetInterface ( ULONG  id ) [inline]
{ if (id == I_MAXSCRIPTPLUGIN) return (MSPlugin*)this; else return MS_SUPER::GetInterface(id); }
virtual BaseInterface* GetInterface ( Interface_ID  id ) [inline, virtual]
                                                        {
        // GetInterface(Interface_ID) was added after the MAX 4
        // SDK shipped. This did not break the SDK because
        // it only calls the base class implementation. If you add
        // any other code here, plugins compiled with the MAX 4 SDK
        // that derive from MSObjectXtnd and call Base class
        // implementations of GetInterface(Interface_ID), will not call
        // that code in this routine. This means that the interface
        // you are adding will not be exposed for these objects,
        // and could have unexpected results.
        return MS_SUPER::GetInterface(id); 
    }
int NumRefs ( )
RefTargetHandle GetReference ( int  i )
void SetReference ( int  i,
RefTargetHandle  rtarg 
)
MCHAR* GetObjectName ( ) [inline]
{ return pc->class_name->to_string(); }
void BeginEditParams ( IObjParam ip,
ULONG  flags,
Animatable prev 
)
void EndEditParams ( IObjParam ip,
ULONG  flags,
Animatable next 
)
int HitTest ( TimeValue  t,
INode inode,
int  type,
int  crossing,
int  flags,
IPoint2 p,
ViewExp vpt 
) [inline]

Reimplemented in MSHelperXtnd, MSLightXtnd, and MSCameraXtnd.

                        { return delegate->HitTest(t, inode, type, crossing, flags, p, vpt); }
int Display ( TimeValue  t,
INode inode,
ViewExp vpt,
int  flags 
) [inline]

Reimplemented in MSHelperXtnd, MSLightXtnd, and MSCameraXtnd.

                        { return delegate->Display(t, inode, vpt, flags); }     
void GetWorldBoundBox ( TimeValue  t,
INode inode,
ViewExp vpt,
Box3 box 
) [inline]

Reimplemented in MSHelperXtnd, MSLightXtnd, and MSCameraXtnd.

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

Reimplemented in MSHelperXtnd, MSLightXtnd, and MSCameraXtnd.

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

Reimplemented in MSHelperXtnd, MSLightXtnd, and MSCameraXtnd.

{ delegate->Snap(t, inode, snap, p, vpt); }
CreateMouseCallBack* GetCreateMouseCallBack ( )
BOOL HasUVW ( ) [inline]

Reimplemented in MSShapeXtnd.

{ return delegate->HasUVW(); }
void SetGenUVW ( BOOL  sw ) [inline]

Reimplemented in MSShapeXtnd.

{ delegate->SetGenUVW(sw); }
void SetExtendedDisplay ( int  flags ) [inline]
{ delegate->SetExtendedDisplay( flags); }      // for setting mode-dependent display attributes
ObjectState Eval ( TimeValue  time )
void InitNodeName ( MSTR s ) [inline]
Interval ObjectValidity ( TimeValue  t )
int CanConvertToType ( Class_ID  obtype ) [inline]
{ return delegate->CanConvertToType(obtype); }
Object* ConvertToType ( TimeValue  t,
Class_ID  obtype 
) [inline]
                                                                {
                        // CAL-10/1/2002: Don't return the delegate, because it might be deleted.
                        //      Return a copy of the delegate instead. (422964)
                        Object* obj = delegate->ConvertToType(t, obtype);
                        if (obj == delegate) obj = delegate->MakeShallowCopy(OBJ_CHANNELS);
                        return obj;
                    }
void GetCollapseTypes ( Tab< Class_ID > &  clist,
Tab< MSTR * > &  nlist 
) [inline]
{ delegate->GetCollapseTypes(clist, nlist); }
void GetDeformBBox ( TimeValue  t,
Box3 box,
Matrix3 tm,
BOOL  useSel 
) [inline]

Reimplemented in MSHelperXtnd, MSLightXtnd, and MSCameraXtnd.

{ delegate->GetDeformBBox(t, box, tm, useSel); }
int IntersectRay ( TimeValue  t,
Ray r,
float &  at,
Point3 norm 
) [inline]

Reimplemented in MSShapeXtnd.

{ return delegate->IntersectRay(t, r, at, norm); }

Member Data Documentation

TYPE* delegate