00001 /* 00002 Copyright (C) 1999 Carsten Winkelholz 00003 00004 Malte Weiß, 06.08.2002: All fields are dynamically loaded. 00005 07.08.2002: Fields direction, intensity, location and priority supported. 00006 08.08.2002: Support extended. Added event management for AudioClip. 00007 09.08.2002: Gain calculations for sound ellipses developed. 00008 12.08.2002: Node completed: manual gain control and field spatialize work. 00009 00010 Address: FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V. 00011 Neuenahrer Str. 20 00012 D - 53343 Wachtberg 00013 00014 Email: winkelholz@fgan.de 00015 00016 This program is free software; you can redistribute it and/or 00017 modify it under the terms of the GNU General Public License 00018 as published by the Free Software Foundation; either version 2 00019 of the License, or (at your option) any later version. 00020 00021 This program is distributed in the hope that it will be useful, 00022 but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 GNU General Public License for more details. 00025 00026 You should have received a copy of the GNU General Public License 00027 along with this program; if not, write to the Free Software 00028 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00029 */ 00030 00031 #ifndef CYBSOUNDC_H 00032 #define CYBSOUNDC_H 00033 00034 #include "oaw/ctk/cybnodec.h" 00035 #include "oaw/ctk/cybaudioclipc.h" 00036 #include "oaw/ctk/cybwrlfields.h" 00037 #include "oaw/ctk/cybsoundmanagerc.h" 00038 #include "../oawconfig.h" 00039 00040 OAW_BEGIN_NAMESPACE 00041 00042 00043 class OAW_DLLMAPPING CybSoundC : public CybNodeC 00044 { 00045 public: 00046 CybSoundC(CybWorldC*); 00047 CybSoundC(const CybSoundC&); 00048 CybSoundC& operator = (const CybSoundC&); 00049 virtual ~CybSoundC(); 00050 00051 virtual void SetEvent(long, const void*, BaseI*); 00052 virtual long GetFieldEventID(const char*); 00053 virtual long GetFieldDataType(long); 00054 00055 virtual void ToChannel(CybChannelC *pV, long flag); 00056 00057 protected: 00058 virtual void CreateNewCopy(CybNodeC*); 00059 virtual void LoadVRML(char*& iter, const char* iterEnd,long& znr); 00060 virtual void FinishInit(); 00061 00062 virtual int SetNode(CybNodeC*); 00063 void SetSourceNode(CybNodeC*); 00064 00065 public: 00066 // Sound properties 00067 SFVec3f m_vDirection; 00068 SFFloat m_fIntensity; 00069 SFVec3f m_vLocation; 00070 SFFloat m_fMaxBack; 00071 SFFloat m_fMaxFront; 00072 SFFloat m_fMinBack; 00073 SFFloat m_fMinFront; 00074 SFFloat m_fPriority; 00075 CybNodeC *m_pSourceNode; 00076 SFBool m_bSpatialize; 00077 00078 // Priority properties 00079 SFBool m_bBlocked; // Blocked by world? 00080 SFFloat m_fDistance; // Distance to listener 00081 00082 // Misc 00083 SFBool m_bInit; // First channel call? 00084 00085 // Key list 00086 static char VRMLKeyStrList[][30]; 00087 }; 00088 00089 OAW_END_NAMESPACE 00090 00091 00092 #endif 00093 00094
1.3-rc2