IParticleChannelQuat.h

Go to the documentation of this file.
00001 
00005 /**********************************************************************
00006  *<
00007     CREATED BY: Oleg Bayborodin
00008 
00009     HISTORY: created 01-09-02
00010 
00011  *> Copyright (c) 2001, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 
00016 #include "PFExport.h"
00017 #include "..\ifnpub.h"
00018 
00019 // generic particle channel "Quat"
00020 // interface ID
00021 #define PARTICLECHANNELQUATR_INTERFACE Interface_ID(0x74f93c0e, 0x1eb34500) 
00022 #define PARTICLECHANNELQUATW_INTERFACE Interface_ID(0x74f93c0e, 0x1eb34501) 
00023 
00024 // since it's a "type" channel there is no "GetChannel" defines
00025 //#define GetParticleChannelQuatRInterface(obj) ((IParticleChannelQuatR*)obj->GetInterface(PARTICLECHANNELQUATR_INTERFACE)) 
00026 //#define GetParticleChannelQuatWInterface(obj) ((IParticleChannelQuatW*)obj->GetInterface(PARTICLECHANNELQUATW_INTERFACE)) 
00027 
00028 
00029 class IParticleChannelQuatR : public FPMixinInterface
00030 {
00031 public:
00032 
00033     // function IDs Read
00034     enum {  kGetValue,
00035             kIsGlobal,
00036             kGetValueGlobal
00037     }; 
00038 
00039     // Function Map for Function Publish System 
00040     //***********************************
00041     BEGIN_FUNCTION_MAP
00042 
00043     FN_1(kGetValue, TYPE_QUAT_BR, GetValue, TYPE_INT);
00044     FN_0(kIsGlobal, TYPE_bool, IsGlobal);
00045     FN_0(kGetValueGlobal, TYPE_QUAT_BR, GetValue);
00046 
00047     END_FUNCTION_MAP
00048 
00056     virtual const Quat& GetValue(int index) const = 0;
00057 
00061     virtual bool            IsGlobal() const = 0;
00062 
00066     virtual const Quat& GetValue() const = 0;
00067 
00068     // returns bounding box for all particles
00069 
00073     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELQUATR_INTERFACE); }
00074 };
00075 
00076 class IParticleChannelQuatW : public FPMixinInterface
00077 {
00078 public:
00079 
00080     // function IDs Write
00081     enum {  kSetValue,
00082             kSetValueGlobal,
00083     }; 
00084 
00085     // Function Map for Function Publish System 
00086     //***********************************
00087     BEGIN_FUNCTION_MAP
00088 
00089     VFN_2(kSetValue, SetValue, TYPE_INT, TYPE_QUAT_BR);
00090     VFN_1(kSetValueGlobal, SetValue, TYPE_QUAT_BR);
00091 
00092     END_FUNCTION_MAP
00093 
00101     virtual void    SetValue(int index, const Quat& v) = 0;
00102 
00106     virtual void    SetValue(const Quat& v) = 0;
00107 
00111     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELQUATW_INTERFACE); }
00112 
00115 };
00116