Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SND_SoundObject.h

Go to the documentation of this file.
00001 /*
00002  * SND_SoundObject.h

00003  *
00004  * Implementation of the abstract sound object

00005  *
00006  * Version: $Id: SND_SoundObject_h-source.html,v 1.1 2001/02/01 12:25:18 coockie Exp $

00007  */
00008 
00009 #ifndef __SND_SOUNDOBJECT_H
00010 #define __SND_SOUNDOBJECT_H
00011 
00012 #include "SoundDefines.h"
00013 #include "SND_IObject.h"
00014 #include "StdString.h"
00015 
00019 
00020 class SND_SoundObject : public SND_IObject
00021 {
00022 public:
00023         SND_SoundObject();
00024         ~SND_SoundObject();
00025 
00026         void startSound();
00027         void stopSound();
00028         void pauseSound();
00029 
00030         void setSample(CCString pSample) {m_sample = pSample;}
00031         void setModified(bool mod) {m_modified = mod;}
00032 
00033         void setPitch(MT_Scalar pitch);
00034         void setGain(MT_Scalar gain);
00035         void setPosition(const MT_Point3& pos);
00036         void setVelocity(const MT_Vector3& vel);
00037         void setOrientation(const MT_Matrix3x3& orient);
00038         void setLooping(bool isLooping);
00039         void setPlaystate(int playstate) {m_playstate = playstate;}
00040 
00041         const CCString& getSample() {return m_sample;}
00042         bool                    isModified() const {return m_modified;}
00043 
00044         float                   getGain() const {return m_gain;}
00045         float                   getPitch() const {return m_pitch;}
00046         MT_Point3               getPosition() const {return m_position;}
00047         MT_Point3               getVelocity() const {return m_velocity;}
00048         MT_Matrix3x3    getOrientation() const {return m_orientation;}
00049         bool                    isLooping() const {return m_islooping;}
00050         int                             getPlaystate() const {return m_playstate;}
00051         
00052 private:
00053         CCString                m_sample;                       /* pointer to the referenced sample */
00054         bool                    m_modified;                     /* flag for if object is modified */
00055         MT_Scalar               m_gain;                         /* the gain of the object */
00056         MT_Scalar               m_pitch;                        /* the pitch of the object */
00057         MT_Point3               m_position;                     /* position; left/right, up/down, in/out */
00058         MT_Point3               m_velocity;                     /* velocity of the object */
00059         MT_Matrix3x3    m_orientation;          /* orientation of the object */
00060         bool                    m_islooping;            /* is the object looping? */
00061         int                             m_playstate;            /* flag for current state of object */
00062 
00063 };
00064 #endif //__SND_SOUNDOBJECT_H

Generated at Thu Feb 1 13:03:12 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000