mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Now using Vector2 and Vector3 structs in functions
This commit is contained in:
1 parent
69433eb0a4
commit
9d0d0588b2
28 files changed
+566
-608
No files matched your search
@@ -29,6 +29,7 @@
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Audio/Export.h>
|
||||
#include <SFML/System/Vector3.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -56,22 +57,18 @@ CSFML_AUDIO_API float sfListener_GetGlobalVolume(void);
|
||||
///
|
||||
/// The default listener's position is (0, 0, 0).
|
||||
///
|
||||
/// \param x X coordinate of the listener's position
|
||||
/// \param y Y coordinate of the listener's position
|
||||
/// \param z Z coordinate of the listener's position
|
||||
/// \param position New position of the listener
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfListener_SetPosition(float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfListener_SetPosition(sfVector3f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of the listener in the scene
|
||||
///
|
||||
/// \param x X coordinate of the listener's position
|
||||
/// \param y Y coordinate of the listener's position
|
||||
/// \param z Z coordinate of the listener's position
|
||||
/// \return The listener's position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfListener_GetPosition(float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API sfVector3f sfListener_GetPosition();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of the listener in the scene
|
||||
@@ -81,22 +78,18 @@ CSFML_AUDIO_API void sfListener_GetPosition(float* x, float* y, float* z);
|
||||
/// doesn't have to be normalized.
|
||||
/// The default listener's orientation is (0, 0, -1).
|
||||
///
|
||||
/// \param x X coordinate of the listener's orientation
|
||||
/// \param y Y coordinate of the listener's orientation
|
||||
/// \param z Z coordinate of the listener's orientation
|
||||
/// \param position New direction of the listener
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfListener_SetDirection(float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfListener_SetDirection(sfVector3f orientation);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current orientation of the listener in the scene
|
||||
///
|
||||
/// \param x X coordinate of the listener's orientation
|
||||
/// \param y Y coordinate of the listener's orientation
|
||||
/// \param z Z coordinate of the listener's orientation
|
||||
/// \return The listener's direction
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfListener_GetDirection(float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API sfVector3f sfListener_GetDirection();
|
||||
|
||||
|
||||
#endif // SFML_LISTENER_H
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/InputStream.h>
|
||||
#include <SFML/System/Time.h>
|
||||
#include <SFML/System/Vector3.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
@@ -243,13 +244,11 @@ CSFML_AUDIO_API void sfMusic_SetVolume(sfMusic* music, float volume);
|
||||
/// spatialized.
|
||||
/// The default position of a music is (0, 0, 0).
|
||||
///
|
||||
/// \param music Music object
|
||||
/// \param x X coordinate of the position of the music in the scene
|
||||
/// \param y Y coordinate of the position of the music in the scene
|
||||
/// \param z Z coordinate of the position of the music in the scene
|
||||
///
|
||||
/// \param music Music object
|
||||
/// \param position Position of the music in the scene
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfMusic_SetPosition(sfMusic* music, sfVector3f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Make a musics's position relative to the listener or absolute
|
||||
@@ -336,12 +335,11 @@ CSFML_AUDIO_API float sfMusic_GetVolume(const sfMusic* music);
|
||||
/// \brief Get the 3D position of a music in the audio scene
|
||||
///
|
||||
/// \param music Music object
|
||||
/// \param x X position of the music in the world
|
||||
/// \param y Y position of the music in the world
|
||||
/// \param z Z position of the music in the world
|
||||
///
|
||||
/// \return Position of the music in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API sfVector3f sfMusic_GetPosition(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a music's position is relative to the
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
#include <SFML/System/Vector3.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -188,13 +189,11 @@ CSFML_AUDIO_API void sfSound_SetVolume(sfSound* sound, float volume);
|
||||
/// spatialized.
|
||||
/// The default position of a sound is (0, 0, 0).
|
||||
///
|
||||
/// \param sound Sound object
|
||||
/// \param x X coordinate of the position of the sound in the scene
|
||||
/// \param y Y coordinate of the position of the sound in the scene
|
||||
/// \param z Z coordinate of the position of the sound in the scene
|
||||
/// \param sound Sound object
|
||||
/// \param position Position of the sound in the scene
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfSound_SetPosition(sfSound* sound, sfVector3f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Make the sound's position relative to the listener or absolute
|
||||
@@ -281,12 +280,11 @@ CSFML_AUDIO_API float sfSound_GetVolume(const sfSound* sound);
|
||||
/// \brief Get the 3D position of a sound in the audio scene
|
||||
///
|
||||
/// \param sound Sound object
|
||||
/// \param x X position of the sound in the world
|
||||
/// \param y Y position of the sound in the world
|
||||
/// \param z Z position of the sound in the world
|
||||
///
|
||||
/// \return Position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API sfVector3f sfSound_GetPosition(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a sound's position is relative to the
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
#include <SFML/System/Vector3.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -181,12 +182,10 @@ CSFML_AUDIO_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float v
|
||||
/// The default position of a stream is (0, 0, 0).
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
/// \param x X coordinate of the position of the stream in the scene
|
||||
/// \param y Y coordinate of the position of the stream in the scene
|
||||
/// \param z Z coordinate of the position of the stream in the scene
|
||||
/// \param position Position of the stream in the scene
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, sfVector3f position);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Make a sound stream's position relative to the listener or absolute
|
||||
@@ -287,12 +286,11 @@ CSFML_AUDIO_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
|
||||
/// \brief Get the 3D position of a sound stream in the audio scene
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
/// \param x X position of the stream in the world
|
||||
/// \param y Y position of the stream in the world
|
||||
/// \param z Z position of the stream in the world
|
||||
///
|
||||
/// \return Position of the stream in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API sfVector3f sfSoundStream_GetPosition(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a sound stream's position is relative to the
|
||||
|
||||
Reference in new issue
Block a user