Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #pragma once
00014
00015 #include "coreexp.h"
00016 #include "maxtypes.h"
00017 #include "object.h"
00018
00019
00020
00021 extern CoreExport Class_ID derivObjClassID;
00022 extern CoreExport Class_ID WSMDerivObjClassID;
00023
00024
00039 class IDerivedObject : public Object
00040 {
00041 public:
00042
00043
00044
00056 virtual void AddModifier(Modifier *mod, ModContext *mc=NULL, int before=0)=0;
00061 virtual void DeleteModifier(int index=0)=0;
00064 virtual int NumModifiers()=0;
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00079 virtual Object *GetObjRef()=0;
00088 virtual RefResult ReferenceObject(Object *pob)=0;
00089
00090
00095 virtual Modifier *GetModifier(int index)=0;
00096
00097
00105 virtual void SetModifier(int index, Modifier *mod)=0;
00106
00107
00112 virtual ModContext* GetModContext(int index)=0;
00113
00126 virtual ObjectState Eval(TimeValue t, int modIndex = 0)=0;
00127
00128
00129 void NotifyTarget(int msg, RefMakerHandle rm) { if (GetObjRef()) GetObjRef()->NotifyTarget(msg, rm); }
00130
00131 using Object::GetInterface;
00132 CoreExport virtual void* GetInterface(ULONG id);
00133 };
00134
00135
00136
00137
00143 CoreExport IDerivedObject *CreateWSDerivedObject(Object *pob=NULL);
00149 CoreExport IDerivedObject *CreateDerivedObject(Object *pob=NULL);
00150
00151 enum PipeEnumResult {
00152 PIPE_ENUM_CONTINUE,
00153 PIPE_ENUM_STOP
00154 };
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00177 class GeomPipelineEnumProc : public InterfaceServer
00178 {
00179 public:
00200 virtual PipeEnumResult proc(ReferenceTarget *object, IDerivedObject *derObj, int index)=0;
00201 };
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00229 CoreExport int EnumGeomPipeline(GeomPipelineEnumProc *gpep, INode *start, bool includeEmptyDOs = false);
00245 CoreExport int EnumGeomPipeline(GeomPipelineEnumProc *gpep, Object *start, bool includeEmptyDOs = false);
00267 CoreExport int EnumGeomPipeline(GeomPipelineEnumProc *gpep, IDerivedObject *start, int modIndex = 0, bool includeEmptyDOs = false);
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00292 class NotifyCollapseEnumProc : public GeomPipelineEnumProc
00293 {
00294 bool bPreCollapse;
00295 INode *node;
00296 Object *collapsedObject;
00297 public:
00314 NotifyCollapseEnumProc(bool preCollapse, INode *n, Object *collapsedObj = NULL) : bPreCollapse(preCollapse), node(n), collapsedObject(collapsedObj) {}
00318 virtual PipeEnumResult proc(ReferenceTarget *object,IDerivedObject *derObj, int index) {
00319 if(object->ClassID() == Class_ID(BASENODE_CLASS_ID,0))
00320 return PIPE_ENUM_CONTINUE;
00321
00322 if(bPreCollapse)
00323 ((BaseObject *) object)->NotifyPreCollapse(node, derObj, index);
00324 else
00325 ((BaseObject *) object)->NotifyPostCollapse(node, collapsedObject, derObj, index);
00326
00327 return PIPE_ENUM_CONTINUE;
00328 }
00329
00330 };
00331
00333
00339 class NotifyCollapseMaintainCustAttribEnumProc : public GeomPipelineEnumProc
00340 {
00341 bool bPreCollapse;
00342 INode *node;
00343 Object *collapsedObject;
00344 bool bCopied;
00345 public:
00346
00348
00352 CoreExport NotifyCollapseMaintainCustAttribEnumProc(bool preCollapse, INode *n, Object *collapsedObj = NULL);
00354
00359 CoreExport virtual PipeEnumResult proc(ReferenceTarget *object,IDerivedObject *derObj, int index);
00360
00361 };
00362
00364
00381 class NotifyCollapseMaintainCustAttribEnumProc2 : public GeomPipelineEnumProc
00382 {
00383 INode *node;
00384 Object *collapsedObject;
00385 Object *nodeBaseObject;
00386 bool bPreCollapse;
00387 bool bCopied;
00388 bool bIgnoreBaseObjectCAs;
00389 public:
00390
00392
00397 CoreExport NotifyCollapseMaintainCustAttribEnumProc2(bool preCollapse, INode *node, bool ignoreBaseObjectCAs = false, Object *collapsedObj = NULL);
00399
00406 CoreExport virtual PipeEnumResult proc(ReferenceTarget *object,IDerivedObject *derObj, int index);
00407
00408 };
00409