IParticleChannelMatrix3.h

Go to the documentation of this file.
00001 
00004 /**********************************************************************
00005  *<
00006     CREATED BY:     Chung-An Lin
00007 
00008     HISTORY:        created 02-03-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 "Matrix3"
00019 // interface ID
00020 #define PARTICLECHANNELMATRIX3R_INTERFACE Interface_ID(0x74f93c0a, 0x1eb34500)
00021 #define PARTICLECHANNELMATRIX3W_INTERFACE Interface_ID(0x74f93c0a, 0x1eb34501)
00022 
00023 // since it's a "type" channel there is no "GetChannel" defines
00024 //#define GetParticleChannelMatrix3RInterface(obj) ((IParticleChannelMatrix3R*)obj->GetInterface(PARTICLECHANNELMATRIX3R_INTERFACE))
00025 //#define GetParticleChannelMatrix3WInterface(obj) ((IParticleChannelMatrix3W*)obj->GetInterface(PARTICLECHANNELMATRIX3W_INTERFACE))
00026 
00027 
00028 class IParticleChannelMatrix3R : 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_MATRIX3_BR, GetValue, TYPE_INT);
00043     FN_0(kIsGlobal, TYPE_bool, IsGlobal);
00044     FN_0(kGetValueGlobal, TYPE_MATRIX3_BR, GetValue);
00045 
00046     END_FUNCTION_MAP
00047 
00055     virtual const Matrix3&  GetValue(int index) const = 0;
00056 
00060     virtual bool            IsGlobal() const = 0;
00061 
00067     virtual const Matrix3&  GetValue() const = 0;
00068 
00072     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELMATRIX3R_INTERFACE); }
00073 };
00074 
00075 class IParticleChannelMatrix3W : public FPMixinInterface
00076 {
00077 public:
00078 
00079     // function IDs Write
00080     enum {  kSetValue,
00081             kSetValueGlobal,
00082     };
00083 
00084     // Function Map for Function Publish System
00085     //***********************************
00086     BEGIN_FUNCTION_MAP
00087 
00088     VFN_2(kSetValue, SetValue, TYPE_INT, TYPE_MATRIX3_BR);
00089     VFN_1(kSetValueGlobal, SetValue, TYPE_MATRIX3_BR);
00090 
00091     END_FUNCTION_MAP
00092 
00100     virtual void    SetValue(int index, const Matrix3& v) = 0;
00101 
00105     virtual void    SetValue(const Matrix3& v) = 0;
00106 
00110     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELMATRIX3W_INTERFACE); }
00111 };
00112