Go to
the documentation of this file.
00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #pragma once
00020
00021 #include "PFExport.h"
00022 #include "IPFAction.h"
00023 #include "IPViewItem.h"
00024 #include "IPFIntegrator.h"
00025 #include "IPFSystem.h"
00026 #include "OneClickCreateCallBack.h"
00027 #include "PFClassIDs.h"
00028 #include "IPViewManager.h"
00029 #include "RandObjLinker.h"
00030 #include "..\iparamb2.h"
00031
00032 class PFSimpleAction: public HelperObject,
00033 public IPFAction,
00034 public IPViewItem
00035 {
00036 public:
00037 PFExport virtual ~PFSimpleAction();
00038
00039
00040 PFExport virtual BaseInterface* GetInterface(Interface_ID id);
00041
00042
00043 PFExport virtual void DeleteThis();
00044 virtual int NumSubs() { return 1; }
00045 PFExport virtual Animatable* SubAnim(int i);
00046 PFExport virtual MSTR SubAnimName(int i);
00047 PFExport BOOL SelectSubAnim(int subNum);
00048 PFExport virtual ParamDimension* GetParamDimension(int i);
00049 PFExport virtual int SubNumToRefNum(int subNum);
00050 virtual BOOL CanCopyAnim() { return FALSE; }
00051 PFExport virtual int HasSubElements(int type);
00052 #pragma warning(push)
00053 #pragma warning(disable:4100)
00054 virtual BOOL CanDeleteSubAnim(int i) { return FALSE; }
00055 virtual BOOL IsAnimated() { return _pblock()->IsAnimated(); }
00056 virtual void FreeCaches() { ; }
00057 virtual int NumParamBlocks() { return 1; }
00058 PFExport virtual IParamBlock2* GetParamBlock(int i);
00059 PFExport virtual IParamBlock2* GetParamBlockByID(short id);
00060
00061
00062 virtual int NumRefs() { return 1; }
00063 PFExport virtual RefTargetHandle GetReference(int i);
00064 protected:
00065 PFExport virtual void SetReference(int i, RefTargetHandle rtarg);
00066 public:
00067 PFExport virtual RefResult NotifyRefChanged(Interval changeInt,RefTargetHandle hTarget,PartID& partID, RefMessage message);
00068 PFExport virtual int RemapRefOnLoad(int iref);
00069 PFExport virtual IOResult Save(ISave *isave);
00070 PFExport virtual IOResult Load(ILoad *iload);
00071
00072
00073 virtual CreateMouseCallBack* GetCreateMouseCallBack() { return OneClickCreateCallBack::Instance(); }
00074 virtual BOOL OKToChangeTopology(MSTR &modName) { return FALSE; }
00075
00076
00077 virtual void InitNodeName(MSTR& s) { s = GetObjectName(); }
00078 virtual ObjectState Eval(TimeValue t) { return ObjectState(this); }
00079
00080
00081
00082
00083
00084
00085 PFSimpleAction()
00086 {
00087 _pblock() = NULL;
00088 RegisterParticleFlowNotification();
00089 }
00090
00091
00092
00093
00094
00095
00096
00097 virtual void GetClassName(MSTR& s) { ; }
00098 virtual Class_ID ClassID() { return Class_ID(0,0); }
00099 virtual void BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev) = 0;
00100
00101
00102
00103
00104 virtual void EndEditParams(IObjParam *ip, ULONG flags,Animatable *next) = 0;
00105
00106
00107
00108
00109
00110 virtual RefTargetHandle Clone(RemapDir &remap) = 0;
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 virtual MCHAR *GetObjectName() = 0;
00121
00122
00123 PFExport virtual bool Init(IObject* pCont, Object* pSystem, INode* node, Tab<Object*>& actions, Tab<INode*>& actionNodes);
00124 PFExport virtual bool Release(IObject* pCont);
00125
00126
00127
00128
00129 virtual bool SupportRand() const { return false; }
00130 virtual int GetRand() { return 0; }
00131 virtual void SetRand(int seed) { ; }
00132 #pragma warning(pop)
00133 PFExport virtual int NewRand();
00134
00135 virtual const ParticleChannelMask& ChannelsUsed(const Interval& time) const = 0;
00136 virtual const Interval ActivityInterval() const = 0;
00137
00138 PFExport virtual IObject* GetCurrentState(IObject* pContainer);
00139 PFExport virtual void SetCurrentState(IObject* actionState, IObject* pContainer);
00140
00141
00142 virtual int NumPViewParamBlocks() const { return 1; }
00143 PFExport virtual IParamBlock2* GetPViewParamBlock(int i) const;
00144
00145
00146 virtual ClassDesc* GetClassDesc() const = 0;
00147
00148 public:
00149 PFExport void RefreshUI(WPARAM message, IParamMap2* map=NULL) const;
00150 PFExport void UpdatePViewUI(ParamID updateID) const;
00151
00152
00153 IParamBlock2* pblock() const { return m_pblock; }
00154 const RandObjLinker& randLinker() const { return m_randLinker; }
00155
00156
00157 IParamBlock2*& _pblock() { return m_pblock; }
00158 RandObjLinker& _randLinker() { return m_randLinker; }
00159
00160 protected:
00161
00162 IParamBlock2* m_pblock;
00163
00164
00165
00166
00167 RandObjLinker m_randLinker;
00168 };
00169