Hummingbird Framework
 All Classes Functions Variables Modules Pages
hb::SoundComponent Class Reference
Inheritance diagram for hb::SoundComponent:
Collaboration diagram for hb::SoundComponent:

Public Types

enum  Status { Stopped, Paused, Playing }
 

Public Member Functions

 SoundComponent (const SoundBuffer &buffer)
 
void update () override
 Function called in the update step.
 
void setBuffer (const SoundBuffer &buffer)
 
SoundBuffergetBuffer ()
 
const SoundBuffergetBuffer () const
 
void play ()
 
void pause ()
 
void stop ()
 
Status getStatus () const
 
Time getPlayingOffset () const
 
void setPlayingOffset (const Time &offset)
 
void loop (bool loop)
 
bool isLooping () const
 
void setPitch (double pitch)
 
double getPitch () const
 
void setVolume (double volume)
 
double getVolume () const
 
void setRelativeToListener (bool relative)
 
bool isRelativeToListener () const
 
void setMinDistance (double distance)
 
double getMinDistance () const
 
void setAttenuation (double attenuation)
 
double getAttenuation () const
 
- Public Member Functions inherited from hb::GameObject::Component
 Component ()
 Default constructor. More...
 
virtual ~Component ()
 Default destructor.
 
virtual void init ()
 Function called once after the Component has been added to a GameObject. More...
 
virtual void preUpdate ()
 Function called in the pre-update step.
 
virtual void postUpdate ()
 Function called in the post-update step.
 
GameObjectgetGameObject () const
 Get the GameObject instance composed by this Component. More...
 
void setActive (bool active)
 Set if Component is active. More...
 
bool isActive () const
 Get if Component is active. More...
 
- Public Member Functions inherited from hb::Transform
 Transform ()
 Default constructor. More...
 
 Transform (const Vector3d &init_pos)
 Constructor with initial position.
 
 ~Transform ()
 Class destructor.
 
const Vector3dgetPosition () const
 Get Transform position. More...
 
void setPosition (const Vector3d &p)
 Set position from a Vector3d. More...
 
void setPosition (double p_x, double p_y, double p_z)
 Set position from doubles. More...
 
const Vector3dgetRotation () const
 Get Transform rotation. More...
 
void setRotation (const Vector3d &rotation)
 Set rotation from a Vector3d. More...
 
void setRotation (double rotation_x, double rotation_y, double rotation_z)
 Set rotation from doubles. More...
 
const Vector3dgetScale () const
 Get Transform scale. More...
 
void setScale (const Vector3d &scale)
 Set scale from a Vector3d. More...
 
void setScale (double scale_x, double scale_y, double scale_z)
 Set position from doubles. More...
 

Additional Inherited Members

- Protected Member Functions inherited from hb::GameObject::Component
void addListenerToGameObject (const std::string &name, std::function< void(DataRepository &)> &&listener)
 
void ignoreToGameObject (const GameObjectMessageManager::ListenerId< DataRepository > &listener_id)
 

The documentation for this class was generated from the following file: