OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
Sound Class Referencefinal

#include <sound.h>

Public Types

enum  Type : uint8_t { T_Regular , T_3D }
 

Public Member Functions

 Sound ()
 
 Sound (World &owner, Type t, std::string_view s, const Tempest::Vec3 &pos, float range, bool freeSlot)
 
 Sound (Sound &&other)
 
Soundoperator= (Sound &&other)
 
 ~Sound ()
 
Tempest::Vec3 position () const
 
bool isEmpty () const
 
bool isFinished () const
 
void setOcclusion (float occ)
 
void setVolume (float v)
 
float volume () const
 
void setPosition (const Tempest::Vec3 &pos)
 
void setPosition (float x, float y, float z)
 
void setLooping (bool l)
 
void setAmbient (bool a)
 
void setActive (bool a)
 
void play ()
 
uint64_t effectPrefferedTime () const
 

Friends

class WorldSound
 

Detailed Description

Definition at line 5 of file sound.h.

Member Enumeration Documentation

◆ Type

enum Sound::Type : uint8_t
Enumerator
T_Regular 
T_3D 

Definition at line 7 of file sound.h.

Constructor & Destructor Documentation

◆ Sound() [1/3]

Sound::Sound ( )

Definition at line 7 of file sound.cpp.

◆ Sound() [2/3]

Sound::Sound ( World owner,
Sound::Type  type,
std::string_view  s,
const Tempest::Vec3 &  pos,
float  range,
bool  freeSlot 
)

Definition at line 10 of file sound.cpp.

◆ Sound() [3/3]

Sound::Sound ( Sound &&  other)

Definition at line 54 of file sound.cpp.

◆ ~Sound()

Sound::~Sound ( )

Definition at line 64 of file sound.cpp.

Member Function Documentation

◆ effectPrefferedTime()

uint64_t Sound::effectPrefferedTime ( ) const

Definition at line 131 of file sound.cpp.

◆ isEmpty()

bool Sound::isEmpty ( ) const

Definition at line 75 of file sound.cpp.

◆ isFinished()

bool Sound::isFinished ( ) const

Definition at line 79 of file sound.cpp.

◆ operator=()

Sound & Sound::operator= ( Sound &&  other)

Definition at line 59 of file sound.cpp.

◆ play()

void Sound::play ( )

Definition at line 126 of file sound.cpp.

◆ position()

Tempest::Vec3 Sound::position ( ) const

Definition at line 71 of file sound.cpp.

◆ setActive()

void Sound::setActive ( bool  a)

Definition at line 121 of file sound.cpp.

◆ setAmbient()

void Sound::setAmbient ( bool  a)

Definition at line 116 of file sound.cpp.

◆ setLooping()

void Sound::setLooping ( bool  l)

Definition at line 111 of file sound.cpp.

◆ setOcclusion()

void Sound::setOcclusion ( float  occ)

Definition at line 83 of file sound.cpp.

◆ setPosition() [1/2]

void Sound::setPosition ( const Tempest::Vec3 &  pos)

Definition at line 99 of file sound.cpp.

◆ setPosition() [2/2]

void Sound::setPosition ( float  x,
float  y,
float  z 
)

Definition at line 103 of file sound.cpp.

◆ setVolume()

void Sound::setVolume ( float  v)

Definition at line 88 of file sound.cpp.

◆ volume()

float Sound::volume ( ) const

Definition at line 93 of file sound.cpp.

Friends And Related Symbol Documentation

◆ WorldSound

friend class WorldSound
friend

Definition at line 42 of file sound.h.


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