3DRadSpace  v1.0.0a
Scripting documentation
_3DRadSpaceDll.SoundSource Class Reference

Allows playing sounds located in a 3D envoirement. More...

Inheritance diagram for _3DRadSpaceDll.SoundSource:
_3DRadSpaceDll.SoundEffect _3DRadSpaceDll.GameObject

Public Member Functions

 SoundSource ()
 Empty SoundSource constructor. More...
 SoundSource (string name, bool enabled, string resource, float volume, Vector3 position, Camera listener, float pitch=0f, float pan=0f, float doppler=1f)
 Main SoundSource constructor. More...
void SetListenerPosition (Vector3 pos, Vector3 up)
 Sets the listener's position. More...
- Public Member Functions inherited from _3DRadSpaceDll.SoundEffect
 SoundEffect (string name, bool active, string resource, float volume=1.0f)
 Main constructor. More...
 SoundEffect ()
 Empty SoundEffect constructor. More...
override void Load (ContentManager content)
 Loads the sound More...
void Play ()
 Plays the sound. More...
void Pause ()
 Pauses the sound. More...
void Stop ()
 Stops the sound More...
bool IsPlaying ()
 Checks if the sound is playing. More...
bool IsPaused ()
 Checks if the sound is paused. More...
bool IsStopped ()
 Checks if the sound is stopped. More...
override void Trigger ()
 Plays the sound. More...
- Public Member Functions inherited from _3DRadSpaceDll.GameObject
 GameObject ()
 Default constructor. More...
void Enable ()
 Enables object. More...
void Disable ()
 Disables object. More...
void Toggle ()
 Switches object on/off state. More...
void Show ()
 Shows the object. More...
void Hide ()
 Hides the object. More...
virtual void Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Unloads the resource. More...
virtual void EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Object draw code for the 3DRadSpace editor More...
virtual void Update (MouseState mouse, KeyboardState keyboard, GameTime time)
 Object update logic More...
override bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
override int GetHashCode ()
 Returns the hash code calculated from a string representing the data inside the object. More...
override string ToString ()
 Returns the object's name More...
void RunOnce ()
 Runs the object one Update loop. If used on a active object it will be stopped. More...


new Vector3 Position [get, set]
 Defines the Sound's location. More...
float DopplerScale [get, set]
 Gets or set a scale applied to the doppler effect between the listener(

See also
LinkedCam, Position

LinkedCam) and the sound source () More...

Camera LinkedCam [get, set]
 Camera object used as listener. More...
- Properties inherited from _3DRadSpaceDll.SoundEffect
Microsoft.Xna.Framework.Audio.SoundEffect Sound [get]
 Sound file. Use

See also
SoundInstance, Microsoft.Xna.Framework.Audio.SoundEffect

to directly access the . More...

SoundEffectInstance SoundInstance [get, set]
 SoundInstance object. Allows playing the sound. More...
float Volume [get, set]
 Sound volume. Ranges from 0.0f to 1.0f. More...
float Pitch [get, set]
 Sound pitch. Ranges from -1.0f to 1.0f. More...
float Pan [get, set]
 Pan / speaker balance. More...
SoundState SoundState [get, set]
 Gets or sets the current state of the sound. para>Unlike SoundInstance.State, this property can be also set.para>Setting this property to any value will call the

See also
Play, Stop, Pause

, and depinding on the value. More...

- Properties inherited from _3DRadSpaceDll.GameObject
string Name [get, set]
 Object Name. Used as a string identifier. More...
object Tag [get, set]
 Tag object. More...
bool Enabled [get, set]
 Checks if object is enabled. More...
bool Hidden [get, set]
 Checks if object is being drawn. More...
List< ObjectBehiavourBehiavours [get, set]
 Relation with other objects More...
Quaternion RotationQuaternion [get]
 Rotation in a Quaterion system. More...
string Resource [get, set]
 Resource file More...

Additional Inherited Members

- Static Public Member Functions inherited from _3DRadSpaceDll.GameObject
static implicit operator bool (GameObject o)
 Checks if the object exists. Same as GameObject != null. More...
static bool operator== (GameObject a, GameObject b)
 Checks if two GameObjects are equal. More...
static bool operator!= (GameObject a, GameObject b)
 The opposite of the equality operator. More...
- Public Attributes inherited from _3DRadSpaceDll.GameObject
Vector3 Position
 Object position More...
Vector3 Rotation
 Rotation in a Euler angles system. More...
List< int > SelectedObjects
 Used for editor. More...
- Events inherited from _3DRadSpaceDll.GameObject
onDraw OnDraw
 Called when object is being drawn on frame. More...
onUpdate OnUpdate
 Called when object is being updated on the update logic loop. More...
onObjectDestroy OnRemoval
 Called when object is being deleted. More...
onObjectLoad OnObjectLoad
 Called when a object resource is being loaded. More...

Detailed Description

Allows playing sounds located in a 3D envoirement.

Constructor & Destructor Documentation

◆ SoundSource() [1/2]

_3DRadSpaceDll.SoundSource.SoundSource ( )

Empty SoundSource constructor.

◆ SoundSource() [2/2]

_3DRadSpaceDll.SoundSource.SoundSource ( string  name,
bool  enabled,
string  resource,
float  volume,
Vector3  position,
Camera  listener,
float  pitch = 0f,
float  pan = 0f,
float  doppler = 1f 

Main SoundSource constructor.

nameObject Name.
enabledIs playing sounds allowed?
resourceResource file
volumeVolume ranging from 0.0 to 1.0
positionSound source position.
listenerCamera used as a listener.
pitchSound pitch ranging from -1.0f to 1.0f
panHeadphones balance, ranging from -1.0f to 1.0f
dopplerDoppler effect scale.

Member Function Documentation

◆ SetListenerPosition()

void _3DRadSpaceDll.SoundSource.SetListenerPosition ( Vector3  pos,
Vector3  up 

Sets the listener's position.

upUp normalized vector.

Property Documentation

◆ DopplerScale

float _3DRadSpaceDll.SoundSource.DopplerScale

Gets or set a scale applied to the doppler effect between the listener(

See also
LinkedCam, Position

LinkedCam) and the sound source ()

◆ LinkedCam

Camera _3DRadSpaceDll.SoundSource.LinkedCam

Camera object used as listener.

◆ Position

new Vector3 _3DRadSpaceDll.SoundSource.Position

Defines the Sound's location.