IParticleChannelFloat.h

Go to the documentation of this file.
00001 
00004 /**********************************************************************
00005  *<
00006     CREATED BY:     Chung-An Lin
00007 
00008     HISTORY:        created 01-24-02
00009 
00010  *> Copyright (c) 2001, All Rights Reserved.
00011  **********************************************************************/
00012 
00013 #pragma once
00014 
00015 #include "PFExport.h"
00016 #include "..\ifnpub.h"
00017 
00018 // generic particle channel "Float"
00019 // interface ID
00020 #define PARTICLECHANNELFLOATR_INTERFACE Interface_ID(0x74f93c00, 0x1eb34500)
00021 #define PARTICLECHANNELFLOATW_INTERFACE Interface_ID(0x74f93c00, 0x1eb34501)
00022 
00023 // since it's a "type" channel there is no "GetChannel" defines
00024 //#define GetParticleChannelFloatRInterface(obj) ((IParticleChannelFloatR*)obj->GetInterface(PARTICLECHANNELFLOATR_INTERFACE))
00025 //#define GetParticleChannelFloatWInterface(obj) ((IParticleChannelFloatW*)obj->GetInterface(PARTICLECHANNELFLOATW_INTERFACE))
00026 
00027 
00028 class IParticleChannelFloatR : public FPMixinInterface
00029 {
00030 public:
00031 
00032     // function IDs Read
00033     enum {  kGetValue,
00034             kIsGlobal,
00035             kGetValueGlobal
00036     };
00037 
00038     // Function Map for Function Publish System
00039     //***********************************
00040     BEGIN_FUNCTION_MAP
00041 
00042     FN_1(kGetValue, TYPE_FLOAT, GetValue, TYPE_INT);
00043     FN_0(kIsGlobal, TYPE_bool, IsGlobal);
00044     FN_0(kGetValueGlobal, TYPE_FLOAT, GetValue);
00045 
00046     END_FUNCTION_MAP
00047 
00055     virtual float   GetValue(int index) const = 0;
00056 
00060     virtual bool    IsGlobal() const = 0;
00061 
00065     virtual float   GetValue() const = 0;
00066 
00070     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELFLOATR_INTERFACE); }
00071 };
00072 
00073 class IParticleChannelFloatW : public FPMixinInterface
00074 {
00075 public:
00076 
00077     // function IDs Write
00078     enum {  kSetValue,
00079             kSetValueGlobal,
00080     };
00081 
00082     // Function Map for Function Publish System
00083     //***********************************
00084     BEGIN_FUNCTION_MAP
00085 
00086     VFN_2(kSetValue, SetValue, TYPE_INT, TYPE_FLOAT);
00087     VFN_1(kSetValueGlobal, SetValue, TYPE_FLOAT);
00088 
00089     END_FUNCTION_MAP
00090 
00098     virtual void    SetValue(int index, float value) = 0;
00099 
00103     virtual void    SetValue(float value) = 0;
00104 
00108     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELFLOATW_INTERFACE); }
00109 };
00110