IParticleChannelNew.h

Go to the documentation of this file.
00001 
00007 /**********************************************************************
00008  *<
00009     CREATED BY: Oleg Bayborodin
00010 
00011     HISTORY: created 10-03-01
00012 
00013  *> Copyright (c) 2001, All Rights Reserved.
00014  **********************************************************************/
00015 
00016 #pragma once
00017 #include "..\ifnpub.h"
00018 
00019 // standard particle channel "New"
00020 // interface ID
00021 #define PARTICLECHANNELNEWR_INTERFACE Interface_ID(0x74f93b01, 0x1eb34500) 
00022 #define PARTICLECHANNELNEWW_INTERFACE Interface_ID(0x74f93b01, 0x1eb34501) 
00023 
00024 #define GetParticleChannelNewRInterface(obj) ((IParticleChannelNewR*)obj->GetInterface(PARTICLECHANNELNEWR_INTERFACE)) 
00025 #define GetParticleChannelNewWInterface(obj) ((IParticleChannelNewW*)obj->GetInterface(PARTICLECHANNELNEWW_INTERFACE)) 
00026 
00027 // function IDs Read
00028 enum {  particleChannelNew_isNew,
00029         particleChannelNew_isAllNew,
00030         particleChannelNew_isAllOld
00031 }; 
00032 
00033 // function IDs Write
00034 enum {  particleChannelNew_setNew, 
00035         particleChannelNew_setOld,
00036         particleChannelNew_setAllNew,
00037         particleChannelNew_setAllOld
00038 }; 
00039 
00040 class IParticleChannelNewR : public FPMixinInterface
00041 {
00042 
00043 BEGIN_FUNCTION_MAP
00044 
00045 FN_1(particleChannelNew_isNew, TYPE_bool, IsNew, TYPE_INT);
00046 FN_0(particleChannelNew_isAllNew, TYPE_bool, IsAllNew);
00047 FN_0(particleChannelNew_isAllOld, TYPE_bool, IsAllOld);
00048 
00049 END_FUNCTION_MAP
00050 
00051 public:
00052 
00057     // get particle property
00061     virtual bool    IsNew(int index) const = 0; // is particle with the index is new
00062 
00066     virtual bool    IsAllNew() const = 0; // all particles are new
00067 
00071     virtual bool    IsAllOld() const = 0; // all particles are old
00072 
00076     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELNEWR_INTERFACE); }
00077 };
00078 
00079 class IParticleChannelNewW : public FPMixinInterface
00080 {
00081 
00082 BEGIN_FUNCTION_MAP
00083 
00084 VFN_1(particleChannelNew_setNew, SetNew, TYPE_INT);
00085 VFN_1(particleChannelNew_setOld, SetOld, TYPE_INT);
00086 VFN_0(particleChannelNew_setAllNew, SetAllNew);
00087 VFN_0(particleChannelNew_setAllOld, SetAllOld);
00088 
00089 END_FUNCTION_MAP
00090 
00091 public:
00092 
00097     // get/set particle property
00101     virtual void    SetNew(int index) = 0; 
00102 
00106     virtual void    SetOld(int index) = 0; 
00107 
00111     virtual void    SetAllNew() = 0; 
00112 
00116     virtual void    SetAllOld() = 0; 
00117 
00125     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELNEWW_INTERFACE); }
00126 };
00127 
00128