diff --git a/CMakeLists.txt b/CMakeLists.txt index 2850a647..82683907 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.11) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") project (raylib_cpp - VERSION 4.2.4 + VERSION 4.2.5 DESCRIPTION "raylib-cpp C++ Object Oriented Wrapper for raylib" HOMEPAGE_URL "https://github.com/robloach/raylib-cpp" LANGUAGES C CXX) diff --git a/clib.json b/clib.json index f61d4ca4..43686af0 100644 --- a/clib.json +++ b/clib.json @@ -1,6 +1,6 @@ { "name": "raylib-cpp", - "version": "4.2.2", + "version": "4.2.5", "repo": "RobLoach/raylib-cpp", "description": "raylib-cpp: C++ Object-Oriented Wrapper for raylib", "homepage": "https://github.com/robloach/raylib-cpp", @@ -39,7 +39,6 @@ "include/Mouse.hpp", "include/Music.hpp", "include/physac.hpp", - "include/Physics.hpp", "include/Ray.hpp", "include/RayCollision.hpp", "include/RaylibException.hpp", @@ -53,6 +52,7 @@ "include/Sound.hpp", "include/Text.hpp", "include/Texture.hpp", + "include/Touch.hpp", "include/Vector2.hpp", "include/Vector3.hpp", "include/Vector4.hpp", diff --git a/docs/_audio_device_8hpp_source.html b/docs/_audio_device_8hpp_source.html index 4f5c0848..a753b363 100644 --- a/docs/_audio_device_8hpp_source.html +++ b/docs/_audio_device_8hpp_source.html @@ -84,45 +84,46 @@
13  public:
21  AudioDevice(bool lateInit = false) {
22  if (!lateInit) {
-
23  if (!Init()) {
-
24  throw RaylibException("Failed to initialize AudioDevice");
-
25  }
-
26  }
-
27  }
-
28 
-
32  ~AudioDevice() {
-
33  Close();
-
34  }
-
35 
-
39  inline bool Init() {
+
23  Init();
+
24  }
+
25  }
+
26 
+
30  ~AudioDevice() {
+
31  Close();
+
32  }
+
33 
+
39  inline void Init() {
40  ::InitAudioDevice();
-
41  return IsReady();
-
42  }
-
43 
-
47  inline void Close() {
-
48  ::CloseAudioDevice();
-
49  }
-
50 
-
54  inline bool IsReady() const {
-
55  return ::IsAudioDeviceReady();
-
56  }
-
57 
-
63  inline AudioDevice& SetVolume(float volume) {
-
64  ::SetMasterVolume(volume);
-
65  return *this;
-
66  }
-
67 };
-
68 } // namespace raylib
-
69 using RAudioDevice = raylib::AudioDevice;
-
70 
-
71 #endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
+
41  if (!IsReady()) {
+
42  throw RaylibException("Failed to initialize AudioDevice");
+
43  }
+
44  }
+
45 
+
49  inline void Close() {
+
50  ::CloseAudioDevice();
+
51  }
+
52 
+
56  inline bool IsReady() const {
+
57  return ::IsAudioDeviceReady();
+
58  }
+
59 
+
65  inline AudioDevice& SetVolume(float volume) {
+
66  ::SetMasterVolume(volume);
+
67  return *this;
+
68  }
+
69 };
+
70 } // namespace raylib
+
71 
+
72 using RAudioDevice = raylib::AudioDevice;
+
73 
+
74 #endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
raylib::AudioDevice
Audio device management functions.
Definition: AudioDevice.hpp:12
-
raylib::AudioDevice::Close
void Close()
Close the audio device and context.
Definition: AudioDevice.hpp:47
-
raylib::AudioDevice::IsReady
bool IsReady() const
Check if audio device has been initialized successfully.
Definition: AudioDevice.hpp:54
-
raylib::AudioDevice::Init
bool Init()
Initialize audio device and context.
Definition: AudioDevice.hpp:39
-
raylib::AudioDevice::~AudioDevice
~AudioDevice()
Close the audio device and context.
Definition: AudioDevice.hpp:32
+
raylib::AudioDevice::Close
void Close()
Close the audio device and context.
Definition: AudioDevice.hpp:49
+
raylib::AudioDevice::IsReady
bool IsReady() const
Check if audio device has been initialized successfully.
Definition: AudioDevice.hpp:56
+
raylib::AudioDevice::Init
void Init()
Initialize audio device and context.
Definition: AudioDevice.hpp:39
+
raylib::AudioDevice::~AudioDevice
~AudioDevice()
Close the audio device and context.
Definition: AudioDevice.hpp:30
raylib::AudioDevice::AudioDevice
AudioDevice(bool lateInit=false)
Initialize audio device and context.
Definition: AudioDevice.hpp:21
-
raylib::AudioDevice::SetVolume
AudioDevice & SetVolume(float volume)
Set master volume (listener).
Definition: AudioDevice.hpp:63
+
raylib::AudioDevice::SetVolume
AudioDevice & SetVolume(float volume)
Set master volume (listener).
Definition: AudioDevice.hpp:65
raylib::RaylibException
Exception used for most raylib-related exceptions.
Definition: RaylibException.hpp:13
raylib
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
diff --git a/docs/_audio_stream_8hpp_source.html b/docs/_audio_stream_8hpp_source.html index 2db013e8..0080354d 100644 --- a/docs/_audio_stream_8hpp_source.html +++ b/docs/_audio_stream_8hpp_source.html @@ -87,24 +87,24 @@
16  }
17 
18  AudioStream(rAudioBuffer* buffer = nullptr,
-
19  unsigned int sampleRate = 0,
-
20  unsigned int sampleSize = 0,
-
21  unsigned int channels = 0) : ::AudioStream{buffer, sampleRate, sampleSize, channels} {
-
22  // Nothing.
-
23  }
-
24 
-
30  AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels = 2) {
-
31  if (!Load(SampleRate, SampleSize, Channels)) {
-
32  throw RaylibException("Failed to create AudioStream");
-
33  }
-
34  }
-
35 
-
36  AudioStream(const AudioStream&) = delete;
-
37 
-
38  AudioStream(AudioStream&& other) {
-
39  set(other);
-
40 
-
41  other.buffer = nullptr;
+
19  rAudioProcessor *processor = nullptr,
+
20  unsigned int sampleRate = 0,
+
21  unsigned int sampleSize = 0,
+
22  unsigned int channels = 0) : ::AudioStream{buffer, processor, sampleRate, sampleSize, channels} {
+
23  // Nothing.
+
24  }
+
25 
+
31  AudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels = 2) {
+
32  Load(sampleRate, sampleSize, channels);
+
33  }
+
34 
+
35  AudioStream(const AudioStream&) = delete;
+
36 
+
37  AudioStream(AudioStream&& other) {
+
38  set(other);
+
39 
+
40  other.buffer = nullptr;
+
41  other.processor = nullptr;
42  other.sampleRate = 0;
43  other.sampleSize = 0;
44  other.channels = 0;
@@ -115,120 +115,148 @@
49  }
50 
51  GETTERSETTER(rAudioBuffer *, Buffer, buffer)
-
52  GETTERSETTER(unsigned int, SampleRate, sampleRate)
-
53  GETTERSETTER(unsigned int, SampleSize, sampleSize)
-
54  GETTERSETTER(unsigned int, Channels, channels)
-
55 
-
56  AudioStream& operator=(const ::AudioStream& stream) {
-
57  set(stream);
-
58  return *this;
-
59  }
-
60 
-
61  AudioStream& operator=(const AudioStream&) = delete;
-
62 
-
63  AudioStream& operator=(AudioStream&& other) noexcept {
-
64  if (this == &other) {
-
65  return *this;
-
66  }
-
67 
-
68  Unload();
-
69  set(other);
-
70 
-
71  other.buffer = nullptr;
-
72  other.sampleRate = 0;
-
73  other.sampleSize = 0;
-
74  other.channels = 0;
-
75 
-
76  return *this;
-
77  }
-
78 
-
82  inline AudioStream& Update(const void *data, int samplesCount) {
-
83  ::UpdateAudioStream(*this, data, samplesCount);
-
84  return *this;
-
85  }
-
86 
-
90  inline void Unload() {
-
91  ::UnloadAudioStream(*this);
-
92  }
-
93 
-
97  inline bool IsProcessed() const {
-
98  return ::IsAudioStreamProcessed(*this);
-
99  }
-
100 
-
104  inline AudioStream& Play() {
-
105  ::PlayAudioStream(*this);
-
106  return *this;
-
107  }
-
108 
-
112  inline AudioStream& Pause() {
-
113  ::PauseAudioStream(*this);
-
114  return *this;
-
115  }
-
116 
-
120  inline AudioStream& Resume() {
-
121  ::ResumeAudioStream(*this);
-
122  return *this;
-
123  }
-
124 
-
128  inline bool IsPlaying() const {
-
129  return ::IsAudioStreamPlaying(*this);
-
130  }
-
131 
-
135  inline AudioStream& Stop() {
-
136  ::StopAudioStream(*this);
-
137  return *this;
-
138  }
-
139 
-
143  inline AudioStream& SetVolume(float volume) {
-
144  ::SetAudioStreamVolume(*this, volume);
-
145  return *this;
-
146  }
-
147 
-
151  inline AudioStream& SetPitch(float pitch) {
-
152  ::SetAudioStreamPitch(*this, pitch);
-
153  return *this;
-
154  }
-
155 
-
159  inline static void SetBufferSizeDefault(int size) {
-
160  ::SetAudioStreamBufferSizeDefault(size);
-
161  }
-
162 
-
166  bool IsReady() {
-
167  return channels > 0;
-
168  }
-
169 
-
175  bool Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels = 2) {
-
176  set(::LoadAudioStream(SampleRate, SampleSize, Channels));
-
177  return IsReady();
+
52  GETTERSETTER(rAudioProcessor *, Processor, processor)
+
53  GETTERSETTER(unsigned int, SampleRate, sampleRate)
+
54  GETTERSETTER(unsigned int, SampleSize, sampleSize)
+
55  GETTERSETTER(unsigned int, Channels, channels)
+
56 
+
57  AudioStream& operator=(const ::AudioStream& stream) {
+
58  set(stream);
+
59  return *this;
+
60  }
+
61 
+
62  AudioStream& operator=(const AudioStream&) = delete;
+
63 
+
64  AudioStream& operator=(AudioStream&& other) noexcept {
+
65  if (this == &other) {
+
66  return *this;
+
67  }
+
68 
+
69  Unload();
+
70  set(other);
+
71 
+
72  other.buffer = nullptr;
+
73  other.processor = nullptr;
+
74  other.sampleRate = 0;
+
75  other.sampleSize = 0;
+
76  other.channels = 0;
+
77 
+
78  return *this;
+
79  }
+
80 
+
84  inline AudioStream& Update(const void *data, int samplesCount) {
+
85  ::UpdateAudioStream(*this, data, samplesCount);
+
86  return *this;
+
87  }
+
88 
+
92  inline void Unload() {
+
93  ::UnloadAudioStream(*this);
+
94  }
+
95 
+
99  inline bool IsProcessed() const {
+
100  return ::IsAudioStreamProcessed(*this);
+
101  }
+
102 
+
106  inline AudioStream& Play() {
+
107  ::PlayAudioStream(*this);
+
108  return *this;
+
109  }
+
110 
+
114  inline AudioStream& Pause() {
+
115  ::PauseAudioStream(*this);
+
116  return *this;
+
117  }
+
118 
+
122  inline AudioStream& Resume() {
+
123  ::ResumeAudioStream(*this);
+
124  return *this;
+
125  }
+
126 
+
130  inline bool IsPlaying() const {
+
131  return ::IsAudioStreamPlaying(*this);
+
132  }
+
133 
+
137  inline AudioStream& Stop() {
+
138  ::StopAudioStream(*this);
+
139  return *this;
+
140  }
+
141 
+
145  inline AudioStream& SetVolume(float volume = 1.0f) {
+
146  ::SetAudioStreamVolume(*this, volume);
+
147  return *this;
+
148  }
+
149 
+
153  inline AudioStream& SetPitch(float pitch) {
+
154  ::SetAudioStreamPitch(*this, pitch);
+
155  return *this;
+
156  }
+
157 
+
161  inline AudioStream& SetPan(float pan = 0.5f) {
+
162  ::SetAudioStreamPitch(*this, pan);
+
163  return *this;
+
164  }
+
165 
+
169  inline static void SetBufferSizeDefault(int size) {
+
170  ::SetAudioStreamBufferSizeDefault(size);
+
171  }
+
172 
+
176  inline void SetCallback(::AudioCallback callback) {
+
177  ::SetAudioStreamCallback(*this, callback);
178  }
179 
-
180  private:
-
181  void set(const ::AudioStream& stream) {
-
182  buffer = stream.buffer;
-
183  sampleRate = stream.sampleRate;
-
184  sampleSize = stream.sampleSize;
-
185  channels = stream.channels;
-
186  }
-
187 };
-
188 } // namespace raylib
-
189 using RAudioStream = raylib::AudioStream;
-
190 
-
191 #endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
183  inline void AttachProcessor(::AudioCallback processor) {
+
184  ::SetAudioStreamCallback(*this, processor);
+
185  }
+
186 
+
190  inline void DetachProcessor(::AudioCallback processor) {
+
191  ::SetAudioStreamCallback(*this, processor);
+
192  }
+
193 
+
197  bool IsReady() {
+
198  return channels > 0;
+
199  }
+
200 
+
206  void Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels = 2) {
+
207  Unload();
+
208  set(::LoadAudioStream(SampleRate, SampleSize, Channels));
+
209  if (!IsReady()) {
+
210  throw RaylibException("Failed to load audio stream");
+
211  }
+
212  }
+
213 
+
214  private:
+
215  void set(const ::AudioStream& stream) {
+
216  buffer = stream.buffer;
+
217  processor = stream.processor;
+
218  sampleRate = stream.sampleRate;
+
219  sampleSize = stream.sampleSize;
+
220  channels = stream.channels;
+
221  }
+
222 };
+
223 } // namespace raylib
+
224 
+
225 using RAudioStream = raylib::AudioStream;
+
226 
+
227 #endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
raylib::AudioStream
AudioStream management functions.
Definition: AudioStream.hpp:12
-
raylib::AudioStream::IsProcessed
bool IsProcessed() const
Check if any audio stream buffers requires refill.
Definition: AudioStream.hpp:97
-
raylib::AudioStream::Stop
AudioStream & Stop()
Stop audio stream.
Definition: AudioStream.hpp:135
-
raylib::AudioStream::SetPitch
AudioStream & SetPitch(float pitch)
Set pitch for audio stream (1.0 is base level)
Definition: AudioStream.hpp:151
-
raylib::AudioStream::IsPlaying
bool IsPlaying() const
Check if audio stream is playing.
Definition: AudioStream.hpp:128
-
raylib::AudioStream::Play
AudioStream & Play()
Play audio stream.
Definition: AudioStream.hpp:104
-
raylib::AudioStream::AudioStream
AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels=2)
Init audio stream (to stream raw audio pcm data)
Definition: AudioStream.hpp:30
-
raylib::AudioStream::SetVolume
AudioStream & SetVolume(float volume)
Set volume for audio stream (1.0 is max level)
Definition: AudioStream.hpp:143
-
raylib::AudioStream::Unload
void Unload()
Unload audio stream and free memory.
Definition: AudioStream.hpp:90
-
raylib::AudioStream::SetBufferSizeDefault
static void SetBufferSizeDefault(int size)
Default size for new audio streams.
Definition: AudioStream.hpp:159
-
raylib::AudioStream::Pause
AudioStream & Pause()
Pause audio stream.
Definition: AudioStream.hpp:112
-
raylib::AudioStream::Resume
AudioStream & Resume()
Resume audio stream.
Definition: AudioStream.hpp:120
-
raylib::AudioStream::Update
AudioStream & Update(const void *data, int samplesCount)
Update audio stream buffers with data.
Definition: AudioStream.hpp:82
-
raylib::AudioStream::Load
bool Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels=2)
Init audio stream (to stream raw audio pcm data)
Definition: AudioStream.hpp:175
-
raylib::AudioStream::IsReady
bool IsReady()
Retrieve whether or not the audio stream is ready.
Definition: AudioStream.hpp:166
+
raylib::AudioStream::SetCallback
void SetCallback(::AudioCallback callback)
Audio thread callback to request new data.
Definition: AudioStream.hpp:176
+
raylib::AudioStream::IsProcessed
bool IsProcessed() const
Check if any audio stream buffers requires refill.
Definition: AudioStream.hpp:99
+
raylib::AudioStream::Stop
AudioStream & Stop()
Stop audio stream.
Definition: AudioStream.hpp:137
+
raylib::AudioStream::SetPitch
AudioStream & SetPitch(float pitch)
Set pitch for audio stream (1.0 is base level)
Definition: AudioStream.hpp:153
+
raylib::AudioStream::IsPlaying
bool IsPlaying() const
Check if audio stream is playing.
Definition: AudioStream.hpp:130
+
raylib::AudioStream::AttachProcessor
void AttachProcessor(::AudioCallback processor)
Attach audio stream processor to stream.
Definition: AudioStream.hpp:183
+
raylib::AudioStream::SetVolume
AudioStream & SetVolume(float volume=1.0f)
Set volume for audio stream (1.0 is max level)
Definition: AudioStream.hpp:145
+
raylib::AudioStream::Play
AudioStream & Play()
Play audio stream.
Definition: AudioStream.hpp:106
+
raylib::AudioStream::Load
void Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels=2)
Load audio stream (to stream raw audio pcm data)
Definition: AudioStream.hpp:206
+
raylib::AudioStream::Unload
void Unload()
Unload audio stream and free memory.
Definition: AudioStream.hpp:92
+
raylib::AudioStream::SetBufferSizeDefault
static void SetBufferSizeDefault(int size)
Default size for new audio streams.
Definition: AudioStream.hpp:169
+
raylib::AudioStream::AudioStream
AudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels=2)
Init audio stream (to stream raw audio pcm data)
Definition: AudioStream.hpp:31
+
raylib::AudioStream::Pause
AudioStream & Pause()
Pause audio stream.
Definition: AudioStream.hpp:114
+
raylib::AudioStream::Resume
AudioStream & Resume()
Resume audio stream.
Definition: AudioStream.hpp:122
+
raylib::AudioStream::SetPan
AudioStream & SetPan(float pan=0.5f)
Set pan for audio stream (0.5 is centered)
Definition: AudioStream.hpp:161
+
raylib::AudioStream::Update
AudioStream & Update(const void *data, int samplesCount)
Update audio stream buffers with data.
Definition: AudioStream.hpp:84
+
raylib::AudioStream::IsReady
bool IsReady()
Retrieve whether or not the audio stream is ready.
Definition: AudioStream.hpp:197
+
raylib::AudioStream::DetachProcessor
void DetachProcessor(::AudioCallback processor)
Detach audio stream processor from stream.
Definition: AudioStream.hpp:190
raylib::RaylibException
Exception used for most raylib-related exceptions.
Definition: RaylibException.hpp:13
raylib
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
diff --git a/docs/_bounding_box_8hpp_source.html b/docs/_bounding_box_8hpp_source.html index 0289e0d8..9dd684ed 100644 --- a/docs/_bounding_box_8hpp_source.html +++ b/docs/_bounding_box_8hpp_source.html @@ -82,76 +82,70 @@
11 class BoundingBox : public ::BoundingBox {
12  public:
13  /*
-
14  * Set the bounding box to default: min (0, 0, 0) and max (0, 0, 0).
+
14  * Copy a bounding box from another bounding box.
15  */
-
16  BoundingBox() : ::BoundingBox{::Vector3{0, 0, 0}, ::Vector3{ 0, 0, 0 }} {
+
16  BoundingBox(const ::BoundingBox& box) : ::BoundingBox{box.min, box.max} {
17  // Nothing.
18  }
19 
-
20  /*
-
21  * Copy a bounding box from another bounding box.
-
22  */
-
23  BoundingBox(const ::BoundingBox& box) : ::BoundingBox{box.min, box.max} {
-
24  // Nothing.
+
23  BoundingBox(const ::Mesh& mesh) {
+
24  set(::GetMeshBoundingBox(mesh));
25  }
26 
-
30  BoundingBox(const ::Mesh& mesh) {
-
31  set(::GetMeshBoundingBox(mesh));
-
32  }
-
33 
-
34  BoundingBox(::Vector3 minMax) : ::BoundingBox{minMax, minMax} {}
-
35  BoundingBox(::Vector3 min, ::Vector3 max) : ::BoundingBox{min, max} {}
-
36 
-
37  GETTERSETTER(::Vector3, Min, min)
-
38  GETTERSETTER(::Vector3, Max, max)
-
39 
-
40  BoundingBox& operator=(const ::BoundingBox& box) {
-
41  set(box);
-
42  return *this;
-
43  }
-
44 
-
48  inline BoundingBox& Draw(::Color color = {255, 255, 255, 255}) {
-
49  DrawBoundingBox(*this, color);
-
50  return *this;
+
27  BoundingBox(::Vector3 minMax = ::Vector3{0.0f, 0.0f, 0.0f}) : ::BoundingBox{minMax, minMax} {}
+
28  BoundingBox(::Vector3 min, ::Vector3 max) : ::BoundingBox{min, max} {}
+
29 
+
30  GETTERSETTER(::Vector3, Min, min)
+
31  GETTERSETTER(::Vector3, Max, max)
+
32 
+
33  BoundingBox& operator=(const ::BoundingBox& box) {
+
34  set(box);
+
35  return *this;
+
36  }
+
37 
+
41  inline BoundingBox& Draw(::Color color = {255, 255, 255, 255}) {
+
42  ::DrawBoundingBox(*this, color);
+
43  return *this;
+
44  }
+
45 
+
49  inline bool CheckCollision(const ::BoundingBox& box2) const {
+
50  return CheckCollisionBoxes(*this, box2);
51  }
52 
-
56  inline bool CheckCollision(const ::BoundingBox& box2) const {
-
57  return CheckCollisionBoxes(*this, box2);
+
56  inline bool CheckCollision(::Vector3 center, float radius) const {
+
57  return CheckCollisionBoxSphere(*this, center, radius);
58  }
59 
-
63  inline bool CheckCollision(::Vector3 center, float radius) const {
-
64  return CheckCollisionBoxSphere(*this, center, radius);
+
63  inline bool CheckCollision(const ::Ray& ray) const {
+
64  return GetRayCollisionBox(ray, *this).hit;
65  }
66 
-
70  inline bool CheckCollision(const ::Ray& ray) const {
-
71  return GetRayCollisionBox(ray, *this).hit;
+
70  inline RayCollision GetCollision(const ::Ray& ray) const {
+
71  return GetRayCollisionBox(ray, *this);
72  }
73 
-
77  inline RayCollision GetCollision(const ::Ray& ray) const {
-
78  return GetRayCollisionBox(ray, *this);
-
79  }
-
80 
-
81  private:
-
82  void set(const ::BoundingBox& box) {
-
83  min = box.min;
-
84  max = box.max;
-
85  }
-
86  void set(const ::Vector3& _min, const ::Vector3& _max) {
-
87  min = _min;
-
88  max = _max;
-
89  }
-
90 };
-
91 } // namespace raylib
-
92 using RBoundingBox = raylib::BoundingBox;
-
93 
-
94 #endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
+
74  private:
+
75  void set(const ::BoundingBox& box) {
+
76  min = box.min;
+
77  max = box.max;
+
78  }
+
79  void set(const ::Vector3& _min, const ::Vector3& _max) {
+
80  min = _min;
+
81  max = _max;
+
82  }
+
83 };
+
84 } // namespace raylib
+
85 
+
86 using RBoundingBox = raylib::BoundingBox;
+
87 
+
88 #endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
raylib::BoundingBox
Bounding box type.
Definition: BoundingBox.hpp:11
-
raylib::BoundingBox::CheckCollision
bool CheckCollision(::Vector3 center, float radius) const
Detect collision between box and sphere.
Definition: BoundingBox.hpp:63
-
raylib::BoundingBox::GetCollision
RayCollision GetCollision(const ::Ray &ray) const
Get collision information between ray and bounding box.
Definition: BoundingBox.hpp:77
-
raylib::BoundingBox::BoundingBox
BoundingBox(const ::Mesh &mesh)
Compute mesh bounding box limits.
Definition: BoundingBox.hpp:30
-
raylib::BoundingBox::Draw
BoundingBox & Draw(::Color color={255, 255, 255, 255})
Draw a bounding box with wires.
Definition: BoundingBox.hpp:48
-
raylib::BoundingBox::CheckCollision
bool CheckCollision(const ::BoundingBox &box2) const
Detect collision between two boxes.
Definition: BoundingBox.hpp:56
-
raylib::BoundingBox::CheckCollision
bool CheckCollision(const ::Ray &ray) const
Detect collision between ray and bounding box.
Definition: BoundingBox.hpp:70
+
raylib::BoundingBox::CheckCollision
bool CheckCollision(::Vector3 center, float radius) const
Detect collision between box and sphere.
Definition: BoundingBox.hpp:56
+
raylib::BoundingBox::GetCollision
RayCollision GetCollision(const ::Ray &ray) const
Get collision information between ray and bounding box.
Definition: BoundingBox.hpp:70
+
raylib::BoundingBox::BoundingBox
BoundingBox(const ::Mesh &mesh)
Compute mesh bounding box limits.
Definition: BoundingBox.hpp:23
+
raylib::BoundingBox::Draw
BoundingBox & Draw(::Color color={255, 255, 255, 255})
Draw a bounding box with wires.
Definition: BoundingBox.hpp:41
+
raylib::BoundingBox::CheckCollision
bool CheckCollision(const ::BoundingBox &box2) const
Detect collision between two boxes.
Definition: BoundingBox.hpp:49
+
raylib::BoundingBox::CheckCollision
bool CheckCollision(const ::Ray &ray) const
Detect collision between ray and bounding box.
Definition: BoundingBox.hpp:63
raylib::Color
Color type, RGBA (32bit)
Definition: Color.hpp:14
raylib::RayCollision
Raycast hit information.
Definition: RayCollision.hpp:11
raylib::Vector3
Vector3 type.
Definition: Vector3.hpp:16
diff --git a/docs/_camera2_d_8hpp_source.html b/docs/_camera2_d_8hpp_source.html index 3ca1a877..3f81d1c5 100644 --- a/docs/_camera2_d_8hpp_source.html +++ b/docs/_camera2_d_8hpp_source.html @@ -131,9 +131,10 @@
69  }
70 };
71 } // namespace raylib
-
72 using RCamera2D = raylib::Camera2D;
-
73 
-
74 #endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
+
72 
+
73 using RCamera2D = raylib::Camera2D;
+
74 
+
75 #endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
raylib::Camera2D
Camera2D type, defines a 2d camera.
Definition: Camera2D.hpp:12
raylib::Camera2D::GetScreenToWorld
Vector2 GetScreenToWorld(::Vector2 position) const
Returns the world space position for a 2d camera screen space position.
Definition: Camera2D.hpp:59
raylib::Camera2D::GetMatrix
Matrix GetMatrix() const
Returns camera 2d transform matrix.
Definition: Camera2D.hpp:45
diff --git a/docs/_camera3_d_8hpp_source.html b/docs/_camera3_d_8hpp_source.html index 5e98bc89..a0852f6d 100644 --- a/docs/_camera3_d_8hpp_source.html +++ b/docs/_camera3_d_8hpp_source.html @@ -185,14 +185,16 @@
159 };
160 
161 typedef Camera3D Camera;
-
162 } // namespace raylib
-
163 using RCamera = raylib::Camera;
-
164 using RCamera3D = raylib::Camera3D;
-
165 
-
166 #endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
+
162 
+
163 } // namespace raylib
+
164 
+
165 using RCamera = raylib::Camera;
+
166 using RCamera3D = raylib::Camera3D;
+
167 
+
168 #endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
raylib::Camera3D
Camera type, defines a camera position/orientation in 3d space.
Definition: Camera3D.hpp:12
raylib::Camera3D::BeginMode
Camera3D & BeginMode()
Initializes 3D mode with custom camera (3D)
Definition: Camera3D.hpp:49
-
raylib::Camera3D::GetMatrix
Matrix GetMatrix() const
Get transform matrix for camera.
Definition: Camera3D.hpp:65
+
raylib::Camera3D::GetMatrix
Matrix GetMatrix() const
Get camera transform matrix (view matrix)
Definition: Camera3D.hpp:65
raylib::Camera3D::DrawBillboard
Camera3D & DrawBillboard(const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, ::Vector2 size, ::Color tint={255, 255, 255, 255})
Draw a billboard texture defined by source.
Definition: Camera3D.hpp:141
raylib::Camera3D::DrawBillboard
Camera3D & DrawBillboard(const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
Draw a billboard texture.
Definition: Camera3D.hpp:129
raylib::Camera3D::GetWorldToScreen
Vector2 GetWorldToScreen(::Vector3 position) const
Returns the screen space position for a 3d world space position.
Definition: Camera3D.hpp:122
@@ -211,7 +213,7 @@
raylib::Vector2
Vector2 type.
Definition: Vector2.hpp:16
raylib::Vector3
Vector3 type.
Definition: Vector3.hpp:16
raylib
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
-
raylib::UpdateCamera
static void UpdateCamera(const ::Camera &camera)
Update camera depending on selected mode.
Definition: Functions.hpp:202
+
raylib::UpdateCamera
static void UpdateCamera(const ::Camera &camera)
Update camera depending on selected mode.
Definition: Functions.hpp:197