IParticleGroup.h

Go to the documentation of this file.
00001 
00007 /**********************************************************************
00008  *<
00009     CREATED BY: Oleg Bayborodin
00010 
00011     HISTORY: created 12-10-01
00012 
00013  *> Copyright (c) 2001, All Rights Reserved.
00014  **********************************************************************/
00015 #pragma once
00016 
00017 #include "PFExport.h"
00018 #include "..\ifnpub.h"
00019 #include "..\object.h"
00020 
00021 PFExport Object* GetPFObject(Object* obj);
00022 // interface ID
00023 #define PARTICLEGROUP_INTERFACE Interface_ID(0x2c712d9f, 0x7bc54cb0) 
00024 #define GetParticleGroupInterface(obj) ((IParticleGroup*)((GetPFObject(obj))->GetInterface(PARTICLEGROUP_INTERFACE))) 
00025 
00026 class IParticleGroup : public FPMixinInterface
00027 {
00028 
00029 public:
00037     virtual INode* GetParticleSystem() const = 0;
00038 
00039 
00043     virtual void SetParticleSystem(INode* pSystem) = 0;
00044 
00048     virtual INode* GetActionList() const = 0;
00049 
00053     virtual void SetActionList(INode* aList) = 0;
00054 
00059     virtual int GetActiveStatus() const = 0;
00060 
00064     virtual void SetActiveStatus(int status) = 0;
00065 
00074     virtual int UpdateActiveStatus() = 0;
00075 
00081     virtual void UpdateActionSet() = 0;
00082 
00087     virtual Mtl* GetMaterial() const = 0;
00088 
00093     virtual DWORD GetWireColor() const = 0;
00094 
00098     virtual IObject* GetParticleContainer() const = 0;
00099 
00103     virtual const Interval& GetValidityInterval() const = 0;
00104 
00108     virtual void SetValidityInterval(Interval& validInterval) = 0;
00109 
00113     virtual void Init(TimeValue time) = 0;
00114 
00120     virtual TimeValue GetFertilityTime() = 0;
00121 
00125     virtual bool Update(TimeValue t) = 0;
00126 
00132     virtual bool PreUpdate(TimeValue t) = 0;
00133 
00139     virtual bool PostUpdate(TimeValue t) = 0;
00140 
00146     virtual bool TransferSurplusContainer(IObject*& pCont, INode*& actionListTo) = 0;
00147 
00152     virtual bool AppendSurplusContainer(IObject* pCont) = 0;
00153 
00161     virtual bool IsSync(TimeValue& time) = 0;
00162 
00169     virtual bool InstantUpdate(TimeValue t) = 0;
00170 
00174     virtual bool SetFinalUpdateTime(TimeValue t) = 0;
00175 
00180     virtual void SetHandle(ULONG handle) = 0;
00181 
00182 
00187     enum { invalidateCurrent=0, invalidateViewport=1, invalidateRender=2, invalidateBoth=3};
00188     virtual void InvalidateContainer(int type=invalidateCurrent) = 0;
00189 
00193     virtual void InvalidateCaches(int type=invalidateCurrent) = 0;
00194 
00195 
00204     virtual bool HasDelayedInvalidation() const = 0;
00205  
00209     virtual bool DoDelayedInvalidation() = 0;
00210 
00216     virtual void InvalidateActions() = 0;
00217  
00221     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLEGROUP_INTERFACE); }
00222 };
00223 
00224 inline IParticleGroup* ParticleGroupInterface(Object* obj) {
00225     return ((obj == NULL) ? NULL : GetParticleGroupInterface(obj));
00226 };
00227 
00228 inline IParticleGroup* ParticleGroupInterface(INode* node) {
00229     return ((node == NULL) ? NULL : ParticleGroupInterface(node->GetObjectRef()));
00230 };
00231 
00232