diff --git a/.gitignore b/.gitignore index c1fdaa8..182db34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ build -.vscode +/.vscode package-lock.json node_modules cmake-build-debug -.idea \ No newline at end of file +.idea diff --git a/CHANGELOG.md b/CHANGELOG.md index 1873873..3a8f645 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.5.0] - 2021-03-24 +### Added +- VSCode project template (by [KnockerPulsar](https://github.com/KnockerPulsar)) +### Changes +- Updated documentation + ## [3.5.0-beta3] - 2021-02-18 ### Added - Added a C++ version of raylib's loading thread example (by [@pkeir]([https://github.com/pkeir)) diff --git a/docs/_audio_device_8hpp_source.html b/docs/_audio_device_8hpp_source.html index af7fb4f..598f1f3 100644 --- a/docs/_audio_device_8hpp_source.html +++ b/docs/_audio_device_8hpp_source.html @@ -71,83 +71,58 @@ $(function() {
AudioDevice.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 #include "./raylib-cpp-utils.hpp"
+
1 #ifndef RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 
+
7 namespace raylib {
+
11 class AudioDevice {
+
12  public:
+
18  AudioDevice(bool lateInit = false) {
+
19  if (!lateInit) {
+
20  Init();
+
21  }
+
22  }
+
23 
+ +
28  Close();
+
29  }
30 
-
31 namespace raylib {
-
35 class AudioDevice {
-
36  public:
-
42  AudioDevice(bool lateInit = false) {
-
43  if (!lateInit) {
-
44  Init();
-
45  }
-
46  }
-
47 
- -
52  Close();
-
53  }
-
54 
-
58  inline AudioDevice& Init() {
-
59  ::InitAudioDevice();
-
60  return *this;
-
61  }
+
34  inline AudioDevice& Init() {
+
35  ::InitAudioDevice();
+
36  return *this;
+
37  }
+
38 
+
42  inline void Close() {
+
43  ::CloseAudioDevice();
+
44  }
+
45 
+
49  inline bool IsReady() const {
+
50  return ::IsAudioDeviceReady();
+
51  }
+
52 
+
56  inline AudioDevice& SetVolume(float volume) {
+
57  ::SetMasterVolume(volume);
+
58  return *this;
+
59  }
+
60 };
+
61 } // namespace raylib
62 
-
66  inline AudioDevice& Close() {
-
67  ::CloseAudioDevice();
-
68  return *this;
-
69  }
-
70 
-
74  inline bool IsReady() const {
-
75  return ::IsAudioDeviceReady();
-
76  }
-
77 
-
81  inline AudioDevice& SetVolume(float volume) {
-
82  ::SetMasterVolume(volume);
-
83  return *this;
-
84  }
-
85 };
-
86 } // namespace raylib
-
87 
-
88 #endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
+
63 #endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
AudioDevice & Close()
Close the audio device and context.
Definition: AudioDevice.hpp:66
-
AudioDevice & SetVolume(float volume)
Set master volume (listener).
Definition: AudioDevice.hpp:81
-
AudioDevice & Init()
Initialize audio device and context.
Definition: AudioDevice.hpp:58
-
~AudioDevice()
Close the audio device and context.
Definition: AudioDevice.hpp:51
-
AudioDevice(bool lateInit=false)
Initialize audio device and context.
Definition: AudioDevice.hpp:42
-
Audio device management functions.
Definition: AudioDevice.hpp:35
-
bool IsReady() const
Check if audio device has been initialized successfully.
Definition: AudioDevice.hpp:74
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
AudioDevice & SetVolume(float volume)
Set master volume (listener).
Definition: AudioDevice.hpp:56
+
AudioDevice & Init()
Initialize audio device and context.
Definition: AudioDevice.hpp:34
+
~AudioDevice()
Close the audio device and context.
Definition: AudioDevice.hpp:27
+
AudioDevice(bool lateInit=false)
Initialize audio device and context.
Definition: AudioDevice.hpp:18
+
Audio device management functions.
Definition: AudioDevice.hpp:11
+
void Close()
Close the audio device and context.
Definition: AudioDevice.hpp:42
+
bool IsReady() const
Check if audio device has been initialized successfully.
Definition: AudioDevice.hpp:49
diff --git a/docs/_audio_stream_8hpp_source.html b/docs/_audio_stream_8hpp_source.html index c721a20..9823b48 100644 --- a/docs/_audio_stream_8hpp_source.html +++ b/docs/_audio_stream_8hpp_source.html @@ -71,144 +71,117 @@ $(function() {
AudioStream.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
1 #ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 
+
7 namespace raylib {
+
11 class AudioStream : public ::AudioStream {
+
12  public:
+
13  AudioStream(const ::AudioStream& music) {
+
14  set(music);
+
15  }
+
16 
+
20  AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels) {
+
21  set(InitAudioStream(SampleRate, SampleSize, Channels));
+
22  }
+
23 
+
24  ~AudioStream() {
+
25  Close();
+
26  }
27 
-
28 #include "./raylib.hpp"
-
29 #include "./raylib-cpp-utils.hpp"
-
30 
-
31 namespace raylib {
-
35 class AudioStream : public ::AudioStream {
-
36  public:
-
37  AudioStream(const ::AudioStream& music) {
-
38  set(music);
-
39  }
-
40 
-
44  AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels) {
-
45  set(InitAudioStream(SampleRate, SampleSize, Channels));
-
46  }
-
47 
- -
49  Close();
-
50  }
-
51 
-
52  GETTERSETTER(rAudioBuffer *, Buffer, buffer)
-
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 
-
65  inline AudioStream& Update(const void *data, int samplesCount) {
-
66  ::UpdateAudioStream(*this, data, samplesCount);
-
67  return *this;
-
68  }
-
69 
-
73  inline void Close() {
-
74  ::CloseAudioStream(*this);
-
75  }
-
76 
-
80  inline bool IsProcessed() const {
-
81  return ::IsAudioStreamProcessed(*this);
+
28  GETTERSETTER(rAudioBuffer *, Buffer, buffer)
+
29  GETTERSETTER(unsigned int, SampleRate, sampleRate)
+
30  GETTERSETTER(unsigned int, SampleSize, sampleSize)
+
31  GETTERSETTER(unsigned int, Channels, channels)
+
32 
+
33  AudioStream& operator=(const ::AudioStream& stream) {
+
34  set(stream);
+
35  return *this;
+
36  }
+
37 
+
41  inline AudioStream& Update(const void *data, int samplesCount) {
+
42  ::UpdateAudioStream(*this, data, samplesCount);
+
43  return *this;
+
44  }
+
45 
+
49  inline void Close() {
+
50  ::CloseAudioStream(*this);
+
51  }
+
52 
+
56  inline bool IsProcessed() const {
+
57  return ::IsAudioStreamProcessed(*this);
+
58  }
+
59 
+
63  inline AudioStream& Play() {
+
64  ::PlayAudioStream(*this);
+
65  return *this;
+
66  }
+
67 
+
71  inline AudioStream& Pause() {
+
72  ::PauseAudioStream(*this);
+
73  return *this;
+
74  }
+
75 
+
79  inline AudioStream& Resume() {
+
80  ::ResumeAudioStream(*this);
+
81  return *this;
82  }
83 
-
87  inline AudioStream& Play() {
-
88  ::PlayAudioStream(*this);
-
89  return *this;
-
90  }
-
91 
-
95  inline AudioStream& Pause() {
-
96  ::PauseAudioStream(*this);
-
97  return *this;
-
98  }
-
99 
-
103  inline AudioStream& Resume() {
-
104  ::ResumeAudioStream(*this);
-
105  return *this;
-
106  }
-
107 
-
111  inline bool IsPlaying() const {
-
112  return ::IsAudioStreamPlaying(*this);
+
87  inline bool IsPlaying() const {
+
88  return ::IsAudioStreamPlaying(*this);
+
89  }
+
90 
+
94  inline AudioStream& Stop() {
+
95  ::StopAudioStream(*this);
+
96  return *this;
+
97  }
+
98 
+
102  inline AudioStream& SetVolume(float volume) {
+
103  ::SetAudioStreamVolume(*this, volume);
+
104  return *this;
+
105  }
+
106 
+
110  inline AudioStream& SetPitch(float pitch) {
+
111  ::SetAudioStreamPitch(*this, pitch);
+
112  return *this;
113  }
114 
-
118  inline AudioStream& Stop() {
-
119  ::StopAudioStream(*this);
-
120  return *this;
-
121  }
-
122 
-
126  inline AudioStream& SetVolume(float volume) {
-
127  ::SetAudioStreamVolume(*this, volume);
-
128  return *this;
-
129  }
-
130 
-
134  inline AudioStream& SetPitch(float pitch) {
-
135  ::SetAudioStreamPitch(*this, pitch);
-
136  return *this;
-
137  }
-
138 
-
142  inline static void SetBufferSizeDefault(int size) {
-
143  ::SetAudioStreamBufferSizeDefault(size);
-
144  }
-
145 
-
146  protected:
-
147  inline void set(const ::AudioStream& stream) {
-
148  buffer = stream.buffer;
-
149  sampleRate = stream.sampleRate;
-
150  sampleSize = stream.sampleSize;
-
151  channels = stream.channels;
-
152  }
-
153 };
-
154 } // namespace raylib
-
155 
-
156 #endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
118  inline static void SetBufferSizeDefault(int size) {
+
119  ::SetAudioStreamBufferSizeDefault(size);
+
120  }
+
121 
+
122  private:
+
123  inline void set(const ::AudioStream& stream) {
+
124  buffer = stream.buffer;
+
125  sampleRate = stream.sampleRate;
+
126  sampleSize = stream.sampleSize;
+
127  channels = stream.channels;
+
128  }
+
129 };
+
130 } // namespace raylib
+
131 
+
132 #endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
bool IsPlaying() const
Check if audio stream is playing.
-
AudioStream & Stop()
Stop audio stream.
-
AudioStream & Update(const void *data, int samplesCount)
Update audio stream buffers with data.
Definition: AudioStream.hpp:65
-
void Close()
Close audio stream and free memory.
Definition: AudioStream.hpp:73
-
~AudioStream()
Definition: AudioStream.hpp:48
-
AudioStream & Resume()
Resume audio stream.
-
static void SetBufferSizeDefault(int size)
Default size for new audio streams.
-
AudioStream(const ::AudioStream &music)
Definition: AudioStream.hpp:37
-
AudioStream & Play()
Play audio stream.
Definition: AudioStream.hpp:87
-
bool IsProcessed() const
Check if any audio stream buffers requires refill.
Definition: AudioStream.hpp:80
-
AudioStream & Pause()
Pause audio stream.
Definition: AudioStream.hpp:95
-
AudioStream & SetPitch(float pitch)
Set pitch for audio stream (1.0 is base level)
-
void set(const ::AudioStream &stream)
-
AudioStream management functions.
Definition: AudioStream.hpp:35
-
AudioStream & SetVolume(float volume)
Set volume for audio stream (1.0 is max level)
-
AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels)
Init audio stream (to stream raw audio pcm data)
Definition: AudioStream.hpp:44
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
bool IsPlaying() const
Check if audio stream is playing.
Definition: AudioStream.hpp:87
+
AudioStream & Stop()
Stop audio stream.
Definition: AudioStream.hpp:94
+
AudioStream & Update(const void *data, int samplesCount)
Update audio stream buffers with data.
Definition: AudioStream.hpp:41
+
void Close()
Close audio stream and free memory.
Definition: AudioStream.hpp:49
+
AudioStream & Resume()
Resume audio stream.
Definition: AudioStream.hpp:79
+
static void SetBufferSizeDefault(int size)
Default size for new audio streams.
+
AudioStream & Play()
Play audio stream.
Definition: AudioStream.hpp:63
+
bool IsProcessed() const
Check if any audio stream buffers requires refill.
Definition: AudioStream.hpp:56
+
AudioStream & Pause()
Pause audio stream.
Definition: AudioStream.hpp:71
+
AudioStream & SetPitch(float pitch)
Set pitch for audio stream (1.0 is base level)
+
AudioStream management functions.
Definition: AudioStream.hpp:11
+
AudioStream & SetVolume(float volume)
Set volume for audio stream (1.0 is max level)
+
AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels)
Init audio stream (to stream raw audio pcm data)
Definition: AudioStream.hpp:20
diff --git a/docs/_bounding_box_8hpp_source.html b/docs/_bounding_box_8hpp_source.html index 70ad35e..282090a 100644 --- a/docs/_bounding_box_8hpp_source.html +++ b/docs/_bounding_box_8hpp_source.html @@ -71,102 +71,75 @@ $(function() {
BoundingBox.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 #include "./raylib-cpp-utils.hpp"
-
30 
-
31 namespace raylib {
-
35 class BoundingBox : public ::BoundingBox {
-
36  public:
-
37  BoundingBox(const ::BoundingBox& box) {
-
38  set(box);
-
39  }
-
40 
-
44  BoundingBox(const ::Mesh& mesh) {
-
45  set(::MeshBoundingBox(mesh));
-
46  }
-
47 
-
48  BoundingBox(::Vector3 Min, ::Vector3 Max) {
-
49  min = Min;
-
50  max = Max;
-
51  }
-
52 
-
53  GETTERSETTER(::Vector3, Min, min)
-
54  GETTERSETTER(::Vector3, Max, max)
-
55 
-
56  BoundingBox& operator=(const ::BoundingBox& box) {
-
57  set(box);
-
58  return *this;
-
59  }
-
60 
-
64  inline BoundingBox& Draw(::Color color = {255, 255, 255, 255}) {
-
65  DrawBoundingBox(*this, color);
-
66  return *this;
-
67  }
-
68 
-
72  inline bool CheckCollision(const ::BoundingBox& box2) const {
-
73  return CheckCollisionBoxes(*this, box2);
-
74  }
-
75 
-
79  inline bool CheckCollision(::Vector3 center, float radius) const {
-
80  return CheckCollisionBoxSphere(*this, center, radius);
-
81  }
-
82 
-
86  inline bool CheckCollision(const ::Ray& ray) const {
-
87  return CheckCollisionRayBox(ray, *this);
-
88  }
-
89 
-
90  protected:
-
91  inline void set(const ::BoundingBox& box) {
-
92  min = box.min;
-
93  max = box.max;
-
94  }
-
95 };
-
96 } // namespace raylib
-
97 
-
98 #endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
+
1 #ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 
+
7 namespace raylib {
+
11 class BoundingBox : public ::BoundingBox {
+
12  public:
+
13  BoundingBox(const ::BoundingBox& box) {
+
14  set(box);
+
15  }
+
16 
+
20  BoundingBox(const ::Mesh& mesh) {
+
21  set(::MeshBoundingBox(mesh));
+
22  }
+
23 
+
24  BoundingBox(::Vector3 Min, ::Vector3 Max) {
+
25  min = Min;
+
26  max = Max;
+
27  }
+
28 
+
29  GETTERSETTER(::Vector3, Min, min)
+
30  GETTERSETTER(::Vector3, Max, max)
+
31 
+
32  BoundingBox& operator=(const ::BoundingBox& box) {
+
33  set(box);
+
34  return *this;
+
35  }
+
36 
+
40  inline BoundingBox& Draw(::Color color = {255, 255, 255, 255}) {
+
41  DrawBoundingBox(*this, color);
+
42  return *this;
+
43  }
+
44 
+
48  inline bool CheckCollision(const ::BoundingBox& box2) const {
+
49  return CheckCollisionBoxes(*this, box2);
+
50  }
+
51 
+
55  inline bool CheckCollision(::Vector3 center, float radius) const {
+
56  return CheckCollisionBoxSphere(*this, center, radius);
+
57  }
+
58 
+
62  inline bool CheckCollision(const ::Ray& ray) const {
+
63  return CheckCollisionRayBox(ray, *this);
+
64  }
+
65 
+
66  private:
+
67  inline void set(const ::BoundingBox& box) {
+
68  min = box.min;
+
69  max = box.max;
+
70  }
+
71 };
+
72 } // namespace raylib
+
73 
+
74 #endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
BoundingBox(const ::Mesh &mesh)
Compute mesh bounding box limits.
Definition: BoundingBox.hpp:44
-
BoundingBox & Draw(::Color color={255, 255, 255, 255})
Draw a bounding box with wires.
Definition: BoundingBox.hpp:64
-
Definition: Vector3.hpp:37
-
void set(const ::BoundingBox &box)
Definition: BoundingBox.hpp:91
-
bool CheckCollision(::Vector3 center, float radius) const
Detect collision between box and sphere.
Definition: BoundingBox.hpp:79
-
bool CheckCollision(const ::BoundingBox &box2) const
Detect collision between two boxes.
Definition: BoundingBox.hpp:72
-
Definition: Color.hpp:35
-
BoundingBox(::Vector3 Min, ::Vector3 Max)
Definition: BoundingBox.hpp:48
-
Bounding box type.
Definition: BoundingBox.hpp:35
-
bool CheckCollision(const ::Ray &ray) const
Detect collision between ray and bounding box.
Definition: BoundingBox.hpp:86
-
BoundingBox(const ::BoundingBox &box)
Definition: BoundingBox.hpp:37
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
BoundingBox(const ::Mesh &mesh)
Compute mesh bounding box limits.
Definition: BoundingBox.hpp:20
+
BoundingBox & Draw(::Color color={255, 255, 255, 255})
Draw a bounding box with wires.
Definition: BoundingBox.hpp:40
+
Vector3 type.
Definition: Vector3.hpp:16
+
bool CheckCollision(::Vector3 center, float radius) const
Detect collision between box and sphere.
Definition: BoundingBox.hpp:55
+
bool CheckCollision(const ::BoundingBox &box2) const
Detect collision between two boxes.
Definition: BoundingBox.hpp:48
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Bounding box type.
Definition: BoundingBox.hpp:11
+
bool CheckCollision(const ::Ray &ray) const
Detect collision between ray and bounding box.
Definition: BoundingBox.hpp:62
diff --git a/docs/_camera2_d_8hpp_source.html b/docs/_camera2_d_8hpp_source.html index 876f41a..44ea717 100644 --- a/docs/_camera2_d_8hpp_source.html +++ b/docs/_camera2_d_8hpp_source.html @@ -71,113 +71,83 @@ $(function() {
Camera2D.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 #include "./Vector2.hpp"
-
30 #include "./raylib-cpp-utils.hpp"
+
1 #ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./Vector2.hpp"
+
6 #include "./raylib-cpp-utils.hpp"
+
7 
+
8 namespace raylib {
+
12 class Camera2D : public ::Camera2D {
+
13  public:
+
14  Camera2D() {}
+
15  Camera2D(const ::Camera2D& camera) {
+
16  set(camera);
+
17  }
+
18 
+
19  Camera2D(::Vector2 offsetValue, ::Vector2 targetValue, float rotationValue = 0,
+
20  float zoomValue = 1) {
+
21  offset = offsetValue;
+
22  target = targetValue;
+
23  rotation = rotationValue;
+
24  zoom = zoomValue;
+
25  }
+
26 
+
27  inline Camera2D& BeginMode() {
+
28  ::BeginMode2D(*this);
+
29  return *this;
+
30  }
31 
-
32 namespace raylib {
-
33 class Camera2D : public ::Camera2D {
-
34  public:
-
35  Camera2D() {}
-
36  Camera2D(const ::Camera2D& camera) {
-
37  set(camera);
-
38  }
-
39 
-
40  Camera2D(::Vector2 offsetValue, ::Vector2 targetValue, float rotationValue = 0,
-
41  float zoomValue = 1) {
-
42  offset = offsetValue;
-
43  target = targetValue;
-
44  rotation = rotationValue;
-
45  zoom = zoomValue;
-
46  }
-
47 
-
48  inline Camera2D& BeginMode() {
-
49  ::BeginMode2D(*this);
-
50  return *this;
-
51  }
-
52 
-
53  inline Camera2D& EndMode() {
-
54  ::EndMode2D();
-
55  return *this;
-
56  }
-
57 
-
58  GETTERSETTER(::Vector2, Offset, offset)
-
59  GETTERSETTER(::Vector2, Target, target)
-
60  GETTERSETTER(float, Rotation, rotation)
-
61  GETTERSETTER(float, Zoom, zoom)
-
62 
-
63  Camera2D& operator=(const ::Camera2D& camera) {
-
64  set(camera);
-
65  return *this;
+
32  inline Camera2D& EndMode() {
+
33  ::EndMode2D();
+
34  return *this;
+
35  }
+
36 
+
37  GETTERSETTER(::Vector2, Offset, offset)
+
38  GETTERSETTER(::Vector2, Target, target)
+
39  GETTERSETTER(float, Rotation, rotation)
+
40  GETTERSETTER(float, Zoom, zoom)
+
41 
+
42  Camera2D& operator=(const ::Camera2D& camera) {
+
43  set(camera);
+
44  return *this;
+
45  }
+
46 
+
50  inline Matrix GetMatrix() const {
+
51  return ::GetCameraMatrix2D(*this);
+
52  }
+
53 
+
57  inline Vector2 GetWorldToScreen(::Vector2 position) const {
+
58  return ::GetWorldToScreen2D(position, *this);
+
59  }
+
60 
+
64  inline Vector2 GetScreenToWorld(::Vector2 position) const {
+
65  return ::GetScreenToWorld2D(position, *this);
66  }
67 
-
71  inline Matrix GetMatrix() const {
-
72  return ::GetCameraMatrix2D(*this);
-
73  }
-
74 
-
78  inline Vector2 GetWorldToScreen(::Vector2 position) const {
-
79  return ::GetWorldToScreen2D(position, *this);
-
80  }
-
81 
-
85  inline Vector2 GetScreenToWorld(::Vector2 position) const {
-
86  return ::GetScreenToWorld2D(position, *this);
-
87  }
-
88 
-
89  protected:
-
90  inline void set(const ::Camera2D& camera) {
-
91  offset = camera.offset;
-
92  target = camera.target;
-
93  rotation = camera.rotation;
-
94  zoom = camera.zoom;
-
95  }
-
96 };
-
97 } // namespace raylib
-
98 
-
99 #endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
+
68  private:
+
69  inline void set(const ::Camera2D& camera) {
+
70  offset = camera.offset;
+
71  target = camera.target;
+
72  rotation = camera.rotation;
+
73  zoom = camera.zoom;
+
74  }
+
75 };
+
76 } // namespace raylib
+
77 
+
78 #endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Definition: Matrix.hpp:46
-
Vector2 GetScreenToWorld(::Vector2 position) const
Returns the world space position for a 2d camera screen space position.
Definition: Camera2D.hpp:85
-
Matrix GetMatrix() const
Returns camera 2d transform matrix.
Definition: Camera2D.hpp:71
-
Camera2D & EndMode()
Definition: Camera2D.hpp:53
-
void set(const ::Camera2D &camera)
Definition: Camera2D.hpp:90
-
Definition: Camera2D.hpp:33
-
Definition: Vector2.hpp:37
-
Vector2 GetWorldToScreen(::Vector2 position) const
Returns the screen space position for a 3d world space position.
Definition: Camera2D.hpp:78
-
Camera2D()
Definition: Camera2D.hpp:35
-
Camera2D(const ::Camera2D &camera)
Definition: Camera2D.hpp:36
-
Camera2D(::Vector2 offsetValue, ::Vector2 targetValue, float rotationValue=0, float zoomValue=1)
Definition: Camera2D.hpp:40
-
Camera2D & BeginMode()
Definition: Camera2D.hpp:48
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Vector2 GetScreenToWorld(::Vector2 position) const
Returns the world space position for a 2d camera screen space position.
Definition: Camera2D.hpp:64
+
Matrix GetMatrix() const
Returns camera 2d transform matrix.
Definition: Camera2D.hpp:50
+
Camera2D type, defines a 2d camera.
Definition: Camera2D.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:16
+
Vector2 GetWorldToScreen(::Vector2 position) const
Returns the screen space position for a 3d world space position.
Definition: Camera2D.hpp:57
diff --git a/docs/_camera3_d_8hpp_source.html b/docs/_camera3_d_8hpp_source.html index a67e239..1af68da 100644 --- a/docs/_camera3_d_8hpp_source.html +++ b/docs/_camera3_d_8hpp_source.html @@ -71,185 +71,156 @@ $(function() {
Camera3D.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 #include "./Vector3.hpp"
-
30 #include "./raylib-cpp-utils.hpp"
-
31 
-
32 namespace raylib {
-
33 class Camera3D : public ::Camera3D {
-
34  public:
-
35  Camera3D(const ::Camera3D& camera) {
-
36  set(camera);
-
37  }
-
38 
-
39  Camera3D(::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue,
-
40  float fovyValue = 0, int typeValue = 0) {
-
41  position = positionValue;
-
42  target = targetValue;
-
43  up = upValue;
-
44  fovy = fovyValue;
-
45  type = typeValue;
+
1 #ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./Vector3.hpp"
+
6 #include "./raylib-cpp-utils.hpp"
+
7 
+
8 namespace raylib {
+
12 class Camera3D : public ::Camera3D {
+
13  public:
+
14  Camera3D(const ::Camera3D& camera) {
+
15  set(camera);
+
16  }
+
17 
+
18  Camera3D(::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue,
+
19  float fovyValue = 0, int typeValue = 0) {
+
20  position = positionValue;
+
21  target = targetValue;
+
22  up = upValue;
+
23  fovy = fovyValue;
+
24  type = typeValue;
+
25  }
+
26 
+
27  Camera3D() {}
+
28 
+
29  GETTERSETTER(::Vector3, Position, position)
+
30  GETTERSETTER(::Vector3, Target, target)
+
31  GETTERSETTER(::Vector3, Up, up)
+
32  GETTERSETTER(float, Fovy, fovy)
+
33  GETTERSETTER(int, Type, type)
+
34 
+
35  Camera3D& operator=(const ::Camera3D& camera) {
+
36  set(camera);
+
37  return *this;
+
38  }
+
39 
+ +
44  ::BeginMode3D(*this);
+
45  return *this;
46  }
47 
-
48  Camera3D() {}
-
49 
-
50  GETTERSETTER(::Vector3, Position, position)
-
51  GETTERSETTER(::Vector3, Target, target)
-
52  GETTERSETTER(::Vector3, Up, up)
-
53  GETTERSETTER(float, Fovy, fovy)
-
54  GETTERSETTER(int, Type, type)
+ +
52  ::EndMode3D();
+
53  return *this;
+
54  }
55 
-
56  Camera3D& operator=(const ::Camera3D& camera) {
-
57  set(camera);
-
58  return *this;
-
59  }
-
60 
- -
65  ::BeginMode3D(*this);
-
66  return *this;
-
67  }
-
68 
- -
73  ::EndMode3D();
-
74  return *this;
-
75  }
-
76 
-
80  inline Matrix GetMatrix() const {
-
81  return ::GetCameraMatrix(*this);
-
82  }
-
83 
-
87  inline Camera3D& SetMode(int mode) {
-
88  ::SetCameraMode(*this, mode);
-
89  return *this;
-
90  }
-
91 
-
95  inline Camera3D& SetAltControl(int altKey) {
-
96  ::SetCameraAltControl(altKey);
-
97  return *this;
-
98  }
-
99 
-
103  inline Camera3D& SetSmoothZoomControl(int szKey) {
-
104  ::SetCameraSmoothZoomControl(szKey);
-
105  return *this;
-
106  }
-
107 
- -
112  int frontKey, int backKey,
-
113  int rightKey, int leftKey,
-
114  int upKey, int downKey) {
-
115  ::SetCameraMoveControls(frontKey, backKey, rightKey, leftKey, upKey, downKey);
-
116  return *this;
-
117  }
-
118 
-
122  inline Camera3D& Update() {
-
123  ::UpdateCamera(this);
-
124  return *this;
-
125  }
-
126 
- -
131  ::UpdateVrTracking(this);
-
132  return *this;
-
133  }
-
134 
-
138  inline Ray GetMouseRay(::Vector2 mousePosition) const {
-
139  return ::GetMouseRay(mousePosition, *this);
-
140  }
-
141 
-
145  inline Vector2 GetWorldToScreen(::Vector3 position) const {
-
146  return ::GetWorldToScreen(position, *this);
-
147  }
-
148 
- -
153  const ::Texture2D& texture,
-
154  ::Vector3 center,
-
155  float size,
-
156  ::Color tint = {255, 255, 255, 255}) {
-
157  ::DrawBillboard(*this, texture, center, size, tint);
-
158  return *this;
-
159  }
-
160 
- -
165  const ::Texture2D& texture,
-
166  ::Rectangle sourceRec,
-
167  ::Vector3 center,
-
168  float size,
-
169  ::Color tint = {255, 255, 255, 255}) {
-
170  ::DrawBillboardRec(*this, texture, sourceRec, center, size, tint);
-
171  return *this;
-
172  }
-
173 
-
174  protected:
-
175  inline void set(const ::Camera3D& camera) {
-
176  position = camera.position;
-
177  target = camera.target;
-
178  up = camera.up;
-
179  fovy = camera.fovy;
-
180  type = camera.type;
-
181  }
-
182 };
-
183 
-
184 typedef Camera3D Camera;
-
185 } // namespace raylib
-
186 
-
187 #endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
+
59  inline Matrix GetMatrix() const {
+
60  return ::GetCameraMatrix(*this);
+
61  }
+
62 
+
66  inline Camera3D& SetMode(int mode) {
+
67  ::SetCameraMode(*this, mode);
+
68  return *this;
+
69  }
+
70 
+
74  inline Camera3D& SetAltControl(int altKey) {
+
75  ::SetCameraAltControl(altKey);
+
76  return *this;
+
77  }
+
78 
+
82  inline Camera3D& SetSmoothZoomControl(int szKey) {
+
83  ::SetCameraSmoothZoomControl(szKey);
+
84  return *this;
+
85  }
+
86 
+ +
91  int frontKey, int backKey,
+
92  int rightKey, int leftKey,
+
93  int upKey, int downKey) {
+
94  ::SetCameraMoveControls(frontKey, backKey, rightKey, leftKey, upKey, downKey);
+
95  return *this;
+
96  }
+
97 
+
101  inline Camera3D& Update() {
+
102  ::UpdateCamera(this);
+
103  return *this;
+
104  }
+
105 
+ +
110  ::UpdateVrTracking(this);
+
111  return *this;
+
112  }
+
113 
+
117  inline Ray GetMouseRay(::Vector2 mousePosition) const {
+
118  return ::GetMouseRay(mousePosition, *this);
+
119  }
+
120 
+
124  inline Vector2 GetWorldToScreen(::Vector3 position) const {
+
125  return ::GetWorldToScreen(position, *this);
+
126  }
+
127 
+ +
132  const ::Texture2D& texture,
+
133  ::Vector3 center,
+
134  float size,
+
135  ::Color tint = {255, 255, 255, 255}) {
+
136  ::DrawBillboard(*this, texture, center, size, tint);
+
137  return *this;
+
138  }
+
139 
+ +
144  const ::Texture2D& texture,
+
145  ::Rectangle sourceRec,
+
146  ::Vector3 center,
+
147  float size,
+
148  ::Color tint = {255, 255, 255, 255}) {
+
149  ::DrawBillboardRec(*this, texture, sourceRec, center, size, tint);
+
150  return *this;
+
151  }
+
152 
+
153  private:
+
154  inline void set(const ::Camera3D& camera) {
+
155  position = camera.position;
+
156  target = camera.target;
+
157  up = camera.up;
+
158  fovy = camera.fovy;
+
159  type = camera.type;
+
160  }
+
161 };
+
162 
+
163 typedef Camera3D Camera;
+
164 } // namespace raylib
+
165 
+
166 #endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Definition: Matrix.hpp:46
-
static void UpdateCamera(const ::Camera &camera)
Definition: Functions.hpp:211
-
Ray GetMouseRay(::Vector2 mousePosition) const
Returns a ray trace from mouse position.
Definition: Camera3D.hpp:138
-
Camera3D & SetMode(int mode)
Set camera mode (multiple camera modes available)
Definition: Camera3D.hpp:87
-
Matrix GetMatrix() const
Get transform matrix for camera.
Definition: Camera3D.hpp:80
-
Camera3D & BeginMode()
Initializes 3D mode with custom camera (3D)
Definition: Camera3D.hpp:64
-
Camera3D & EndMode()
Ends 3D mode and returns to default 2D orthographic mode.
Definition: Camera3D.hpp:72
-
Ray type (useful for raycast)
Definition: Ray.hpp:38
-
Camera3D & UpdateVrTracking()
Update VR tracking (position and orientation) and camera.
Definition: Camera3D.hpp:130
-
Camera3D()
Definition: Camera3D.hpp:48
-
Camera3D & Update()
Update camera position for selected mode.
Definition: Camera3D.hpp:122
-
Camera3D & SetMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
Set camera move controls (1st person and 3rd person cameras)
Definition: Camera3D.hpp:111
-
Camera3D & SetAltControl(int altKey)
Set camera alt key to combine with mouse movement (free camera)
Definition: Camera3D.hpp:95
-
Camera3D & DrawBillboard(const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
Draw a billboard texture.
Definition: Camera3D.hpp:152
-
Definition: Vector3.hpp:37
-
Camera3D(::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue, float fovyValue=0, int typeValue=0)
Definition: Camera3D.hpp:39
-
Camera3D Camera
Definition: Camera3D.hpp:184
-
Camera3D(const ::Camera3D &camera)
Definition: Camera3D.hpp:35
-
Definition: Camera3D.hpp:33
-
Definition: Rectangle.hpp:33
-
Definition: Vector2.hpp:37
-
void set(const ::Camera3D &camera)
Definition: Camera3D.hpp:175
-
Definition: Color.hpp:35
-
Camera3D & DrawBillboard(const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
Draw a billboard texture defined by source.
Definition: Camera3D.hpp:164
-
Camera3D & SetSmoothZoomControl(int szKey)
Set camera smooth zoom key to combine with mouse (free camera)
Definition: Camera3D.hpp:103
-
Vector2 GetWorldToScreen(::Vector3 position) const
Returns the screen space position for a 3d world space position.
Definition: Camera3D.hpp:145
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
static void UpdateCamera(const ::Camera &camera)
Update camera depending on selected mode.
Definition: Functions.hpp:196
+
Ray GetMouseRay(::Vector2 mousePosition) const
Returns a ray trace from mouse position.
Definition: Camera3D.hpp:117
+
Camera3D & SetMode(int mode)
Set camera mode (multiple camera modes available)
Definition: Camera3D.hpp:66
+
Matrix GetMatrix() const
Get transform matrix for camera.
Definition: Camera3D.hpp:59
+
Camera3D & BeginMode()
Initializes 3D mode with custom camera (3D)
Definition: Camera3D.hpp:43
+
Camera3D & EndMode()
Ends 3D mode and returns to default 2D orthographic mode.
Definition: Camera3D.hpp:51
+
Ray type (useful for raycast)
Definition: Ray.hpp:12
+
Camera3D & UpdateVrTracking()
Update VR tracking (position and orientation) and camera.
Definition: Camera3D.hpp:109
+
Camera3D & Update()
Update camera position for selected mode.
Definition: Camera3D.hpp:101
+
Camera3D & SetMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
Set camera move controls (1st person and 3rd person cameras)
Definition: Camera3D.hpp:90
+
Camera3D & SetAltControl(int altKey)
Set camera alt key to combine with mouse movement (free camera)
Definition: Camera3D.hpp:74
+
Camera3D & DrawBillboard(const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
Draw a billboard texture.
Definition: Camera3D.hpp:131
+
Vector3 type.
Definition: Vector3.hpp:16
+
Camera type, defines a camera position/orientation in 3d space.
Definition: Camera3D.hpp:12
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:16
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Camera3D & DrawBillboard(const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
Draw a billboard texture defined by source.
Definition: Camera3D.hpp:143
+
Camera3D & SetSmoothZoomControl(int szKey)
Set camera smooth zoom key to combine with mouse (free camera)
Definition: Camera3D.hpp:82
+
Vector2 GetWorldToScreen(::Vector3 position) const
Returns the screen space position for a 3d world space position.
Definition: Camera3D.hpp:124
diff --git a/docs/_color_8hpp_source.html b/docs/_color_8hpp_source.html index da31735..e4f144b 100644 --- a/docs/_color_8hpp_source.html +++ b/docs/_color_8hpp_source.html @@ -71,331 +71,238 @@ $(function() {
Color.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_COLOR_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_COLOR_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./Vector4.hpp"
-
32 #include "./raylib-cpp-utils.hpp"
-
33 
-
34 namespace raylib {
-
35 class Color : public ::Color {
-
36  public:
-
37  Color(const ::Color& color) {
-
38  set(color);
-
39  }
-
40 
-
41  Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha) :
-
42  ::Color{red, green, blue, alpha} {};
-
43 
-
44  Color(unsigned char red, unsigned char green, unsigned char blue) :
-
45  ::Color{red, green, blue, 255} {};
-
46 
-
50  Color() : ::Color{0, 0, 0, 255} {};
+
1 #ifndef RAYLIB_CPP_INCLUDE_COLOR_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_COLOR_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./Vector4.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 
+
10 namespace raylib {
+
14 class Color : public ::Color {
+
15  public:
+
16  Color(const ::Color& color) {
+
17  set(color);
+
18  }
+
19 
+
20  Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha) :
+
21  ::Color{red, green, blue, alpha} {};
+
22 
+
23  Color(unsigned char red, unsigned char green, unsigned char blue) :
+
24  ::Color{red, green, blue, 255} {};
+
25 
+
29  Color() : ::Color{0, 0, 0, 255} {};
+
30 
+
34  Color(::Vector3 hsv) {
+
35  set(::ColorFromHSV(hsv.x, hsv.y, hsv.z));
+
36  }
+
37 
+
41  static ::Color FromHSV(float hue, float saturation, float value) {
+
42  return ::ColorFromHSV(hue, saturation, value);
+
43  }
+
44 
+
48  Color(int hexValue) {
+
49  set(::GetColor(hexValue));
+
50  }
51 
-
55  Color(::Vector3 hsv) {
-
56  set(::ColorFromHSV(hsv.x, hsv.y, hsv.z));
+
55  Color(::Vector4 normalized) {
+
56  set(::ColorFromNormalized(normalized));
57  }
58 
-
62  static ::Color FromHSV(float hue, float saturation, float value) {
-
63  return ::ColorFromHSV(hue, saturation, value);
+
62  int ToInt() const {
+
63  return ::ColorToInt(*this);
64  }
65 
-
69  Color(int hexValue) {
-
70  set(::GetColor(hexValue));
+
69  operator int() const {
+
70  return ::ColorToInt(*this);
71  }
72 
-
76  Color(::Vector4 normalized) {
-
77  set(::ColorFromNormalized(normalized));
+
76  Color Fade(float alpha) const {
+
77  return ::Fade(*this, alpha);
78  }
79 
-
83  int ToInt() const {
-
84  return ::ColorToInt(*this);
+
83  Vector4 Normalize() const {
+
84  return ::ColorNormalize(*this);
85  }
86 
-
90  operator int() const {
-
91  return ::ColorToInt(*this);
+
90  Vector3 ToHSV() const {
+
91  return ::ColorToHSV(*this);
92  }
93 
-
97  Color Fade(float alpha) const {
-
98  return ::Fade(*this, alpha);
-
99  }
-
100 
-
104  Vector4 Normalize() const {
-
105  return ::ColorNormalize(*this);
-
106  }
-
107 
-
111  Vector3 ToHSV() const {
-
112  return ::ColorToHSV(*this);
-
113  }
-
114 
-
115  GETTERSETTER(unsigned char, R, r)
-
116  GETTERSETTER(unsigned char, G, g)
-
117  GETTERSETTER(unsigned char, B, b)
-
118  GETTERSETTER(unsigned char, A, a)
-
119 
-
120  Color& operator=(const ::Color& color) {
-
121  set(color);
+
94  GETTERSETTER(unsigned char, R, r)
+
95  GETTERSETTER(unsigned char, G, g)
+
96  GETTERSETTER(unsigned char, B, b)
+
97  GETTERSETTER(unsigned char, A, a)
+
98 
+
99  Color& operator=(const ::Color& color) {
+
100  set(color);
+
101  return *this;
+
102  }
+
103 
+
107  inline Color& ClearBackground() {
+
108  ::ClearBackground(*this);
+
109  return *this;
+
110  }
+
111 
+
112  inline Color& DrawPixel(int x, int y) {
+
113  ::DrawPixel(x, y, *this);
+
114  return *this;
+
115  }
+
116 
+
120  inline Color& DrawPixel(::Vector2 pos) {
+
121  ::DrawPixelV(pos, *this);
122  return *this;
123  }
124 
-
128  inline Color& ClearBackground() {
-
129  ::ClearBackground(*this);
+
128  inline Color& DrawLine(int startPosX, int startPosY, int endPosX, int endPosY) {
+
129  ::DrawLine(startPosX, startPosY, endPosX, endPosY, *this);
130  return *this;
131  }
132 
-
133  inline Color& DrawPixel(int x, int y) {
-
134  ::DrawPixel(x, y, *this);
+
133  inline Color& DrawLine(::Vector2 startPos, ::Vector2 endPos) {
+
134  ::DrawLineV(startPos, endPos, *this);
135  return *this;
136  }
137 
-
141  inline Color& DrawPixel(::Vector2 pos) {
-
142  ::DrawPixelV(pos, *this);
-
143  return *this;
-
144  }
-
145 
-
149  inline Color& DrawLine(int startPosX, int startPosY, int endPosX, int endPosY) {
-
150  ::DrawLine(startPosX, startPosY, endPosX, endPosY, *this);
-
151  return *this;
-
152  }
-
153 
-
154  inline Color& DrawLine(::Vector2 startPos, ::Vector2 endPos) {
-
155  ::DrawLineV(startPos, endPos, *this);
-
156  return *this;
-
157  }
-
158 
-
159  inline Color& DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick) {
-
160  ::DrawLineEx(startPos, endPos, thick, *this);
+
138  inline Color& DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick) {
+
139  ::DrawLineEx(startPos, endPos, thick, *this);
+
140  return *this;
+
141  }
+
142 
+
143  inline Color& DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick) {
+
144  ::DrawLineBezier(startPos, endPos, thick, *this);
+
145  return *this;
+
146  }
+
147 
+
148  inline Color& DrawLineStrip(::Vector2 *points, int numPoints) {
+
149  ::DrawLineStrip(points, numPoints, *this);
+
150  return *this;
+
151  }
+
152 
+
153  inline Color& DrawText(const std::string& text, int posX, int posY, int fontSize) {
+
154  ::DrawText(text.c_str(), posX, posY, fontSize, *this);
+
155  return *this;
+
156  }
+
157 
+
158  inline Color& DrawText(const ::Font& font, const std::string& text, ::Vector2 position,
+
159  float fontSize, float spacing) {
+
160  ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, *this);
161  return *this;
162  }
163 
-
164  inline Color& DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick) {
-
165  ::DrawLineBezier(startPos, endPos, thick, *this);
-
166  return *this;
-
167  }
-
168 
-
169  inline Color& DrawLineStrip(::Vector2 *points, int numPoints) {
-
170  ::DrawLineStrip(points, numPoints, *this);
-
171  return *this;
-
172  }
-
173 
-
174  inline Color& DrawText(const std::string& text, int posX, int posY, int fontSize) {
-
175  ::DrawText(text.c_str(), posX, posY, fontSize, *this);
-
176  return *this;
-
177  }
-
178 
-
179  inline Color& DrawText(const ::Font& font, const std::string& text, ::Vector2 position,
-
180  float fontSize, float spacing) {
-
181  ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, *this);
+
164  inline Color& DrawText(
+
165  const ::Font& font,
+
166  const std::string& text,
+
167  ::Rectangle rec,
+
168  float fontSize,
+
169  float spacing,
+
170  bool wordWrap = false) {
+
171  ::DrawTextRec(font, text.c_str(), rec, fontSize, spacing, wordWrap, *this);
+
172  return *this;
+
173  }
+
174 
+
175  inline Color& DrawRectangle(int posX, int posY, int width, int height) {
+
176  ::DrawRectangle(posX, posY, width, height, *this);
+
177  return *this;
+
178  }
+
179 
+
180  inline Color& DrawRectangle(::Vector2 position, ::Vector2 size) {
+
181  ::DrawRectangleV(position, size, *this);
182  return *this;
183  }
184 
-
185  inline Color& DrawText(
-
186  const ::Font& font,
-
187  const std::string& text,
-
188  ::Rectangle rec,
-
189  float fontSize,
-
190  float spacing,
-
191  bool wordWrap = false) {
-
192  ::DrawTextRec(font, text.c_str(), rec, fontSize, spacing, wordWrap, *this);
-
193  return *this;
-
194  }
-
195 
-
196  inline Color& DrawRectangle(int posX, int posY, int width, int height) {
-
197  ::DrawRectangle(posX, posY, width, height, *this);
-
198  return *this;
-
199  }
-
200 
-
201  inline Color& DrawRectangle(::Vector2 position, ::Vector2 size) {
-
202  ::DrawRectangleV(position, size, *this);
-
203  return *this;
-
204  }
-
205 
-
206  inline Color& DrawRectangle(::Rectangle rec) {
-
207  ::DrawRectangleRec(rec, *this);
-
208  return *this;
-
209  }
-
210 
-
211  inline Color& DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation) {
-
212  ::DrawRectanglePro(rec, origin, rotation, *this);
-
213  return *this;
-
214  }
-
215 
-
216  inline Color& DrawRectangleLines(int posX, int posY, int width, int height) {
-
217  ::DrawRectangleLines(posX, posY, width, height, *this);
-
218  return *this;
-
219  }
-
220 
-
221  inline Color& DrawRectangleLines(::Rectangle rec, int lineThick) {
-
222  ::DrawRectangleLinesEx(rec, lineThick, *this);
-
223  return *this;
-
224  }
-
225 
-
229  Color Alpha(float alpha) const {
-
230  return ::ColorAlpha(*this, alpha);
-
231  }
-
232 
-
236  Color AlphaBlend(::Color dst, ::Color tint) const {
-
237  return ::ColorAlphaBlend(dst, *this, tint);
-
238  }
-
239 
-
240  inline static Color LightGray() { return LIGHTGRAY; }
-
241  inline static Color Gray() { return GRAY; }
-
242  inline static Color DarkGray() { return DARKGRAY; }
-
243  inline static Color Yellow() { return YELLOW; }
-
244  inline static Color Gold() { return GOLD; }
-
245  inline static Color Orange() { return ORANGE; }
-
246  inline static Color Pink() { return PINK; }
-
247  inline static Color Red() { return RED; }
-
248  inline static Color Maroon() { return MAROON; }
-
249  inline static Color Green() { return GREEN; }
-
250  inline static Color Lime() { return LIME; }
-
251  inline static Color DarkGreen() { return DARKGREEN; }
-
252  inline static Color SkyBlue() { return SKYBLUE; }
-
253  inline static Color Blue() { return BLUE; }
-
254  inline static Color DarkBlue() { return DARKBLUE; }
-
255  inline static Color Purple() { return PURPLE; }
-
256  inline static Color Violet() { return VIOLET; }
-
257  inline static Color DarkPurple() { return DARKPURPLE; }
-
258  inline static Color Beige() { return BEIGE; }
-
259  inline static Color Brown() { return BROWN; }
-
260  inline static Color DarkBrown() { return DARKBROWN; }
-
261  inline static Color White() { return WHITE; }
-
262  inline static Color Black() { return BLACK; }
-
263  inline static Color Blank() { return BLANK; }
-
264  inline static Color Magenta() { return MAGENTA; }
-
265  inline static Color RayWhite() { return RAYWHITE; }
-
266 
-
267  protected:
-
268  inline void set(const ::Color& color) {
-
269  r = color.r;
-
270  g = color.g;
-
271  b = color.b;
-
272  a = color.a;
-
273  }
-
274 };
-
275 
-
276 } // namespace raylib
-
277 
-
278 #endif // RAYLIB_CPP_INCLUDE_COLOR_HPP_
+
185  inline Color& DrawRectangle(::Rectangle rec) {
+
186  ::DrawRectangleRec(rec, *this);
+
187  return *this;
+
188  }
+
189 
+
190  inline Color& DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation) {
+
191  ::DrawRectanglePro(rec, origin, rotation, *this);
+
192  return *this;
+
193  }
+
194 
+
195  inline Color& DrawRectangleLines(int posX, int posY, int width, int height) {
+
196  ::DrawRectangleLines(posX, posY, width, height, *this);
+
197  return *this;
+
198  }
+
199 
+
200  inline Color& DrawRectangleLines(::Rectangle rec, int lineThick) {
+
201  ::DrawRectangleLinesEx(rec, lineThick, *this);
+
202  return *this;
+
203  }
+
204 
+
208  Color Alpha(float alpha) const {
+
209  return ::ColorAlpha(*this, alpha);
+
210  }
+
211 
+
215  Color AlphaBlend(::Color dst, ::Color tint) const {
+
216  return ::ColorAlphaBlend(dst, *this, tint);
+
217  }
+
218 
+
219  inline static Color LightGray() { return LIGHTGRAY; }
+
220  inline static Color Gray() { return GRAY; }
+
221  inline static Color DarkGray() { return DARKGRAY; }
+
222  inline static Color Yellow() { return YELLOW; }
+
223  inline static Color Gold() { return GOLD; }
+
224  inline static Color Orange() { return ORANGE; }
+
225  inline static Color Pink() { return PINK; }
+
226  inline static Color Red() { return RED; }
+
227  inline static Color Maroon() { return MAROON; }
+
228  inline static Color Green() { return GREEN; }
+
229  inline static Color Lime() { return LIME; }
+
230  inline static Color DarkGreen() { return DARKGREEN; }
+
231  inline static Color SkyBlue() { return SKYBLUE; }
+
232  inline static Color Blue() { return BLUE; }
+
233  inline static Color DarkBlue() { return DARKBLUE; }
+
234  inline static Color Purple() { return PURPLE; }
+
235  inline static Color Violet() { return VIOLET; }
+
236  inline static Color DarkPurple() { return DARKPURPLE; }
+
237  inline static Color Beige() { return BEIGE; }
+
238  inline static Color Brown() { return BROWN; }
+
239  inline static Color DarkBrown() { return DARKBROWN; }
+
240  inline static Color White() { return WHITE; }
+
241  inline static Color Black() { return BLACK; }
+
242  inline static Color Blank() { return BLANK; }
+
243  inline static Color Magenta() { return MAGENTA; }
+
244  inline static Color RayWhite() { return RAYWHITE; }
+
245 
+
246  private:
+
247  inline void set(const ::Color& color) {
+
248  r = color.r;
+
249  g = color.g;
+
250  b = color.b;
+
251  a = color.a;
+
252  }
+
253 };
+
254 
+
255 } // namespace raylib
+
256 
+
257 #endif // RAYLIB_CPP_INCLUDE_COLOR_HPP_
-
static Color Violet()
Definition: Color.hpp:256
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Color & DrawRectangleLines(int posX, int posY, int width, int height)
Definition: Color.hpp:216
-
-
static Color Green()
Definition: Color.hpp:249
-
Color & DrawLineStrip(::Vector2 *points, int numPoints)
Definition: Color.hpp:169
-
static Color White()
Definition: Color.hpp:261
-
-
static Color Purple()
Definition: Color.hpp:255
-
Color & DrawRectangle(::Vector2 position, ::Vector2 size)
Definition: Color.hpp:201
-
Color & DrawText(const ::Font &font, const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false)
Definition: Color.hpp:185
-
Color & DrawRectangleLines(::Rectangle rec, int lineThick)
Definition: Color.hpp:221
-
Definition: Vector4.hpp:38
-
-
-
void set(const ::Color &color)
Definition: Color.hpp:268
-
Color & ClearBackground()
Set background color (framebuffer clear color)
Definition: Color.hpp:128
-
Color & DrawLine(::Vector2 startPos, ::Vector2 endPos)
Definition: Color.hpp:154
-
static Color DarkPurple()
Definition: Color.hpp:257
-
static Color DarkBlue()
Definition: Color.hpp:254
-
-
static Color SkyBlue()
Definition: Color.hpp:252
-
-
Color & DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation)
Definition: Color.hpp:211
-
-
static Color Brown()
Definition: Color.hpp:259
-
static Color Beige()
Definition: Color.hpp:258
-
static Color Pink()
Definition: Color.hpp:246
-
-
Definition: Vector3.hpp:37
-
Color & DrawPixel(int x, int y)
Definition: Color.hpp:133
-
-
int ToInt() const
Returns hexadecimal value for a Color.
Definition: Color.hpp:83
-
Vector3 ToHSV() const
Returns HSV values for a Color.
Definition: Color.hpp:111
-
Color & DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick)
Definition: Color.hpp:159
-
static Color Blue()
Definition: Color.hpp:253
-
-
static Color Blank()
Definition: Color.hpp:263
-
static Color Maroon()
Definition: Color.hpp:248
-
static Color LightGray()
Definition: Color.hpp:240
-
-
static Color Orange()
Definition: Color.hpp:245
-
static Color Black()
Definition: Color.hpp:262
-
Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
Definition: Color.hpp:41
-
static Color RayWhite()
Definition: Color.hpp:265
-
-
static Color Yellow()
Definition: Color.hpp:243
-
-
Color & DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing)
Definition: Color.hpp:179
-
Definition: Rectangle.hpp:33
-
static Color Gray()
Definition: Color.hpp:241
-
-
-
Color(::Vector3 hsv)
Returns a Color from HSV values.
Definition: Color.hpp:55
-
-
Definition: Vector2.hpp:37
-
static Color DarkGreen()
Definition: Color.hpp:251
-
Color & DrawRectangle(::Rectangle rec)
Definition: Color.hpp:206
-
Color(unsigned char red, unsigned char green, unsigned char blue)
Definition: Color.hpp:44
-
static Color Red()
Definition: Color.hpp:247
-
Color & DrawPixel(::Vector2 pos)
Draw a pixel.
Definition: Color.hpp:141
-
-
Color(::Vector4 normalized)
Returns Color from normalized values [0..1].
Definition: Color.hpp:76
-
-
Definition: Color.hpp:35
-
Color & DrawText(const std::string &text, int posX, int posY, int fontSize)
Definition: Color.hpp:174
-
Color()
Black.
Definition: Color.hpp:50
-
::Color FromHSV(float hue, float saturation, float value)
Returns a Color from HSV values.
Definition: Color.hpp:62
-
Color Alpha(float alpha) const
Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
Definition: Color.hpp:229
-
Color AlphaBlend(::Color dst, ::Color tint) const
Returns src alpha-blended into dst color with tint.
Definition: Color.hpp:236
-
-
Vector4 Normalize() const
Returns Color normalized as float [0..1].
Definition: Color.hpp:104
-
-
static Color Gold()
Definition: Color.hpp:244
-
-
static Color DarkGray()
Definition: Color.hpp:242
-
Color & DrawLine(int startPosX, int startPosY, int endPosX, int endPosY)
Draw a line.
Definition: Color.hpp:149
-
Color Fade(float alpha) const
Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
Definition: Color.hpp:97
-
static Color DarkBrown()
Definition: Color.hpp:260
-
static Color Lime()
Definition: Color.hpp:250
-
Color(const ::Color &color)
Definition: Color.hpp:37
-
Color & DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick)
Definition: Color.hpp:164
-
Color & DrawRectangle(int posX, int posY, int width, int height)
Definition: Color.hpp:196
-
static Color Magenta()
Definition: Color.hpp:264
-
-
-
-
Color(int hexValue)
Get Color structure from hexadecimal value.
Definition: Color.hpp:69
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Vector4 type.
Definition: Vector4.hpp:17
+
Color & ClearBackground()
Set background color (framebuffer clear color)
Definition: Color.hpp:107
+
Vector3 type.
Definition: Vector3.hpp:16
+
int ToInt() const
Returns hexadecimal value for a Color.
Definition: Color.hpp:62
+
Vector3 ToHSV() const
Returns HSV values for a Color.
Definition: Color.hpp:90
+
Color(::Vector3 hsv)
Returns a Color from HSV values.
Definition: Color.hpp:34
+
Vector2 type.
Definition: Vector2.hpp:16
+
Color & DrawPixel(::Vector2 pos)
Draw a pixel.
Definition: Color.hpp:120
+
Color(::Vector4 normalized)
Returns Color from normalized values [0..1].
Definition: Color.hpp:55
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Color()
Black.
Definition: Color.hpp:29
+
::Color FromHSV(float hue, float saturation, float value)
Returns a Color from HSV values.
Definition: Color.hpp:41
+
Color Alpha(float alpha) const
Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
Definition: Color.hpp:208
+
Color AlphaBlend(::Color dst, ::Color tint) const
Returns src alpha-blended into dst color with tint.
Definition: Color.hpp:215
+
Vector4 Normalize() const
Returns Color normalized as float [0..1].
Definition: Color.hpp:83
+
Color & DrawLine(int startPosX, int startPosY, int endPosX, int endPosY)
Draw a line.
Definition: Color.hpp:128
+
Color Fade(float alpha) const
Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
Definition: Color.hpp:76
+
Color(int hexValue)
Get Color structure from hexadecimal value.
Definition: Color.hpp:48
diff --git a/docs/_font_8hpp_source.html b/docs/_font_8hpp_source.html index afaea9f..b95def9 100644 --- a/docs/_font_8hpp_source.html +++ b/docs/_font_8hpp_source.html @@ -71,167 +71,133 @@ $(function() {
Font.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_FONT_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_FONT_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
-
32 
-
33 namespace raylib {
-
34 class Font : public ::Font {
-
35  public:
-
36  Font() {
-
37  set(::GetFontDefault());
-
38  }
-
39 
-
40  Font(const ::Font& font) {
-
41  set(font);
-
42  }
-
43 
-
44  Font(const std::string& fileName) {
-
45  set(::LoadFont(fileName.c_str()));
-
46  }
-
47 
-
48  Font(const std::string& fileName, int fontSize, int* fontChars, int charCount) {
-
49  set(::LoadFontEx(fileName.c_str(), fontSize, fontChars, charCount));
-
50  }
-
51 
-
52  Font(const ::Image& image, ::Color key, int firstChar) {
-
53  set(::LoadFontFromImage(image, key, firstChar));
-
54  }
+
1 #ifndef RAYLIB_CPP_INCLUDE_FONT_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_FONT_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 
+
9 namespace raylib {
+
13 class Font : public ::Font {
+
14  public:
+
15  Font() {
+
16  set(::GetFontDefault());
+
17  }
+
18 
+
19  Font(const ::Font& font) {
+
20  set(font);
+
21  }
+
22 
+
23  Font(const std::string& fileName) {
+
24  set(::LoadFont(fileName.c_str()));
+
25  }
+
26 
+
27  Font(const std::string& fileName, int fontSize, int* fontChars, int charCount) {
+
28  set(::LoadFontEx(fileName.c_str(), fontSize, fontChars, charCount));
+
29  }
+
30 
+
31  Font(const ::Image& image, ::Color key, int firstChar) {
+
32  set(::LoadFontFromImage(image, key, firstChar));
+
33  }
+
34 
+
35  Font(const std::string& fileType, const unsigned char *fileData, int dataSize, int fontSize,
+
36  int *fontChars, int charsCount) {
+
37  set(::LoadFontFromMemory(fileType.c_str(), fileData, dataSize, fontSize, fontChars,
+
38  charsCount));
+
39  }
+
40 
+
41  ~Font() {
+
42  Unload();
+
43  }
+
44 
+
45  void Unload() {
+
46  UnloadFont(*this);
+
47  }
+
48 
+
49  GETTERSETTER(int, BaseSize, baseSize)
+
50  GETTERSETTER(int, CharsCount, charsCount)
+
51  GETTERSETTER(int, CharsPadding, charsPadding)
+
52  GETTERSETTER(::Texture2D, Texture, texture)
+
53  GETTERSETTER(::Rectangle*, Recs, recs)
+
54  GETTERSETTER(::CharInfo*, Chars, chars)
55 
-
56  Font(const std::string& fileType, const unsigned char *fileData, int dataSize, int fontSize,
-
57  int *fontChars, int charsCount) {
-
58  set(::LoadFontFromMemory(fileType.c_str(), fileData, dataSize, fontSize, fontChars,
-
59  charsCount));
-
60  }
-
61 
-
62  ~Font() {
-
63  Unload();
-
64  }
-
65 
-
66  void Unload() {
-
67  UnloadFont(*this);
+
56  Font& operator=(const ::Font& font) {
+
57  set(font);
+
58  return *this;
+
59  }
+
60 
+
64  inline Font& DrawText(const std::string& text, ::Vector2 position, float fontSize,
+
65  float spacing, ::Color tint = WHITE) {
+
66  ::DrawTextEx(*this, text.c_str(), position, fontSize, spacing, tint);
+
67  return *this;
68  }
69 
-
70  GETTERSETTER(int, BaseSize, baseSize)
-
71  GETTERSETTER(int, CharsCount, charsCount)
-
72  GETTERSETTER(int, CharsPadding, charsPadding)
-
73  GETTERSETTER(::Texture2D, Texture, texture)
-
74  GETTERSETTER(::Rectangle*, Recs, recs)
-
75  GETTERSETTER(::CharInfo*, Chars, chars)
-
76 
-
77  Font& operator=(const ::Font& font) {
-
78  set(font);
-
79  return *this;
-
80  }
-
81 
-
85  inline Font& DrawText(const std::string& text, ::Vector2 position, float fontSize,
-
86  float spacing, ::Color tint = WHITE) {
-
87  ::DrawTextEx(*this, text.c_str(), position, fontSize, spacing, tint);
-
88  return *this;
-
89  }
-
90 
-
91  inline Font& DrawText(const std::string& text, ::Rectangle rec, float fontSize, float spacing,
-
92  bool wordWrap = false, ::Color tint = WHITE) {
-
93  ::DrawTextRec(*this, text.c_str(), rec, fontSize, spacing, wordWrap, tint);
-
94  return *this;
-
95  }
-
96 
-
100  inline Font& DrawText(const std::string& text, ::Rectangle rec, float fontSize, float spacing,
-
101  bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText,
-
102  ::Color selectBack) {
-
103  ::DrawTextRecEx(*this, text.c_str(), rec, fontSize, spacing, wordWrap, tint,
-
104  selectStart, selectLength, selectText, selectBack);
-
105  return *this;
-
106  }
-
107 
-
111  inline Font& DrawText(int codepoint,
-
112  ::Vector2 position,
-
113  float fontSize,
-
114  ::Color tint = { 255, 255, 255, 255 }) {
-
115  ::DrawTextCodepoint(*this, codepoint, position, fontSize, tint);
-
116  return *this;
-
117  }
-
118 
-
122  inline Vector2 MeasureText(const std::string& text, float fontSize, float spacing) const {
-
123  return ::MeasureTextEx(*this, text.c_str(), fontSize, spacing);
-
124  }
-
125 
-
129  inline int GetGlyphIndex(int character) const {
-
130  return ::GetGlyphIndex(*this, character);
-
131  }
-
132 
-
136  inline ::Image ImageText(const std::string& text, float fontSize,
-
137  float spacing, ::Color tint) const {
-
138  return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint);
-
139  }
-
140 
-
141  protected:
-
142  void set(const ::Font& font) {
-
143  baseSize = font.baseSize;
-
144  charsCount = font.charsCount;
-
145  charsPadding = font.charsPadding;
-
146  texture = font.texture;
-
147  recs = font.recs;
-
148  chars = font.chars;
-
149  }
-
150 };
-
151 } // namespace raylib
-
152 
-
153 #endif // RAYLIB_CPP_INCLUDE_FONT_HPP_
+
70  inline Font& DrawText(const std::string& text, ::Rectangle rec, float fontSize, float spacing,
+
71  bool wordWrap = false, ::Color tint = WHITE) {
+
72  ::DrawTextRec(*this, text.c_str(), rec, fontSize, spacing, wordWrap, tint);
+
73  return *this;
+
74  }
+
75 
+
79  inline Font& DrawText(const std::string& text, ::Rectangle rec, float fontSize, float spacing,
+
80  bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText,
+
81  ::Color selectBack) {
+
82  ::DrawTextRecEx(*this, text.c_str(), rec, fontSize, spacing, wordWrap, tint,
+
83  selectStart, selectLength, selectText, selectBack);
+
84  return *this;
+
85  }
+
86 
+
90  inline Font& DrawText(int codepoint,
+
91  ::Vector2 position,
+
92  float fontSize,
+
93  ::Color tint = { 255, 255, 255, 255 }) {
+
94  ::DrawTextCodepoint(*this, codepoint, position, fontSize, tint);
+
95  return *this;
+
96  }
+
97 
+
101  inline Vector2 MeasureText(const std::string& text, float fontSize, float spacing) const {
+
102  return ::MeasureTextEx(*this, text.c_str(), fontSize, spacing);
+
103  }
+
104 
+
108  inline int GetGlyphIndex(int character) const {
+
109  return ::GetGlyphIndex(*this, character);
+
110  }
+
111 
+
115  inline ::Image ImageText(const std::string& text, float fontSize,
+
116  float spacing, ::Color tint) const {
+
117  return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint);
+
118  }
+
119 
+
120  private:
+
121  void set(const ::Font& font) {
+
122  baseSize = font.baseSize;
+
123  charsCount = font.charsCount;
+
124  charsPadding = font.charsPadding;
+
125  texture = font.texture;
+
126  recs = font.recs;
+
127  chars = font.chars;
+
128  }
+
129 };
+
130 } // namespace raylib
+
131 
+
132 #endif // RAYLIB_CPP_INCLUDE_FONT_HPP_
-
Font(const std::string &fileName)
Definition: Font.hpp:44
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
void set(const ::Font &font)
Definition: Font.hpp:142
-
Font & DrawText(const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE)
Draw text using font and additional parameters.
Definition: Font.hpp:85
-
void Unload()
Definition: Font.hpp:66
-
Font & DrawText(const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false, ::Color tint=WHITE)
Definition: Font.hpp:91
-
Font()
Definition: Font.hpp:36
-
~Font()
Definition: Font.hpp:62
-
Font(const ::Image &image, ::Color key, int firstChar)
Definition: Font.hpp:52
-
Font & DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint={ 255, 255, 255, 255 })
Draw one character (codepoint)
Definition: Font.hpp:111
-
Font(const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
Definition: Font.hpp:56
-
Definition: Rectangle.hpp:33
-
Definition: Font.hpp:34
-
int GetGlyphIndex(int character) const
Get index position for a unicode character on font.
Definition: Font.hpp:129
-
Definition: Vector2.hpp:37
-
Font(const ::Font &font)
Definition: Font.hpp:40
-
Font(const std::string &fileName, int fontSize, int *fontChars, int charCount)
Definition: Font.hpp:48
-
Definition: Color.hpp:35
-
inline ::Image ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) const
Create an image from text (custom sprite font)
Definition: Font.hpp:136
-
Definition: Texture.hpp:36
-
Vector2 MeasureText(const std::string &text, float fontSize, float spacing) const
Measure string size for Font.
Definition: Font.hpp:122
-
Font & DrawText(const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText, ::Color selectBack)
Draw text using font inside rectangle limits with support for text selection.
Definition: Font.hpp:100
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Font & DrawText(const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE)
Draw text using font and additional parameters.
Definition: Font.hpp:64
+
Font & DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint={ 255, 255, 255, 255 })
Draw one character (codepoint)
Definition: Font.hpp:90
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Font type, includes texture and charSet array data.
Definition: Font.hpp:13
+
int GetGlyphIndex(int character) const
Get index position for a unicode character on font.
Definition: Font.hpp:108
+
Vector2 type.
Definition: Vector2.hpp:16
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
inline ::Image ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) const
Create an image from text (custom sprite font)
Definition: Font.hpp:115
+
Texture type.
Definition: Texture.hpp:15
+
Vector2 MeasureText(const std::string &text, float fontSize, float spacing) const
Measure string size for Font.
Definition: Font.hpp:101
+
Font & DrawText(const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText, ::Color selectBack)
Draw text using font inside rectangle limits with support for text selection.
Definition: Font.hpp:79
diff --git a/docs/_functions_8hpp_source.html b/docs/_functions_8hpp_source.html index a5b47bc..6e2301b 100644 --- a/docs/_functions_8hpp_source.html +++ b/docs/_functions_8hpp_source.html @@ -71,221 +71,197 @@ $(function() {
Functions.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
1 
+
4 #ifndef RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
5 #define RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
6 
+
7 #include <string>
+
8 #include <vector>
+
9 
+
10 #include "./raylib.hpp"
+
11 
+
15 #ifndef RLCPPAPI
+
16 #define RLCPPAPI static
+
17 #endif
+
18 
+
19 namespace raylib {
+
20 
+
24 RLCPPAPI inline void InitWindow(int width, int height, const std::string& title = "raylib") {
+
25  ::InitWindow(width, height, title.c_str());
+
26 }
27 
-
28 #include <string>
-
29 #include <vector>
-
30 
-
31 #include "./raylib.hpp"
-
32 
-
33 #ifndef RLCPPAPI
+
31 RLCPPAPI inline void SetWindowTitle(const std::string& title) {
+
32  ::SetWindowTitle(title.c_str());
+
33 }
34 
-
37 #define RLCPPAPI static
-
38 #endif
-
39 
-
40 namespace raylib {
+
38 RLCPPAPI inline std::string GetMonitorName(int monitor = 0) {
+
39  return ::GetMonitorName(monitor);
+
40 }
41 
-
45 RLCPPAPI inline void InitWindow(int width, int height, const std::string& title = "raylib") {
-
46  ::InitWindow(width, height, title.c_str());
+
45 RLCPPAPI inline void SetClipboardText(const std::string& text) {
+
46  ::SetClipboardText(text.c_str());
47 }
48 
-
52 RLCPPAPI inline void SetWindowTitle(const std::string& title) {
-
53  ::SetWindowTitle(title.c_str());
+
52 RLCPPAPI inline std::string GetClipboardText() {
+
53  return ::GetClipboardText();
54 }
55 
-
59 RLCPPAPI inline std::string GetMonitorName(int monitor = 0) {
-
60  return ::GetMonitorName(monitor);
+
59 RLCPPAPI inline void TakeScreenshot(const std::string& fileName) {
+
60  ::TakeScreenshot(fileName.c_str());
61 }
62 
-
66 RLCPPAPI inline void SetClipboardText(const std::string& text) {
-
67  ::SetClipboardText(text.c_str());
-
68 }
-
69 
-
73 RLCPPAPI inline std::string GetClipboardText() {
-
74  return ::GetClipboardText();
-
75 }
-
76 
-
80 RLCPPAPI inline void TakeScreenshot(const std::string& fileName) {
-
81  ::TakeScreenshot(fileName.c_str());
-
82 }
-
83 
-
87 RLCPPAPI std::string LoadFileText(const std::string& fileName) {
-
88  char* text = ::LoadFileText(fileName.c_str());
-
89  std::string output(text);
-
90  ::UnloadFileText((unsigned char*)text);
-
91  return output;
+
66 RLCPPAPI std::string LoadFileText(const std::string& fileName) {
+
67  char* text = ::LoadFileText(fileName.c_str());
+
68  std::string output(text);
+
69  ::UnloadFileText((unsigned char*)text);
+
70  return output;
+
71 }
+
72 
+
76 RLCPPAPI inline bool SaveFileText(const std::string& fileName, const std::string& text) {
+
77  return ::SaveFileText(fileName.c_str(), const_cast<char*>(text.c_str()));
+
78 }
+
79 
+
83 RLCPPAPI inline bool FileExists(const std::string& fileName) {
+
84  return ::FileExists(fileName.c_str());
+
85 }
+
86 
+
90 RLCPPAPI inline bool DirectoryExists(const std::string& dirPath) {
+
91  return ::DirectoryExists(dirPath.c_str());
92 }
93 
-
97 RLCPPAPI inline bool SaveFileText(const std::string& fileName, const std::string& text) {
-
98  return ::SaveFileText(fileName.c_str(), const_cast<char*>(text.c_str()));
+
97 RLCPPAPI inline bool IsFileExtension(const std::string& fileName, const std::string& ext) {
+
98  return ::IsFileExtension(fileName.c_str(), ext.c_str());
99 }
100 
-
104 RLCPPAPI inline bool FileExists(const std::string& fileName) {
-
105  return ::FileExists(fileName.c_str());
+
104 RLCPPAPI inline std::string GetFileExtension(const std::string& fileName) {
+
105  return ::GetFileExtension(fileName.c_str());
106 }
107 
-
111 RLCPPAPI inline bool DirectoryExists(const std::string& dirPath) {
-
112  return ::DirectoryExists(dirPath.c_str());
+
111 RLCPPAPI inline std::string GetFileName(const std::string& filePath) {
+
112  return ::GetFileName(filePath.c_str());
113 }
114 
-
118 RLCPPAPI inline bool IsFileExtension(const std::string& fileName, const std::string& ext) {
-
119  return ::IsFileExtension(fileName.c_str(), ext.c_str());
+
118 RLCPPAPI inline std::string GetFileNameWithoutExt(const std::string& filePath) {
+
119  return ::GetFileNameWithoutExt(filePath.c_str());
120 }
121 
-
125 RLCPPAPI inline std::string GetFileExtension(const std::string& fileName) {
-
126  return ::GetFileExtension(fileName.c_str());
+
125 RLCPPAPI inline std::string GetDirectoryPath(const std::string& filePath) {
+
126  return ::GetDirectoryPath(filePath.c_str());
127 }
128 
-
132 RLCPPAPI inline std::string GetFileName(const std::string& filePath) {
-
133  return ::GetFileName(filePath.c_str());
+
132 RLCPPAPI inline std::string GetPrevDirectoryPath(const std::string& dirPath) {
+
133  return ::GetPrevDirectoryPath(dirPath.c_str());
134 }
135 
-
139 RLCPPAPI inline std::string GetFileNameWithoutExt(const std::string& filePath) {
-
140  return ::GetFileNameWithoutExt(filePath.c_str());
+
139 RLCPPAPI inline std::string GetWorkingDirectory() {
+
140  return ::GetWorkingDirectory();
141 }
142 
-
146 RLCPPAPI inline std::string GetDirectoryPath(const std::string& filePath) {
-
147  return ::GetDirectoryPath(filePath.c_str());
-
148 }
-
149 
-
153 RLCPPAPI inline std::string GetPrevDirectoryPath(const std::string& dirPath) {
-
154  return ::GetPrevDirectoryPath(dirPath.c_str());
-
155 }
-
156 
-
160 RLCPPAPI inline std::string GetWorkingDirectory() {
-
161  return ::GetWorkingDirectory();
-
162 }
-
163 
-
167 RLCPPAPI std::vector<std::string> GetDirectoryFiles(const std::string& dirPath) {
-
168  int count;
-
169  char** files = ::GetDirectoryFiles(dirPath.c_str(), &count);
-
170  std::vector<std::string> output(files, files + count);
-
171  ::ClearDirectoryFiles();
-
172  return output;
-
173 }
-
174 
-
178 RLCPPAPI inline bool ChangeDirectory(const std::string& dir) {
-
179  return ::ChangeDirectory(dir.c_str());
-
180 }
-
181 
-
185 RLCPPAPI std::vector<std::string> GetDroppedFiles() {
-
186  int count;
-
187  char** files = ::GetDroppedFiles(&count);
-
188  std::vector<std::string> output(files, files + count);
-
189  ::ClearDroppedFiles();
-
190  return output;
+
146 RLCPPAPI std::vector<std::string> GetDirectoryFiles(const std::string& dirPath) {
+
147  int count;
+
148  char** files = ::GetDirectoryFiles(dirPath.c_str(), &count);
+
149  std::vector<std::string> output(files, files + count);
+
150  ::ClearDirectoryFiles();
+
151  return output;
+
152 }
+
153 
+
157 RLCPPAPI inline bool ChangeDirectory(const std::string& dir) {
+
158  return ::ChangeDirectory(dir.c_str());
+
159 }
+
160 
+
164 RLCPPAPI std::vector<std::string> GetDroppedFiles() {
+
165  int count;
+
166  char** files = ::GetDroppedFiles(&count);
+
167  std::vector<std::string> output(files, files + count);
+
168  ::ClearDroppedFiles();
+
169  return output;
+
170 }
+
171 
+
175 RLCPPAPI inline long GetFileModTime(const std::string& fileName) { // NOLINT
+
176  return ::GetFileModTime(fileName.c_str());
+
177 }
+
178 
+
182 RLCPPAPI inline void OpenURL(const std::string& url) {
+
183  return ::OpenURL(url.c_str());
+
184 }
+
185 
+
189 RLCPPAPI inline bool IsGamepadName(int gamepad, const std::string& name) {
+
190  return ::IsGamepadName(gamepad, name.c_str());
191 }
192 
-
196 RLCPPAPI inline long GetFileModTime(const std::string& fileName) { // NOLINT
-
197  return ::GetFileModTime(fileName.c_str());
-
198 }
-
199 
-
203 RLCPPAPI inline void OpenURL(const std::string& url) {
-
204  return ::OpenURL(url.c_str());
-
205 }
-
206 
-
207 RLCPPAPI inline bool IsGamepadName(int gamepad, const std::string& name) {
-
208  return ::IsGamepadName(gamepad, name.c_str());
-
209 }
-
210 
-
211 RLCPPAPI inline void UpdateCamera(const ::Camera& camera) {
-
212  ::Camera* cameraPointer = (::Camera*)&camera;
-
213  ::UpdateCamera(cameraPointer);
-
214 }
-
215 
-
216 RLCPPAPI inline ::Image LoadImage(const std::string& fileName) {
-
217  return ::LoadImage(fileName.c_str());
-
218 }
-
219 
-
220 RLCPPAPI inline ::Image LoadImageRaw(const std::string& fileName,
-
221  int width, int height,
-
222  int format, int headerSize) {
-
223  return ::LoadImageRaw(fileName.c_str(), width, height, format, headerSize);
-
224 }
-
225 
-
226 RLCPPAPI inline ::Image LoadImageAnim(const std::string& fileName, int *frames) {
-
227  return ::LoadImageAnim(fileName.c_str(), frames);
-
228 }
-
229 
-
230 RLCPPAPI inline ::Image LoadImageFromMemory(const std::string& fileType,
-
231  const unsigned char *fileData,
-
232  int dataSize) {
-
233  return ::LoadImageFromMemory(fileType.c_str(), fileData, dataSize);
-
234 }
-
235 
+
196 RLCPPAPI inline void UpdateCamera(const ::Camera& camera) {
+
197  ::Camera* cameraPointer = (::Camera*)&camera;
+
198  ::UpdateCamera(cameraPointer);
+
199 }
+
200 
+
204 RLCPPAPI inline ::Image LoadImage(const std::string& fileName) {
+
205  return ::LoadImage(fileName.c_str());
+
206 }
+
207 
+
211 RLCPPAPI inline ::Image LoadImageRaw(const std::string& fileName,
+
212  int width, int height,
+
213  int format, int headerSize) {
+
214  return ::LoadImageRaw(fileName.c_str(), width, height, format, headerSize);
+
215 }
+
216 
+
220 RLCPPAPI inline ::Image LoadImageAnim(const std::string& fileName, int *frames) {
+
221  return ::LoadImageAnim(fileName.c_str(), frames);
+
222 }
+
223 
+
227 RLCPPAPI inline ::Image LoadImageFromMemory(const std::string& fileType,
+
228  const unsigned char *fileData,
+
229  int dataSize) {
+
230  return ::LoadImageFromMemory(fileType.c_str(), fileData, dataSize);
+
231 }
+
232 
236 RLCPPAPI inline bool ExportImage(const Image& image, const std::string& fileName) {
237  return ::ExportImage(image, fileName.c_str());
238 }
239 
-
240 RLCPPAPI inline bool ExportImageAsCode(const Image& image, const std::string& fileName) {
-
241  return ::ExportImageAsCode(image, fileName.c_str());
-
242 }
-
243 
-
244 } // namespace raylib
-
245 
-
246 #endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
243 RLCPPAPI inline bool ExportImageAsCode(const Image& image, const std::string& fileName) {
+
244  return ::ExportImageAsCode(image, fileName.c_str());
+
245 }
+
246 
+
247 } // namespace raylib
+
248 
+
249 #endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
static inline ::Image LoadImage(const std::string &fileName)
Definition: Functions.hpp:216
-
static std::string GetFileName(const std::string &filePath)
Get pointer to filename for a path string.
Definition: Functions.hpp:132
-
static void UpdateCamera(const ::Camera &camera)
Definition: Functions.hpp:211
-
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Definition: Functions.hpp:220
-
static std::string GetPrevDirectoryPath(const std::string &dirPath)
Get previous directory path for a given path.
Definition: Functions.hpp:153
-
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Definition: Functions.hpp:230
-
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:52
-
static bool IsGamepadName(int gamepad, const std::string &name)
Definition: Functions.hpp:207
-
Definition: Image.hpp:34
-
static std::string GetMonitorName(int monitor=0)
Get the human-readable, UTF-8 encoded name of the primary monitor.
Definition: Functions.hpp:59
-
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Definition: Functions.hpp:226
-
static long GetFileModTime(const std::string &fileName)
Get file modification time (last write time)
Definition: Functions.hpp:196
-
static void TakeScreenshot(const std::string &fileName)
Takes a screenshot of current screen (saved a .png)
Definition: Functions.hpp:80
-
static std::vector< std::string > GetDroppedFiles()
Get dropped files names.
Definition: Functions.hpp:185
-
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
Definition: Functions.hpp:45
-
static bool ExportImageAsCode(const Image &image, const std::string &fileName)
Definition: Functions.hpp:240
-
Definition: Camera3D.hpp:33
-
static bool DirectoryExists(const std::string &dirPath)
Check if directory path exists.
Definition: Functions.hpp:111
-
static std::string GetFileNameWithoutExt(const std::string &filePath)
Get filename string without extension.
Definition: Functions.hpp:139
-
static std::string GetDirectoryPath(const std::string &filePath)
Get full path for a given fileName with path.
Definition: Functions.hpp:146
-
static bool IsFileExtension(const std::string &fileName, const std::string &ext)
Check file extension (including point: .png, .wav)
Definition: Functions.hpp:118
-
static bool FileExists(const std::string &fileName)
Check if file exists.
Definition: Functions.hpp:104
-
static std::vector< std::string > GetDirectoryFiles(const std::string &dirPath)
Get filenames in a directory path.
Definition: Functions.hpp:167
-
static bool ExportImage(const Image &image, const std::string &fileName)
Definition: Functions.hpp:236
-
static bool ChangeDirectory(const std::string &dir)
Change working directory, return true on success.
Definition: Functions.hpp:178
-
static void SetClipboardText(const std::string &text)
Set clipboard text content.
Definition: Functions.hpp:66
-
static std::string GetFileExtension(const std::string &fileName)
Get pointer to extension for a filename string (including point: ".png")
Definition: Functions.hpp:125
-
static bool SaveFileText(const std::string &fileName, const std::string &text)
Save text data to file (write)
Definition: Functions.hpp:97
-
static std::string LoadFileText(const std::string &fileName)
Load text data from file (read)
Definition: Functions.hpp:87
-
static void OpenURL(const std::string &url)
Open URL with default system browser (if available)
Definition: Functions.hpp:203
-
static std::string GetWorkingDirectory()
Get current working directory.
Definition: Functions.hpp:160
-
static std::string GetClipboardText()
Get clipboard text content.
Definition: Functions.hpp:73
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
static inline ::Image LoadImage(const std::string &fileName)
Load an image.
Definition: Functions.hpp:204
+
static std::string GetFileName(const std::string &filePath)
Get pointer to filename for a path string.
Definition: Functions.hpp:111
+
static void UpdateCamera(const ::Camera &camera)
Update camera depending on selected mode.
Definition: Functions.hpp:196
+
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load an image from RAW file data.
Definition: Functions.hpp:211
+
static std::string GetPrevDirectoryPath(const std::string &dirPath)
Get previous directory path for a given path.
Definition: Functions.hpp:132
+
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension like "png".
Definition: Functions.hpp:227
+
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:31
+
static bool IsGamepadName(int gamepad, const std::string &name)
Check gamepad name (if available)
Definition: Functions.hpp:189
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:15
+
static std::string GetMonitorName(int monitor=0)
Get the human-readable, UTF-8 encoded name of the primary monitor.
Definition: Functions.hpp:38
+
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Load animated image data.
Definition: Functions.hpp:220
+
static long GetFileModTime(const std::string &fileName)
Get file modification time (last write time)
Definition: Functions.hpp:175
+
static void TakeScreenshot(const std::string &fileName)
Takes a screenshot of current screen (saved a .png)
Definition: Functions.hpp:59
+
static std::vector< std::string > GetDroppedFiles()
Get dropped files names.
Definition: Functions.hpp:164
+
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
Definition: Functions.hpp:24
+
static bool ExportImageAsCode(const Image &image, const std::string &fileName)
Export image as code file (.h) defining an array of bytes.
Definition: Functions.hpp:243
+
Camera type, defines a camera position/orientation in 3d space.
Definition: Camera3D.hpp:12
+
static bool DirectoryExists(const std::string &dirPath)
Check if directory path exists.
Definition: Functions.hpp:90
+
static std::string GetFileNameWithoutExt(const std::string &filePath)
Get filename string without extension.
Definition: Functions.hpp:118
+
static std::string GetDirectoryPath(const std::string &filePath)
Get full path for a given fileName with path.
Definition: Functions.hpp:125
+
static bool IsFileExtension(const std::string &fileName, const std::string &ext)
Check file extension (including point: .png, .wav)
Definition: Functions.hpp:97
+
static bool FileExists(const std::string &fileName)
Check if file exists.
Definition: Functions.hpp:83
+
static std::vector< std::string > GetDirectoryFiles(const std::string &dirPath)
Get filenames in a directory path.
Definition: Functions.hpp:146
+
static bool ExportImage(const Image &image, const std::string &fileName)
Export image data to file.
Definition: Functions.hpp:236
+
static bool ChangeDirectory(const std::string &dir)
Change working directory, return true on success.
Definition: Functions.hpp:157
+
static void SetClipboardText(const std::string &text)
Set clipboard text content.
Definition: Functions.hpp:45
+
static std::string GetFileExtension(const std::string &fileName)
Get pointer to extension for a filename string (including point: ".png")
Definition: Functions.hpp:104
+
static bool SaveFileText(const std::string &fileName, const std::string &text)
Save text data to file (write)
Definition: Functions.hpp:76
+
static std::string LoadFileText(const std::string &fileName)
Load text data from file (read)
Definition: Functions.hpp:66
+
static void OpenURL(const std::string &url)
Open URL with default system browser (if available)
Definition: Functions.hpp:182
+
static std::string GetWorkingDirectory()
Get current working directory.
Definition: Functions.hpp:139
+
static std::string GetClipboardText()
Get clipboard text content.
Definition: Functions.hpp:52
diff --git a/docs/_gamepad_8hpp_source.html b/docs/_gamepad_8hpp_source.html index f57ef4d..fe5ebe5 100644 --- a/docs/_gamepad_8hpp_source.html +++ b/docs/_gamepad_8hpp_source.html @@ -71,137 +71,109 @@ $(function() {
Gamepad.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
-
32 
-
33 namespace raylib {
-
34 class Gamepad {
-
35  public:
-
36  Gamepad(int gamepadNumber = 0) {
-
37  set(gamepadNumber);
-
38  }
-
39  int number;
+
1 #ifndef RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 
+
9 namespace raylib {
+
13 class Gamepad {
+
14  public:
+
15  Gamepad(int gamepadNumber = 0) {
+
16  set(gamepadNumber);
+
17  }
+
18  int number;
+
19 
+
20  GETTERSETTER(int, Number, number)
+
21 
+
22  Gamepad& operator=(const Gamepad& gamepad) {
+
23  set(gamepad);
+
24  return *this;
+
25  }
+
26 
+
27  Gamepad& operator=(int gamepadNumber) {
+
28  set(gamepadNumber);
+
29  return *this;
+
30  }
+
31 
+
32  operator int() const { return number; }
+
33 
+
37  inline bool IsAvailable() const {
+
38  return ::IsGamepadAvailable(number);
+
39  }
40 
-
41  GETTERSETTER(int, Number, number)
-
42 
-
43  Gamepad& operator=(const Gamepad& gamepad) {
-
44  set(gamepad);
-
45  return *this;
+
44  static inline bool IsAvailable(int number) {
+
45  return ::IsGamepadAvailable(number);
46  }
47 
-
48  Gamepad& operator=(int gamepadNumber) {
-
49  set(gamepadNumber);
-
50  return *this;
-
51  }
-
52 
-
53  operator int() const { return number; }
+
51  inline bool IsName(const std::string& name) const {
+
52  return ::IsGamepadName(number, name.c_str());
+
53  }
54 
-
58  inline bool IsAvailable() const {
-
59  return ::IsGamepadAvailable(number);
+
58  std::string GetName() const {
+
59  return ::GetGamepadName(number);
60  }
61 
-
65  static inline bool IsAvailable(int number) {
-
66  return ::IsGamepadAvailable(number);
+
65  operator std::string() const {
+
66  return GetName();
67  }
68 
-
72  inline bool IsName(const std::string& name) const {
-
73  return ::IsGamepadName(number, name.c_str());
+
72  inline bool IsButtonPressed(int button) const {
+
73  return ::IsGamepadButtonPressed(number, button);
74  }
75 
-
79  std::string GetName() const {
-
80  return ::GetGamepadName(number);
+
79  inline bool IsButtonDown(int button) const {
+
80  return ::IsGamepadButtonDown(number, button);
81  }
82 
-
86  operator std::string() const {
-
87  return GetName();
+
86  inline bool IsButtonReleased(int button) const {
+
87  return ::IsGamepadButtonReleased(number, button);
88  }
89 
-
93  inline bool IsButtonPressed(int button) const {
-
94  return ::IsGamepadButtonPressed(number, button);
+
93  inline bool IsButtonUp(int button) const {
+
94  return ::IsGamepadButtonUp(number, button);
95  }
96 
-
100  inline bool IsButtonDown(int button) const {
-
101  return ::IsGamepadButtonDown(number, button);
+
100  inline int GetButtonPressed() const {
+
101  return ::GetGamepadButtonPressed();
102  }
103 
-
107  inline bool IsButtonReleased(int button) const {
-
108  return ::IsGamepadButtonReleased(number, button);
+
107  inline int GetAxisCount() const {
+
108  return ::GetGamepadAxisCount(number);
109  }
110 
-
114  inline bool IsButtonUp(int button) const {
-
115  return ::IsGamepadButtonUp(number, button);
+
114  inline float GetAxisMovement(int axis) const {
+
115  return ::GetGamepadAxisMovement(number, axis);
116  }
117 
-
121  inline int GetButtonPressed() const {
-
122  return ::GetGamepadButtonPressed();
-
123  }
+
118  private:
+
119  inline void set(int gamepadNumber) {
+
120  number = gamepadNumber;
+
121  }
+
122 };
+
123 } // namespace raylib
124 
-
128  inline int GetAxisCount() const {
-
129  return ::GetGamepadAxisCount(number);
-
130  }
-
131 
-
135  inline float GetAxisMovement(int axis) const {
-
136  return ::GetGamepadAxisMovement(number, axis);
-
137  }
-
138 
-
139  protected:
-
140  inline void set(int gamepadNumber) {
-
141  number = gamepadNumber;
-
142  }
-
143 };
-
144 } // namespace raylib
-
145 
-
146 #endif // RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
+
125 #endif // RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
float GetAxisMovement(int axis) const
Return axis movement value for a gamepad axis.
Definition: Gamepad.hpp:135
-
bool IsButtonReleased(int button) const
Detect if a gamepad button has been released once.
Definition: Gamepad.hpp:107
-
Gamepad(int gamepadNumber=0)
Definition: Gamepad.hpp:36
-
bool IsButtonUp(int button) const
Detect if a gamepad button is NOT being pressed.
Definition: Gamepad.hpp:114
-
void set(int gamepadNumber)
Definition: Gamepad.hpp:140
-
std::string GetName() const
Return gamepad internal name id.
Definition: Gamepad.hpp:79
-
Definition: Gamepad.hpp:34
-
bool IsButtonPressed(int button) const
Detect if a gamepad button has been pressed once.
Definition: Gamepad.hpp:93
-
Gamepad & operator=(int gamepadNumber)
Definition: Gamepad.hpp:48
-
bool IsButtonDown(int button) const
Detect if a gamepad button is being pressed.
Definition: Gamepad.hpp:100
-
int GetButtonPressed() const
Get the last gamepad button pressed.
Definition: Gamepad.hpp:121
-
bool IsAvailable() const
Detect if a gamepad is available.
Definition: Gamepad.hpp:58
-
bool IsName(const std::string &name) const
Check gamepad name (if available)
Definition: Gamepad.hpp:72
-
int GetAxisCount() const
Return gamepad axis count for a gamepad.
Definition: Gamepad.hpp:128
-
static bool IsAvailable(int number)
Detect if a gamepad is available.
Definition: Gamepad.hpp:65
-
int number
Definition: Gamepad.hpp:39
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
float GetAxisMovement(int axis) const
Return axis movement value for a gamepad axis.
Definition: Gamepad.hpp:114
+
bool IsButtonReleased(int button) const
Detect if a gamepad button has been released once.
Definition: Gamepad.hpp:86
+
bool IsButtonUp(int button) const
Detect if a gamepad button is NOT being pressed.
Definition: Gamepad.hpp:93
+
std::string GetName() const
Return gamepad internal name id.
Definition: Gamepad.hpp:58
+
Input-related functions: gamepads.
Definition: Gamepad.hpp:13
+
bool IsButtonPressed(int button) const
Detect if a gamepad button has been pressed once.
Definition: Gamepad.hpp:72
+
bool IsButtonDown(int button) const
Detect if a gamepad button is being pressed.
Definition: Gamepad.hpp:79
+
int GetButtonPressed() const
Get the last gamepad button pressed.
Definition: Gamepad.hpp:100
+
bool IsAvailable() const
Detect if a gamepad is available.
Definition: Gamepad.hpp:37
+
bool IsName(const std::string &name) const
Check gamepad name (if available)
Definition: Gamepad.hpp:51
+
int GetAxisCount() const
Return gamepad axis count for a gamepad.
Definition: Gamepad.hpp:107
+
static bool IsAvailable(int number)
Detect if a gamepad is available.
Definition: Gamepad.hpp:44
diff --git a/docs/_image_8hpp_source.html b/docs/_image_8hpp_source.html index 8e592bd..394e3af 100644 --- a/docs/_image_8hpp_source.html +++ b/docs/_image_8hpp_source.html @@ -71,515 +71,465 @@ $(function() {
Image.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
+
1 #ifndef RAYLIB_CPP_INCLUDE_IMAGE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_IMAGE_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 
+
9 namespace raylib {
+
15 class Image : public ::Image {
+
16  public:
+
17  Image(const ::Image& image) {
+
18  set(image);
+
19  }
+
20 
+
21  Image(const std::string& fileName) {
+
22  Load(fileName);
+
23  }
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_IMAGE_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_IMAGE_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
+
25  Image(const std::string& fileName, int width, int height, int format, int headerSize) {
+
26  LoadRaw(fileName, width, height, format, headerSize);
+
27  }
+
28 
+
29  Image(const std::string& fileName, int* frames) {
+
30  LoadAnim(fileName, frames);
+
31  }
32 
-
33 namespace raylib {
-
34 class Image : public ::Image {
-
35  public:
-
36  Image(const ::Image& image) {
-
37  set(image);
-
38  }
-
39 
-
40  Image(const std::string& fileName) {
-
41  Load(fileName);
-
42  }
-
43 
-
44  Image(const std::string& fileName, int width, int height, int format, int headerSize) {
-
45  LoadRaw(fileName, width, height, format, headerSize);
-
46  }
-
47 
-
48  Image(const std::string& fileName, int* frames) {
-
49  LoadAnim(fileName, frames);
-
50  }
-
51 
-
52  Image(const std::string& fileType, const unsigned char* fileData, int dataSize) {
-
53  LoadFromMemory(fileType, fileData, dataSize);
-
54  }
-
55 
-
56  Image(const ::Texture2D& texture) {
-
57  set(::GetTextureData(texture));
+
33  Image(const std::string& fileType, const unsigned char* fileData, int dataSize) {
+
34  LoadFromMemory(fileType, fileData, dataSize);
+
35  }
+
36 
+
37  Image(const ::Texture2D& texture) {
+
38  set(::GetTextureData(texture));
+
39  }
+
40 
+
41  Image(int width, int height, ::Color color = {255, 255, 255, 255}) {
+
42  set(::GenImageColor(width, height, color));
+
43  }
+
44 
+
45  Image(const ::Font& font, const std::string& text, float fontSize, float spacing,
+
46  ::Color tint = {255, 255, 255, 255}) {
+
47  set(::ImageTextEx(font, text.c_str(), fontSize, spacing, tint));
+
48  }
+
49 
+
50  static ::Image Text(const std::string& text, int fontSize,
+
51  ::Color color = {255, 255, 255, 255}) {
+
52  return ::ImageText(text.c_str(), fontSize, color);
+
53  }
+
54 
+
55  static ::Image Text(const ::Font& font, const std::string& text, float fontSize, float spacing,
+
56  ::Color tint = {255, 255, 255, 255}) {
+
57  return ::ImageTextEx(font, text.c_str(), fontSize, spacing, tint);
58  }
59 
-
60  Image(int width, int height, ::Color color = {255, 255, 255, 255}) {
-
61  set(::GenImageColor(width, height, color));
-
62  }
-
63 
-
64  Image(const ::Font& font, const std::string& text, float fontSize, float spacing,
-
65  ::Color tint = {255, 255, 255, 255}) {
-
66  set(::ImageTextEx(font, text.c_str(), fontSize, spacing, tint));
-
67  }
-
68 
-
69  static ::Image Text(const std::string& text, int fontSize,
-
70  ::Color color = {255, 255, 255, 255}) {
-
71  return ::ImageText(text.c_str(), fontSize, color);
+
63  static ::Image GetScreenData() {
+
64  return ::GetScreenData();
+
65  }
+
66 
+
70  static ::Image Color(int width, int height, ::Color color = {255, 255, 255, 255}) {
+
71  return ::GenImageColor(width, height, color);
72  }
73 
-
74  static ::Image Text(const ::Font& font, const std::string& text, float fontSize, float spacing,
-
75  ::Color tint = {255, 255, 255, 255}) {
-
76  return ::ImageTextEx(font, text.c_str(), fontSize, spacing, tint);
-
77  }
-
78 
-
82  static ::Image GetScreenData() {
-
83  return ::GetScreenData();
-
84  }
-
85 
-
89  static ::Image Color(int width, int height, ::Color color = {255, 255, 255, 255}) {
-
90  return ::GenImageColor(width, height, color);
-
91  }
-
92 
-
96  static ::Image GradientV(int width, int height, ::Color top, ::Color bottom) {
-
97  return ::GenImageGradientV(width, height, top, bottom);
-
98  }
-
99 
-
103  static ::Image GradientH(int width, int height, ::Color left, ::Color right) {
-
104  return ::GenImageGradientH(width, height, left, right);
-
105  }
-
106 
-
110  static ::Image GradientRadial(int width, int height, float density,
-
111  ::Color inner, ::Color outer) {
-
112  return ::GenImageGradientRadial(width, height, density, inner, outer);
-
113  }
-
114 
-
118  static ::Image Checked(int width, int height, int checksX, int checksY,
-
119  ::Color col1, ::Color col2) {
-
120  return ::GenImageChecked(width, height, checksX, checksY, col1, col2);
-
121  }
-
122 
-
126  static ::Image WhiteNoise(int width, int height, float factor) {
-
127  return ::GenImageWhiteNoise(width, height, factor);
+
77  static ::Image GradientV(int width, int height, ::Color top, ::Color bottom) {
+
78  return ::GenImageGradientV(width, height, top, bottom);
+
79  }
+
80 
+
84  static ::Image GradientH(int width, int height, ::Color left, ::Color right) {
+
85  return ::GenImageGradientH(width, height, left, right);
+
86  }
+
87 
+
91  static ::Image GradientRadial(int width, int height, float density,
+
92  ::Color inner, ::Color outer) {
+
93  return ::GenImageGradientRadial(width, height, density, inner, outer);
+
94  }
+
95 
+
99  static ::Image Checked(int width, int height, int checksX, int checksY,
+
100  ::Color col1, ::Color col2) {
+
101  return ::GenImageChecked(width, height, checksX, checksY, col1, col2);
+
102  }
+
103 
+
107  static ::Image WhiteNoise(int width, int height, float factor) {
+
108  return ::GenImageWhiteNoise(width, height, factor);
+
109  }
+
110 
+
114  static ::Image PerlinNoise(int width, int height, int offsetX, int offsetY,
+
115  float scale = 1.0f) {
+
116  return ::GenImagePerlinNoise(width, height, offsetX, offsetY, scale);
+
117  }
+
118 
+
122  static ::Image Cellular(int width, int height, int tileSize) {
+
123  return ::GenImageCellular(width, height, tileSize);
+
124  }
+
125 
+
126  ~Image() {
+
127  Unload();
128  }
129 
-
133  static ::Image PerlinNoise(int width, int height, int offsetX, int offsetY,
-
134  float scale = 1.0f) {
-
135  return ::GenImagePerlinNoise(width, height, offsetX, offsetY, scale);
-
136  }
-
137 
-
141  static ::Image Cellular(int width, int height, int tileSize) {
-
142  return ::GenImageCellular(width, height, tileSize);
-
143  }
-
144 
-
145  ~Image() {
-
146  Unload();
+
130  Image& operator=(const ::Image& image) {
+
131  set(image);
+
132  return *this;
+
133  }
+
134 
+
138  void Load(const std::string& fileName) {
+
139  set(::LoadImage(fileName.c_str()));
+
140  }
+
141 
+
145  void LoadRaw(const std::string& fileName, int width, int height, int format, int headerSize) {
+
146  set(::LoadImageRaw(fileName.c_str(), width, height, format, headerSize));
147  }
148 
-
149  Image& operator=(const ::Image& image) {
-
150  set(image);
-
151  return *this;
-
152  }
-
153 
-
157  void Load(const std::string& fileName) {
-
158  set(::LoadImage(fileName.c_str()));
-
159  }
-
160 
-
164  void LoadRaw(const std::string& fileName, int width, int height, int format, int headerSize) {
-
165  set(::LoadImageRaw(fileName.c_str(), width, height, format, headerSize));
-
166  }
-
167 
-
171  void LoadAnim(const std::string& fileName, int* frames) {
-
172  set(::LoadImageAnim(fileName.c_str(), frames));
-
173  }
-
174 
- -
179  const std::string& fileType,
-
180  const unsigned char *fileData,
-
181  int dataSize) {
-
182  set(::LoadImageFromMemory(fileType.c_str(), fileData, dataSize));
-
183  }
-
184 
-
188  inline void Unload() {
-
189  if (data != NULL) {
-
190  ::UnloadImage(*this);
-
191  data = NULL;
-
192  }
-
193  }
-
194 
-
198  inline bool Export(const std::string& fileName) {
-
199  // TODO(RobLoach): Switch to an invalid loading exception on false.
-
200  return ::ExportImage(*this, fileName.c_str());
-
201  }
-
202 
-
206  inline bool ExportAsCode(const std::string& fileName) {
-
207  return ::ExportImageAsCode(*this, fileName.c_str());
-
208  }
-
209 
-
210  GETTERSETTER(void*, Data, data)
-
211  GETTERSETTER(int, Width, width)
-
212  GETTERSETTER(int, Height, height)
-
213  GETTERSETTER(int, Mipmaps, mipmaps)
-
214  GETTERSETTER(int, Format, format)
-
215 
-
219  inline ::Vector2 GetSize() {
-
220  return {static_cast<float>(width), static_cast<float>(height)};
-
221  }
-
222 
-
226  inline ::Image Copy() {
-
227  return ::ImageCopy(*this);
-
228  }
-
229 
-
233  inline ::Image FromImage(::Rectangle rec) {
-
234  return ::ImageFromImage(*this, rec);
-
235  }
-
236 
-
240  inline Image& ToPOT(::Color fillColor) {
-
241  ::ImageToPOT(this, fillColor);
-
242  return *this;
-
243  }
-
244 
-
248  inline Image& Format(int newFormat) {
-
249  ::ImageFormat(this, newFormat);
-
250  return *this;
-
251  }
-
252 
-
256  inline Image& AlphaMask(const ::Image& alphaMask) {
-
257  ::ImageAlphaMask(this, alphaMask);
-
258  return *this;
-
259  }
-
260 
-
264  inline Image& AlphaCrop(float threshold) {
-
265  ::ImageAlphaCrop(this, threshold);
-
266  return *this;
-
267  }
-
268 
- -
273  ::ImageAlphaPremultiply(this);
-
274  return *this;
-
275  }
-
276 
-
280  inline Image& Crop(::Rectangle crop) {
-
281  ::ImageCrop(this, crop);
-
282  return *this;
-
283  }
-
284 
-
288  inline Image& Crop(::Vector2 size) {
-
289  return Crop(0, 0, static_cast<int>(size.x), static_cast<int>(size.y));
-
290  }
-
291 
-
295  inline Image& Crop(int offsetX, int offsetY, int newWidth, int newHeight) {
-
296  ::Rectangle rect{
-
297  static_cast<float>(offsetX),
-
298  static_cast<float>(offsetY),
-
299  static_cast<float>(newWidth),
-
300  static_cast<float>(newHeight)
-
301  };
-
302  ::ImageCrop(this, rect);
-
303  return *this;
-
304  }
-
305 
-
309  inline Image& Resize(int newWidth, int newHeight) {
-
310  ::ImageResize(this, newWidth, newHeight);
-
311  return *this;
-
312  }
-
313 
-
317  inline Image& ResizeNN(int newWidth, int newHeight) {
-
318  ::ImageResizeNN(this, newWidth, newHeight);
-
319  return *this;
-
320  }
-
321 
-
325  inline Image& ResizeCanvas(int newWidth, int newHeight, int offsetX, int offsetY,
-
326  ::Color color = {255, 255, 255, 255}) {
-
327  ::ImageResizeCanvas(this, newWidth, newHeight, offsetX, offsetY, color);
-
328  return *this;
-
329  }
-
330 
-
334  inline Image& Mipmaps() {
-
335  ::ImageMipmaps(this);
-
336  return *this;
-
337  }
-
338 
-
342  inline Image& Dither(int rBpp, int gBpp, int bBpp, int aBpp) {
-
343  ::ImageDither(this, rBpp, gBpp, bBpp, aBpp);
-
344  return *this;
-
345  }
-
346 
-
350  inline Image& FlipVertical() {
-
351  ::ImageFlipVertical(this);
-
352  return *this;
-
353  }
-
354 
-
358  inline Image& FlipHorizontal() {
-
359  ::ImageFlipHorizontal(this);
-
360  return *this;
-
361  }
-
362 
-
366  inline Image& RotateCW() {
-
367  ::ImageRotateCW(this);
-
368  return *this;
-
369  }
-
370 
-
374  inline Image& RotateCCW() {
-
375  ::ImageRotateCCW(this);
-
376  return *this;
-
377  }
-
378 
-
382  inline Image& ColorTint(::Color color = {255, 255, 255, 255}) {
-
383  ::ImageColorTint(this, color);
-
384  return *this;
-
385  }
-
386 
-
390  inline Image& ColorInvert() {
-
391  ::ImageColorInvert(this);
-
392  return *this;
-
393  }
-
394 
-
398  inline Image& ColorGrayscale() {
-
399  ::ImageColorGrayscale(this);
-
400  return *this;
-
401  }
-
402 
-
408  inline Image& ColorContrast(float contrast) {
-
409  ::ImageColorContrast(this, contrast);
-
410  return *this;
-
411  }
-
412 
-
418  inline Image& ColorBrightness(int brightness) {
-
419  ::ImageColorBrightness(this, brightness);
-
420  return *this;
-
421  }
-
422 
-
426  inline Image& ColorReplace(::Color color, ::Color replace) {
-
427  ::ImageColorReplace(this, color, replace);
-
428  return *this;
-
429  }
-
430 
-
436  inline Rectangle GetAlphaBorder(float threshold) const {
-
437  return ::GetImageAlphaBorder(*this, threshold);
-
438  }
-
439 
-
443  inline Image& ClearBackground(::Color color = {0, 0, 0, 255}) {
-
444  ::ImageClearBackground(this, color);
+
152  void LoadAnim(const std::string& fileName, int* frames) {
+
153  set(::LoadImageAnim(fileName.c_str(), frames));
+
154  }
+
155 
+ +
160  const std::string& fileType,
+
161  const unsigned char *fileData,
+
162  int dataSize) {
+
163  set(::LoadImageFromMemory(fileType.c_str(), fileData, dataSize));
+
164  }
+
165 
+
169  inline void Unload() {
+
170  if (data != NULL) {
+
171  ::UnloadImage(*this);
+
172  data = NULL;
+
173  }
+
174  }
+
175 
+
179  inline bool Export(const std::string& fileName) {
+
180  // TODO(RobLoach): Switch to an invalid loading exception on false.
+
181  return ::ExportImage(*this, fileName.c_str());
+
182  }
+
183 
+
187  inline bool ExportAsCode(const std::string& fileName) {
+
188  return ::ExportImageAsCode(*this, fileName.c_str());
+
189  }
+
190 
+
191  GETTERSETTER(void*, Data, data)
+
192  GETTERSETTER(int, Width, width)
+
193  GETTERSETTER(int, Height, height)
+
194  GETTERSETTER(int, Mipmaps, mipmaps)
+
195  GETTERSETTER(int, Format, format)
+
196 
+
200  inline ::Vector2 GetSize() {
+
201  return {static_cast<float>(width), static_cast<float>(height)};
+
202  }
+
203 
+
207  inline ::Image Copy() {
+
208  return ::ImageCopy(*this);
+
209  }
+
210 
+
214  inline ::Image FromImage(::Rectangle rec) {
+
215  return ::ImageFromImage(*this, rec);
+
216  }
+
217 
+
221  inline Image& ToPOT(::Color fillColor) {
+
222  ::ImageToPOT(this, fillColor);
+
223  return *this;
+
224  }
+
225 
+
229  inline Image& Format(int newFormat) {
+
230  ::ImageFormat(this, newFormat);
+
231  return *this;
+
232  }
+
233 
+
237  inline Image& AlphaMask(const ::Image& alphaMask) {
+
238  ::ImageAlphaMask(this, alphaMask);
+
239  return *this;
+
240  }
+
241 
+
245  inline Image& AlphaCrop(float threshold) {
+
246  ::ImageAlphaCrop(this, threshold);
+
247  return *this;
+
248  }
+
249 
+ +
254  ::ImageAlphaPremultiply(this);
+
255  return *this;
+
256  }
+
257 
+
261  inline Image& Crop(::Rectangle crop) {
+
262  ::ImageCrop(this, crop);
+
263  return *this;
+
264  }
+
265 
+
269  inline Image& Crop(::Vector2 size) {
+
270  return Crop(0, 0, static_cast<int>(size.x), static_cast<int>(size.y));
+
271  }
+
272 
+
276  inline Image& Crop(int offsetX, int offsetY, int newWidth, int newHeight) {
+
277  ::Rectangle rect{
+
278  static_cast<float>(offsetX),
+
279  static_cast<float>(offsetY),
+
280  static_cast<float>(newWidth),
+
281  static_cast<float>(newHeight)
+
282  };
+
283  ::ImageCrop(this, rect);
+
284  return *this;
+
285  }
+
286 
+
290  inline Image& Resize(int newWidth, int newHeight) {
+
291  ::ImageResize(this, newWidth, newHeight);
+
292  return *this;
+
293  }
+
294 
+
298  inline Image& ResizeNN(int newWidth, int newHeight) {
+
299  ::ImageResizeNN(this, newWidth, newHeight);
+
300  return *this;
+
301  }
+
302 
+
306  inline Image& ResizeCanvas(int newWidth, int newHeight, int offsetX, int offsetY,
+
307  ::Color color = {255, 255, 255, 255}) {
+
308  ::ImageResizeCanvas(this, newWidth, newHeight, offsetX, offsetY, color);
+
309  return *this;
+
310  }
+
311 
+
315  inline Image& Mipmaps() {
+
316  ::ImageMipmaps(this);
+
317  return *this;
+
318  }
+
319 
+
323  inline Image& Dither(int rBpp, int gBpp, int bBpp, int aBpp) {
+
324  ::ImageDither(this, rBpp, gBpp, bBpp, aBpp);
+
325  return *this;
+
326  }
+
327 
+
331  inline Image& FlipVertical() {
+
332  ::ImageFlipVertical(this);
+
333  return *this;
+
334  }
+
335 
+
339  inline Image& FlipHorizontal() {
+
340  ::ImageFlipHorizontal(this);
+
341  return *this;
+
342  }
+
343 
+
347  inline Image& RotateCW() {
+
348  ::ImageRotateCW(this);
+
349  return *this;
+
350  }
+
351 
+
355  inline Image& RotateCCW() {
+
356  ::ImageRotateCCW(this);
+
357  return *this;
+
358  }
+
359 
+
363  inline Image& ColorTint(::Color color = {255, 255, 255, 255}) {
+
364  ::ImageColorTint(this, color);
+
365  return *this;
+
366  }
+
367 
+
371  inline Image& ColorInvert() {
+
372  ::ImageColorInvert(this);
+
373  return *this;
+
374  }
+
375 
+
379  inline Image& ColorGrayscale() {
+
380  ::ImageColorGrayscale(this);
+
381  return *this;
+
382  }
+
383 
+
389  inline Image& ColorContrast(float contrast) {
+
390  ::ImageColorContrast(this, contrast);
+
391  return *this;
+
392  }
+
393 
+
399  inline Image& ColorBrightness(int brightness) {
+
400  ::ImageColorBrightness(this, brightness);
+
401  return *this;
+
402  }
+
403 
+
407  inline Image& ColorReplace(::Color color, ::Color replace) {
+
408  ::ImageColorReplace(this, color, replace);
+
409  return *this;
+
410  }
+
411 
+
417  inline Rectangle GetAlphaBorder(float threshold) const {
+
418  return ::GetImageAlphaBorder(*this, threshold);
+
419  }
+
420 
+
424  inline Image& ClearBackground(::Color color = {0, 0, 0, 255}) {
+
425  ::ImageClearBackground(this, color);
+
426  return *this;
+
427  }
+
428 
+
432  inline Image& DrawPixel(int posX, int posY, ::Color color = {255, 255, 255, 255}) {
+
433  ::ImageDrawPixel(this, posX, posY, color);
+
434  return *this;
+
435  }
+
436 
+
437  inline Image& DrawPixel(::Vector2 position, ::Color color = {255, 255, 255, 255}) {
+
438  ::ImageDrawPixelV(this, position, color);
+
439  return *this;
+
440  }
+
441 
+
442  inline Image& DrawLine(int startPosX, int startPosY, int endPosX, int endPosY,
+
443  ::Color color = {255, 255, 255, 255}) {
+
444  ::ImageDrawLine(this, startPosX, startPosY, endPosX, endPosY, color);
445  return *this;
446  }
447 
-
451  inline Image& DrawPixel(int posX, int posY, ::Color color = {255, 255, 255, 255}) {
-
452  ::ImageDrawPixel(this, posX, posY, color);
-
453  return *this;
-
454  }
-
455 
-
456  inline Image& DrawPixel(::Vector2 position, ::Color color = {255, 255, 255, 255}) {
-
457  ::ImageDrawPixelV(this, position, color);
-
458  return *this;
-
459  }
-
460 
-
461  inline Image& DrawLine(int startPosX, int startPosY, int endPosX, int endPosY,
-
462  ::Color color = {255, 255, 255, 255}) {
-
463  ::ImageDrawLine(this, startPosX, startPosY, endPosX, endPosY, color);
-
464  return *this;
-
465  }
-
466 
-
467  inline Image& DrawLine(::Vector2 start, ::Vector2 end, ::Color color = {255, 255, 255, 255}) {
-
468  ::ImageDrawLineV(this, start, end, color);
-
469  return *this;
-
470  }
-
471 
-
472  inline Image& DrawCircle(int centerX, int centerY, int radius,
-
473  ::Color color = {255, 255, 255, 255}) {
-
474  ::ImageDrawCircle(this, centerX, centerY, radius, color);
-
475  return *this;
-
476  }
-
477 
-
478  inline Image& DrawCircle(::Vector2 center, int radius,
-
479  ::Color color = {255, 255, 255, 255}) {
-
480  ::ImageDrawCircleV(this, center, radius, color);
-
481  return *this;
-
482  }
-
483 
-
484  inline Image& DrawRectangle(int posX, int posY, int width, int height,
-
485  ::Color color = {255, 255, 255, 255}) {
-
486  ::ImageDrawRectangle(this, posX, posY, width, height, color);
-
487  return *this;
-
488  }
-
489 
-
490  inline Image& DrawRectangle(Vector2 position, Vector2 size,
-
491  ::Color color = {255, 255, 255, 255}) {
-
492  ::ImageDrawRectangleV(this, position, size, color);
-
493  return *this;
-
494  }
-
495 
-
496  inline Image& DrawRectangle(::Rectangle rec, ::Color color = {255, 255, 255, 255}) {
-
497  ::ImageDrawRectangleRec(this, rec, color);
-
498  return *this;
-
499  }
-
500 
-
501  inline Image& DrawRectangleLines(::Rectangle rec, int thick,
-
502  ::Color color = {255, 255, 255, 255}) {
-
503  ::ImageDrawRectangleLines(this, rec, thick, color);
-
504  return *this;
-
505  }
-
506 
-
507  inline Image& Draw(const ::Image& src, ::Rectangle srcRec, ::Rectangle dstRec,
-
508  ::Color tint = {255, 255, 255, 255}) {
-
509  ::ImageDraw(this, src, srcRec, dstRec, tint);
-
510  return *this;
-
511  }
-
512 
-
513  inline Image& DrawText(const std::string& text, ::Vector2 position, int fontSize,
-
514  ::Color color = {255, 255, 255, 255}) {
-
515  ::ImageDrawText(this,
-
516  text.c_str(),
-
517  static_cast<int>(position.x),
-
518  static_cast<int>(position.y),
-
519  fontSize,
-
520  color);
-
521  return *this;
+
448  inline Image& DrawLine(::Vector2 start, ::Vector2 end, ::Color color = {255, 255, 255, 255}) {
+
449  ::ImageDrawLineV(this, start, end, color);
+
450  return *this;
+
451  }
+
452 
+
453  inline Image& DrawCircle(int centerX, int centerY, int radius,
+
454  ::Color color = {255, 255, 255, 255}) {
+
455  ::ImageDrawCircle(this, centerX, centerY, radius, color);
+
456  return *this;
+
457  }
+
458 
+
459  inline Image& DrawCircle(::Vector2 center, int radius,
+
460  ::Color color = {255, 255, 255, 255}) {
+
461  ::ImageDrawCircleV(this, center, radius, color);
+
462  return *this;
+
463  }
+
464 
+
465  inline Image& DrawRectangle(int posX, int posY, int width, int height,
+
466  ::Color color = {255, 255, 255, 255}) {
+
467  ::ImageDrawRectangle(this, posX, posY, width, height, color);
+
468  return *this;
+
469  }
+
470 
+
471  inline Image& DrawRectangle(Vector2 position, Vector2 size,
+
472  ::Color color = {255, 255, 255, 255}) {
+
473  ::ImageDrawRectangleV(this, position, size, color);
+
474  return *this;
+
475  }
+
476 
+
477  inline Image& DrawRectangle(::Rectangle rec, ::Color color = {255, 255, 255, 255}) {
+
478  ::ImageDrawRectangleRec(this, rec, color);
+
479  return *this;
+
480  }
+
481 
+
482  inline Image& DrawRectangleLines(::Rectangle rec, int thick,
+
483  ::Color color = {255, 255, 255, 255}) {
+
484  ::ImageDrawRectangleLines(this, rec, thick, color);
+
485  return *this;
+
486  }
+
487 
+
488  inline Image& Draw(const ::Image& src, ::Rectangle srcRec, ::Rectangle dstRec,
+
489  ::Color tint = {255, 255, 255, 255}) {
+
490  ::ImageDraw(this, src, srcRec, dstRec, tint);
+
491  return *this;
+
492  }
+
493 
+
494  inline Image& DrawText(const std::string& text, ::Vector2 position, int fontSize,
+
495  ::Color color = {255, 255, 255, 255}) {
+
496  ::ImageDrawText(this,
+
497  text.c_str(),
+
498  static_cast<int>(position.x),
+
499  static_cast<int>(position.y),
+
500  fontSize,
+
501  color);
+
502  return *this;
+
503  }
+
504 
+
505  inline Image& DrawText(const std::string& text, int x, int y, int fontSize,
+
506  ::Color color = {255, 255, 255, 255}) {
+
507  ::ImageDrawText(this, text.c_str(), x, y, fontSize, color);
+
508  return *this;
+
509  }
+
510 
+
511  inline Image& DrawText(const ::Font& font, const std::string& text, ::Vector2 position,
+
512  float fontSize, float spacing, ::Color tint = {255, 255, 255, 255}) {
+
513  ::ImageDrawTextEx(this, font, text.c_str(), position, fontSize, spacing, tint);
+
514  return *this;
+
515  }
+
516 
+
520  inline ::Color* LoadColors() {
+
521  return ::LoadImageColors(*this);
522  }
523 
-
524  inline Image& DrawText(const std::string& text, int x, int y, int fontSize,
-
525  ::Color color = {255, 255, 255, 255}) {
-
526  ::ImageDrawText(this, text.c_str(), x, y, fontSize, color);
-
527  return *this;
-
528  }
-
529 
-
530  inline Image& DrawText(const ::Font& font, const std::string& text, ::Vector2 position,
-
531  float fontSize, float spacing, ::Color tint = {255, 255, 255, 255}) {
-
532  ::ImageDrawTextEx(this, font, text.c_str(), position, fontSize, spacing, tint);
-
533  return *this;
-
534  }
-
535 
-
539  inline ::Color* LoadColors() {
-
540  return ::LoadImageColors(*this);
-
541  }
-
542 
-
546  inline ::Color* LoadPalette(int maxPaletteSize, int *colorsCount) {
-
547  return ::LoadImagePalette(*this, maxPaletteSize, colorsCount);
-
548  }
-
549 
-
553  inline ::Texture2D LoadTexture() {
-
554  return ::LoadTextureFromImage(*this);
-
555  }
-
556 
-
560  inline operator ::Texture2D() {
-
561  return LoadTexture();
-
562  }
-
563 
-
564  protected:
-
565  inline void set(const ::Image& image) {
-
566  data = image.data;
-
567  width = image.width;
-
568  height = image.height;
-
569  mipmaps = image.mipmaps;
-
570  format = image.format;
-
571  }
-
572 };
-
573 } // namespace raylib
-
574 
-
575 #endif // RAYLIB_CPP_INCLUDE_IMAGE_HPP_
+
527  inline ::Color* LoadPalette(int maxPaletteSize, int *colorsCount) {
+
528  return ::LoadImagePalette(*this, maxPaletteSize, colorsCount);
+
529  }
+
530 
+
534  inline ::Texture2D LoadTexture() {
+
535  return ::LoadTextureFromImage(*this);
+
536  }
+
537 
+
541  inline operator ::Texture2D() {
+
542  return LoadTexture();
+
543  }
+
544 
+
545  private:
+
546  inline void set(const ::Image& image) {
+
547  data = image.data;
+
548  width = image.width;
+
549  height = image.height;
+
550  mipmaps = image.mipmaps;
+
551  format = image.format;
+
552  }
+
553 };
+
554 } // namespace raylib
+
555 
+
556 #endif // RAYLIB_CPP_INCLUDE_IMAGE_HPP_
-
Image & Dither(int rBpp, int gBpp, int bBpp, int aBpp)
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
Definition: Image.hpp:342
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
inline ::Color * LoadPalette(int maxPaletteSize, int *colorsCount)
Load colors palette from image as a Color array (RGBA - 32bit)
Definition: Image.hpp:546
-
Image & ColorBrightness(int brightness)
Modify image color: brightness.
Definition: Image.hpp:418
-
::Image WhiteNoise(int width, int height, float factor)
Generate image: white noise.
Definition: Image.hpp:126
-
static inline ::Image LoadImage(const std::string &fileName)
Definition: Functions.hpp:216
-
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Definition: Functions.hpp:220
-
::Image GradientRadial(int width, int height, float density, ::Color inner, ::Color outer)
Generate image: radial gradient.
Definition: Image.hpp:110
-
Image(const std::string &fileType, const unsigned char *fileData, int dataSize)
Definition: Image.hpp:52
-
~Image()
Definition: Image.hpp:145
-
Image(int width, int height, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:60
-
Image & ToPOT(::Color fillColor)
Convert image to POT (power-of-two)
Definition: Image.hpp:240
-
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Definition: Functions.hpp:230
-
Image & DrawCircle(::Vector2 center, int radius, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:478
-
Image & Format(int newFormat)
Convert image data to desired format.
Definition: Image.hpp:248
-
Image & Draw(const ::Image &src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint={255, 255, 255, 255})
Definition: Image.hpp:507
-
inline ::Image Copy()
Create an image duplicate (useful for transformations)
Definition: Image.hpp:226
-
Image & Crop(::Vector2 size)
Crop an image to a new given width and height based on a vector.
Definition: Image.hpp:288
-
Image & ColorInvert()
Modify image color: invert.
Definition: Image.hpp:390
-
Image & ColorGrayscale()
Modify image color: grayscale.
Definition: Image.hpp:398
-
Definition: Image.hpp:34
-
Image & Crop(::Rectangle crop)
Crop an image to area defined by a rectangle.
Definition: Image.hpp:280
-
Image(const std::string &fileName)
Definition: Image.hpp:40
-
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Definition: Functions.hpp:226
-
Image & DrawText(const std::string &text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:524
-
inline ::Vector2 GetSize()
Retrieve the width and height of the image.
Definition: Image.hpp:219
-
Image & DrawPixel(::Vector2 position, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:456
-
::Image Text(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
Definition: Image.hpp:74
-
Image & DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:461
-
Image & RotateCCW()
Rotate image counter-clockwise 90deg.
Definition: Image.hpp:374
-
Image & DrawCircle(int centerX, int centerY, int radius, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:472
-
Image(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
Definition: Image.hpp:64
-
bool ExportAsCode(const std::string &fileName)
Export image as code file defining an array of bytes, returns true on success.
Definition: Image.hpp:206
-
Image & DrawRectangle(Vector2 position, Vector2 size, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:490
-
Image & FlipVertical()
Flip image vertically.
Definition: Image.hpp:350
-
Image & ColorContrast(float contrast)
Modify image color: contrast.
Definition: Image.hpp:408
-
Image & DrawText(const std::string &text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:513
-
inline ::Color * LoadColors()
Load color data from image as a Color array (RGBA - 32bit)
Definition: Image.hpp:539
-
::Image GetScreenData()
Get pixel data from screen buffer and return an Image (screenshot)
Definition: Image.hpp:82
-
::Image PerlinNoise(int width, int height, int offsetX, int offsetY, float scale=1.0f)
Generate image: perlin noise.
Definition: Image.hpp:133
-
void LoadRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load image from RAW file data.
Definition: Image.hpp:164
-
Image & operator=(const ::Image &image)
Definition: Image.hpp:149
-
Image & DrawRectangle(::Rectangle rec, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:496
-
Image & DrawLine(::Vector2 start, ::Vector2 end, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:467
-
Image & AlphaPremultiply()
Premultiply alpha channel.
Definition: Image.hpp:272
-
Image & Crop(int offsetX, int offsetY, int newWidth, int newHeight)
Crop an image to area defined by a rectangle.
Definition: Image.hpp:295
-
void LoadFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension: i.e.
Definition: Image.hpp:178
-
Image & ResizeCanvas(int newWidth, int newHeight, int offsetX, int offsetY, ::Color color={255, 255, 255, 255})
Resize canvas and fill with color.
Definition: Image.hpp:325
-
Image & DrawPixel(int posX, int posY, ::Color color={255, 255, 255, 255})
Draw pixel within an image.
Definition: Image.hpp:451
-
Image & Mipmaps()
Generate all mipmap levels for a provided image.
Definition: Image.hpp:334
-
::Image Text(const std::string &text, int fontSize, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:69
-
Image(const std::string &fileName, int width, int height, int format, int headerSize)
Definition: Image.hpp:44
-
bool Export(const std::string &fileName)
Export image data to file, returns true on success.
Definition: Image.hpp:198
-
Definition: Rectangle.hpp:33
-
Definition: Vector2.hpp:37
-
::Image GradientV(int width, int height, ::Color top, ::Color bottom)
Generate image: vertical gradient.
Definition: Image.hpp:96
-
Image & DrawRectangleLines(::Rectangle rec, int thick, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:501
-
Image & ColorTint(::Color color={255, 255, 255, 255})
Modify image color: tint.
Definition: Image.hpp:382
-
Rectangle GetAlphaBorder(float threshold) const
Get image alpha border rectangle.
Definition: Image.hpp:436
-
Definition: Color.hpp:35
-
::Image GradientH(int width, int height, ::Color left, ::Color right)
Generate image: horizontal gradient.
Definition: Image.hpp:103
-
void set(const ::Image &image)
Definition: Image.hpp:565
-
::Image Checked(int width, int height, int checksX, int checksY, ::Color col1, ::Color col2)
Generate image: checked.
Definition: Image.hpp:118
-
void LoadAnim(const std::string &fileName, int *frames)
Load image sequence from file (frames appended to image.data).
Definition: Image.hpp:171
-
void Load(const std::string &fileName)
Load image from file into CPU memory (RAM)
Definition: Image.hpp:157
-
Image(const std::string &fileName, int *frames)
Definition: Image.hpp:48
-
::Image Color(int width, int height, ::Color color={255, 255, 255, 255})
Generate image: plain color.
Definition: Image.hpp:89
-
Image & AlphaCrop(float threshold)
Crop image depending on alpha value.
Definition: Image.hpp:264
-
Image & Resize(int newWidth, int newHeight)
Resize and image to new size.
Definition: Image.hpp:309
-
Image(const ::Texture2D &texture)
Definition: Image.hpp:56
-
void Unload()
Unload image from CPU memory (RAM)
Definition: Image.hpp:188
-
Image & FlipHorizontal()
Flip image horizontally.
Definition: Image.hpp:358
-
inline ::Image FromImage(::Rectangle rec)
Create an image from another image piece.
Definition: Image.hpp:233
-
inline ::Texture2D LoadTexture()
Load texture from image data.
Definition: Image.hpp:553
-
Image & ResizeNN(int newWidth, int newHeight)
Resize and image to new size using Nearest-Neighbor scaling algorithm.
Definition: Image.hpp:317
-
::Image Cellular(int width, int height, int tileSize)
Generate image: cellular algorithm.
Definition: Image.hpp:141
-
Image(const ::Image &image)
Definition: Image.hpp:36
-
Image & DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
Definition: Image.hpp:530
-
Image & DrawRectangle(int posX, int posY, int width, int height, ::Color color={255, 255, 255, 255})
Definition: Image.hpp:484
-
Image & ClearBackground(::Color color={0, 0, 0, 255})
Clear image background with given color.
Definition: Image.hpp:443
-
Image & RotateCW()
Rotate image clockwise 90deg.
Definition: Image.hpp:366
-
Image & AlphaMask(const ::Image &alphaMask)
Apply alpha mask to image.
Definition: Image.hpp:256
-
Image & ColorReplace(::Color color, ::Color replace)
Modify image color: replace color.
Definition: Image.hpp:426
+
Image & Dither(int rBpp, int gBpp, int bBpp, int aBpp)
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
Definition: Image.hpp:323
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
inline ::Color * LoadPalette(int maxPaletteSize, int *colorsCount)
Load colors palette from image as a Color array (RGBA - 32bit)
Definition: Image.hpp:527
+
Image & ColorBrightness(int brightness)
Modify image color: brightness.
Definition: Image.hpp:399
+
::Image WhiteNoise(int width, int height, float factor)
Generate image: white noise.
Definition: Image.hpp:107
+
static inline ::Image LoadImage(const std::string &fileName)
Load an image.
Definition: Functions.hpp:204
+
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load an image from RAW file data.
Definition: Functions.hpp:211
+
::Image GradientRadial(int width, int height, float density, ::Color inner, ::Color outer)
Generate image: radial gradient.
Definition: Image.hpp:91
+
Image & ToPOT(::Color fillColor)
Convert image to POT (power-of-two)
Definition: Image.hpp:221
+
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension like "png".
Definition: Functions.hpp:227
+
Image & Format(int newFormat)
Convert image data to desired format.
Definition: Image.hpp:229
+
inline ::Image Copy()
Create an image duplicate (useful for transformations)
Definition: Image.hpp:207
+
Image & Crop(::Vector2 size)
Crop an image to a new given width and height based on a vector.
Definition: Image.hpp:269
+
Image & ColorInvert()
Modify image color: invert.
Definition: Image.hpp:371
+
Image & ColorGrayscale()
Modify image color: grayscale.
Definition: Image.hpp:379
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:15
+
Image & Crop(::Rectangle crop)
Crop an image to area defined by a rectangle.
Definition: Image.hpp:261
+
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Load animated image data.
Definition: Functions.hpp:220
+
inline ::Vector2 GetSize()
Retrieve the width and height of the image.
Definition: Image.hpp:200
+
Image & RotateCCW()
Rotate image counter-clockwise 90deg.
Definition: Image.hpp:355
+
bool ExportAsCode(const std::string &fileName)
Export image as code file defining an array of bytes, returns true on success.
Definition: Image.hpp:187
+
Image & FlipVertical()
Flip image vertically.
Definition: Image.hpp:331
+
Image & ColorContrast(float contrast)
Modify image color: contrast.
Definition: Image.hpp:389
+
inline ::Color * LoadColors()
Load color data from image as a Color array (RGBA - 32bit)
Definition: Image.hpp:520
+
::Image GetScreenData()
Get pixel data from screen buffer and return an Image (screenshot)
Definition: Image.hpp:63
+
::Image PerlinNoise(int width, int height, int offsetX, int offsetY, float scale=1.0f)
Generate image: perlin noise.
Definition: Image.hpp:114
+
void LoadRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load image from RAW file data.
Definition: Image.hpp:145
+
Image & AlphaPremultiply()
Premultiply alpha channel.
Definition: Image.hpp:253
+
Image & Crop(int offsetX, int offsetY, int newWidth, int newHeight)
Crop an image to area defined by a rectangle.
Definition: Image.hpp:276
+
void LoadFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension: i.e.
Definition: Image.hpp:159
+
Image & ResizeCanvas(int newWidth, int newHeight, int offsetX, int offsetY, ::Color color={255, 255, 255, 255})
Resize canvas and fill with color.
Definition: Image.hpp:306
+
Image & DrawPixel(int posX, int posY, ::Color color={255, 255, 255, 255})
Draw pixel within an image.
Definition: Image.hpp:432
+
Image & Mipmaps()
Generate all mipmap levels for a provided image.
Definition: Image.hpp:315
+
bool Export(const std::string &fileName)
Export image data to file, returns true on success.
Definition: Image.hpp:179
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:16
+
::Image GradientV(int width, int height, ::Color top, ::Color bottom)
Generate image: vertical gradient.
Definition: Image.hpp:77
+
Image & ColorTint(::Color color={255, 255, 255, 255})
Modify image color: tint.
Definition: Image.hpp:363
+
Rectangle GetAlphaBorder(float threshold) const
Get image alpha border rectangle.
Definition: Image.hpp:417
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
::Image GradientH(int width, int height, ::Color left, ::Color right)
Generate image: horizontal gradient.
Definition: Image.hpp:84
+
::Image Checked(int width, int height, int checksX, int checksY, ::Color col1, ::Color col2)
Generate image: checked.
Definition: Image.hpp:99
+
void LoadAnim(const std::string &fileName, int *frames)
Load image sequence from file (frames appended to image.data).
Definition: Image.hpp:152
+
void Load(const std::string &fileName)
Load image from file into CPU memory (RAM)
Definition: Image.hpp:138
+
::Image Color(int width, int height, ::Color color={255, 255, 255, 255})
Generate image: plain color.
Definition: Image.hpp:70
+
Image & AlphaCrop(float threshold)
Crop image depending on alpha value.
Definition: Image.hpp:245
+
Image & Resize(int newWidth, int newHeight)
Resize and image to new size.
Definition: Image.hpp:290
+
void Unload()
Unload image from CPU memory (RAM)
Definition: Image.hpp:169
+
Image & FlipHorizontal()
Flip image horizontally.
Definition: Image.hpp:339
+
inline ::Image FromImage(::Rectangle rec)
Create an image from another image piece.
Definition: Image.hpp:214
+
inline ::Texture2D LoadTexture()
Load texture from image data.
Definition: Image.hpp:534
+
Image & ResizeNN(int newWidth, int newHeight)
Resize and image to new size using Nearest-Neighbor scaling algorithm.
Definition: Image.hpp:298
+
::Image Cellular(int width, int height, int tileSize)
Generate image: cellular algorithm.
Definition: Image.hpp:122
+
Image & ClearBackground(::Color color={0, 0, 0, 255})
Clear image background with given color.
Definition: Image.hpp:424
+
Image & RotateCW()
Rotate image clockwise 90deg.
Definition: Image.hpp:347
+
Image & AlphaMask(const ::Image &alphaMask)
Apply alpha mask to image.
Definition: Image.hpp:237
+
Image & ColorReplace(::Color color, ::Color replace)
Modify image color: replace color.
Definition: Image.hpp:407
diff --git a/docs/_material_8hpp_source.html b/docs/_material_8hpp_source.html index 6516246..e0793c3 100644 --- a/docs/_material_8hpp_source.html +++ b/docs/_material_8hpp_source.html @@ -71,105 +71,78 @@ $(function() {
Material.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
-
27 
-
28 #include <string>
-
29 #include <vector>
+
1 #ifndef RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
+
3 
+
4 #include <string>
+
5 #include <vector>
+
6 
+
7 #include "./raylib.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 
+
10 namespace raylib {
+
14 class Material : public ::Material {
+
15  public:
+
16  Material(const ::Material& material) {
+
17  set(material);
+
18  }
+
19 
+ +
24  set(LoadMaterialDefault());
+
25  }
+
26 
+
27  ~Material() {
+
28  Unload();
+
29  }
30 
-
31 #include "./raylib.hpp"
-
32 #include "./raylib-cpp-utils.hpp"
-
33 
-
34 namespace raylib {
-
35 class Material : public ::Material {
-
36  public:
-
37  Material(const ::Material& material) {
-
38  set(material);
-
39  }
-
40 
- -
45  set(LoadMaterialDefault());
-
46  }
-
47 
- -
49  Unload();
-
50  }
-
51 
-
55  static std::vector<Material> Load(const std::string& fileName) {
-
56  int count = 0;
-
57  ::Material* materials = ::LoadMaterials(fileName.c_str(), &count);
-
58  return std::vector<Material>(materials, materials + count);
-
59  }
-
60 
-
61  GETTERSETTER(::Shader, Shader, shader)
-
62  GETTERSETTER(::MaterialMap*, Maps, maps)
-
63  GETTERSETTER(float*, Params, params)
-
64 
-
65  Material& operator=(const ::Material& material) {
-
66  set(material);
-
67  return *this;
-
68  }
-
69 
-
73  inline void Unload() {
-
74  if (maps != NULL) {
-
75  ::UnloadMaterial(*this);
-
76  maps = NULL;
-
77  }
-
78  }
-
79 
-
83  inline Material& SetTexture(int mapType, const ::Texture2D& texture) {
-
84  ::SetMaterialTexture(this, mapType, texture);
-
85  return *this;
-
86  }
-
87 
-
88  protected:
-
89  inline void set(const ::Material& material) {
-
90  shader = material.shader;
-
91  maps = material.maps;
-
92  params = material.params;
-
93  }
-
94 };
-
95 } // namespace raylib
-
96 
-
97 #endif // RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
+
34  static std::vector<Material> Load(const std::string& fileName) {
+
35  int count = 0;
+
36  ::Material* materials = ::LoadMaterials(fileName.c_str(), &count);
+
37  return std::vector<Material>(materials, materials + count);
+
38  }
+
39 
+
40  GETTERSETTER(::Shader, Shader, shader)
+
41  GETTERSETTER(::MaterialMap*, Maps, maps)
+
42  GETTERSETTER(float*, Params, params)
+
43 
+
44  Material& operator=(const ::Material& material) {
+
45  set(material);
+
46  return *this;
+
47  }
+
48 
+
52  inline void Unload() {
+
53  if (maps != NULL) {
+
54  ::UnloadMaterial(*this);
+
55  maps = NULL;
+
56  }
+
57  }
+
58 
+
62  inline Material& SetTexture(int mapType, const ::Texture2D& texture) {
+
63  ::SetMaterialTexture(this, mapType, texture);
+
64  return *this;
+
65  }
+
66 
+
67  private:
+
68  inline void set(const ::Material& material) {
+
69  shader = material.shader;
+
70  maps = material.maps;
+
71  params = material.params;
+
72  }
+
73 };
+
74 } // namespace raylib
+
75 
+
76 #endif // RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
~Material()
Definition: Material.hpp:48
-
static std::vector< Material > Load(const std::string &fileName)
Load materials from model file.
Definition: Material.hpp:55
-
Material & SetTexture(int mapType, const ::Texture2D &texture)
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition: Material.hpp:83
-
void set(const ::Material &material)
Definition: Material.hpp:89
-
Material()
Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
Definition: Material.hpp:44
-
Definition: Shader.hpp:35
-
void Unload()
Unload material from memory.
Definition: Material.hpp:73
-
Material(const ::Material &material)
Definition: Material.hpp:37
-
Definition: Material.hpp:35
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
static std::vector< Material > Load(const std::string &fileName)
Load materials from model file.
Definition: Material.hpp:34
+
Material & SetTexture(int mapType, const ::Texture2D &texture)
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition: Material.hpp:62
+
Material()
Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
Definition: Material.hpp:23
+
Shader type (generic)
Definition: Shader.hpp:14
+
void Unload()
Unload material from memory.
Definition: Material.hpp:52
+
Material type (generic)
Definition: Material.hpp:14
diff --git a/docs/_matrix_8hpp_source.html b/docs/_matrix_8hpp_source.html index c91f301..a40b060 100644 --- a/docs/_matrix_8hpp_source.html +++ b/docs/_matrix_8hpp_source.html @@ -71,314 +71,254 @@ $(function() {
Matrix.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_MATRIX_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_MATRIX_HPP_
-
27 
-
28 #ifdef __cplusplus
-
29 extern "C" {
-
30 #endif
-
31 #include "raylib.h" // NOLINT
-
32 #ifndef RAYLIB_CPP_NO_MATH
-
33 #include "raymath.h" // NOLINT
-
34 #endif
-
35 #ifdef __cplusplus
-
36 }
-
37 #endif
-
38 
-
39 #ifndef RAYLIB_CPP_NO_MATH
-
40 #include <cmath>
-
41 #endif
+
1 #ifndef RAYLIB_CPP_INCLUDE_MATRIX_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MATRIX_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raymath.hpp"
+
7 
+
8 #ifndef RAYLIB_CPP_NO_MATH
+
9 #include <cmath>
+
10 #endif
+
11 
+
12 namespace raylib {
+
16 class Matrix : public ::Matrix {
+
17  public:
+
18  Matrix(const ::Matrix& mat) {
+
19  set(mat);
+
20  }
+
21 
+
22  Matrix(float M0 = 0, float M1 = 0, float M2 = 0, float M3 = 0, float M4 = 0, float M5 = 0,
+
23  float M6 = 0, float M7 = 0, float M8 = 0, float M9 = 0, float M10 = 0, float M11 = 0,
+
24  float M12 = 0, float M13 = 0, float M14 = 0, float M15 = 0) {
+
25  m0 = M0;
+
26  m1 = M1;
+
27  m2 = M2;
+
28  m3 = M3;
+
29  m4 = M4;
+
30  m5 = M5;
+
31  m6 = M6;
+
32  m7 = M7;
+
33  m8 = M8;
+
34  m9 = M9;
+
35  m10 = M10;
+
36  m11 = M11;
+
37  m12 = M12;
+
38  m13 = M13;
+
39  m14 = M14;
+
40  m15 = M15;
+
41  }
42 
-
43 #include "./raylib-cpp-utils.hpp"
-
44 
-
45 namespace raylib {
-
46 class Matrix : public ::Matrix {
-
47  public:
-
48  Matrix(const ::Matrix& mat) {
-
49  set(mat);
-
50  }
-
51 
-
52  Matrix(float M0 = 0, float M1 = 0, float M2 = 0, float M3 = 0, float M4 = 0, float M5 = 0,
-
53  float M6 = 0, float M7 = 0, float M8 = 0, float M9 = 0, float M10 = 0, float M11 = 0,
-
54  float M12 = 0, float M13 = 0, float M14 = 0, float M15 = 0) {
-
55  m0 = M0;
-
56  m1 = M1;
-
57  m2 = M2;
-
58  m3 = M3;
-
59  m4 = M4;
-
60  m5 = M5;
-
61  m6 = M6;
-
62  m7 = M7;
-
63  m8 = M8;
-
64  m9 = M9;
-
65  m10 = M10;
-
66  m11 = M11;
-
67  m12 = M12;
-
68  m13 = M13;
-
69  m14 = M14;
-
70  m15 = M15;
-
71  }
-
72 
-
73  GETTERSETTER(float, M0, m0)
-
74  GETTERSETTER(float, M1, m1)
-
75  GETTERSETTER(float, M2, m2)
-
76  GETTERSETTER(float, M3, m3)
-
77  GETTERSETTER(float, M4, m4)
-
78  GETTERSETTER(float, M5, m5)
-
79  GETTERSETTER(float, M6, m6)
-
80  GETTERSETTER(float, M7, m7)
-
81  GETTERSETTER(float, M8, m8)
-
82  GETTERSETTER(float, M9, m9)
-
83  GETTERSETTER(float, M10, m10)
-
84  GETTERSETTER(float, M11, m11)
-
85  GETTERSETTER(float, M12, m12)
-
86  GETTERSETTER(float, M13, m13)
-
87  GETTERSETTER(float, M14, m14)
-
88  GETTERSETTER(float, M15, m15)
-
89 
-
90  Matrix& operator=(const ::Matrix& matrix) {
-
91  set(matrix);
-
92  return *this;
-
93  }
-
94 
-
95  Matrix& operator=(const Matrix& matrix) {
-
96  set(matrix);
-
97  return *this;
-
98  }
-
99 
-
100  bool operator==(const ::Matrix& other) {
-
101  return m0 == other.m0
-
102  && m1 == other.m1
-
103  && m2 == other.m2
-
104  && m3 == other.m3
-
105  && m4 == other.m4
-
106  && m5 == other.m5
-
107  && m6 == other.m6
-
108  && m7 == other.m7
-
109  && m8 == other.m8
-
110  && m9 == other.m9
-
111  && m10 == other.m10
-
112  && m11 == other.m11
-
113  && m12 == other.m12
-
114  && m13 == other.m13
-
115  && m14 == other.m14
-
116  && m15 == other.m15;
+
43  GETTERSETTER(float, M0, m0)
+
44  GETTERSETTER(float, M1, m1)
+
45  GETTERSETTER(float, M2, m2)
+
46  GETTERSETTER(float, M3, m3)
+
47  GETTERSETTER(float, M4, m4)
+
48  GETTERSETTER(float, M5, m5)
+
49  GETTERSETTER(float, M6, m6)
+
50  GETTERSETTER(float, M7, m7)
+
51  GETTERSETTER(float, M8, m8)
+
52  GETTERSETTER(float, M9, m9)
+
53  GETTERSETTER(float, M10, m10)
+
54  GETTERSETTER(float, M11, m11)
+
55  GETTERSETTER(float, M12, m12)
+
56  GETTERSETTER(float, M13, m13)
+
57  GETTERSETTER(float, M14, m14)
+
58  GETTERSETTER(float, M15, m15)
+
59 
+
60  Matrix& operator=(const ::Matrix& matrix) {
+
61  set(matrix);
+
62  return *this;
+
63  }
+
64 
+
65  Matrix& operator=(const Matrix& matrix) {
+
66  set(matrix);
+
67  return *this;
+
68  }
+
69 
+
70  bool operator==(const ::Matrix& other) {
+
71  return m0 == other.m0
+
72  && m1 == other.m1
+
73  && m2 == other.m2
+
74  && m3 == other.m3
+
75  && m4 == other.m4
+
76  && m5 == other.m5
+
77  && m6 == other.m6
+
78  && m7 == other.m7
+
79  && m8 == other.m8
+
80  && m9 == other.m9
+
81  && m10 == other.m10
+
82  && m11 == other.m11
+
83  && m12 == other.m12
+
84  && m13 == other.m13
+
85  && m14 == other.m14
+
86  && m15 == other.m15;
+
87  }
+
88 
+
92  inline Matrix& SetProjection() {
+
93  ::SetMatrixProjection(*this);
+
94  return *this;
+
95  }
+
96 
+
100  inline Matrix& SetModelview() {
+
101  ::SetMatrixModelview(*this);
+
102  return *this;
+
103  }
+
104 
+
108  static Matrix GetModelview() {
+
109  return ::GetMatrixModelview();
+
110  }
+
111 
+ +
116  return ::GetMatrixProjection();
117  }
118 
-
122  inline Matrix& SetProjection() {
-
123  ::SetMatrixProjection(*this);
-
124  return *this;
+
119 #ifndef RAYLIB_CPP_NO_MATH
+
120 
+
123  inline float Trace() const {
+
124  return ::MatrixTrace(*this);
125  }
126 
-
130  inline Matrix& SetModelview() {
-
131  ::SetMatrixModelview(*this);
-
132  return *this;
-
133  }
-
134 
-
138  static Matrix GetModelview() {
-
139  return ::GetMatrixModelview();
+
130  inline Matrix Transpose() const {
+
131  return ::MatrixTranspose(*this);
+
132  }
+
133 
+
134  inline Matrix Invert() const {
+
135  return ::MatrixInvert(*this);
+
136  }
+
137 
+
138  inline Matrix Normalize() const {
+
139  return ::MatrixNormalize(*this);
140  }
141 
- -
146  return ::GetMatrixProjection();
-
147  }
-
148 
-
149 #ifndef RAYLIB_CPP_NO_MATH
-
150 
-
153  inline float Trace() const {
-
154  return ::MatrixTrace(*this);
-
155  }
-
156 
-
160  inline Matrix Transpose() const {
-
161  return ::MatrixTranspose(*this);
-
162  }
-
163 
-
164  inline Matrix Invert() const {
-
165  return ::MatrixInvert(*this);
-
166  }
-
167 
-
168  inline Matrix Normalize() const {
-
169  return ::MatrixNormalize(*this);
-
170  }
-
171 
-
172  static Matrix Identity() {
-
173  return ::MatrixIdentity();
-
174  }
-
175 
-
176  Matrix Add(const ::Matrix& right) {
-
177  return ::MatrixAdd(*this, right);
-
178  }
-
179 
-
180  Matrix operator+(const ::Matrix& matrix) {
-
181  return ::MatrixAdd(*this, matrix);
-
182  }
-
183 
-
184  Matrix Subtract(const ::Matrix& right) {
-
185  return ::MatrixSubtract(*this, right);
-
186  }
-
187 
-
188  Matrix operator-(const ::Matrix& matrix) {
-
189  return ::MatrixSubtract(*this, matrix);
-
190  }
-
191 
-
192  static Matrix Translate(float x, float y, float z) {
-
193  return ::MatrixTranslate(x, y, z);
-
194  }
-
195 
-
196  static Matrix Rotate(Vector3 axis, float angle) {
-
197  return ::MatrixRotate(axis, angle);
-
198  }
-
199 
-
200  static Matrix RotateXYZ(Vector3 angle) {
-
201  return ::MatrixRotateXYZ(angle);
-
202  }
-
203 
-
204  static Matrix RotateX(float angle) {
-
205  return ::MatrixRotateX(angle);
-
206  }
-
207 
-
208  static Matrix RotateY(float angle) {
-
209  return ::MatrixRotateY(angle);
+
142  static Matrix Identity() {
+
143  return ::MatrixIdentity();
+
144  }
+
145 
+
146  Matrix Add(const ::Matrix& right) {
+
147  return ::MatrixAdd(*this, right);
+
148  }
+
149 
+
150  Matrix operator+(const ::Matrix& matrix) {
+
151  return ::MatrixAdd(*this, matrix);
+
152  }
+
153 
+
154  Matrix Subtract(const ::Matrix& right) {
+
155  return ::MatrixSubtract(*this, right);
+
156  }
+
157 
+
158  Matrix operator-(const ::Matrix& matrix) {
+
159  return ::MatrixSubtract(*this, matrix);
+
160  }
+
161 
+
162  static Matrix Translate(float x, float y, float z) {
+
163  return ::MatrixTranslate(x, y, z);
+
164  }
+
165 
+
166  static Matrix Rotate(Vector3 axis, float angle) {
+
167  return ::MatrixRotate(axis, angle);
+
168  }
+
169 
+
170  static Matrix RotateXYZ(Vector3 angle) {
+
171  return ::MatrixRotateXYZ(angle);
+
172  }
+
173 
+
174  static Matrix RotateX(float angle) {
+
175  return ::MatrixRotateX(angle);
+
176  }
+
177 
+
178  static Matrix RotateY(float angle) {
+
179  return ::MatrixRotateY(angle);
+
180  }
+
181 
+
182  static Matrix RotateZ(float angle) {
+
183  return ::MatrixRotateZ(angle);
+
184  }
+
185 
+
186  static Matrix Scale(float x, float y, float z) {
+
187  return ::MatrixScale(x, y, z);
+
188  }
+
189 
+
190  Matrix Multiply(const ::Matrix& right) const {
+
191  return ::MatrixMultiply(*this, right);
+
192  }
+
193 
+
194  Matrix operator*(const ::Matrix& matrix) {
+
195  return ::MatrixMultiply(*this, matrix);
+
196  }
+
197 
+
198  static Matrix Frustum(double left, double right, double bottom, double top,
+
199  double near, double far) {
+
200  return ::MatrixFrustum(left, right, bottom, top, near, far);
+
201  }
+
202 
+
203  static Matrix Perspective(double fovy, double aspect, double near, double far) {
+
204  return ::MatrixPerspective(fovy, aspect, near, far);
+
205  }
+
206 
+
207  static Matrix Ortho(double left, double right, double bottom, double top,
+
208  double near, double far) {
+
209  return ::MatrixOrtho(left, right, bottom, top, near, far);
210  }
211 
-
212  static Matrix RotateZ(float angle) {
-
213  return ::MatrixRotateZ(angle);
+
212  static Matrix LookAt(Vector3 eye, Vector3 target, Vector3 up) {
+
213  return ::MatrixLookAt(eye, target, up);
214  }
215 
-
216  static Matrix Scale(float x, float y, float z) {
-
217  return ::MatrixScale(x, y, z);
+
216  inline float16 ToFloatV() const {
+
217  return ::MatrixToFloatV(*this);
218  }
219 
-
220  Matrix Multiply(const ::Matrix& right) const {
-
221  return ::MatrixMultiply(*this, right);
+
220  operator float16() {
+
221  return ToFloatV();
222  }
223 
-
224  Matrix operator*(const ::Matrix& matrix) {
-
225  return ::MatrixMultiply(*this, matrix);
-
226  }
-
227 
-
228  static Matrix Frustum(double left, double right, double bottom, double top,
-
229  double near, double far) {
-
230  return ::MatrixFrustum(left, right, bottom, top, near, far);
-
231  }
-
232 
-
233  static Matrix Perspective(double fovy, double aspect, double near, double far) {
-
234  return ::MatrixPerspective(fovy, aspect, near, far);
-
235  }
-
236 
-
237  static Matrix Ortho(double left, double right, double bottom, double top,
-
238  double near, double far) {
-
239  return ::MatrixOrtho(left, right, bottom, top, near, far);
-
240  }
-
241 
-
242  static Matrix LookAt(Vector3 eye, Vector3 target, Vector3 up) {
-
243  return ::MatrixLookAt(eye, target, up);
-
244  }
-
245 
-
246  inline float16 ToFloatV() const {
-
247  return ::MatrixToFloatV(*this);
-
248  }
-
249 
-
250  operator float16() {
-
251  return ToFloatV();
+
227  inline Matrix& SetShaderValue(::Shader shader, int uniformLoc) {
+
228  ::SetShaderValueMatrix(shader, uniformLoc, *this);
+
229  return *this;
+
230  }
+
231 
+
232 #endif
+
233 
+
234  private:
+
235  inline void set(const ::Matrix& mat) {
+
236  m0 = mat.m0;
+
237  m1 = mat.m1;
+
238  m2 = mat.m2;
+
239  m3 = mat.m3;
+
240  m4 = mat.m4;
+
241  m5 = mat.m5;
+
242  m6 = mat.m6;
+
243  m7 = mat.m7;
+
244  m8 = mat.m8;
+
245  m9 = mat.m9;
+
246  m10 = mat.m10;
+
247  m11 = mat.m11;
+
248  m12 = mat.m12;
+
249  m13 = mat.m13;
+
250  m14 = mat.m14;
+
251  m15 = mat.m15;
252  }
-
253 
-
257  inline Matrix& SetShaderValue(::Shader shader, int uniformLoc) {
-
258  ::SetShaderValueMatrix(shader, uniformLoc, *this);
-
259  return *this;
-
260  }
-
261 
-
262 #endif
-
263 
-
264  protected:
-
265  inline void set(const ::Matrix& mat) {
-
266  m0 = mat.m0;
-
267  m1 = mat.m1;
-
268  m2 = mat.m2;
-
269  m3 = mat.m3;
-
270  m4 = mat.m4;
-
271  m5 = mat.m5;
-
272  m6 = mat.m6;
-
273  m7 = mat.m7;
-
274  m8 = mat.m8;
-
275  m9 = mat.m9;
-
276  m10 = mat.m10;
-
277  m11 = mat.m11;
-
278  m12 = mat.m12;
-
279  m13 = mat.m13;
-
280  m14 = mat.m14;
-
281  m15 = mat.m15;
-
282  }
-
283 };
-
284 } // namespace raylib
-
285 
-
286 
-
287 #endif // RAYLIB_CPP_INCLUDE_MATRIX_HPP_
+
253 };
+
254 } // namespace raylib
+
255 
+
256 
+
257 #endif // RAYLIB_CPP_INCLUDE_MATRIX_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Matrix Transpose() const
Transposes provided matrix.
Definition: Matrix.hpp:160
-
Definition: Matrix.hpp:46
-
Matrix operator-(const ::Matrix &matrix)
Definition: Matrix.hpp:188
-
Matrix Normalize() const
Definition: Matrix.hpp:168
-
static Matrix Frustum(double left, double right, double bottom, double top, double near, double far)
Definition: Matrix.hpp:228
-
Matrix(const ::Matrix &mat)
Definition: Matrix.hpp:48
-
Matrix & SetShaderValue(::Shader shader, int uniformLoc)
Set shader uniform value (matrix 4x4)
Definition: Matrix.hpp:257
-
static Matrix RotateXYZ(Vector3 angle)
Definition: Matrix.hpp:200
-
static Matrix Scale(float x, float y, float z)
Definition: Matrix.hpp:216
-
static Matrix Translate(float x, float y, float z)
Definition: Matrix.hpp:192
-
static Matrix Rotate(Vector3 axis, float angle)
Definition: Matrix.hpp:196
-
Matrix operator+(const ::Matrix &matrix)
Definition: Matrix.hpp:180
-
Matrix operator*(const ::Matrix &matrix)
Definition: Matrix.hpp:224
-
static Matrix RotateZ(float angle)
Definition: Matrix.hpp:212
-
Definition: Vector3.hpp:37
-
Matrix & SetProjection()
Set a custom projection matrix (replaces internal projection matrix)
Definition: Matrix.hpp:122
-
Matrix & SetModelview()
Set a custom modelview matrix (replaces internal modelview matrix)
Definition: Matrix.hpp:130
-
float16 ToFloatV() const
Definition: Matrix.hpp:246
-
static Matrix Identity()
Definition: Matrix.hpp:172
-
Matrix & operator=(const Matrix &matrix)
Definition: Matrix.hpp:95
-
static Matrix RotateX(float angle)
Definition: Matrix.hpp:204
-
static Matrix Perspective(double fovy, double aspect, double near, double far)
Definition: Matrix.hpp:233
-
Definition: Shader.hpp:35
-
void set(const ::Matrix &mat)
Definition: Matrix.hpp:265
-
Matrix Add(const ::Matrix &right)
Definition: Matrix.hpp:176
-
static Matrix GetModelview()
Get internal modelview matrix.
Definition: Matrix.hpp:138
-
Matrix(float M0=0, float M1=0, float M2=0, float M3=0, float M4=0, float M5=0, float M6=0, float M7=0, float M8=0, float M9=0, float M10=0, float M11=0, float M12=0, float M13=0, float M14=0, float M15=0)
Definition: Matrix.hpp:52
-
Matrix Invert() const
Definition: Matrix.hpp:164
-
static Matrix LookAt(Vector3 eye, Vector3 target, Vector3 up)
Definition: Matrix.hpp:242
-
Matrix Subtract(const ::Matrix &right)
Definition: Matrix.hpp:184
-
float Trace() const
Returns the trace of the matrix (sum of the values along the diagonal)
Definition: Matrix.hpp:153
-
static Matrix RotateY(float angle)
Definition: Matrix.hpp:208
-
static Matrix GetProjection()
Get internal projection matrix.
Definition: Matrix.hpp:145
-
bool operator==(const ::Matrix &other)
Definition: Matrix.hpp:100
-
Matrix Multiply(const ::Matrix &right) const
Definition: Matrix.hpp:220
-
static Matrix Ortho(double left, double right, double bottom, double top, double near, double far)
Definition: Matrix.hpp:237
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Matrix Transpose() const
Transposes provided matrix.
Definition: Matrix.hpp:130
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Matrix & SetShaderValue(::Shader shader, int uniformLoc)
Set shader uniform value (matrix 4x4)
Definition: Matrix.hpp:227
+
Matrix & SetProjection()
Set a custom projection matrix (replaces internal projection matrix)
Definition: Matrix.hpp:92
+
Matrix & SetModelview()
Set a custom modelview matrix (replaces internal modelview matrix)
Definition: Matrix.hpp:100
+
Shader type (generic)
Definition: Shader.hpp:14
+
static Matrix GetModelview()
Get internal modelview matrix.
Definition: Matrix.hpp:108
+
float Trace() const
Returns the trace of the matrix (sum of the values along the diagonal)
Definition: Matrix.hpp:123
+
static Matrix GetProjection()
Get internal projection matrix.
Definition: Matrix.hpp:115
diff --git a/docs/_mesh_8hpp_source.html b/docs/_mesh_8hpp_source.html index 0b837b7..51dac47 100644 --- a/docs/_mesh_8hpp_source.html +++ b/docs/_mesh_8hpp_source.html @@ -71,220 +71,192 @@ $(function() {
Mesh.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_MESH_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_MESH_HPP_
-
27 
-
28 #include <string>
-
29 #include <vector>
-
30 
-
31 #include "./raylib.hpp"
-
32 #include "./raylib-cpp-utils.hpp"
-
33 #include "./BoundingBox.hpp"
-
34 #include "./Model.hpp"
+
1 #ifndef RAYLIB_CPP_INCLUDE_MESH_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MESH_HPP_
+
3 
+
4 #include <string>
+
5 #include <vector>
+
6 
+
7 #include "./raylib.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 #include "./BoundingBox.hpp"
+
10 #include "./Model.hpp"
+
11 
+
12 namespace raylib {
+
16 class Mesh : public ::Mesh {
+
17  public:
+
18  Mesh(const ::Mesh& mesh) {
+
19  set(mesh);
+
20  }
+
21 
+
22  Mesh(int VertexCount = 0, int TriangleCount = 0) {
+
23  vertexCount = VertexCount;
+
24  triangleCount = TriangleCount;
+
25  }
+
26 
+
30  static std::vector<Mesh> Load(const std::string& fileName) {
+
31  int count = 0;
+
32  ::Mesh* meshes = LoadMeshes(fileName.c_str(), &count);
+
33  return std::vector<Mesh>(meshes, meshes + count);
+
34  }
35 
-
36 namespace raylib {
-
37 class Mesh : public ::Mesh {
-
38  public:
-
39  Mesh(const ::Mesh& mesh) {
-
40  set(mesh);
+
39  static ::Mesh Poly(int sides, float radius) {
+
40  return ::GenMeshPoly(sides, radius);
41  }
42 
-
43  Mesh(int VertexCount = 0, int TriangleCount = 0) {
-
44  vertexCount = VertexCount;
-
45  triangleCount = TriangleCount;
-
46  }
-
47 
-
51  static std::vector<Mesh> Load(const std::string& fileName) {
-
52  int count = 0;
-
53  ::Mesh* meshes = LoadMeshes(fileName.c_str(), &count);
-
54  return std::vector<Mesh>(meshes, meshes + count);
+
46  static ::Mesh Plane(float width, float length, int resX, int resZ) {
+
47  return ::GenMeshPlane(width, length, resX, resZ);
+
48  }
+
49 
+
53  static ::Mesh Cube(float width, float height, float length) {
+
54  return ::GenMeshCube(width, height, length);
55  }
56 
-
60  static ::Mesh Poly(int sides, float radius) {
-
61  return ::GenMeshPoly(sides, radius);
+
60  static ::Mesh Sphere(float radius, int rings, int slices) {
+
61  return ::GenMeshSphere(radius, rings, slices);
62  }
63 
-
67  static ::Mesh Plane(float width, float length, int resX, int resZ) {
-
68  return ::GenMeshPlane(width, length, resX, resZ);
+
67  static ::Mesh HemiSphere(float radius, int rings, int slices) {
+
68  return ::GenMeshHemiSphere(radius, rings, slices);
69  }
70 
-
74  static ::Mesh Cube(float width, float height, float length) {
-
75  return ::GenMeshCube(width, height, length);
+
74  static ::Mesh Cylinder(float radius, float height, int slices) {
+
75  return ::GenMeshCylinder(radius, height, slices);
76  }
77 
-
81  static ::Mesh Sphere(float radius, int rings, int slices) {
-
82  return ::GenMeshSphere(radius, rings, slices);
+
81  static ::Mesh Torus(float radius, float size, int radSeg, int sides) {
+
82  return ::GenMeshTorus(radius, size, radSeg, sides);
83  }
84 
-
88  static ::Mesh HemiSphere(float radius, int rings, int slices) {
-
89  return ::GenMeshHemiSphere(radius, rings, slices);
+
88  static ::Mesh Knot(float radius, float size, int radSeg, int sides) {
+
89  return ::GenMeshKnot(radius, size, radSeg, sides);
90  }
91 
-
95  static ::Mesh Cylinder(float radius, float height, int slices) {
-
96  return ::GenMeshCylinder(radius, height, slices);
+
95  static ::Mesh Heightmap(const ::Image& heightmap, ::Vector3 size) {
+
96  return ::GenMeshHeightmap(heightmap, size);
97  }
98 
-
102  static ::Mesh Torus(float radius, float size, int radSeg, int sides) {
-
103  return ::GenMeshTorus(radius, size, radSeg, sides);
+
102  static ::Mesh Cubicmap(const ::Image& cubicmap, ::Vector3 cubeSize) {
+
103  return ::GenMeshCubicmap(cubicmap, cubeSize);
104  }
105 
-
109  static ::Mesh Knot(float radius, float size, int radSeg, int sides) {
-
110  return ::GenMeshKnot(radius, size, radSeg, sides);
-
111  }
-
112 
-
116  static ::Mesh Heightmap(const ::Image& heightmap, ::Vector3 size) {
-
117  return ::GenMeshHeightmap(heightmap, size);
-
118  }
-
119 
-
123  static ::Mesh Cubicmap(const ::Image& cubicmap, ::Vector3 cubeSize) {
-
124  return ::GenMeshCubicmap(cubicmap, cubeSize);
+
106  GETTERSETTER(int, VertexCount, vertexCount)
+
107  GETTERSETTER(int, TriangleCount, triangleCount)
+
108  GETTERSETTER(float*, Vertices, vertices)
+
109  GETTERSETTER(float *, TexCoords, texcoords)
+
110  GETTERSETTER(float *, TexCoords2, texcoords2)
+
111  GETTERSETTER(float *, Normals, normals)
+
112  GETTERSETTER(float *, Tangents, tangents)
+
113  GETTERSETTER(unsigned char *, Colors, colors)
+
114  GETTERSETTER(unsigned short *, Indices, indices) // NOLINT
+
115  GETTERSETTER(float *, AnimVertices, animVertices)
+
116  GETTERSETTER(float *, AnimNormals, animNormals)
+
117  GETTERSETTER(int *, BoneIds, boneIds)
+
118  GETTERSETTER(float *, BoneWeights, boneWeights)
+
119  GETTERSETTER(unsigned int, VaoId, vaoId)
+
120  GETTERSETTER(unsigned int *, VboId, vboId)
+
121 
+
122  Mesh& operator=(const ::Mesh& mesh) {
+
123  set(mesh);
+
124  return *this;
125  }
126 
-
127  GETTERSETTER(int, VertexCount, vertexCount)
-
128  GETTERSETTER(int, TriangleCount, triangleCount)
-
129  GETTERSETTER(float*, Vertices, vertices)
-
130  GETTERSETTER(float *, TexCoords, texcoords)
-
131  GETTERSETTER(float *, TexCoords2, texcoords2)
-
132  GETTERSETTER(float *, Normals, normals)
-
133  GETTERSETTER(float *, Tangents, tangents)
-
134  GETTERSETTER(unsigned char *, Colors, colors)
-
135  GETTERSETTER(unsigned short *, Indices, indices) // NOLINT
-
136  GETTERSETTER(float *, AnimVertices, animVertices)
-
137  GETTERSETTER(float *, AnimNormals, animNormals)
-
138  GETTERSETTER(int *, BoneIds, boneIds)
-
139  GETTERSETTER(float *, BoneWeights, boneWeights)
-
140  GETTERSETTER(unsigned int, VaoId, vaoId)
-
141  GETTERSETTER(unsigned int *, VboId, vboId)
-
142 
-
143  Mesh& operator=(const ::Mesh& mesh) {
-
144  set(mesh);
-
145  return *this;
-
146  }
-
147 
-
148  ~Mesh() {
-
149  Unload();
-
150  }
-
151 
-
155  inline bool Export(const std::string& fileName) {
-
156  // TODO(RobLoach): Switch to an exception when failed.
-
157  return ExportMesh(*this, fileName.c_str());
-
158  }
-
159 
-
160  inline void Unload() {
-
161  if (vboId != NULL) {
-
162  ::UnloadMesh(*this);
-
163  vboId = NULL;
-
164  }
-
165  }
-
166 
- -
171  return ::MeshBoundingBox(*this);
-
172  }
-
173 
-
177  operator raylib::BoundingBox() {
-
178  return BoundingBox();
-
179  }
-
180 
-
184  inline Mesh& Tangents() {
-
185  ::MeshTangents(this);
-
186  return *this;
-
187  }
-
188 
-
192  inline Mesh& Binormals() {
-
193  ::MeshBinormals(this);
-
194  return *this;
-
195  }
-
196 
-
200  inline Mesh& NormalsSmooth() {
-
201  ::MeshNormalsSmooth(this);
-
202  return *this;
-
203  }
-
204 
-
208  inline raylib::Model LoadModelFrom() const {
-
209  return ::LoadModelFromMesh(*this);
-
210  }
-
211 
-
215  operator raylib::Model() {
-
216  return ::LoadModelFromMesh(*this);
-
217  }
-
218 
-
219  protected:
-
220  inline void set(const ::Mesh& mesh) {
-
221  vertexCount = mesh.vertexCount;
-
222  triangleCount = mesh.triangleCount;
-
223  vertices = mesh.vertices;
-
224  texcoords = mesh.texcoords;
-
225  texcoords2 = mesh.texcoords2;
-
226  normals = mesh.normals;
-
227  tangents = mesh.tangents;
-
228  colors = mesh.colors;
-
229  indices = mesh.indices;
-
230  animVertices = mesh.animVertices;
-
231  animNormals = mesh.animNormals;
-
232  boneIds = mesh.boneIds;
-
233  boneWeights = mesh.boneWeights;
-
234  vaoId = mesh.vaoId;
-
235  vboId = mesh.vboId;
-
236  }
-
237 };
-
238 } // namespace raylib
-
239 
-
240 #endif // RAYLIB_CPP_INCLUDE_MESH_HPP_
+
127  ~Mesh() {
+
128  Unload();
+
129  }
+
130 
+
134  inline bool Export(const std::string& fileName) {
+
135  // TODO(RobLoach): Switch to an exception when failed.
+
136  return ExportMesh(*this, fileName.c_str());
+
137  }
+
138 
+
142  inline void Unload() {
+
143  if (vboId != NULL) {
+
144  ::UnloadMesh(*this);
+
145  vboId = NULL;
+
146  }
+
147  }
+
148 
+ +
153  return ::MeshBoundingBox(*this);
+
154  }
+
155 
+
159  operator raylib::BoundingBox() {
+
160  return BoundingBox();
+
161  }
+
162 
+
166  inline Mesh& Tangents() {
+
167  ::MeshTangents(this);
+
168  return *this;
+
169  }
+
170 
+
174  inline Mesh& Binormals() {
+
175  ::MeshBinormals(this);
+
176  return *this;
+
177  }
+
178 
+
182  inline Mesh& NormalsSmooth() {
+
183  ::MeshNormalsSmooth(this);
+
184  return *this;
+
185  }
+
186 
+
190  inline raylib::Model LoadModelFrom() const {
+
191  return ::LoadModelFromMesh(*this);
+
192  }
+
193 
+
197  operator raylib::Model() {
+
198  return ::LoadModelFromMesh(*this);
+
199  }
+
200 
+
201  private:
+
202  inline void set(const ::Mesh& mesh) {
+
203  vertexCount = mesh.vertexCount;
+
204  triangleCount = mesh.triangleCount;
+
205  vertices = mesh.vertices;
+
206  texcoords = mesh.texcoords;
+
207  texcoords2 = mesh.texcoords2;
+
208  normals = mesh.normals;
+
209  tangents = mesh.tangents;
+
210  colors = mesh.colors;
+
211  indices = mesh.indices;
+
212  animVertices = mesh.animVertices;
+
213  animNormals = mesh.animNormals;
+
214  boneIds = mesh.boneIds;
+
215  boneWeights = mesh.boneWeights;
+
216  vaoId = mesh.vaoId;
+
217  vboId = mesh.vboId;
+
218  }
+
219 };
+
220 } // namespace raylib
+
221 
+
222 #endif // RAYLIB_CPP_INCLUDE_MESH_HPP_
-
::Mesh Cube(float width, float height, float length)
Generate cuboid mesh.
Definition: Mesh.hpp:74
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
bool Export(const std::string &fileName)
Export mesh data to file.
Definition: Mesh.hpp:155
-
Mesh & NormalsSmooth()
Smooth (average) vertex normals.
Definition: Mesh.hpp:200
-
raylib::BoundingBox BoundingBox() const
Compute mesh bounding box limits.
Definition: Mesh.hpp:170
-
Mesh & Tangents()
Compute mesh tangents.
Definition: Mesh.hpp:184
-
~Mesh()
Definition: Mesh.hpp:148
-
::Mesh Poly(int sides, float radius)
Generate polygonal mesh.
Definition: Mesh.hpp:60
-
::Mesh Torus(float radius, float size, int radSeg, int sides)
Generate torus mesh.
Definition: Mesh.hpp:102
-
void set(const ::Mesh &mesh)
Definition: Mesh.hpp:220
-
Mesh(const ::Mesh &mesh)
Definition: Mesh.hpp:39
-
Definition: Vector3.hpp:37
-
Mesh & Binormals()
Compute mesh binormals (aka bitangent)
Definition: Mesh.hpp:192
-
::Mesh HemiSphere(float radius, int rings, int slices)
Generate half-sphere mesh (no bottom cap)
Definition: Mesh.hpp:88
-
void Unload()
Definition: Mesh.hpp:160
-
Definition: Mesh.hpp:37
-
static std::vector< Mesh > Load(const std::string &fileName)
Load meshes from model file.
Definition: Mesh.hpp:51
-
::Mesh Heightmap(const ::Image &heightmap, ::Vector3 size)
Generate heightmap mesh from image data.
Definition: Mesh.hpp:116
-
::Mesh Knot(float radius, float size, int radSeg, int sides)
Generate trefoil knot mesh.
Definition: Mesh.hpp:109
-
::Mesh Cubicmap(const ::Image &cubicmap, ::Vector3 cubeSize)
Generate cubes-based map mesh from image data.
Definition: Mesh.hpp:123
-
::Mesh Sphere(float radius, int rings, int slices)
Generate sphere mesh (standard sphere)
Definition: Mesh.hpp:81
-
Mesh(int VertexCount=0, int TriangleCount=0)
Definition: Mesh.hpp:43
-
Definition: Model.hpp:35
-
::Mesh Cylinder(float radius, float height, int slices)
Generate cylinder mesh.
Definition: Mesh.hpp:95
-
Bounding box type.
Definition: BoundingBox.hpp:35
-
raylib::Model LoadModelFrom() const
Load model from generated mesh.
Definition: Mesh.hpp:208
-
::Mesh Plane(float width, float length, int resX, int resZ)
Generate plane mesh (with subdivisions)
Definition: Mesh.hpp:67
+
::Mesh Cube(float width, float height, float length)
Generate cuboid mesh.
Definition: Mesh.hpp:53
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
bool Export(const std::string &fileName)
Export mesh data to file.
Definition: Mesh.hpp:134
+
Mesh & NormalsSmooth()
Smooth (average) vertex normals.
Definition: Mesh.hpp:182
+
raylib::BoundingBox BoundingBox() const
Compute mesh bounding box limits.
Definition: Mesh.hpp:152
+
Mesh & Tangents()
Compute mesh tangents.
Definition: Mesh.hpp:166
+
::Mesh Poly(int sides, float radius)
Generate polygonal mesh.
Definition: Mesh.hpp:39
+
::Mesh Torus(float radius, float size, int radSeg, int sides)
Generate torus mesh.
Definition: Mesh.hpp:81
+
Vector3 type.
Definition: Vector3.hpp:16
+
Mesh & Binormals()
Compute mesh binormals (aka bitangent)
Definition: Mesh.hpp:174
+
::Mesh HemiSphere(float radius, int rings, int slices)
Generate half-sphere mesh (no bottom cap)
Definition: Mesh.hpp:67
+
void Unload()
Unload mesh from memory (RAM and/or VRAM)
Definition: Mesh.hpp:142
+
Vertex data definning a mesh.
Definition: Mesh.hpp:16
+
static std::vector< Mesh > Load(const std::string &fileName)
Load meshes from model file.
Definition: Mesh.hpp:30
+
::Mesh Heightmap(const ::Image &heightmap, ::Vector3 size)
Generate heightmap mesh from image data.
Definition: Mesh.hpp:95
+
::Mesh Knot(float radius, float size, int radSeg, int sides)
Generate trefoil knot mesh.
Definition: Mesh.hpp:88
+
::Mesh Cubicmap(const ::Image &cubicmap, ::Vector3 cubeSize)
Generate cubes-based map mesh from image data.
Definition: Mesh.hpp:102
+
::Mesh Sphere(float radius, int rings, int slices)
Generate sphere mesh (standard sphere)
Definition: Mesh.hpp:60
+
Model type.
Definition: Model.hpp:14
+
::Mesh Cylinder(float radius, float height, int slices)
Generate cylinder mesh.
Definition: Mesh.hpp:74
+
Bounding box type.
Definition: BoundingBox.hpp:11
+
raylib::Model LoadModelFrom() const
Load model from generated mesh.
Definition: Mesh.hpp:190
+
::Mesh Plane(float width, float length, int resX, int resZ)
Generate plane mesh (with subdivisions)
Definition: Mesh.hpp:46
diff --git a/docs/_model_8hpp_source.html b/docs/_model_8hpp_source.html index ceaea5a..3a1a9f8 100644 --- a/docs/_model_8hpp_source.html +++ b/docs/_model_8hpp_source.html @@ -71,183 +71,154 @@ $(function() {
Model.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_MODEL_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_MODEL_HPP_
+
1 #ifndef RAYLIB_CPP_INCLUDE_MODEL_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MODEL_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./Mesh.hpp"
+
9 
+
10 namespace raylib {
+
14 class Model : public ::Model {
+
15  public:
+
16  Model(const ::Model& model) {
+
17  set(model);
+
18  }
+
19 
+
20  Model(const std::string& fileName) {
+
21  set(::LoadModel(fileName.c_str()));
+
22  }
+
23 
+
24  Model(const ::Mesh& mesh) {
+
25  set(::LoadModelFromMesh(mesh));
+
26  }
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
-
32 #include "./Mesh.hpp"
-
33 
-
34 namespace raylib {
-
35 class Model : public ::Model {
-
36  public:
-
37  Model(const ::Model& model) {
-
38  set(model);
-
39  }
-
40 
-
41  Model(const std::string& fileName) {
-
42  set(::LoadModel(fileName.c_str()));
-
43  }
-
44 
-
45  Model(const ::Mesh& mesh) {
-
46  set(::LoadModelFromMesh(mesh));
-
47  }
-
48 
-
49  ~Model() {
-
50  Unload();
-
51  }
-
52 
-
53  GETTERSETTER(::Matrix, Transform, transform)
-
54  GETTERSETTER(int, MeshCount, meshCount)
-
55  GETTERSETTER(int, MaterialCount, materialCount)
-
56  GETTERSETTER(::Mesh *, Meshes, meshes)
-
57  GETTERSETTER(::Material *, Materials, materials)
-
58  GETTERSETTER(int *, MeshMaterial, meshMaterial)
-
59  GETTERSETTER(int, BoneCount, boneCount)
-
60  GETTERSETTER(::BoneInfo *, Bones, bones)
-
61  GETTERSETTER(::Transform *, BindPoe, bindPose)
-
62 
-
63  Model& operator=(const ::Model& model) {
-
64  set(model);
-
65  return *this;
-
66  }
-
67 
-
71  inline void Unload() {
-
72  if (meshes != NULL || materials != NULL) {
-
73  ::UnloadModel(*this);
-
74  meshes = NULL;
-
75  materials = NULL;
-
76  }
-
77  }
-
78 
-
82  inline Model& UnloadKeepMeshes() {
-
83  ::UnloadModelKeepMeshes(*this);
-
84  return *this;
-
85  }
-
86 
-
90  inline Model& SetMeshMaterial(int meshId, int materialId) {
-
91  ::SetModelMeshMaterial(this, meshId, materialId);
-
92  return *this;
-
93  }
-
94 
-
98  inline RayHitInfo GetCollision(const ::Ray& ray) const {
-
99  return ::GetCollisionRayModel(ray, *this);
-
100  }
-
101 
-
105  inline Model& UpdateModelAnimation(const ::ModelAnimation& anim, int frame) {
-
106  ::UpdateModelAnimation(*this, anim, frame);
-
107  return *this;
-
108  }
-
109 
-
113  inline bool IsModelAnimationValid(const ::ModelAnimation& anim) const {
-
114  return ::IsModelAnimationValid(*this, anim);
-
115  }
-
116 
-
120  inline Model& Draw(::Vector3 position,
-
121  float scale = 1.0f,
-
122  ::Color tint = {255, 255, 255, 255}) {
-
123  ::DrawModel(*this, position, scale, tint);
-
124  return *this;
-
125  }
-
126 
-
130  inline Model& Draw(
-
131  ::Vector3 position,
-
132  ::Vector3 rotationAxis,
-
133  float rotationAngle = 0.0f,
-
134  ::Vector3 scale = {1.0f, 1.0f, 1.0f},
-
135  ::Color tint = {255, 255, 255, 255}) {
-
136  ::DrawModelEx(*this, position, rotationAxis, rotationAngle, scale, tint);
-
137  return *this;
-
138  }
-
139 
-
143  inline Model& DrawWires(::Vector3 position,
-
144  float scale = 1.0f,
-
145  ::Color tint = {255, 255, 255, 255}) {
-
146  ::DrawModelWires(*this, position, scale, tint);
-
147  return *this;
-
148  }
-
149 
-
153  inline Model& DrawWires(
-
154  ::Vector3 position,
-
155  ::Vector3 rotationAxis,
-
156  float rotationAngle = 0.0f,
-
157  ::Vector3 scale = {1.0f, 1.0f, 1.0f},
-
158  ::Color tint = {255, 255, 255, 255}) {
-
159  ::DrawModelWiresEx(*this, position, rotationAxis, rotationAngle, scale, tint);
-
160  return *this;
-
161  }
-
162 
-
163  protected:
-
164  inline void set(const ::Model& model) {
-
165  transform = model.transform;
-
166 
-
167  meshCount = model.meshCount;
-
168  materialCount = model.materialCount;
-
169  meshes = model.meshes;
-
170  materials = model.materials;
-
171  meshMaterial = model.meshMaterial;
-
172 
-
173  boneCount = model.boneCount;
-
174  bones = model.bones;
-
175  bindPose = model.bindPose;
-
176  }
-
177 };
-
178 } // namespace raylib
-
179 
-
180 #endif // RAYLIB_CPP_INCLUDE_MODEL_HPP_
+
28  ~Model() {
+
29  Unload();
+
30  }
+
31 
+
32  GETTERSETTER(::Matrix, Transform, transform)
+
33  GETTERSETTER(int, MeshCount, meshCount)
+
34  GETTERSETTER(int, MaterialCount, materialCount)
+
35  GETTERSETTER(::Mesh *, Meshes, meshes)
+
36  GETTERSETTER(::Material *, Materials, materials)
+
37  GETTERSETTER(int *, MeshMaterial, meshMaterial)
+
38  GETTERSETTER(int, BoneCount, boneCount)
+
39  GETTERSETTER(::BoneInfo *, Bones, bones)
+
40  GETTERSETTER(::Transform *, BindPoe, bindPose)
+
41 
+
42  Model& operator=(const ::Model& model) {
+
43  set(model);
+
44  return *this;
+
45  }
+
46 
+
50  inline void Unload() {
+
51  if (meshes != NULL || materials != NULL) {
+
52  ::UnloadModel(*this);
+
53  meshes = NULL;
+
54  materials = NULL;
+
55  }
+
56  }
+
57 
+
61  inline Model& UnloadKeepMeshes() {
+
62  ::UnloadModelKeepMeshes(*this);
+
63  return *this;
+
64  }
+
65 
+
69  inline Model& SetMeshMaterial(int meshId, int materialId) {
+
70  ::SetModelMeshMaterial(this, meshId, materialId);
+
71  return *this;
+
72  }
+
73 
+
77  inline RayHitInfo GetCollision(const ::Ray& ray) const {
+
78  return ::GetCollisionRayModel(ray, *this);
+
79  }
+
80 
+
84  inline Model& UpdateModelAnimation(const ::ModelAnimation& anim, int frame) {
+
85  ::UpdateModelAnimation(*this, anim, frame);
+
86  return *this;
+
87  }
+
88 
+
92  inline bool IsModelAnimationValid(const ::ModelAnimation& anim) const {
+
93  return ::IsModelAnimationValid(*this, anim);
+
94  }
+
95 
+
99  inline Model& Draw(::Vector3 position,
+
100  float scale = 1.0f,
+
101  ::Color tint = {255, 255, 255, 255}) {
+
102  ::DrawModel(*this, position, scale, tint);
+
103  return *this;
+
104  }
+
105 
+
109  inline Model& Draw(
+
110  ::Vector3 position,
+
111  ::Vector3 rotationAxis,
+
112  float rotationAngle = 0.0f,
+
113  ::Vector3 scale = {1.0f, 1.0f, 1.0f},
+
114  ::Color tint = {255, 255, 255, 255}) {
+
115  ::DrawModelEx(*this, position, rotationAxis, rotationAngle, scale, tint);
+
116  return *this;
+
117  }
+
118 
+
122  inline Model& DrawWires(::Vector3 position,
+
123  float scale = 1.0f,
+
124  ::Color tint = {255, 255, 255, 255}) {
+
125  ::DrawModelWires(*this, position, scale, tint);
+
126  return *this;
+
127  }
+
128 
+
132  inline Model& DrawWires(
+
133  ::Vector3 position,
+
134  ::Vector3 rotationAxis,
+
135  float rotationAngle = 0.0f,
+
136  ::Vector3 scale = {1.0f, 1.0f, 1.0f},
+
137  ::Color tint = {255, 255, 255, 255}) {
+
138  ::DrawModelWiresEx(*this, position, rotationAxis, rotationAngle, scale, tint);
+
139  return *this;
+
140  }
+
141 
+
142  private:
+
143  inline void set(const ::Model& model) {
+
144  transform = model.transform;
+
145 
+
146  meshCount = model.meshCount;
+
147  materialCount = model.materialCount;
+
148  meshes = model.meshes;
+
149  materials = model.materials;
+
150  meshMaterial = model.meshMaterial;
+
151 
+
152  boneCount = model.boneCount;
+
153  bones = model.bones;
+
154  bindPose = model.bindPose;
+
155  }
+
156 };
+
157 } // namespace raylib
+
158 
+
159 #endif // RAYLIB_CPP_INCLUDE_MODEL_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Definition: Matrix.hpp:46
-
Model(const ::Mesh &mesh)
Definition: Model.hpp:45
-
Model & UpdateModelAnimation(const ::ModelAnimation &anim, int frame)
Update model animation pose.
Definition: Model.hpp:105
-
Model & DrawWires(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
Draw a model wires (with texture if set)
Definition: Model.hpp:143
-
Model & DrawWires(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
Draw a model wires (with texture if set) with extended parameters.
Definition: Model.hpp:153
-
Model & SetMeshMaterial(int meshId, int materialId)
Set material for a mesh.
Definition: Model.hpp:90
-
Model & Draw(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
Draw a model (with texture if set)
Definition: Model.hpp:120
-
Model(const std::string &fileName)
Definition: Model.hpp:41
-
Model & Draw(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
Draw a model with extended parameters.
Definition: Model.hpp:130
-
bool IsModelAnimationValid(const ::ModelAnimation &anim) const
Check model animation skeleton match.
Definition: Model.hpp:113
-
Definition: Vector3.hpp:37
-
Definition: Mesh.hpp:37
-
Definition: Color.hpp:35
-
Definition: Model.hpp:35
-
void set(const ::Model &model)
Definition: Model.hpp:164
-
RayHitInfo GetCollision(const ::Ray &ray) const
Get collision info between ray and model.
Definition: Model.hpp:98
-
Model(const ::Model &model)
Definition: Model.hpp:37
-
Raycast hit information.
Definition: RayHitInfo.hpp:35
-
~Model()
Definition: Model.hpp:49
-
Definition: Material.hpp:35
-
void Unload()
Unload model (including meshes) from memory (RAM and/or VRAM)
Definition: Model.hpp:71
-
Model & UnloadKeepMeshes()
Unload model (but not meshes) from memory (RAM and/or VRAM)
Definition: Model.hpp:82
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Model & UpdateModelAnimation(const ::ModelAnimation &anim, int frame)
Update model animation pose.
Definition: Model.hpp:84
+
Model & DrawWires(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
Draw a model wires (with texture if set)
Definition: Model.hpp:122
+
Model & DrawWires(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
Draw a model wires (with texture if set) with extended parameters.
Definition: Model.hpp:132
+
Model & SetMeshMaterial(int meshId, int materialId)
Set material for a mesh.
Definition: Model.hpp:69
+
Model & Draw(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
Draw a model (with texture if set)
Definition: Model.hpp:99
+
Model & Draw(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
Draw a model with extended parameters.
Definition: Model.hpp:109
+
bool IsModelAnimationValid(const ::ModelAnimation &anim) const
Check model animation skeleton match.
Definition: Model.hpp:92
+
Vector3 type.
Definition: Vector3.hpp:16
+
Vertex data definning a mesh.
Definition: Mesh.hpp:16
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Model type.
Definition: Model.hpp:14
+
RayHitInfo GetCollision(const ::Ray &ray) const
Get collision info between ray and model.
Definition: Model.hpp:77
+
Raycast hit information.
Definition: RayHitInfo.hpp:11
+
Material type (generic)
Definition: Material.hpp:14
+
void Unload()
Unload model (including meshes) from memory (RAM and/or VRAM)
Definition: Model.hpp:50
+
Model & UnloadKeepMeshes()
Unload model (but not meshes) from memory (RAM and/or VRAM)
Definition: Model.hpp:61
diff --git a/docs/_model_animation_8hpp_source.html b/docs/_model_animation_8hpp_source.html index e9f39ca..1f60535 100644 --- a/docs/_model_animation_8hpp_source.html +++ b/docs/_model_animation_8hpp_source.html @@ -71,104 +71,77 @@ $(function() {
ModelAnimation.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
+
1 #ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
+
3 
+
4 #include <vector>
+
5 #include <string>
+
6 
+
7 #include "./raylib.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 #include "./Mesh.hpp"
+
10 
+
11 namespace raylib {
+ +
16  public:
+
17  ModelAnimation(const ::ModelAnimation& model) {
+
18  set(model);
+
19  }
+
20 
+
21  ~ModelAnimation() {
+
22  Unload();
+
23  }
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
-
27 
-
28 #include <vector>
-
29 #include <string>
-
30 
-
31 #include "./raylib.hpp"
-
32 #include "./raylib-cpp-utils.hpp"
-
33 #include "./Mesh.hpp"
-
34 
-
35 namespace raylib {
- -
40  public:
-
41  ModelAnimation(const ::ModelAnimation& model) {
-
42  set(model);
-
43  }
-
44 
- -
46  Unload();
-
47  }
-
48 
-
52  static std::vector<ModelAnimation> Load(const std::string& fileName) {
-
53  int count = 0;
-
54  ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.c_str(), &count);
-
55  return std::vector<ModelAnimation>(modelAnimations, modelAnimations + count);
-
56  }
-
57 
-
58  GETTERSETTER(int, BoneCount, boneCount)
-
59  GETTERSETTER(::BoneInfo*, Bones, bones)
-
60  GETTERSETTER(int, FrameCount, frameCount)
-
61  GETTERSETTER(::Transform**, FramePoses, framePoses)
-
62 
-
63  ModelAnimation& operator=(const ::ModelAnimation& model) {
-
64  set(model);
-
65  return *this;
-
66  }
-
67 
-
71  inline void Unload() {
-
72  ::UnloadModelAnimation(*this);
-
73  }
-
74 
-
78  inline ModelAnimation& Update(const ::Model& model, int frame) {
-
79  ::UpdateModelAnimation(model, *this, frame);
-
80  return *this;
-
81  }
-
82 
-
86  inline bool IsValid(const ::Model& model) const {
-
87  return ::IsModelAnimationValid(model, *this);
-
88  }
-
89 
-
90  protected:
-
91  inline void set(const ::ModelAnimation& model) {
-
92  boneCount = model.boneCount;
-
93  bones = model.bones;
-
94  frameCount = model.frameCount;
-
95  framePoses = model.framePoses;
-
96  }
-
97 };
-
98 } // namespace raylib
-
99 
-
100 #endif // RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
+
28  static std::vector<ModelAnimation> Load(const std::string& fileName) {
+
29  int count = 0;
+
30  ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.c_str(), &count);
+
31  return std::vector<ModelAnimation>(modelAnimations, modelAnimations + count);
+
32  }
+
33 
+
34  GETTERSETTER(int, BoneCount, boneCount)
+
35  GETTERSETTER(::BoneInfo*, Bones, bones)
+
36  GETTERSETTER(int, FrameCount, frameCount)
+
37  GETTERSETTER(::Transform**, FramePoses, framePoses)
+
38 
+
39  ModelAnimation& operator=(const ::ModelAnimation& model) {
+
40  set(model);
+
41  return *this;
+
42  }
+
43 
+
47  inline void Unload() {
+
48  ::UnloadModelAnimation(*this);
+
49  }
+
50 
+
54  inline ModelAnimation& Update(const ::Model& model, int frame) {
+
55  ::UpdateModelAnimation(model, *this, frame);
+
56  return *this;
+
57  }
+
58 
+
62  inline bool IsValid(const ::Model& model) const {
+
63  return ::IsModelAnimationValid(model, *this);
+
64  }
+
65 
+
66  private:
+
67  inline void set(const ::ModelAnimation& model) {
+
68  boneCount = model.boneCount;
+
69  bones = model.bones;
+
70  frameCount = model.frameCount;
+
71  framePoses = model.framePoses;
+
72  }
+
73 };
+
74 } // namespace raylib
+
75 
+
76 #endif // RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
~ModelAnimation()
-
ModelAnimation(const ::ModelAnimation &model)
-
ModelAnimation & Update(const ::Model &model, int frame)
Update model animation pose.
-
static std::vector< ModelAnimation > Load(const std::string &fileName)
Load model animations from file.
-
void set(const ::ModelAnimation &model)
-
void Unload()
Unload animation data.
-
bool IsValid(const ::Model &model) const
Check model animation skeleton match.
-
Model animation.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
ModelAnimation & Update(const ::Model &model, int frame)
Update model animation pose.
+
static std::vector< ModelAnimation > Load(const std::string &fileName)
Load model animations from file.
+
void Unload()
Unload animation data.
+
bool IsValid(const ::Model &model) const
Check model animation skeleton match.
+
Model animation.
diff --git a/docs/_mouse_8hpp_source.html b/docs/_mouse_8hpp_source.html index 7c7cd22..44d41c4 100644 --- a/docs/_mouse_8hpp_source.html +++ b/docs/_mouse_8hpp_source.html @@ -71,140 +71,99 @@ $(function() {
Mouse.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_MOUSE_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_MOUSE_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 
-
30 #include "./Vector2.hpp"
-
31 
-
32 namespace raylib {
-
36 class Mouse {
-
37  public:
-
41  static inline bool IsButtonPressed(int button) {
-
42  return ::IsMouseButtonPressed(button);
-
43  }
-
44 
-
48  static inline bool IsButtonDown(int button) {
-
49  return ::IsMouseButtonDown(button);
-
50  }
-
51 
-
55  static inline bool IsButtonReleased(int button) {
-
56  return ::IsMouseButtonReleased(button);
-
57  }
-
58 
-
59  static inline bool IsButtonUp(int button) {
-
60  return ::IsMouseButtonUp(button);
-
61  }
-
62 
-
63  static inline int GetX() {
-
64  return ::GetMouseX();
-
65  }
-
66 
-
67  static inline int GetY() {
-
68  return ::GetMouseY();
-
69  }
-
70 
-
71  static inline void SetX(int x) {
-
72  ::SetMousePosition(x, GetY());
-
73  }
-
74 
-
75  static inline void SetY(int y) {
-
76  ::SetMousePosition(GetX(), y);
-
77  }
-
78 
-
79  static inline Vector2 GetPosition() {
-
80  return ::GetMousePosition();
-
81  }
-
82 
-
83  static inline void SetPosition(int x, int y) {
-
84  ::SetMousePosition(x, y);
-
85  }
-
86 
-
87  static inline void SetOffset(int offsetX, int offsetY) {
-
88  ::SetMouseOffset(offsetX, offsetY);
-
89  }
-
90 
-
91  static inline void SetScale(float scaleX, float scaleY) {
-
92  ::SetMouseScale(scaleX, scaleY);
-
93  }
-
94 
-
95  static inline float GetWheelMove() {
-
96  return ::GetMouseWheelMove();
-
97  }
-
98 
-
99  static inline int GetCursor() {
-
100  return ::GetMouseCursor();
-
101  }
-
102 
-
103  static inline void SetCursor(int cursor) {
-
104  ::SetMouseCursor(cursor);
-
105  }
-
106 
-
107  static inline int GetTouchX() {
-
108  return ::GetTouchX();
-
109  }
-
110 
-
111  static inline int GetTouchY() {
-
112  return ::GetTouchY();
-
113  }
-
114 
-
115  static inline Vector2 GetTouchPosition(int index) {
-
116  return ::GetTouchPosition(index);
-
117  }
-
118 };
-
119 } // namespace raylib
-
120 
-
121 #endif // RAYLIB_CPP_INCLUDE_MOUSE_HPP_
+
1 #ifndef RAYLIB_CPP_INCLUDE_MOUSE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MOUSE_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./Vector2.hpp"
+
6 
+
7 namespace raylib {
+
11 class Mouse {
+
12  public:
+
16  static inline bool IsButtonPressed(int button) {
+
17  return ::IsMouseButtonPressed(button);
+
18  }
+
19 
+
23  static inline bool IsButtonDown(int button) {
+
24  return ::IsMouseButtonDown(button);
+
25  }
+
26 
+
30  static inline bool IsButtonReleased(int button) {
+
31  return ::IsMouseButtonReleased(button);
+
32  }
+
33 
+
34  static inline bool IsButtonUp(int button) {
+
35  return ::IsMouseButtonUp(button);
+
36  }
+
37 
+
38  static inline int GetX() {
+
39  return ::GetMouseX();
+
40  }
+
41 
+
42  static inline int GetY() {
+
43  return ::GetMouseY();
+
44  }
+
45 
+
46  static inline void SetX(int x) {
+
47  ::SetMousePosition(x, GetY());
+
48  }
+
49 
+
50  static inline void SetY(int y) {
+
51  ::SetMousePosition(GetX(), y);
+
52  }
+
53 
+
54  static inline Vector2 GetPosition() {
+
55  return ::GetMousePosition();
+
56  }
+
57 
+
58  static inline void SetPosition(int x, int y) {
+
59  ::SetMousePosition(x, y);
+
60  }
+
61 
+
62  static inline void SetOffset(int offsetX, int offsetY) {
+
63  ::SetMouseOffset(offsetX, offsetY);
+
64  }
+
65 
+
66  static inline void SetScale(float scaleX, float scaleY) {
+
67  ::SetMouseScale(scaleX, scaleY);
+
68  }
+
69 
+
70  static inline float GetWheelMove() {
+
71  return ::GetMouseWheelMove();
+
72  }
+
73 
+
74  static inline int GetCursor() {
+
75  return ::GetMouseCursor();
+
76  }
+
77 
+
78  static inline void SetCursor(int cursor) {
+
79  ::SetMouseCursor(cursor);
+
80  }
+
81 
+
82  static inline int GetTouchX() {
+
83  return ::GetTouchX();
+
84  }
+
85 
+
86  static inline int GetTouchY() {
+
87  return ::GetTouchY();
+
88  }
+
89 
+
90  static inline Vector2 GetTouchPosition(int index) {
+
91  return ::GetTouchPosition(index);
+
92  }
+
93 };
+
94 } // namespace raylib
+
95 
+
96 #endif // RAYLIB_CPP_INCLUDE_MOUSE_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Input-related functions: mouse.
Definition: Mouse.hpp:36
-
static void SetCursor(int cursor)
Definition: Mouse.hpp:103
-
static int GetX()
Definition: Mouse.hpp:63
-
static void SetOffset(int offsetX, int offsetY)
Definition: Mouse.hpp:87
-
static bool IsButtonDown(int button)
Detect if a mouse button is being pressed.
Definition: Mouse.hpp:48
-
static bool IsButtonPressed(int button)
Detect if a mouse button has been pressed once.
Definition: Mouse.hpp:41
-
static Vector2 GetTouchPosition(int index)
Definition: Mouse.hpp:115
-
static void SetScale(float scaleX, float scaleY)
Definition: Mouse.hpp:91
-
static Vector2 GetPosition()
Definition: Mouse.hpp:79
-
static int GetY()
Definition: Mouse.hpp:67
-
static int GetTouchX()
Definition: Mouse.hpp:107
-
Definition: Vector2.hpp:37
-
static int GetTouchY()
Definition: Mouse.hpp:111
-
static void SetX(int x)
Definition: Mouse.hpp:71
-
static float GetWheelMove()
Definition: Mouse.hpp:95
-
static bool IsButtonReleased(int button)
Detect if a mouse button has been released once.
Definition: Mouse.hpp:55
-
static bool IsButtonUp(int button)
Definition: Mouse.hpp:59
-
static void SetPosition(int x, int y)
Definition: Mouse.hpp:83
-
static int GetCursor()
Definition: Mouse.hpp:99
-
static void SetY(int y)
Definition: Mouse.hpp:75
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Input-related functions: mouse.
Definition: Mouse.hpp:11
+
static bool IsButtonDown(int button)
Detect if a mouse button is being pressed.
Definition: Mouse.hpp:23
+
static bool IsButtonPressed(int button)
Detect if a mouse button has been pressed once.
Definition: Mouse.hpp:16
+
static bool IsButtonReleased(int button)
Detect if a mouse button has been released once.
Definition: Mouse.hpp:30
diff --git a/docs/_music_8hpp_source.html b/docs/_music_8hpp_source.html index cf6e996..4df198d 100644 --- a/docs/_music_8hpp_source.html +++ b/docs/_music_8hpp_source.html @@ -71,149 +71,123 @@ $(function() {
Music.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_MUSIC_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_MUSIC_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
+
1 #ifndef RAYLIB_CPP_INCLUDE_MUSIC_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MUSIC_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 
+
9 namespace raylib {
+
13 class Music : public ::Music {
+
14  public:
+
15  Music(const ::Music& music) {
+
16  set(music);
+
17  }
+
18 
+
22  Music(const std::string& fileName) {
+
23  set(::LoadMusicStream(fileName.c_str()));
+
24  }
+
25 
+
29  ~Music() {
+
30  Unload();
+
31  }
32 
-
33 namespace raylib {
-
34 class Music : public ::Music {
-
35  public:
-
36  Music(const ::Music& music) {
-
37  set(music);
-
38  }
-
39 
-
43  Music(const std::string& fileName) {
-
44  set(::LoadMusicStream(fileName.c_str()));
-
45  }
-
46 
-
50  ~Music() {
-
51  Unload();
-
52  }
-
53 
-
54  GETTERSETTER(::AudioStream, Stream, stream)
-
55  GETTERSETTER(unsigned int, SampleCount, sampleCount)
-
56  GETTERSETTER(bool, Looping, looping)
-
57  GETTERSETTER(int, CtxType, ctxType)
-
58  GETTERSETTER(void*, CtxData, ctxData)
-
59 
-
60  Music& operator=(const ::Music& music) {
-
61  set(music);
-
62  return *this;
-
63  }
-
64 
-
68  inline void Unload() {
-
69  ::UnloadMusicStream(*this);
-
70  }
-
71 
-
75  inline Music& Play() {
-
76  ::PlayMusicStream(*this);
-
77  return *this;
-
78  }
-
79 
-
83  inline Music& Update() {
-
84  ::UpdateMusicStream(*this);
-
85  return *this;
-
86  }
-
87 
-
91  inline Music& Stop() {
-
92  ::StopMusicStream(*this);
-
93  return *this;
-
94  }
-
95 
-
99  inline Music& Pause() {
-
100  ::PauseMusicStream(*this);
-
101  return *this;
-
102  }
-
103 
-
107  inline Music& Resume() {
-
108  ::ResumeMusicStream(*this);
-
109  return *this;
-
110  }
-
111 
-
115  inline bool IsPlaying() const {
-
116  return ::IsMusicPlaying(*this);
-
117  }
-
118 
-
122  inline Music& SetVolume(float volume) {
-
123  ::SetMusicVolume(*this, volume);
-
124  return *this;
-
125  }
-
126 
-
130  inline Music& SetPitch(float pitch) {
-
131  ::SetMusicPitch(*this, pitch);
-
132  return *this;
-
133  }
-
134 
-
138  inline float GetTimeLength() const {
-
139  return ::GetMusicTimeLength(*this);
-
140  }
-
141 
-
145  inline float GetTimePlayed() const {
-
146  return ::GetMusicTimePlayed(*this);
-
147  }
-
148 
-
149  protected:
-
150  inline void set(const ::Music& music) {
-
151  ctxType = music.ctxType;
-
152  ctxData = music.ctxData;
-
153  looping = music.looping;
-
154  sampleCount = music.sampleCount;
-
155  stream = music.stream;
-
156  }
-
157 };
-
158 } // namespace raylib
-
159 
-
160 #endif // RAYLIB_CPP_INCLUDE_MUSIC_HPP_
+
33  GETTERSETTER(::AudioStream, Stream, stream)
+
34  GETTERSETTER(unsigned int, SampleCount, sampleCount)
+
35  GETTERSETTER(bool, Looping, looping)
+
36  GETTERSETTER(int, CtxType, ctxType)
+
37  GETTERSETTER(void*, CtxData, ctxData)
+
38 
+
39  Music& operator=(const ::Music& music) {
+
40  set(music);
+
41  return *this;
+
42  }
+
43 
+
47  inline void Unload() {
+
48  ::UnloadMusicStream(*this);
+
49  }
+
50 
+
54  inline Music& Play() {
+
55  ::PlayMusicStream(*this);
+
56  return *this;
+
57  }
+
58 
+
62  inline Music& Update() {
+
63  ::UpdateMusicStream(*this);
+
64  return *this;
+
65  }
+
66 
+
70  inline Music& Stop() {
+
71  ::StopMusicStream(*this);
+
72  return *this;
+
73  }
+
74 
+
78  inline Music& Pause() {
+
79  ::PauseMusicStream(*this);
+
80  return *this;
+
81  }
+
82 
+
86  inline Music& Resume() {
+
87  ::ResumeMusicStream(*this);
+
88  return *this;
+
89  }
+
90 
+
94  inline bool IsPlaying() const {
+
95  return ::IsMusicPlaying(*this);
+
96  }
+
97 
+
101  inline Music& SetVolume(float volume) {
+
102  ::SetMusicVolume(*this, volume);
+
103  return *this;
+
104  }
+
105 
+
109  inline Music& SetPitch(float pitch) {
+
110  ::SetMusicPitch(*this, pitch);
+
111  return *this;
+
112  }
+
113 
+
117  inline float GetTimeLength() const {
+
118  return ::GetMusicTimeLength(*this);
+
119  }
+
120 
+
124  inline float GetTimePlayed() const {
+
125  return ::GetMusicTimePlayed(*this);
+
126  }
+
127 
+
128  private:
+
129  inline void set(const ::Music& music) {
+
130  ctxType = music.ctxType;
+
131  ctxData = music.ctxData;
+
132  looping = music.looping;
+
133  sampleCount = music.sampleCount;
+
134  stream = music.stream;
+
135  }
+
136 };
+
137 } // namespace raylib
+
138 
+
139 #endif // RAYLIB_CPP_INCLUDE_MUSIC_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Music & SetPitch(float pitch)
Set pitch for music.
Definition: Music.hpp:130
-
Music & Stop()
Stop music playing.
Definition: Music.hpp:91
-
Music & SetVolume(float volume)
Set volume for music.
Definition: Music.hpp:122
-
Music & Resume()
Resume music playing.
Definition: Music.hpp:107
-
Music & Play()
Start music playing.
Definition: Music.hpp:75
-
Music & Pause()
Pause music playing.
Definition: Music.hpp:99
-
bool IsPlaying() const
Check if music is playing.
Definition: Music.hpp:115
-
void set(const ::Music &music)
Definition: Music.hpp:150
-
~Music()
Unload music stream.
Definition: Music.hpp:50
-
Music(const std::string &fileName)
Load music stream from file.
Definition: Music.hpp:43
-
void Unload()
Unload music stream.
Definition: Music.hpp:68
-
Definition: Music.hpp:34
-
AudioStream management functions.
Definition: AudioStream.hpp:35
-
Music(const ::Music &music)
Definition: Music.hpp:36
-
Music & Update()
Updates buffers for music streaming.
Definition: Music.hpp:83
-
float GetTimeLength() const
Get music time length (in seconds)
Definition: Music.hpp:138
-
float GetTimePlayed() const
Get current music time played (in seconds)
Definition: Music.hpp:145
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Music & SetPitch(float pitch)
Set pitch for music.
Definition: Music.hpp:109
+
Music & Stop()
Stop music playing.
Definition: Music.hpp:70
+
Music & SetVolume(float volume)
Set volume for music.
Definition: Music.hpp:101
+
Music & Resume()
Resume music playing.
Definition: Music.hpp:86
+
Music & Play()
Start music playing.
Definition: Music.hpp:54
+
Music & Pause()
Pause music playing.
Definition: Music.hpp:78
+
bool IsPlaying() const
Check if music is playing.
Definition: Music.hpp:94
+
~Music()
Unload music stream.
Definition: Music.hpp:29
+
Music(const std::string &fileName)
Load music stream from file.
Definition: Music.hpp:22
+
void Unload()
Unload music stream.
Definition: Music.hpp:47
+
Music stream type (audio file streaming from memory)
Definition: Music.hpp:13
+
AudioStream management functions.
Definition: AudioStream.hpp:11
+
Music & Update()
Updates buffers for music streaming.
Definition: Music.hpp:62
+
float GetTimeLength() const
Get music time length (in seconds)
Definition: Music.hpp:117
+
float GetTimePlayed() const
Get current music time played (in seconds)
Definition: Music.hpp:124
diff --git a/docs/_physics_8hpp_source.html b/docs/_physics_8hpp_source.html index b797cf7..d975869 100644 --- a/docs/_physics_8hpp_source.html +++ b/docs/_physics_8hpp_source.html @@ -71,191 +71,135 @@ $(function() {
Physics.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
+
1 #ifndef RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./physac.hpp"
+
6 #include "./Vector2.hpp"
+
7 
+
8 namespace raylib {
+
12 class Physics {
+
13  public:
+
14  Physics() {
+
15  Init();
+
16  }
+
17 
+
18  Physics(float gravityY) {
+
19  Init();
+
20  SetGravity(0, gravityY);
+
21  }
+
22 
+
23  Physics(float gravityX, float gravityY) {
+
24  Init();
+
25  SetGravity(gravityX, gravityY);
+
26  }
27 
-
28 #include "./raylib.hpp"
-
29 
-
30 #ifdef __cplusplus
-
31 extern "C" {
-
32 #endif
-
33 #include "physac.h" // NOLINT
-
34 #ifdef __cplusplus
-
35 }
-
36 #endif
-
37 
-
38 #include "./Vector2.hpp"
-
39 
-
40 namespace raylib {
-
41 class Physics {
-
42  public:
-
43  Physics() {
-
44  Init();
+
28  ~Physics() {
+
29  Close();
+
30  }
+
31 
+
32  inline Physics& Init() {
+
33  ::InitPhysics();
+
34  return *this;
+
35  }
+
36 
+
37  inline Physics& Close() {
+
38  ::ClosePhysics();
+
39  return *this;
+
40  }
+
41 
+
42  inline Physics& RunStep() {
+
43  ::RunPhysicsStep();
+
44  return *this;
45  }
46 
-
47  Physics(float gravityY) {
-
48  Init();
-
49  SetGravity(0, gravityY);
+
47  inline Physics& SetTimeStep(double delta) {
+
48  ::SetPhysicsTimeStep(delta);
+
49  return *this;
50  }
51 
-
52  Physics(float gravityX, float gravityY) {
-
53  Init();
-
54  SetGravity(gravityX, gravityY);
-
55  }
-
56 
- -
58  Close();
+
52  inline bool IsEnabled() const {
+
53  return ::IsPhysicsEnabled();
+
54  }
+
55 
+
56  inline Physics& SetGravity(float x, float y) {
+
57  ::SetPhysicsGravity(x, y);
+
58  return *this;
59  }
60 
-
61  inline Physics& Init() {
-
62  ::InitPhysics();
-
63  return *this;
-
64  }
-
65 
-
66  inline Physics& Close() {
-
67  ::ClosePhysics();
-
68  return *this;
-
69  }
-
70 
-
71  inline Physics& RunStep() {
-
72  ::RunPhysicsStep();
-
73  return *this;
-
74  }
-
75 
-
76  inline Physics& SetTimeStep(double delta) {
-
77  ::SetPhysicsTimeStep(delta);
-
78  return *this;
-
79  }
-
80 
-
81  inline bool IsEnabled() const {
-
82  return ::IsPhysicsEnabled();
-
83  }
-
84 
-
85  inline Physics& SetGravity(float x, float y) {
-
86  ::SetPhysicsGravity(x, y);
-
87  return *this;
-
88  }
-
89 
-
90  inline PhysicsBody CreateBodyCircle(Vector2 pos, float radius, float density) {
-
91  return ::CreatePhysicsBodyCircle(pos, radius, density);
-
92  }
-
93 
-
94  inline PhysicsBody CreateBodyRectangle(Vector2 pos, float width, float height, float density) {
-
95  return ::CreatePhysicsBodyRectangle(pos, width, height, density);
-
96  }
-
97 
-
98  inline PhysicsBody CreateBodyPolygon(Vector2 pos, float radius, int sides, float density) {
-
99  return ::CreatePhysicsBodyPolygon(pos, radius, sides, density);
-
100  }
-
101 
-
102  inline Physics& AddForce(PhysicsBody body, Vector2 force) {
-
103  ::PhysicsAddForce(body, force);
-
104  return *this;
-
105  }
-
106 
-
107  inline Physics& AddTorque(PhysicsBody body, float amount) {
-
108  ::PhysicsAddTorque(body, amount);
-
109  return *this;
-
110  }
-
111 
-
112  inline Physics& Shatter(PhysicsBody body, Vector2 position, float force) {
-
113  ::PhysicsShatter(body, position, force);
-
114  return *this;
-
115  }
-
116 
-
117  inline int GetBodiesCount() const {
-
118  return ::GetPhysicsBodiesCount();
-
119  }
-
120 
-
121  inline PhysicsBody GetBody(int index) const {
-
122  return ::GetPhysicsBody(index);
-
123  }
+
61  inline PhysicsBody CreateBodyCircle(Vector2 pos, float radius, float density) {
+
62  return ::CreatePhysicsBodyCircle(pos, radius, density);
+
63  }
+
64 
+
65  inline PhysicsBody CreateBodyRectangle(Vector2 pos, float width, float height, float density) {
+
66  return ::CreatePhysicsBodyRectangle(pos, width, height, density);
+
67  }
+
68 
+
69  inline PhysicsBody CreateBodyPolygon(Vector2 pos, float radius, int sides, float density) {
+
70  return ::CreatePhysicsBodyPolygon(pos, radius, sides, density);
+
71  }
+
72 
+
73  inline Physics& AddForce(PhysicsBody body, Vector2 force) {
+
74  ::PhysicsAddForce(body, force);
+
75  return *this;
+
76  }
+
77 
+
78  inline Physics& AddTorque(PhysicsBody body, float amount) {
+
79  ::PhysicsAddTorque(body, amount);
+
80  return *this;
+
81  }
+
82 
+
83  inline Physics& Shatter(PhysicsBody body, Vector2 position, float force) {
+
84  ::PhysicsShatter(body, position, force);
+
85  return *this;
+
86  }
+
87 
+
88  inline int GetBodiesCount() const {
+
89  return ::GetPhysicsBodiesCount();
+
90  }
+
91 
+
92  inline PhysicsBody GetBody(int index) const {
+
93  return ::GetPhysicsBody(index);
+
94  }
+
95 
+
96  inline int GetShapeType(int index) const {
+
97  return ::GetPhysicsShapeType(index);
+
98  }
+
99 
+
100  inline int GetShapeVerticesCount(int index) const {
+
101  return ::GetPhysicsShapeVerticesCount(index);
+
102  }
+
103 
+
104  inline Vector2 GetShapeVertex(PhysicsBody body, int vertex) const {
+
105  return ::GetPhysicsShapeVertex(body, vertex);
+
106  }
+
107 
+
108  inline Physics& SetBodyRotation(PhysicsBody body, float radians) {
+
109  ::SetPhysicsBodyRotation(body, radians);
+
110  return *this;
+
111  }
+
112 
+
113  inline Physics& DestroyBody(PhysicsBody body) {
+
114  ::DestroyPhysicsBody(body);
+
115  return *this;
+
116  }
+
117 
+
118  inline Physics& Reset() {
+
119  ::ResetPhysics();
+
120  return *this;
+
121  }
+
122 };
+
123 } // namespace raylib
124 
-
125  inline int GetShapeType(int index) const {
-
126  return ::GetPhysicsShapeType(index);
-
127  }
-
128 
-
129  inline int GetShapeVerticesCount(int index) const {
-
130  return ::GetPhysicsShapeVerticesCount(index);
-
131  }
-
132 
-
133  inline Vector2 GetShapeVertex(PhysicsBody body, int vertex) const {
-
134  return ::GetPhysicsShapeVertex(body, vertex);
-
135  }
-
136 
-
137  inline Physics& SetBodyRotation(PhysicsBody body, float radians) {
-
138  ::SetPhysicsBodyRotation(body, radians);
-
139  return *this;
-
140  }
-
141 
-
142  inline Physics& DestroyBody(PhysicsBody body) {
-
143  ::DestroyPhysicsBody(body);
-
144  return *this;
-
145  }
-
146 
-
147  inline Physics& Reset() {
-
148  ::ResetPhysics();
-
149  return *this;
-
150  }
-
151 };
-
152 } // namespace raylib
-
153 
-
154 #endif // RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
+
125 #endif // RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
PhysicsBody CreateBodyCircle(Vector2 pos, float radius, float density)
Definition: Physics.hpp:90
-
Physics & RunStep()
Definition: Physics.hpp:71
-
Physics & DestroyBody(PhysicsBody body)
Definition: Physics.hpp:142
-
Definition: Physics.hpp:41
-
Physics & SetBodyRotation(PhysicsBody body, float radians)
Definition: Physics.hpp:137
-
Physics()
Definition: Physics.hpp:43
-
PhysicsBody CreateBodyPolygon(Vector2 pos, float radius, int sides, float density)
Definition: Physics.hpp:98
-
Physics & SetGravity(float x, float y)
Definition: Physics.hpp:85
-
int GetShapeVerticesCount(int index) const
Definition: Physics.hpp:129
-
PhysicsBody GetBody(int index) const
Definition: Physics.hpp:121
-
~Physics()
Definition: Physics.hpp:57
-
PhysicsBody CreateBodyRectangle(Vector2 pos, float width, float height, float density)
Definition: Physics.hpp:94
-
Physics & Shatter(PhysicsBody body, Vector2 position, float force)
Definition: Physics.hpp:112
-
int GetShapeType(int index) const
Definition: Physics.hpp:125
-
Physics & Close()
Definition: Physics.hpp:66
-
Physics(float gravityX, float gravityY)
Definition: Physics.hpp:52
-
Physics & SetTimeStep(double delta)
Definition: Physics.hpp:76
-
Definition: Vector2.hpp:37
-
Physics(float gravityY)
Definition: Physics.hpp:47
-
Physics & AddForce(PhysicsBody body, Vector2 force)
Definition: Physics.hpp:102
-
int GetBodiesCount() const
Definition: Physics.hpp:117
-
Physics & Init()
Definition: Physics.hpp:61
-
Physics & Reset()
Definition: Physics.hpp:147
-
bool IsEnabled() const
Definition: Physics.hpp:81
-
Physics & AddTorque(PhysicsBody body, float amount)
Definition: Physics.hpp:107
-
Vector2 GetShapeVertex(PhysicsBody body, int vertex) const
Definition: Physics.hpp:133
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
2D Physics library for videogames
Definition: Physics.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:16
diff --git a/docs/_ray_8hpp_source.html b/docs/_ray_8hpp_source.html index a3c7087..6075e38 100644 --- a/docs/_ray_8hpp_source.html +++ b/docs/_ray_8hpp_source.html @@ -71,125 +71,94 @@ $(function() {
Ray.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_RAY_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_RAY_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 
-
30 #include "./raylib-cpp-utils.hpp"
+
1 #ifndef RAYLIB_CPP_INCLUDE_RAY_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RAY_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./RayHitInfo.hpp"
+
7 
+
8 namespace raylib {
+
12 class Ray : public ::Ray {
+
13  public:
+
14  Ray(const ::Ray& ray) {
+
15  set(ray);
+
16  }
+
17 
+
18  Ray(::Vector3 Position, ::Vector3 Direction) {
+
19  position = Position;
+
20  direction = Direction;
+
21  }
+
22 
+
23  Ray(::Vector2 mousePosition, ::Camera camera) {
+
24  set(::GetMouseRay(mousePosition, camera));
+
25  }
+
26 
+
27  Ray& operator=(const ::Ray& ray) {
+
28  set(ray);
+
29  return *this;
+
30  }
31 
-
32 #include "./RayHitInfo.hpp"
-
33 
-
34 namespace raylib {
-
38 class Ray : public ::Ray {
-
39  public:
-
40  Ray(const ::Ray& ray) {
-
41  set(ray);
-
42  }
-
43 
-
44  Ray(::Vector3 Position, ::Vector3 Direction) {
-
45  position = Position;
-
46  direction = Direction;
-
47  }
-
48 
-
49  Ray(::Vector2 mousePosition, ::Camera camera) {
-
50  set(GetMouseRay(mousePosition, camera));
-
51  }
-
52 
-
53  Ray& operator=(const ::Ray& ray) {
-
54  set(ray);
-
55  return *this;
+
32  GETTERSETTER(::Vector3, Position, position)
+
33  GETTERSETTER(::Vector3, Direction, direction)
+
34 
+
38  inline Ray& Draw(::Color color) {
+
39  DrawRay(*this, color);
+
40  return *this;
+
41  }
+
42 
+
46  inline bool CheckCollisionSphere(::Vector3 center, float radius) const {
+
47  return CheckCollisionRaySphere(*this, center, radius);
+
48  }
+
49 
+
53  inline bool CheckCollisionSphere(::Vector3 center, float radius,
+
54  ::Vector3 *collisionPoint) const {
+
55  return CheckCollisionRaySphereEx(*this, center, radius, collisionPoint);
56  }
57 
-
58  GETTERSETTER(::Vector3, Position, position)
-
59  GETTERSETTER(::Vector3, Direction, direction)
-
60 
-
64  inline Ray& Draw(::Color color) {
-
65  DrawRay(*this, color);
-
66  return *this;
-
67  }
-
68 
-
72  inline bool CheckCollisionSphere(::Vector3 center, float radius) const {
-
73  return CheckCollisionRaySphere(*this, center, radius);
-
74  }
-
75 
-
79  inline bool CheckCollisionSphere(::Vector3 center, float radius,
-
80  ::Vector3 *collisionPoint) const {
-
81  return CheckCollisionRaySphereEx(*this, center, radius, collisionPoint);
-
82  }
-
83 
-
87  inline bool CheckCollision(const ::BoundingBox& box) const {
-
88  return CheckCollisionRayBox(*this, box);
-
89  }
-
90 
-
94  inline RayHitInfo GetCollision(const ::Model& model) {
-
95  return GetCollisionRayModel(*this, model);
-
96  }
-
97 
- -
102  return GetCollisionRayTriangle(*this, p1, p2, p3);
-
103  }
-
104 
-
108  inline RayHitInfo GetCollisionGround(float groundHeight) {
-
109  return GetCollisionRayGround(*this, groundHeight);
-
110  }
-
111 
-
112  protected:
-
113  inline void set(const ::Ray& ray) {
-
114  position = ray.position;
-
115  direction = ray.direction;
-
116  }
-
117 };
-
118 } // namespace raylib
-
119 
-
120 #endif // RAYLIB_CPP_INCLUDE_RAY_HPP_
+
61  inline bool CheckCollision(const ::BoundingBox& box) const {
+
62  return CheckCollisionRayBox(*this, box);
+
63  }
+
64 
+
68  inline RayHitInfo GetCollision(const ::Model& model) const {
+
69  return GetCollisionRayModel(*this, model);
+
70  }
+
71 
+
75  inline RayHitInfo GetCollisionTriangle(::Vector3 p1, ::Vector3 p2, ::Vector3 p3) const {
+
76  return GetCollisionRayTriangle(*this, p1, p2, p3);
+
77  }
+
78 
+
82  inline RayHitInfo GetCollisionGround(float groundHeight) const {
+
83  return GetCollisionRayGround(*this, groundHeight);
+
84  }
+
85 
+
86  private:
+
87  inline void set(const ::Ray& ray) {
+
88  position = ray.position;
+
89  direction = ray.direction;
+
90  }
+
91 };
+
92 } // namespace raylib
+
93 
+
94 #endif // RAYLIB_CPP_INCLUDE_RAY_HPP_
-
Ray & Draw(::Color color)
Draw a ray line.
Definition: Ray.hpp:64
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
bool CheckCollision(const ::BoundingBox &box) const
Detect collision between ray and box.
Definition: Ray.hpp:87
-
Ray type (useful for raycast)
Definition: Ray.hpp:38
-
bool CheckCollisionSphere(::Vector3 center, float radius) const
Detect collision between ray and sphere.
Definition: Ray.hpp:72
-
Ray(::Vector3 Position, ::Vector3 Direction)
Definition: Ray.hpp:44
-
Definition: Vector3.hpp:37
-
Definition: Camera3D.hpp:33
-
Ray(::Vector2 mousePosition, ::Camera camera)
Definition: Ray.hpp:49
-
RayHitInfo GetCollisionTriangle(::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
Get collision info between ray and triangle.
Definition: Ray.hpp:101
-
RayHitInfo GetCollision(const ::Model &model)
Get collision info between ray and model.
Definition: Ray.hpp:94
-
Definition: Vector2.hpp:37
-
bool CheckCollisionSphere(::Vector3 center, float radius, ::Vector3 *collisionPoint) const
Detect collision between ray and sphere, returns collision point.
Definition: Ray.hpp:79
-
Definition: Color.hpp:35
-
RayHitInfo GetCollisionGround(float groundHeight)
Get collision info between ray and ground plane (Y-normal plane)
Definition: Ray.hpp:108
-
Raycast hit information.
Definition: RayHitInfo.hpp:35
-
Ray & operator=(const ::Ray &ray)
Definition: Ray.hpp:53
-
void set(const ::Ray &ray)
Definition: Ray.hpp:113
-
Ray(const ::Ray &ray)
Definition: Ray.hpp:40
+
Ray & Draw(::Color color)
Draw a ray line.
Definition: Ray.hpp:38
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
bool CheckCollision(const ::BoundingBox &box) const
Detect collision between ray and box.
Definition: Ray.hpp:61
+
RayHitInfo GetCollision(const ::Model &model) const
Get collision info between ray and model.
Definition: Ray.hpp:68
+
Ray type (useful for raycast)
Definition: Ray.hpp:12
+
bool CheckCollisionSphere(::Vector3 center, float radius) const
Detect collision between ray and sphere.
Definition: Ray.hpp:46
+
Vector3 type.
Definition: Vector3.hpp:16
+
Camera type, defines a camera position/orientation in 3d space.
Definition: Camera3D.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:16
+
RayHitInfo GetCollisionTriangle(::Vector3 p1, ::Vector3 p2, ::Vector3 p3) const
Get collision info between ray and triangle.
Definition: Ray.hpp:75
+
bool CheckCollisionSphere(::Vector3 center, float radius, ::Vector3 *collisionPoint) const
Detect collision between ray and sphere, returns collision point.
Definition: Ray.hpp:53
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Raycast hit information.
Definition: RayHitInfo.hpp:11
+
RayHitInfo GetCollisionGround(float groundHeight) const
Get collision info between ray and ground plane (Y-normal plane)
Definition: Ray.hpp:82
diff --git a/docs/_ray_hit_info_8hpp_source.html b/docs/_ray_hit_info_8hpp_source.html index bd25c0a..83faed5 100644 --- a/docs/_ray_hit_info_8hpp_source.html +++ b/docs/_ray_hit_info_8hpp_source.html @@ -71,97 +71,74 @@ $(function() {
RayHitInfo.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 #include "./raylib-cpp-utils.hpp"
+
1 #ifndef RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 
+
7 namespace raylib {
+
11 class RayHitInfo : public ::RayHitInfo {
+
12  public:
+
13  RayHitInfo(const ::RayHitInfo& ray) {
+
14  set(ray);
+
15  }
+
16 
+
17  RayHitInfo(bool Hit, float Distance, ::Vector3 Position, ::Vector3 Normal) {
+
18  hit = Hit;
+
19  distance = Distance;
+
20  position = Position;
+
21  normal = Normal;
+
22  }
+
23 
+
27  RayHitInfo(const ::Ray& ray, const ::Mesh& mesh, const ::Matrix& transform) {
+
28  set(::GetCollisionRayMesh(ray, mesh, transform));
+
29  }
30 
-
31 namespace raylib {
-
35 class RayHitInfo : public ::RayHitInfo {
-
36  public:
-
37  RayHitInfo(const ::RayHitInfo& ray) {
-
38  set(ray);
-
39  }
-
40 
-
41  RayHitInfo(bool Hit, float Distance, ::Vector3 Position, ::Vector3 Normal) {
-
42  hit = Hit;
-
43  distance = Distance;
-
44  position = Position;
-
45  normal = Normal;
-
46  }
-
47 
-
51  RayHitInfo(const ::Ray& ray, const ::Model& model) {
-
52  set(::GetCollisionRayModel(ray, model));
-
53  }
-
54 
-
58  RayHitInfo(const ::Ray& ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3) {
-
59  set(::GetCollisionRayTriangle(ray, p1, p2, p3));
-
60  }
+
34  RayHitInfo(const ::Ray& ray, const ::Model& model) {
+
35  set(::GetCollisionRayModel(ray, model));
+
36  }
+
37 
+
41  RayHitInfo(const ::Ray& ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3) {
+
42  set(::GetCollisionRayTriangle(ray, p1, p2, p3));
+
43  }
+
44 
+
48  RayHitInfo(const ::Ray& ray, float groundHeight) {
+
49  set(::GetCollisionRayGround(ray, groundHeight));
+
50  }
+
51 
+
52  RayHitInfo& operator=(const ::RayHitInfo& ray) {
+
53  set(ray);
+
54  return *this;
+
55  }
+
56 
+
57  GETTERSETTER(bool, Hit, hit)
+
58  GETTERSETTER(float, Distance, distance)
+
59  GETTERSETTER(::Vector3, Position, position)
+
60  GETTERSETTER(::Vector3, Normal, normal)
61 
-
65  RayHitInfo(const ::Ray& ray, float groundHeight) {
-
66  set(::GetCollisionRayGround(ray, groundHeight));
-
67  }
-
68 
-
69  RayHitInfo& operator=(const ::RayHitInfo& ray) {
-
70  set(ray);
-
71  return *this;
-
72  }
-
73 
-
74  GETTERSETTER(bool, Hit, hit)
-
75  GETTERSETTER(float, Distance, distance)
-
76  GETTERSETTER(::Vector3, Position, position)
-
77  GETTERSETTER(::Vector3, Normal, normal)
-
78 
-
79  protected:
-
80  inline void set(const ::RayHitInfo& ray) {
-
81  hit = ray.hit;
-
82  distance = ray.distance;
-
83  position = ray.position;
-
84  normal = ray.normal;
-
85  }
-
86 };
-
87 } // namespace raylib
-
88 
-
89 #endif // RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
+
62  private:
+
63  inline void set(const ::RayHitInfo& ray) {
+
64  hit = ray.hit;
+
65  distance = ray.distance;
+
66  position = ray.position;
+
67  normal = ray.normal;
+
68  }
+
69 };
+
70 } // namespace raylib
+
71 
+
72 #endif // RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
RayHitInfo(const ::RayHitInfo &ray)
Definition: RayHitInfo.hpp:37
-
RayHitInfo(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
Get collision info between ray and triangle.
Definition: RayHitInfo.hpp:58
-
Definition: Vector3.hpp:37
-
void set(const ::RayHitInfo &ray)
Definition: RayHitInfo.hpp:80
-
RayHitInfo & operator=(const ::RayHitInfo &ray)
Definition: RayHitInfo.hpp:69
-
RayHitInfo(const ::Ray &ray, float groundHeight)
Get collision info between ray and ground plane (Y-normal plane)
Definition: RayHitInfo.hpp:65
-
Raycast hit information.
Definition: RayHitInfo.hpp:35
-
RayHitInfo(const ::Ray &ray, const ::Model &model)
Get collision info between ray and model.
Definition: RayHitInfo.hpp:51
-
RayHitInfo(bool Hit, float Distance, ::Vector3 Position, ::Vector3 Normal)
Definition: RayHitInfo.hpp:41
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
RayHitInfo(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
Get collision info between ray and triangle.
Definition: RayHitInfo.hpp:41
+
Vector3 type.
Definition: Vector3.hpp:16
+
RayHitInfo(const ::Ray &ray, float groundHeight)
Get collision info between ray and ground plane (Y-normal plane)
Definition: RayHitInfo.hpp:48
+
RayHitInfo(const ::Ray &ray, const ::Mesh &mesh, const ::Matrix &transform)
Get collision info between ray and mesh.
Definition: RayHitInfo.hpp:27
+
Raycast hit information.
Definition: RayHitInfo.hpp:11
+
RayHitInfo(const ::Ray &ray, const ::Model &model)
Get collision info between ray and model.
Definition: RayHitInfo.hpp:34
diff --git a/docs/_rectangle_8hpp_source.html b/docs/_rectangle_8hpp_source.html index b15dd7a..2a7b0a8 100644 --- a/docs/_rectangle_8hpp_source.html +++ b/docs/_rectangle_8hpp_source.html @@ -71,214 +71,166 @@ $(function() {
Rectangle.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
+
1 #ifndef RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./Vector2.hpp"
+
7 
+
8 namespace raylib {
+
12 class Rectangle : public ::Rectangle {
+
13  public:
+
14  Rectangle(const ::Rectangle& vec) {
+
15  set(vec);
+
16  }
+
17 
+
18  Rectangle(float x, float y, float width, float height) : ::Rectangle{x, y, width, height} {}
+
19  Rectangle(float x, float y, float width) : ::Rectangle{x, y, width, 0} {}
+
20  Rectangle(float x, float y) : ::Rectangle{x, y, 0, 0} {}
+
21  Rectangle(float x) : ::Rectangle{x, 0, 0, 0} {}
+
22  Rectangle() : ::Rectangle{0, 0, 0, 0} {}
+
23 
+
24  Rectangle(::Vector2 position, ::Vector2 size)
+
25  : ::Rectangle{position.x, position.y, size.x, size.y} {}
+
26  Rectangle(::Vector2 size) : ::Rectangle{0, 0, size.x, size.y} {}
27 
-
28 #include "./raylib.hpp"
-
29 #include "./raylib-cpp-utils.hpp"
-
30 #include "./Vector2.hpp"
-
31 
-
32 namespace raylib {
-
33 class Rectangle : public ::Rectangle {
-
34  public:
-
35  Rectangle(const ::Rectangle& vec) {
-
36  set(vec);
-
37  }
-
38 
-
39  Rectangle(float x, float y, float width, float height) : ::Rectangle{x, y, width, height} {}
-
40  Rectangle(float x, float y, float width) : ::Rectangle{x, y, width, 0} {}
-
41  Rectangle(float x, float y) : ::Rectangle{x, y, 0, 0} {}
-
42  Rectangle(float x) : ::Rectangle{x, 0, 0, 0} {}
-
43  Rectangle() : ::Rectangle{0, 0, 0, 0} {}
-
44 
-
45  Rectangle(::Vector2 position, ::Vector2 size)
-
46  : ::Rectangle{position.x, position.y, size.x, size.y} {}
-
47  Rectangle(::Vector2 size) : ::Rectangle{0, 0, size.x, size.y} {}
-
48 
-
49  GETTERSETTER(float, X, x)
-
50  GETTERSETTER(float, Y, y)
-
51  GETTERSETTER(float, Width, width)
-
52  GETTERSETTER(float, Height, height)
-
53 
-
54  Rectangle& operator=(const ::Rectangle& rect) {
-
55  set(rect);
-
56  return *this;
-
57  }
-
58 
-
59  inline ::Vector4 ToVector4() {
-
60  return {x, y, width, height};
-
61  }
-
62 
-
63  operator ::Vector4() const {
-
64  return {x, y, width, height};
-
65  }
-
66 
-
70  inline Rectangle& Draw(::Color color) {
-
71  ::DrawRectangle(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
-
72  static_cast<int>(height), color);
-
73  return *this;
-
74  }
-
75 
-
76  inline Rectangle& Draw(::Vector2 origin, float rotation, ::Color color) {
-
77  ::DrawRectanglePro(*this, origin, rotation, color);
-
78  return *this;
-
79  }
-
80 
-
81  inline Rectangle& DrawGradientV(::Color color1, ::Color color2) {
-
82  ::DrawRectangleGradientV(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
-
83  static_cast<int>(height), color1, color2);
-
84  return *this;
-
85  }
-
86 
-
87  inline Rectangle& DrawGradientH(::Color color1, ::Color color2) {
-
88  ::DrawRectangleGradientH(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
-
89  static_cast<int>(height), color1, color2);
+
28  GETTERSETTER(float, X, x)
+
29  GETTERSETTER(float, Y, y)
+
30  GETTERSETTER(float, Width, width)
+
31  GETTERSETTER(float, Height, height)
+
32 
+
33  Rectangle& operator=(const ::Rectangle& rect) {
+
34  set(rect);
+
35  return *this;
+
36  }
+
37 
+
38  inline ::Vector4 ToVector4() {
+
39  return {x, y, width, height};
+
40  }
+
41 
+
42  operator ::Vector4() const {
+
43  return {x, y, width, height};
+
44  }
+
45 
+
49  inline Rectangle& Draw(::Color color) {
+
50  ::DrawRectangle(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
+
51  static_cast<int>(height), color);
+
52  return *this;
+
53  }
+
54 
+
55  inline Rectangle& Draw(::Vector2 origin, float rotation, ::Color color) {
+
56  ::DrawRectanglePro(*this, origin, rotation, color);
+
57  return *this;
+
58  }
+
59 
+
60  inline Rectangle& DrawGradientV(::Color color1, ::Color color2) {
+
61  ::DrawRectangleGradientV(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
+
62  static_cast<int>(height), color1, color2);
+
63  return *this;
+
64  }
+
65 
+
66  inline Rectangle& DrawGradientH(::Color color1, ::Color color2) {
+
67  ::DrawRectangleGradientH(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
+
68  static_cast<int>(height), color1, color2);
+
69  return *this;
+
70  }
+
71 
+
72  inline Rectangle& DrawGradient(::Color col1, ::Color col2, ::Color col3, ::Color col4) {
+
73  ::DrawRectangleGradientEx(*this, col1, col2, col3, col4);
+
74  return *this;
+
75  }
+
76 
+
77  inline Rectangle& DrawLines(::Color color) {
+
78  ::DrawRectangleLines(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
+
79  static_cast<int>(height), color);
+
80  return *this;
+
81  }
+
82 
+
83  inline Rectangle& DrawLines(::Color color, int lineThick) {
+
84  ::DrawRectangleLinesEx(*this, lineThick, color);
+
85  return *this;
+
86  }
+
87 
+
88  inline Rectangle& DrawRounded(float roundness, int segments, ::Color color) {
+
89  ::DrawRectangleRounded(*this, roundness, segments, color);
90  return *this;
91  }
92 
-
93  inline Rectangle& DrawGradient(::Color col1, ::Color col2, ::Color col3, ::Color col4) {
-
94  ::DrawRectangleGradientEx(*this, col1, col2, col3, col4);
-
95  return *this;
-
96  }
-
97 
-
98  inline Rectangle& DrawLines(::Color color) {
-
99  ::DrawRectangleLines(static_cast<int>(x), static_cast<int>(y), static_cast<int>(width),
-
100  static_cast<int>(height), color);
-
101  return *this;
-
102  }
-
103 
-
104  inline Rectangle& DrawLines(::Color color, int lineThick) {
-
105  ::DrawRectangleLinesEx(*this, lineThick, color);
-
106  return *this;
-
107  }
-
108 
-
109  inline Rectangle& DrawRounded(float roundness, int segments, ::Color color) {
-
110  ::DrawRectangleRounded(*this, roundness, segments, color);
-
111  return *this;
-
112  }
-
113 
-
114  inline Rectangle& DrawRoundedLines(float roundness, int segments, int lineThick,
-
115  ::Color color) {
-
116  ::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color);
-
117  return *this;
+
93  inline Rectangle& DrawRoundedLines(float roundness, int segments, int lineThick,
+
94  ::Color color) {
+
95  ::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color);
+
96  return *this;
+
97  }
+
98 
+
102  inline bool CheckCollision(::Rectangle rec2) const {
+
103  return ::CheckCollisionRecs(*this, rec2);
+
104  }
+
105 
+
109  inline ::Rectangle GetCollision(::Rectangle rec2) const {
+
110  return ::GetCollisionRec(*this, rec2);
+
111  }
+
112 
+
116  inline bool CheckCollision(::Vector2 point) const {
+
117  return ::CheckCollisionPointRec(point, *this);
118  }
119 
-
123  inline bool CheckCollision(::Rectangle rec2) const {
-
124  return ::CheckCollisionRecs(*this, rec2);
+
123  inline bool CheckCollision(::Vector2 center, float radius) {
+
124  return ::CheckCollisionCircleRec(center, radius, *this);
125  }
126 
-
130  inline ::Rectangle GetCollision(::Rectangle rec2) const {
-
131  return ::GetCollisionRec(*this, rec2);
-
132  }
-
133 
-
137  inline bool CheckCollision(::Vector2 point) const {
-
138  return ::CheckCollisionPointRec(point, *this);
+
127  inline ::Vector2 GetSize() {
+
128  return {width, height};
+
129  }
+
130 
+
131  inline Rectangle& SetSize(float newWidth, float newHeight) {
+
132  width = newWidth;
+
133  height = newHeight;
+
134  return *this;
+
135  }
+
136 
+
137  inline Rectangle& SetSize(const ::Vector2& size) {
+
138  return SetSize(size.x, size.y);
139  }
140 
-
144  inline bool CheckCollision(::Vector2 center, float radius) {
-
145  return ::CheckCollisionCircleRec(center, radius, *this);
-
146  }
-
147 
-
148  inline ::Vector2 GetSize() {
-
149  return {width, height};
-
150  }
-
151 
-
152  inline Rectangle& SetSize(float newWidth, float newHeight) {
-
153  width = newWidth;
-
154  height = newHeight;
-
155  return *this;
-
156  }
-
157 
-
158  inline Rectangle& SetSize(const ::Vector2& size) {
-
159  return SetSize(size.x, size.y);
-
160  }
-
161 
-
162  inline ::Vector2 GetPosition() {
-
163  return {x, y};
-
164  }
-
165 
-
166  inline Rectangle& SetPosition(float newX, float newY) {
-
167  x = newX;
-
168  y = newY;
-
169  return *this;
-
170  }
-
171 
-
172  inline Rectangle& SetPosition(const ::Vector2& position) {
-
173  return SetPosition(position.x, position.y);
-
174  }
-
175 
-
176  protected:
-
177  inline void set(const ::Rectangle& rect) {
-
178  x = rect.x;
-
179  y = rect.y;
-
180  width = rect.width;
-
181  height = rect.height;
-
182  }
-
183 };
-
184 } // namespace raylib
-
185 
-
186 #endif // RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
+
141  inline ::Vector2 GetPosition() {
+
142  return {x, y};
+
143  }
+
144 
+
145  inline Rectangle& SetPosition(float newX, float newY) {
+
146  x = newX;
+
147  y = newY;
+
148  return *this;
+
149  }
+
150 
+
151  inline Rectangle& SetPosition(const ::Vector2& position) {
+
152  return SetPosition(position.x, position.y);
+
153  }
+
154 
+
155  private:
+
156  inline void set(const ::Rectangle& rect) {
+
157  x = rect.x;
+
158  y = rect.y;
+
159  width = rect.width;
+
160  height = rect.height;
+
161  }
+
162 };
+
163 } // namespace raylib
+
164 
+
165 #endif // RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
-
inline ::Vector2 GetPosition()
Definition: Rectangle.hpp:162
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Rectangle & SetSize(float newWidth, float newHeight)
Definition: Rectangle.hpp:152
-
Rectangle(float x)
Definition: Rectangle.hpp:42
-
Rectangle & DrawRounded(float roundness, int segments, ::Color color)
Definition: Rectangle.hpp:109
-
Rectangle & DrawGradientH(::Color color1, ::Color color2)
Definition: Rectangle.hpp:87
-
Rectangle(::Vector2 size)
Definition: Rectangle.hpp:47
-
Rectangle & Draw(::Vector2 origin, float rotation, ::Color color)
Definition: Rectangle.hpp:76
-
inline ::Vector2 GetSize()
Definition: Rectangle.hpp:148
-
Rectangle(::Vector2 position, ::Vector2 size)
Definition: Rectangle.hpp:45
-
Rectangle & SetPosition(const ::Vector2 &position)
Definition: Rectangle.hpp:172
-
Rectangle & DrawGradientV(::Color color1, ::Color color2)
Definition: Rectangle.hpp:81
-
Rectangle & DrawLines(::Color color)
Definition: Rectangle.hpp:98
-
bool CheckCollision(::Vector2 point) const
Check if point is inside rectangle.
Definition: Rectangle.hpp:137
-
inline ::Vector4 ToVector4()
Definition: Rectangle.hpp:59
-
bool CheckCollision(::Vector2 center, float radius)
Check collision between circle and rectangle.
Definition: Rectangle.hpp:144
-
Rectangle(const ::Rectangle &vec)
Definition: Rectangle.hpp:35
-
Definition: Rectangle.hpp:33
-
Definition: Vector2.hpp:37
-
Definition: Color.hpp:35
-
Rectangle(float x, float y, float width)
Definition: Rectangle.hpp:40
-
inline ::Rectangle GetCollision(::Rectangle rec2) const
Get collision rectangle for two rectangles collision.
Definition: Rectangle.hpp:130
-
Rectangle & SetSize(const ::Vector2 &size)
Definition: Rectangle.hpp:158
-
Rectangle & SetPosition(float newX, float newY)
Definition: Rectangle.hpp:166
-
Rectangle(float x, float y)
Definition: Rectangle.hpp:41
-
Rectangle(float x, float y, float width, float height)
Definition: Rectangle.hpp:39
-
Rectangle & DrawGradient(::Color col1, ::Color col2, ::Color col3, ::Color col4)
Definition: Rectangle.hpp:93
-
bool CheckCollision(::Rectangle rec2) const
Check collision between two rectangles.
Definition: Rectangle.hpp:123
-
Rectangle()
Definition: Rectangle.hpp:43
-
Rectangle & DrawLines(::Color color, int lineThick)
Definition: Rectangle.hpp:104
-
void set(const ::Rectangle &rect)
Definition: Rectangle.hpp:177
-
Rectangle & Draw(::Color color)
Draw a color-filled rectangle.
Definition: Rectangle.hpp:70
-
Rectangle & DrawRoundedLines(float roundness, int segments, int lineThick, ::Color color)
Definition: Rectangle.hpp:114
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
bool CheckCollision(::Vector2 point) const
Check if point is inside rectangle.
Definition: Rectangle.hpp:116
+
bool CheckCollision(::Vector2 center, float radius)
Check collision between circle and rectangle.
Definition: Rectangle.hpp:123
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:16
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
inline ::Rectangle GetCollision(::Rectangle rec2) const
Get collision rectangle for two rectangles collision.
Definition: Rectangle.hpp:109
+
bool CheckCollision(::Rectangle rec2) const
Check collision between two rectangles.
Definition: Rectangle.hpp:102
+
Rectangle & Draw(::Color color)
Draw a color-filled rectangle.
Definition: Rectangle.hpp:49
diff --git a/docs/_render_texture_8hpp_source.html b/docs/_render_texture_8hpp_source.html index eecbecb..1cbce85 100644 --- a/docs/_render_texture_8hpp_source.html +++ b/docs/_render_texture_8hpp_source.html @@ -71,105 +71,74 @@ $(function() {
RenderTexture.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
+
1 #ifndef RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 
+
7 namespace raylib {
+ +
12  public:
+
13  RenderTexture(const ::RenderTexture& renderTexture) {
+
14  set(renderTexture);
+
15  }
+
16 
+
17  RenderTexture(unsigned int Id) {
+
18  id = Id;
+
19  }
+
20 
+
21  RenderTexture(int width, int height) {
+
22  set(LoadRenderTexture(width, height));
+
23  }
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 #include "./raylib-cpp-utils.hpp"
-
30 
-
31 namespace raylib {
- -
33  public:
-
34  RenderTexture(const ::RenderTexture& renderTexture) {
-
35  set(renderTexture);
+
25  GETTERSETTER(unsigned int, Id, id)
+
26  GETTERSETTER(::Texture2D, Texture, texture)
+
27  GETTERSETTER(::Texture2D, Depth, depth)
+
28 
+
29  RenderTexture& operator=(const ::RenderTexture& texture) {
+
30  set(texture);
+
31  return *this;
+
32  }
+
33 
+
34  ~RenderTexture() {
+
35  Unload();
36  }
37 
-
38  RenderTexture(unsigned int Id) {
-
39  id = Id;
+
38  inline void Unload() {
+
39  UnloadRenderTexture(*this);
40  }
41 
-
42  RenderTexture(int width, int height) {
-
43  set(LoadRenderTexture(width, height));
-
44  }
-
45 
-
46  GETTERSETTER(unsigned int, Id, id)
-
47  GETTERSETTER(::Texture2D, Texture, texture)
-
48  GETTERSETTER(::Texture2D, Depth, depth)
+ +
46  ::BeginTextureMode(*this);
+
47  return *this;
+
48  }
49 
-
50  RenderTexture& operator=(const ::RenderTexture& texture) {
-
51  set(texture);
-
52  return *this;
-
53  }
-
54 
- -
56  Unload();
-
57  }
-
58 
-
59  inline void Unload() {
-
60  UnloadRenderTexture(*this);
-
61  }
-
62 
- -
67  ::BeginTextureMode(*this);
-
68  return *this;
-
69  }
-
70 
-
74  inline RenderTexture& EndMode() {
-
75  ::EndTextureMode();
-
76  return *this;
-
77  }
-
78 
-
79  protected:
-
80  inline void set(const ::RenderTexture& renderTexture) {
-
81  id = renderTexture.id;
-
82  texture = renderTexture.texture;
-
83  depth = renderTexture.depth;
-
84  }
-
85 };
- -
87 } // namespace raylib
-
88 
-
89 #endif // RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
+
53  inline RenderTexture& EndMode() {
+
54  ::EndTextureMode();
+
55  return *this;
+
56  }
+
57 
+
58  private:
+
59  inline void set(const ::RenderTexture& renderTexture) {
+
60  id = renderTexture.id;
+
61  texture = renderTexture.texture;
+
62  depth = renderTexture.depth;
+
63  }
+
64 };
+
65 typedef RenderTexture RenderTexture2D;
+
66 } // namespace raylib
+
67 
+
68 #endif // RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
~RenderTexture()
-
RenderTexture(int width, int height)
-
RenderTexture(unsigned int Id)
-
void Unload()
-
RenderTexture RenderTexture2D
-
-
RenderTexture & EndMode()
Ends drawing to render texture.
-
RenderTexture & BeginMode()
Initializes render texture for drawing.
-
void set(const ::RenderTexture &renderTexture)
-
Definition: Texture.hpp:36
-
RenderTexture(const ::RenderTexture &renderTexture)
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
RenderTexture type, for texture rendering.
+
RenderTexture & EndMode()
Ends drawing to render texture.
+
RenderTexture & BeginMode()
Initializes render texture for drawing.
+
Texture type.
Definition: Texture.hpp:15
diff --git a/docs/_shader_8hpp_source.html b/docs/_shader_8hpp_source.html index 26d595d..7775a8f 100644 --- a/docs/_shader_8hpp_source.html +++ b/docs/_shader_8hpp_source.html @@ -71,174 +71,139 @@ $(function() {
Shader.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
+
1 #ifndef RAYLIB_CPP_INCLUDE_SHADER_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_SHADER_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "Texture.hpp"
+
9 
+
10 namespace raylib {
+
14 class Shader : public ::Shader {
+
15  public:
+
16  Shader(const ::Shader& shader) {
+
17  set(shader);
+
18  }
+
19 
+
20  Shader(unsigned int Id, int* Locs) {
+
21  id = Id;
+
22  locs = Locs;
+
23  }
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_SHADER_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_SHADER_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
-
32 #include "Texture.hpp"
-
33 
-
34 namespace raylib {
-
35 class Shader : public ::Shader {
-
36  public:
-
37  Shader(const ::Shader& shader) {
-
38  set(shader);
-
39  }
-
40 
-
41  Shader(unsigned int Id, int* Locs) {
-
42  id = Id;
-
43  locs = Locs;
-
44  }
-
45 
-
46  Shader() {
-
47  set(GetShaderDefault());
-
48  }
+
25  Shader() {
+
26  set(GetShaderDefault());
+
27  }
+
28 
+
29  Shader(const std::string& vsFileName, const std::string& fsFileName) {
+
30  set(::LoadShader(vsFileName.c_str(), fsFileName.c_str()));
+
31  }
+
32 
+
36  static ::Shader Load(const std::string& vsFileName, const std::string& fsFileName) {
+
37  return ::LoadShader(vsFileName.c_str(), fsFileName.c_str());
+
38  }
+
39 
+
43  static ::Shader LoadCode(const std::string& vsCode, const std::string& fsCode) {
+
44  return ::LoadShaderCode(vsCode.c_str(), fsCode.c_str());
+
45  }
+
46 
+
47  GETTERSETTER(unsigned int, Id, id)
+
48  GETTERSETTER(int*, Locs, locs)
49 
-
50  Shader(const std::string& vsFileName, const std::string& fsFileName) {
-
51  set(::LoadShader(vsFileName.c_str(), fsFileName.c_str()));
-
52  }
-
53 
-
57  static ::Shader Load(const std::string& vsFileName, const std::string& fsFileName) {
-
58  return ::LoadShader(vsFileName.c_str(), fsFileName.c_str());
-
59  }
-
60 
-
64  static ::Shader LoadCode(const std::string& vsCode, const std::string& fsCode) {
-
65  return ::LoadShaderCode(vsCode.c_str(), fsCode.c_str());
-
66  }
-
67 
-
68  GETTERSETTER(unsigned int, Id, id)
-
69  GETTERSETTER(int*, Locs, locs)
+
50  Shader& operator=(const ::Shader& shader) {
+
51  set(shader);
+
52  return *this;
+
53  }
+
54 
+
55  ~Shader() {
+
56  Unload();
+
57  }
+
58 
+
59  void Unload() {
+
60  ::UnloadShader(*this);
+
61  }
+
62 
+
66  inline Shader& BeginMode() {
+
67  ::BeginShaderMode(*this);
+
68  return *this;
+
69  }
70 
-
71  Shader& operator=(const ::Shader& shader) {
-
72  set(shader);
-
73  return *this;
-
74  }
-
75 
-
76  ~Shader() {
-
77  Unload();
-
78  }
-
79 
-
80  void Unload() {
-
81  ::UnloadShader(*this);
-
82  }
-
83 
-
87  inline Shader& BeginMode() {
-
88  ::BeginShaderMode(*this);
-
89  return *this;
-
90  }
-
91 
-
95  inline Shader& EndMode() {
-
96  ::EndShaderMode();
-
97  return *this;
-
98  }
-
99 
-
103  inline int GetLocation(const std::string& uniformName) const {
-
104  return ::GetShaderLocation(*this, uniformName.c_str());
+
74  inline Shader& EndMode() {
+
75  ::EndShaderMode();
+
76  return *this;
+
77  }
+
78 
+
84  inline int GetLocation(const std::string& uniformName) const {
+
85  return ::GetShaderLocation(*this, uniformName.c_str());
+
86  }
+
87 
+
93  inline int GetLocationAttrib(const std::string& attribName) const {
+
94  return ::GetShaderLocationAttrib(*this, attribName.c_str());
+
95  }
+
96 
+
102  inline Shader& SetValue(int uniformLoc, const std::string& value, int uniformType) {
+
103  ::SetShaderValue(*this, uniformLoc, value.c_str(), uniformType);
+
104  return *this;
105  }
106 
-
110  inline int GetLocationAttrib(const std::string& attribName) const {
-
111  return ::GetShaderLocationAttrib(*this, attribName.c_str());
-
112  }
-
113 
-
119  inline Shader& SetValue(int uniformLoc, const std::string& value, int uniformType) {
-
120  ::SetShaderValue(*this, uniformLoc, value.c_str(), uniformType);
-
121  return *this;
-
122  }
-
123 
-
129  inline Shader& SetValue(int uniformLoc, const std::string& value, int uniformType, int count) {
-
130  ::SetShaderValueV(*this, uniformLoc, value.c_str(), uniformType, count);
-
131  return *this;
-
132  }
-
133 
-
139  inline Shader& SetValue(int uniformLoc, const ::Matrix& mat) {
-
140  ::SetShaderValueMatrix(*this, uniformLoc, mat);
-
141  return *this;
-
142  }
-
143 
-
149  inline Shader& SetValue(int uniformLoc, const ::Texture2D& texture) {
-
150  ::SetShaderValueTexture(*this, uniformLoc, texture);
-
151  return *this;
-
152  }
-
153 
-
154  ::TextureCubemap GenTextureCubemap(const ::Texture2D& panorama, int size, int format) const {
-
155  return ::GenTextureCubemap(*this, panorama, size, format);
-
156  }
-
157 
-
158  ::TextureCubemap GenTextureIrradiance(const ::Texture2D& panorama, int size) const {
-
159  return ::GenTextureIrradiance(*this, panorama, size);
-
160  }
-
161 
-
162  ::TextureCubemap GenTexturePrefilter(const ::Texture2D& panorama, int size) const {
-
163  return ::GenTexturePrefilter(*this, panorama, size);
-
164  }
-
165 
-
166  ::Texture2D GenTextureBRDF(int size) const {
-
167  return ::GenTextureBRDF(*this, size);
-
168  }
-
169 
-
170  protected:
-
171  inline void set(const ::Shader& shader) {
-
172  id = shader.id;
-
173  locs = shader.locs;
-
174  }
-
175 };
-
176 } // namespace raylib
-
177 
-
178 #endif // RAYLIB_CPP_INCLUDE_SHADER_HPP_
+
112  inline Shader& SetValue(int uniformLoc, const std::string& value, int uniformType, int count) {
+
113  ::SetShaderValueV(*this, uniformLoc, value.c_str(), uniformType, count);
+
114  return *this;
+
115  }
+
116 
+
122  inline Shader& SetValue(int uniformLoc, const ::Matrix& mat) {
+
123  ::SetShaderValueMatrix(*this, uniformLoc, mat);
+
124  return *this;
+
125  }
+
126 
+
132  inline Shader& SetValue(int uniformLoc, const ::Texture2D& texture) {
+
133  ::SetShaderValueTexture(*this, uniformLoc, texture);
+
134  return *this;
+
135  }
+
136 
+
137  ::TextureCubemap GenTextureCubemap(const ::Texture2D& panorama, int size, int format) const {
+
138  return ::GenTextureCubemap(*this, panorama, size, format);
+
139  }
+
140 
+
141  ::TextureCubemap GenTextureIrradiance(const ::Texture2D& panorama, int size) const {
+
142  return ::GenTextureIrradiance(*this, panorama, size);
+
143  }
+
144 
+
145  ::TextureCubemap GenTexturePrefilter(const ::Texture2D& panorama, int size) const {
+
146  return ::GenTexturePrefilter(*this, panorama, size);
+
147  }
+
148 
+
149  ::Texture2D GenTextureBRDF(int size) const {
+
150  return ::GenTextureBRDF(*this, size);
+
151  }
+
152 
+
153  private:
+
154  inline void set(const ::Shader& shader) {
+
155  id = shader.id;
+
156  locs = shader.locs;
+
157  }
+
158 };
+
159 } // namespace raylib
+
160 
+
161 #endif // RAYLIB_CPP_INCLUDE_SHADER_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Shader & SetValue(int uniformLoc, const std::string &value, int uniformType)
Set shader uniform value.
Definition: Shader.hpp:119
-
::TextureCubemap GenTextureCubemap(const ::Texture2D &panorama, int size, int format) const
Definition: Shader.hpp:154
-
~Shader()
Definition: Shader.hpp:76
-
Shader & SetValue(int uniformLoc, const ::Matrix &mat)
Set shader uniform value (matrix 4x4)
Definition: Shader.hpp:139
-
::TextureCubemap GenTexturePrefilter(const ::Texture2D &panorama, int size) const
Definition: Shader.hpp:162
-
int GetLocation(const std::string &uniformName) const
Get shader uniform location.
Definition: Shader.hpp:103
-
Shader()
Definition: Shader.hpp:46
-
Shader & SetValue(int uniformLoc, const std::string &value, int uniformType, int count)
Set shader uniform value vector.
Definition: Shader.hpp:129
-
::TextureCubemap GenTextureIrradiance(const ::Texture2D &panorama, int size) const
Definition: Shader.hpp:158
-
Shader & EndMode()
End custom shader drawing (use default shader).
Definition: Shader.hpp:95
-
Definition: Shader.hpp:35
-
Shader & BeginMode()
Begin custom shader drawing.
Definition: Shader.hpp:87
-
Shader(unsigned int Id, int *Locs)
Definition: Shader.hpp:41
-
void set(const ::Shader &shader)
Definition: Shader.hpp:171
-
Shader(const std::string &vsFileName, const std::string &fsFileName)
Definition: Shader.hpp:50
-
void Unload()
Definition: Shader.hpp:80
-
int GetLocationAttrib(const std::string &attribName) const
Get shader attribute location.
Definition: Shader.hpp:110
-
::Shader LoadCode(const std::string &vsCode, const std::string &fsCode)
Load shader from code strings and bind default locations.
Definition: Shader.hpp:64
-
Definition: Texture.hpp:36
-
::Texture2D GenTextureBRDF(int size) const
Definition: Shader.hpp:166
-
Shader(const ::Shader &shader)
Definition: Shader.hpp:37
-
::Shader Load(const std::string &vsFileName, const std::string &fsFileName)
Load shader from files and bind default locations.
Definition: Shader.hpp:57
-
Shader & SetValue(int uniformLoc, const ::Texture2D &texture)
Set shader uniform value for texture.
Definition: Shader.hpp:149
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Shader & SetValue(int uniformLoc, const std::string &value, int uniformType)
Set shader uniform value.
Definition: Shader.hpp:102
+
Shader & SetValue(int uniformLoc, const ::Matrix &mat)
Set shader uniform value (matrix 4x4)
Definition: Shader.hpp:122
+
int GetLocation(const std::string &uniformName) const
Get shader uniform location.
Definition: Shader.hpp:84
+
Shader & SetValue(int uniformLoc, const std::string &value, int uniformType, int count)
Set shader uniform value vector.
Definition: Shader.hpp:112
+
Shader & EndMode()
End custom shader drawing (use default shader).
Definition: Shader.hpp:74
+
Shader type (generic)
Definition: Shader.hpp:14
+
Shader & BeginMode()
Begin custom shader drawing.
Definition: Shader.hpp:66
+
int GetLocationAttrib(const std::string &attribName) const
Get shader attribute location.
Definition: Shader.hpp:93
+
::Shader LoadCode(const std::string &vsCode, const std::string &fsCode)
Load shader from code strings and bind default locations.
Definition: Shader.hpp:43
+
Texture type.
Definition: Texture.hpp:15
+
::Shader Load(const std::string &vsFileName, const std::string &fsFileName)
Load shader from files and bind default locations.
Definition: Shader.hpp:36
+
Shader & SetValue(int uniformLoc, const ::Texture2D &texture)
Set shader uniform value for texture.
Definition: Shader.hpp:132
diff --git a/docs/_sound_8hpp_source.html b/docs/_sound_8hpp_source.html index 055a01c..870d6e2 100644 --- a/docs/_sound_8hpp_source.html +++ b/docs/_sound_8hpp_source.html @@ -71,150 +71,121 @@ $(function() {
Sound.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_SOUND_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_SOUND_HPP_
+
1 #ifndef RAYLIB_CPP_INCLUDE_SOUND_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_SOUND_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 
+
9 namespace raylib {
+
18 class Sound : public ::Sound {
+
19  public:
+
20  Sound(const ::Sound& vec) {
+
21  set(vec);
+
22  }
+
23 
+
24  Sound(const std::string& fileName) {
+
25  set(LoadSound(fileName.c_str()));
+
26  }
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
-
32 
-
33 namespace raylib {
-
37 class Sound : public ::Sound {
-
38  public:
-
39  Sound(const ::Sound& vec) {
-
40  set(vec);
-
41  }
-
42 
-
43  Sound(const std::string& fileName) {
-
44  set(LoadSound(fileName.c_str()));
-
45  }
-
46 
-
47  Sound(const ::Wave& wave) {
-
48  set(LoadSoundFromWave(wave));
-
49  }
-
50 
-
51  ~Sound() {
-
52  Unload();
-
53  }
-
54 
-
55  GETTERSETTER(unsigned int, SampleCount, sampleCount)
-
56  GETTERSETTER(::AudioStream, Stream, stream)
-
57 
-
58  Sound& operator=(const ::Sound& sound) {
-
59  set(sound);
-
60  return *this;
-
61  }
-
62 
-
66  inline Sound& Update(const void *data, int sampleCount) {
-
67  ::UpdateSound(*this, data, sampleCount);
-
68  return *this;
-
69  }
-
70 
-
74  inline void Unload() {
-
75  ::UnloadSound(*this);
-
76  }
-
77 
-
81  inline Sound& Play() {
-
82  ::PlaySound(*this);
-
83  return *this;
-
84  }
-
85 
-
89  inline Sound& Stop() {
-
90  ::StopSound(*this);
-
91  return *this;
-
92  }
-
93 
-
97  inline Sound& Pause() {
-
98  ::PauseSound(*this);
-
99  return *this;
-
100  }
-
101 
-
105  inline Sound& Resume() {
-
106  ::ResumeSound(*this);
-
107  return *this;
-
108  }
-
109 
-
113  inline Sound& PlayMulti() {
-
114  ::PlaySoundMulti(*this);
-
115  return *this;
-
116  }
-
117 
-
121  inline Sound& StopMulti() {
-
122  ::StopSoundMulti();
-
123  return *this;
-
124  }
-
125 
-
129  inline bool IsPlaying() const {
-
130  return ::IsSoundPlaying(*this);
-
131  }
-
132 
-
136  inline Sound& SetVolume(float volume) {
-
137  ::SetSoundVolume(*this, volume);
-
138  return *this;
-
139  }
-
140 
-
144  inline Sound& SetPitch(float pitch) {
-
145  ::SetSoundPitch(*this, pitch);
-
146  return *this;
-
147  }
-
148 
-
149  protected:
-
150  inline void set(const ::Sound& sound) {
-
151  sampleCount = sound.sampleCount;
-
152  stream = sound.stream;
-
153  }
-
154 };
-
155 } // namespace raylib
-
156 
-
157 #endif // RAYLIB_CPP_INCLUDE_SOUND_HPP_
+
28  Sound(const ::Wave& wave) {
+
29  set(LoadSoundFromWave(wave));
+
30  }
+
31 
+
32  ~Sound() {
+
33  Unload();
+
34  }
+
35 
+
36  GETTERSETTER(unsigned int, SampleCount, sampleCount)
+
37  GETTERSETTER(::AudioStream, Stream, stream)
+
38 
+
39  Sound& operator=(const ::Sound& sound) {
+
40  set(sound);
+
41  return *this;
+
42  }
+
43 
+
47  inline Sound& Update(const void *data, int sampleCount) {
+
48  ::UpdateSound(*this, data, sampleCount);
+
49  return *this;
+
50  }
+
51 
+
55  inline void Unload() {
+
56  ::UnloadSound(*this);
+
57  }
+
58 
+
62  inline Sound& Play() {
+
63  ::PlaySound(*this);
+
64  return *this;
+
65  }
+
66 
+
70  inline Sound& Stop() {
+
71  ::StopSound(*this);
+
72  return *this;
+
73  }
+
74 
+
78  inline Sound& Pause() {
+
79  ::PauseSound(*this);
+
80  return *this;
+
81  }
+
82 
+
86  inline Sound& Resume() {
+
87  ::ResumeSound(*this);
+
88  return *this;
+
89  }
+
90 
+
94  inline Sound& PlayMulti() {
+
95  ::PlaySoundMulti(*this);
+
96  return *this;
+
97  }
+
98 
+
102  inline Sound& StopMulti() {
+
103  ::StopSoundMulti();
+
104  return *this;
+
105  }
+
106 
+
110  inline bool IsPlaying() const {
+
111  return ::IsSoundPlaying(*this);
+
112  }
+
113 
+
117  inline Sound& SetVolume(float volume) {
+
118  ::SetSoundVolume(*this, volume);
+
119  return *this;
+
120  }
+
121 
+
125  inline Sound& SetPitch(float pitch) {
+
126  ::SetSoundPitch(*this, pitch);
+
127  return *this;
+
128  }
+
129 
+
130  private:
+
131  inline void set(const ::Sound& sound) {
+
132  sampleCount = sound.sampleCount;
+
133  stream = sound.stream;
+
134  }
+
135 };
+
136 } // namespace raylib
+
137 
+
138 #endif // RAYLIB_CPP_INCLUDE_SOUND_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
~Sound()
Definition: Sound.hpp:51
-
Sound & Update(const void *data, int sampleCount)
Update sound buffer with new data.
Definition: Sound.hpp:66
-
void set(const ::Sound &sound)
Definition: Sound.hpp:150
-
Sound & StopMulti()
Stop any sound playing (using multichannel buffer pool)
Definition: Sound.hpp:121
-
Sound & SetVolume(float volume)
Set volume for a sound (1.0 is max level)
Definition: Sound.hpp:136
-
Wave/Sound management functions.
Definition: Sound.hpp:37
-
Sound & Pause()
Pause a sound.
Definition: Sound.hpp:97
-
Sound & Resume()
Resume a paused sound.
Definition: Sound.hpp:105
-
Sound(const ::Sound &vec)
Definition: Sound.hpp:39
-
Sound & Stop()
Stop playing a sound.
Definition: Sound.hpp:89
-
bool IsPlaying() const
Check if a sound is currently playing.
Definition: Sound.hpp:129
-
void Unload()
Unload sound.
Definition: Sound.hpp:74
-
AudioStream management functions.
Definition: AudioStream.hpp:35
-
Sound(const ::Wave &wave)
Definition: Sound.hpp:47
-
Sound & SetPitch(float pitch)
Set pitch for a sound (1.0 is base level)
Definition: Sound.hpp:144
-
Sound & Play()
Play a sound.
Definition: Sound.hpp:81
-
Sound & PlayMulti()
Play a sound (using multichannel buffer pool)
Definition: Sound.hpp:113
-
Sound(const std::string &fileName)
Definition: Sound.hpp:43
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Sound & Update(const void *data, int sampleCount)
Update sound buffer with new data.
Definition: Sound.hpp:47
+
Sound & StopMulti()
Stop any sound playing (using multichannel buffer pool)
Definition: Sound.hpp:102
+
Sound & SetVolume(float volume)
Set volume for a sound (1.0 is max level)
Definition: Sound.hpp:117
+
Wave/Sound management functions.
Definition: Sound.hpp:18
+
Sound & Pause()
Pause a sound.
Definition: Sound.hpp:78
+
Sound & Resume()
Resume a paused sound.
Definition: Sound.hpp:86
+
Sound & Stop()
Stop playing a sound.
Definition: Sound.hpp:70
+
bool IsPlaying() const
Check if a sound is currently playing.
Definition: Sound.hpp:110
+
void Unload()
Unload sound.
Definition: Sound.hpp:55
+
AudioStream management functions.
Definition: AudioStream.hpp:11
+
Sound & SetPitch(float pitch)
Set pitch for a sound (1.0 is base level)
Definition: Sound.hpp:125
+
Sound & Play()
Play a sound.
Definition: Sound.hpp:62
+
Sound & PlayMulti()
Play a sound (using multichannel buffer pool)
Definition: Sound.hpp:94
diff --git a/docs/_text_8hpp_source.html b/docs/_text_8hpp_source.html new file mode 100644 index 0000000..27e89ec --- /dev/null +++ b/docs/_text_8hpp_source.html @@ -0,0 +1,128 @@ + + + + + + + +raylib-cpp: Text.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Text.hpp
+
+
+
1 
+
4 #ifndef RAYLIB_CPP_INCLUDE_TEXT_HPP_
+
5 #define RAYLIB_CPP_INCLUDE_TEXT_HPP_
+
6 
+
7 #include <string>
+
8 
+
9 #include "./raylib.hpp"
+
10 
+
14 #ifndef RLCPPAPI
+
15 #define RLCPPAPI static
+
16 #endif
+
17 
+
18 namespace raylib {
+
19 
+
23 RLCPPAPI inline void DrawText(
+
24  const std::string& title,
+
25  int posX,
+
26  int posY,
+
27  int fontSize,
+
28  ::Color color) {
+
29  ::DrawText(title.c_str(), posX, posY, fontSize, color);
+
30 }
+
31 
+
35 RLCPPAPI inline int MeasureText(const std::string& text, int fontSize) {
+
36  return ::MeasureText(text.c_str(), fontSize);
+
37 }
+
38 
+
42 RLCPPAPI inline bool TextIsEqual(const std::string& text1, const std::string& text2) {
+
43  return ::TextIsEqual(text1.c_str(), text2.c_str());
+
44 }
+
45 
+
49 RLCPPAPI inline unsigned int TextLength(const std::string& text) {
+
50  return ::TextLength(text.c_str());
+
51 }
+
52 
+
53 // TODO(RobLoach): Add remaining raylib C functions with string c_str() wrappers.
+
54 
+
55 } // namespace raylib
+
56 
+
57 #endif // RAYLIB_CPP_INCLUDE_TEXT_HPP_
+
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
static bool TextIsEqual(const std::string &text1, const std::string &text2)
Check if two text string are equal.
Definition: Text.hpp:42
+
static int MeasureText(const std::string &text, int fontSize)
Measure string width for default font.
Definition: Text.hpp:35
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
static void DrawText(const std::string &title, int posX, int posY, int fontSize, ::Color color)
Draw text (using default font)
Definition: Text.hpp:23
+
static unsigned int TextLength(const std::string &text)
Check if two text string are equal.
Definition: Text.hpp:49
+ + + + diff --git a/docs/_texture_8hpp_source.html b/docs/_texture_8hpp_source.html index c3646ae..021516f 100644 --- a/docs/_texture_8hpp_source.html +++ b/docs/_texture_8hpp_source.html @@ -71,258 +71,217 @@ $(function() {
Texture.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
+
1 #ifndef RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./Vector2.hpp"
+
9 #include "./Material.hpp"
+
10 
+
11 namespace raylib {
+
15 class Texture : public ::Texture {
+
16  public:
+
17  Texture(const ::Texture& texture) {
+
18  set(texture);
+
19  }
+
20 
+
21  Texture() {
+
22  set(::GetTextureDefault());
+
23  }
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
-
32 #include "./Vector2.hpp"
-
33 #include "./Material.hpp"
-
34 
-
35 namespace raylib {
-
36 class Texture : public ::Texture {
-
37  public:
-
38  Texture(const ::Texture& texture) {
-
39  set(texture);
-
40  }
-
41 
-
42  Texture() {
-
43  set(::GetTextureDefault());
-
44  }
+
25  Texture(const ::Image& image) {
+
26  LoadFromImage(image);
+
27  }
+
28 
+
32  Texture(const std::string& fileName) {
+
33  Load(fileName);
+
34  }
+
35 
+
36  ~Texture() {
+
37  Unload();
+
38  }
+
39 
+
40  GETTERSETTER(unsigned int, Id, id)
+
41  GETTERSETTER(int, Width, width)
+
42  GETTERSETTER(int, Height, height)
+
43  GETTERSETTER(int, Mipmaps, mipmaps)
+
44  GETTERSETTER(int, Format, format)
45 
-
46  Texture(const ::Image& image) {
-
47  LoadFromImage(image);
-
48  }
-
49 
-
53  Texture(const std::string& fileName) {
-
54  Load(fileName);
-
55  }
-
56 
- -
58  Unload();
-
59  }
-
60 
-
61  GETTERSETTER(unsigned int, Id, id)
-
62  GETTERSETTER(int, Width, width)
-
63  GETTERSETTER(int, Height, height)
-
64  GETTERSETTER(int, Mipmaps, mipmaps)
-
65  GETTERSETTER(int, Format, format)
-
66 
-
67  Texture& operator=(const ::Texture& texture) {
-
68  set(texture);
-
69  return *this;
+
46  Texture& operator=(const ::Texture& texture) {
+
47  set(texture);
+
48  return *this;
+
49  }
+
50 
+
54  inline ::Vector2 GetSize() {
+
55  return {static_cast<float>(width), static_cast<float>(height)};
+
56  }
+
57 
+
61  void LoadFromImage(const ::Image& image) {
+
62  set(::LoadTextureFromImage(image));
+
63  }
+
64 
+
68  void LoadTextureCubemap(const ::Image& image, int layoutType) {
+
69  set(::LoadTextureCubemap(image, layoutType));
70  }
71 
-
75  inline ::Vector2 GetSize() {
-
76  return {static_cast<float>(width), static_cast<float>(height)};
+
75  void Load(const std::string& fileName) {
+
76  set(::LoadTexture(fileName.c_str()));
77  }
78 
-
82  void LoadFromImage(const ::Image& image) {
-
83  set(::LoadTextureFromImage(image));
+
82  inline void Unload() {
+
83  ::UnloadTexture(*this);
84  }
85 
-
89  void LoadTextureCubemap(const ::Image& image, int layoutType) {
-
90  set(::LoadTextureCubemap(image, layoutType));
-
91  }
-
92 
-
96  void Load(const std::string& fileName) {
-
97  set(::LoadTexture(fileName.c_str()));
-
98  }
-
99 
-
103  inline void Unload() {
-
104  ::UnloadTexture(*this);
-
105  }
-
106 
-
110  inline Texture& Update(const void *pixels) {
-
111  ::UpdateTexture(*this, pixels);
-
112  return *this;
-
113  }
-
114 
-
118  inline Texture& UpdateRec(::Rectangle rec, const void *pixels) {
-
119  UpdateTextureRec(*this, rec, pixels);
-
120  return *this;
-
121  }
-
122 
-
126  inline ::Image GetData() const {
-
127  return ::GetTextureData(*this);
-
128  }
-
129 
-
133  inline operator raylib::Image() {
-
134  return GetData();
-
135  }
-
136 
-
140  inline Texture& GenMipmaps() {
-
141  ::GenTextureMipmaps(this);
-
142  return *this;
-
143  }
-
144 
-
148  inline Texture& SetFilter(int filterMode) {
-
149  ::SetTextureFilter(*this, filterMode);
-
150  return *this;
-
151  }
-
152 
-
156  inline Texture& SetWrap(int wrapMode) {
-
157  ::SetTextureWrap(*this, wrapMode);
-
158  return *this;
-
159  }
-
160 
-
164  inline Texture& Draw() {
-
165  return Draw(0, 0);
-
166  }
-
167 
-
171  inline Texture& Draw(int posX, int posY, ::Color tint = {255, 255, 255, 255}) {
-
172  ::DrawTexture(*this, posX, posY, tint);
-
173  return *this;
-
174  }
-
175 
-
176  inline Texture& Draw(::Vector2 position, ::Color tint = {255, 255, 255, 255}) {
-
177  ::DrawTextureV(*this, position, tint);
-
178  return *this;
-
179  }
-
180 
-
181  inline Texture& Draw(::Vector2 position, float rotation, float scale = 1.0f,
-
182  ::Color tint = {255, 255, 255, 255}) {
-
183  ::DrawTextureEx(*this, position, rotation, scale, tint);
-
184  return *this;
-
185  }
-
186 
-
187  inline Texture& Draw(::Rectangle sourceRec, ::Vector2 position = {0, 0},
-
188  ::Color tint = {255, 255, 255, 255}) {
-
189  ::DrawTextureRec(*this, sourceRec, position, tint);
-
190  return *this;
-
191  }
-
192 
-
193  inline Texture& Draw(::Vector2 tiling, ::Vector2 offset, ::Rectangle quad,
-
194  ::Color tint = {255, 255, 255, 255}) {
-
195  ::DrawTextureQuad(*this, tiling, offset, quad, tint);
-
196  return *this;
-
197  }
-
198 
-
199  inline Texture& Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin = {0, 0},
-
200  float rotation = 0, ::Color tint = {255, 255, 255, 255}) {
-
201  ::DrawTexturePro(*this, sourceRec, destRec, origin, rotation, tint);
-
202  return *this;
-
203  }
-
204 
-
205  inline Texture& Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin = {0, 0},
-
206  float rotation = 0, ::Color tint = {255, 255, 255, 255}) {
-
207  ::DrawTextureNPatch(*this, nPatchInfo, destRec, origin, rotation, tint);
-
208  return *this;
-
209  }
-
210 
-
211  inline Texture& Draw(::Vector3 position, float width, float height, float length,
-
212  ::Color color = {255, 255, 255, 255}) {
-
213  ::DrawCubeTexture(*this, position, width, height, length, color);
-
214  return *this;
+
89  inline Texture& Update(const void *pixels) {
+
90  ::UpdateTexture(*this, pixels);
+
91  return *this;
+
92  }
+
93 
+
97  inline Texture& UpdateRec(::Rectangle rec, const void *pixels) {
+
98  UpdateTextureRec(*this, rec, pixels);
+
99  return *this;
+
100  }
+
101 
+
105  inline ::Image GetData() const {
+
106  return ::GetTextureData(*this);
+
107  }
+
108 
+
112  inline operator raylib::Image() {
+
113  return GetData();
+
114  }
+
115 
+
119  inline Texture& GenMipmaps() {
+
120  ::GenTextureMipmaps(this);
+
121  return *this;
+
122  }
+
123 
+
127  inline Texture& SetFilter(int filterMode) {
+
128  ::SetTextureFilter(*this, filterMode);
+
129  return *this;
+
130  }
+
131 
+
135  inline Texture& SetWrap(int wrapMode) {
+
136  ::SetTextureWrap(*this, wrapMode);
+
137  return *this;
+
138  }
+
139 
+
143  inline Texture& Draw() {
+
144  return Draw(0, 0);
+
145  }
+
146 
+
150  inline Texture& Draw(int posX, int posY, ::Color tint = {255, 255, 255, 255}) {
+
151  ::DrawTexture(*this, posX, posY, tint);
+
152  return *this;
+
153  }
+
154 
+
155  inline Texture& Draw(::Vector2 position, ::Color tint = {255, 255, 255, 255}) {
+
156  ::DrawTextureV(*this, position, tint);
+
157  return *this;
+
158  }
+
159 
+
160  inline Texture& Draw(::Vector2 position, float rotation, float scale = 1.0f,
+
161  ::Color tint = {255, 255, 255, 255}) {
+
162  ::DrawTextureEx(*this, position, rotation, scale, tint);
+
163  return *this;
+
164  }
+
165 
+
166  inline Texture& Draw(::Rectangle sourceRec, ::Vector2 position = {0, 0},
+
167  ::Color tint = {255, 255, 255, 255}) {
+
168  ::DrawTextureRec(*this, sourceRec, position, tint);
+
169  return *this;
+
170  }
+
171 
+
172  inline Texture& Draw(::Vector2 tiling, ::Vector2 offset, ::Rectangle quad,
+
173  ::Color tint = {255, 255, 255, 255}) {
+
174  ::DrawTextureQuad(*this, tiling, offset, quad, tint);
+
175  return *this;
+
176  }
+
177 
+
178  inline Texture& Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin = {0, 0},
+
179  float rotation = 0, ::Color tint = {255, 255, 255, 255}) {
+
180  ::DrawTexturePro(*this, sourceRec, destRec, origin, rotation, tint);
+
181  return *this;
+
182  }
+
183 
+
184  inline Texture& Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin = {0, 0},
+
185  float rotation = 0, ::Color tint = {255, 255, 255, 255}) {
+
186  ::DrawTextureNPatch(*this, nPatchInfo, destRec, origin, rotation, tint);
+
187  return *this;
+
188  }
+
189 
+
190  inline Texture& Draw(::Vector3 position, float width, float height, float length,
+
191  ::Color color = {255, 255, 255, 255}) {
+
192  ::DrawCubeTexture(*this, position, width, height, length, color);
+
193  return *this;
+
194  }
+
195 
+
196  inline Texture& DrawTiled(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin = {0, 0},
+
197  float rotation = 0, float scale = 1, Color tint = {255, 255, 255, 255}) {
+
198  ::DrawTextureTiled(*this, sourceRec, destRec, origin, rotation, scale, tint);
+
199  return *this;
+
200  }
+
201 
+
205  inline Texture& SetMaterial(::Material *material, int mapType) {
+
206  ::SetMaterialTexture(material, mapType, *this);
+
207  return *this;
+
208  }
+
209 
+
213  static int GetPixelDataSize(int width, int height, int format) {
+
214  return ::GetPixelDataSize(width, height, format);
215  }
216 
-
217  inline Texture& DrawTiled(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin = {0, 0},
-
218  float rotation = 0, float scale = 1, Color tint = {255, 255, 255, 255}) {
-
219  ::DrawTextureTiled(*this, sourceRec, destRec, origin, rotation, scale, tint);
-
220  return *this;
-
221  }
-
222 
-
226  inline Texture& SetMaterial(::Material *material, int mapType) {
-
227  ::SetMaterialTexture(material, mapType, *this);
-
228  return *this;
-
229  }
-
230 
-
234  static int GetPixelDataSize(int width, int height, int format) {
-
235  return ::GetPixelDataSize(width, height, format);
-
236  }
-
237 
-
241  inline Texture& SetShapes(::Rectangle source) {
-
242  ::SetShapesTexture(*this, source);
-
243  return *this;
-
244  }
-
245 
-
246  protected:
-
247  inline void set(const ::Texture& texture) {
-
248  id = texture.id;
-
249  width = texture.width;
-
250  height = texture.height;
-
251  mipmaps = texture.mipmaps;
-
252  format = texture.format;
-
253  }
-
254 };
-
255 
-
256 // Create the Texture aliases.
- - -
259 
-
260 } // namespace raylib
-
261 
-
262 #endif // RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
+
220  inline Texture& SetShapes(::Rectangle source) {
+
221  ::SetShapesTexture(*this, source);
+
222  return *this;
+
223  }
+
224 
+
225  private:
+
226  inline void set(const ::Texture& texture) {
+
227  id = texture.id;
+
228  width = texture.width;
+
229  height = texture.height;
+
230  mipmaps = texture.mipmaps;
+
231  format = texture.format;
+
232  }
+
233 };
+
234 
+
235 // Create the Texture aliases.
+
236 typedef Texture Texture2D;
+
237 typedef Texture TextureCubemap;
+
238 
+
239 } // namespace raylib
+
240 
+
241 #endif // RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
-
static int GetPixelDataSize(int width, int height, int format)
Get pixel data size in bytes for certain format.
Definition: Texture.hpp:234
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Texture & SetWrap(int wrapMode)
Set texture wrapping mode.
Definition: Texture.hpp:156
-
void LoadTextureCubemap(const ::Image &image, int layoutType)
Load cubemap from image, multiple image cubemap layouts supported.
Definition: Texture.hpp:89
-
void set(const ::Texture &texture)
Definition: Texture.hpp:247
-
Texture & Draw(int posX, int posY, ::Color tint={255, 255, 255, 255})
Draw a Texture2D.
Definition: Texture.hpp:171
-
Texture & Draw(::Vector3 position, float width, float height, float length, ::Color color={255, 255, 255, 255})
Definition: Texture.hpp:211
-
Definition: Image.hpp:34
-
inline ::Vector2 GetSize()
Retrieve the width and height of the texture.
Definition: Texture.hpp:75
-
Texture & Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})
Definition: Texture.hpp:199
-
Texture & SetShapes(::Rectangle source)
Define default texture used to draw shapes.
Definition: Texture.hpp:241
-
Definition: Vector3.hpp:37
-
Texture(const ::Image &image)
Definition: Texture.hpp:46
-
Texture & Draw(::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255})
Definition: Texture.hpp:187
-
void Load(const std::string &fileName)
Load texture from file into GPU memory (VRAM)
Definition: Texture.hpp:96
-
Definition: Rectangle.hpp:33
-
Texture & DrawTiled(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, float scale=1, Color tint={255, 255, 255, 255})
Definition: Texture.hpp:217
-
Definition: Vector2.hpp:37
-
void LoadFromImage(const ::Image &image)
Load texture from image data.
Definition: Texture.hpp:82
-
Texture(const std::string &fileName)
Load texture from file into GPU memory (VRAM)
Definition: Texture.hpp:53
-
Texture & SetFilter(int filterMode)
Set texture scaling filter mode.
Definition: Texture.hpp:148
-
Definition: Color.hpp:35
-
Texture & Draw(::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255})
Definition: Texture.hpp:181
-
~Texture()
Definition: Texture.hpp:57
-
inline ::Image GetData() const
Get pixel data from GPU texture and return an Image.
Definition: Texture.hpp:126
-
Texture Texture2D
Definition: Texture.hpp:257
-
Texture & Draw(::Vector2 tiling, ::Vector2 offset, ::Rectangle quad, ::Color tint={255, 255, 255, 255})
Definition: Texture.hpp:193
-
Texture & Draw()
Draws the texture at the top left corner of the screen.
Definition: Texture.hpp:164
-
Texture & UpdateRec(::Rectangle rec, const void *pixels)
Update GPU texture rectangle with new data.
Definition: Texture.hpp:118
-
Definition: Texture.hpp:36
-
void Unload()
Unload texture from GPU memory (VRAM)
Definition: Texture.hpp:103
-
Texture & Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})
Definition: Texture.hpp:205
-
Texture TextureCubemap
Definition: Texture.hpp:258
-
Texture & GenMipmaps()
Generate GPU mipmaps for a texture.
Definition: Texture.hpp:140
-
Texture & Draw(::Vector2 position, ::Color tint={255, 255, 255, 255})
Definition: Texture.hpp:176
-
Texture(const ::Texture &texture)
Definition: Texture.hpp:38
-
Definition: Material.hpp:35
-
Texture & SetMaterial(::Material *material, int mapType)
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition: Texture.hpp:226
-
Texture()
Definition: Texture.hpp:42
-
Texture & Update(const void *pixels)
Update GPU texture with new data.
Definition: Texture.hpp:110
+
static int GetPixelDataSize(int width, int height, int format)
Get pixel data size in bytes for certain format.
Definition: Texture.hpp:213
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Texture & SetWrap(int wrapMode)
Set texture wrapping mode.
Definition: Texture.hpp:135
+
void LoadTextureCubemap(const ::Image &image, int layoutType)
Load cubemap from image, multiple image cubemap layouts supported.
Definition: Texture.hpp:68
+
Texture & Draw(int posX, int posY, ::Color tint={255, 255, 255, 255})
Draw a Texture2D.
Definition: Texture.hpp:150
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:15
+
inline ::Vector2 GetSize()
Retrieve the width and height of the texture.
Definition: Texture.hpp:54
+
Texture & SetShapes(::Rectangle source)
Define default texture used to draw shapes.
Definition: Texture.hpp:220
+
void Load(const std::string &fileName)
Load texture from file into GPU memory (VRAM)
Definition: Texture.hpp:75
+
Rectangle type.
Definition: Rectangle.hpp:12
+
void LoadFromImage(const ::Image &image)
Load texture from image data.
Definition: Texture.hpp:61
+
Texture(const std::string &fileName)
Load texture from file into GPU memory (VRAM)
Definition: Texture.hpp:32
+
Texture & SetFilter(int filterMode)
Set texture scaling filter mode.
Definition: Texture.hpp:127
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
inline ::Image GetData() const
Get pixel data from GPU texture and return an Image.
Definition: Texture.hpp:105
+
Texture & Draw()
Draws the texture at the top left corner of the screen.
Definition: Texture.hpp:143
+
Texture & UpdateRec(::Rectangle rec, const void *pixels)
Update GPU texture rectangle with new data.
Definition: Texture.hpp:97
+
Texture type.
Definition: Texture.hpp:15
+
void Unload()
Unload texture from GPU memory (VRAM)
Definition: Texture.hpp:82
+
Texture & GenMipmaps()
Generate GPU mipmaps for a texture.
Definition: Texture.hpp:119
+
Material type (generic)
Definition: Material.hpp:14
+
Texture & SetMaterial(::Material *material, int mapType)
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition: Texture.hpp:205
+
Texture & Update(const void *pixels)
Update GPU texture with new data.
Definition: Texture.hpp:89
diff --git a/docs/_vector2_8hpp_source.html b/docs/_vector2_8hpp_source.html index e57e7ee..4a1482f 100644 --- a/docs/_vector2_8hpp_source.html +++ b/docs/_vector2_8hpp_source.html @@ -71,355 +71,299 @@ $(function() {
Vector2.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
-
27 
-
28 #ifndef RAYLIB_CPP_NO_MATH
-
29 #include <cmath>
-
30 #endif
-
31 
-
32 #include "./raylib.hpp"
-
33 #include "./raymath.hpp"
-
34 #include "./raylib-cpp-utils.hpp"
-
35 
-
36 namespace raylib {
-
37 class Vector2 : public ::Vector2 {
-
38  public:
-
39  Vector2(const ::Vector2& vec) {
-
40  set(vec);
-
41  }
-
42 
-
43  Vector2(float x, float y) : ::Vector2{x, y} {}
-
44  Vector2(float x) : ::Vector2{x, 0} {}
-
45  Vector2() : ::Vector2{0, 0} {}
-
46 
-
47  GETTERSETTER(float, X, x)
-
48  GETTERSETTER(float, Y, y)
-
49 
-
50  Vector2& operator=(const ::Vector2& vector2) {
-
51  set(vector2);
-
52  return *this;
-
53  }
-
54 
-
55  bool operator==(const ::Vector2& other) {
-
56  return x == other.x
-
57  && y == other.y;
+
1 #ifndef RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
+
3 
+
4 #ifndef RAYLIB_CPP_NO_MATH
+
5 #include <cmath>
+
6 #endif
+
7 
+
8 #include "./raylib.hpp"
+
9 #include "./raymath.hpp"
+
10 #include "./raylib-cpp-utils.hpp"
+
11 
+
12 namespace raylib {
+
16 class Vector2 : public ::Vector2 {
+
17  public:
+
18  Vector2(const ::Vector2& vec) {
+
19  set(vec);
+
20  }
+
21 
+
22  Vector2(float x, float y) : ::Vector2{x, y} {}
+
23  Vector2(float x) : ::Vector2{x, 0} {}
+
24  Vector2() : ::Vector2{0, 0} {}
+
25 
+
26  GETTERSETTER(float, X, x)
+
27  GETTERSETTER(float, Y, y)
+
28 
+
29  Vector2& operator=(const ::Vector2& vector2) {
+
30  set(vector2);
+
31  return *this;
+
32  }
+
33 
+
34  bool operator==(const ::Vector2& other) {
+
35  return x == other.x
+
36  && y == other.y;
+
37  }
+
38 
+
39 #ifndef RAYLIB_CPP_NO_MATH
+
40  Vector2 Add(const ::Vector2& vector2) const {
+
41  return Vector2Add(*this, vector2);
+
42  }
+
43 
+
44  Vector2 operator+(const ::Vector2& vector2) {
+
45  return Vector2Add(*this, vector2);
+
46  }
+
47 
+
48  Vector2 Subtract(const ::Vector2& vector2) const {
+
49  return Vector2Subtract(*this, vector2);
+
50  }
+
51 
+
52  Vector2 operator-(const ::Vector2& vector2) {
+
53  return Vector2Subtract(*this, vector2);
+
54  }
+
55 
+
56  Vector2 Negate() const {
+
57  return Vector2Negate(*this);
58  }
59 
-
60 #ifndef RAYLIB_CPP_NO_MATH
-
61  Vector2 Add(const ::Vector2& vector2) const {
-
62  return Vector2Add(*this, vector2);
-
63  }
-
64 
-
65  Vector2 operator+(const ::Vector2& vector2) {
-
66  return Vector2Add(*this, vector2);
-
67  }
-
68 
-
69  Vector2 Subtract(const ::Vector2& vector2) const {
-
70  return Vector2Subtract(*this, vector2);
-
71  }
-
72 
-
73  Vector2 operator-(const ::Vector2& vector2) {
-
74  return Vector2Subtract(*this, vector2);
-
75  }
-
76 
-
77  Vector2 Negate() const {
-
78  return Vector2Negate(*this);
-
79  }
-
80 
- -
82  return Vector2Negate(*this);
-
83  }
-
84 
-
85  Vector2 Multiply(const ::Vector2& vector2) const {
-
86  return Vector2Multiply(*this, vector2);
-
87  }
-
88 
-
89  Vector2 operator*(const ::Vector2& vector2) {
-
90  return Vector2Multiply(*this, vector2);
-
91  }
-
92 
-
93  Vector2 Scale(const float scale) const {
-
94  return Vector2Scale(*this, scale);
-
95  }
-
96 
-
97  Vector2 operator*(const float scale) {
-
98  return Vector2Scale(*this, scale);
-
99  }
-
100 
-
101  Vector2 Divide(const ::Vector2& vector2) const {
-
102  return Vector2Divide(*this, vector2);
-
103  }
+
60  Vector2 operator-() {
+
61  return Vector2Negate(*this);
+
62  }
+
63 
+
64  Vector2 Multiply(const ::Vector2& vector2) const {
+
65  return Vector2Multiply(*this, vector2);
+
66  }
+
67 
+
68  Vector2 operator*(const ::Vector2& vector2) {
+
69  return Vector2Multiply(*this, vector2);
+
70  }
+
71 
+
72  Vector2 Scale(const float scale) const {
+
73  return Vector2Scale(*this, scale);
+
74  }
+
75 
+
76  Vector2 operator*(const float scale) {
+
77  return Vector2Scale(*this, scale);
+
78  }
+
79 
+
80  Vector2 Divide(const ::Vector2& vector2) const {
+
81  return Vector2Divide(*this, vector2);
+
82  }
+
83 
+
84  Vector2 operator/(const ::Vector2& vector2) {
+
85  return Vector2Divide(*this, vector2);
+
86  }
+
87 
+
88  Vector2& Divide(const float div) {
+
89  x /= div;
+
90  y /= div;
+
91 
+
92  return *this;
+
93  }
+
94 
+
95  Vector2& operator/(const float div) {
+
96  x /= div;
+
97  y /= div;
+
98 
+
99  return *this;
+
100  }
+
101 
+
102  Vector2& operator+=(const ::Vector2& vector2) {
+
103  set(Vector2Add(*this, vector2));
104 
-
105  Vector2 operator/(const ::Vector2& vector2) {
-
106  return Vector2Divide(*this, vector2);
-
107  }
-
108 
-
109  Vector2& Divide(const float div) {
-
110  x /= div;
-
111  y /= div;
-
112 
-
113  return *this;
-
114  }
-
115 
-
116  Vector2& operator/(const float div) {
-
117  x /= div;
-
118  y /= div;
-
119 
-
120  return *this;
-
121  }
-
122 
-
123  Vector2& operator+=(const ::Vector2& vector2) {
-
124  set(Vector2Add(*this, vector2));
-
125 
-
126  return *this;
-
127  }
-
128 
-
129  Vector2& operator-=(const ::Vector2& vector2) {
-
130  set(Vector2Subtract(*this, vector2));
-
131 
-
132  return *this;
-
133  }
-
134 
-
135 
-
136  Vector2& operator*=(const ::Vector2& vector2) {
-
137  set(Vector2Multiply(*this, vector2));
-
138 
-
139  return *this;
-
140  }
-
141 
-
142  Vector2& operator*=(const float scale) {
-
143  set(Vector2Scale(*this, scale));
-
144 
-
145  return *this;
-
146  }
-
147 
-
148  Vector2& operator/=(const ::Vector2& vector2) {
-
149  set(Vector2Divide(*this, vector2));
-
150 
-
151  return *this;
+
105  return *this;
+
106  }
+
107 
+
108  Vector2& operator-=(const ::Vector2& vector2) {
+
109  set(Vector2Subtract(*this, vector2));
+
110 
+
111  return *this;
+
112  }
+
113 
+
114 
+
115  Vector2& operator*=(const ::Vector2& vector2) {
+
116  set(Vector2Multiply(*this, vector2));
+
117 
+
118  return *this;
+
119  }
+
120 
+
121  Vector2& operator*=(const float scale) {
+
122  set(Vector2Scale(*this, scale));
+
123 
+
124  return *this;
+
125  }
+
126 
+
127  Vector2& operator/=(const ::Vector2& vector2) {
+
128  set(Vector2Divide(*this, vector2));
+
129 
+
130  return *this;
+
131  }
+
132 
+
133  Vector2& operator/=(const float div) {
+
134  this->x /= div;
+
135  this->y /= div;
+
136 
+
137  return *this;
+
138  }
+
139 
+
143  float Length() const {
+
144  return Vector2Length(*this);
+
145  }
+
146 
+
150  float LengthSqr() const {
+
151  return Vector2LengthSqr(*this);
152  }
153 
-
154  Vector2& operator/=(const float div) {
-
155  this->x /= div;
-
156  this->y /= div;
-
157 
-
158  return *this;
+
157  Vector2 Normalize() const {
+
158  return Vector2Normalize(*this);
159  }
160 
-
164  float Length() const {
-
165  return Vector2Length(*this);
+
164  float DotProduct(const ::Vector2& vector2) const {
+
165  return Vector2DotProduct(*this, vector2);
166  }
167 
-
171  float LengthSqr() const {
-
172  return Vector2LengthSqr(*this);
+
171  float Angle(const ::Vector2& vector2) const {
+
172  return Vector2Angle(*this, vector2);
173  }
174 
-
178  Vector2 Normalize() const {
-
179  return Vector2Normalize(*this);
+
178  float Distance(const ::Vector2& vector2) const {
+
179  return Vector2Distance(*this, vector2);
180  }
181 
-
185  float DotProduct(const ::Vector2& vector2) const {
-
186  return Vector2DotProduct(*this, vector2);
+
185  Vector2 Lerp(const ::Vector2& vector2, float amount) const {
+
186  return Vector2Lerp(*this, vector2, amount);
187  }
188 
-
192  float Angle(const ::Vector2& vector2) const {
-
193  return Vector2Angle(*this, vector2);
+
192  Vector2 Reflect(const ::Vector2& normal) const {
+
193  return Vector2Reflect(*this, normal);
194  }
195 
-
199  float Distance(const ::Vector2& vector2) const {
-
200  return Vector2Distance(*this, vector2);
+
199  Vector2 Rotate(float degrees) const {
+
200  return Vector2Rotate(*this, degrees);
201  }
202 
-
206  Vector2 Lerp(const ::Vector2& vector2, float amount) const {
-
207  return Vector2Lerp(*this, vector2, amount);
+
206  Vector2 MoveTowards(const ::Vector2& target, float maxDistance) const {
+
207  return Vector2MoveTowards(*this, target, maxDistance);
208  }
209 
-
213  Vector2 Reflect(const ::Vector2& normal) const {
-
214  return Vector2Reflect(*this, normal);
+
213  static Vector2 Zero() {
+
214  return Vector2Zero();
215  }
216 
-
220  Vector2 Rotate(float degrees) const {
-
221  return Vector2Rotate(*this, degrees);
+
220  static Vector2 One() {
+
221  return Vector2One();
222  }
-
223 
-
227  Vector2 MoveTowards(const ::Vector2& target, float maxDistance) const {
-
228  return Vector2MoveTowards(*this, target, maxDistance);
-
229  }
-
230 
-
234  static Vector2 Zero() {
-
235  return Vector2Zero();
-
236  }
-
237 
-
241  static Vector2 One() {
-
242  return Vector2One();
+
223 #endif
+
224 
+
225  inline Vector2& DrawPixel(::Color color) {
+
226  ::DrawPixelV(*this, color);
+
227  return *this;
+
228  }
+
229 
+
230  inline Vector2& DrawLine(::Vector2 endPos, ::Color color) {
+
231  ::DrawLineV(*this, endPos, color);
+
232  return *this;
+
233  }
+
234 
+
235  inline Vector2& DrawLine(::Vector2 endPos, float thick, ::Color color) {
+
236  ::DrawLineEx(*this, endPos, thick, color);
+
237  return *this;
+
238  }
+
239 
+
240  inline Vector2& DrawLineBezier(::Vector2 endPos, float thick, ::Color color) {
+
241  ::DrawLineBezier(*this, endPos, thick, color);
+
242  return *this;
243  }
-
244 #endif
-
245 
-
246  inline Vector2& DrawPixel(::Color color) {
-
247  ::DrawPixelV(*this, color);
-
248  return *this;
-
249  }
-
250 
-
251  inline Vector2& DrawLine(::Vector2 endPos, ::Color color) {
-
252  ::DrawLineV(*this, endPos, color);
-
253  return *this;
-
254  }
-
255 
-
256  inline Vector2& DrawLine(::Vector2 endPos, float thick, ::Color color) {
-
257  ::DrawLineEx(*this, endPos, thick, color);
-
258  return *this;
-
259  }
-
260 
-
261  inline Vector2& DrawLineBezier(::Vector2 endPos, float thick, ::Color color) {
-
262  ::DrawLineBezier(*this, endPos, thick, color);
-
263  return *this;
-
264  }
-
265 
-
271  // inline Vector2& DrawLineBezierQuad(
-
272  // ::Vector2 endPos,
-
273  // ::Vector2 controlPos,
-
274  // float thick,
-
275  // ::Color color) {
-
276  // ::DrawLineBezierQuad(*this, endPos, controlPos, thick, color);
-
277  // return *this;
-
278  //}
-
279 
-
283  inline Vector2& DrawCircle(float radius, ::Color color) {
-
284  ::DrawCircleV(*this, radius, color);
-
285  return *this;
-
286  }
-
287 
-
288  inline Vector2& DrawRectangle(::Vector2 size, ::Color color) {
-
289  ::DrawRectangleV(*this, size, color);
-
290  return *this;
-
291  }
-
292 
-
293  inline Vector2& DrawPoly(int sides, float radius, float rotation, ::Color color) {
-
294  ::DrawPoly(*this, sides, radius, rotation, color);
-
295  return *this;
+
244 
+
250  // inline Vector2& DrawLineBezierQuad(
+
251  // ::Vector2 endPos,
+
252  // ::Vector2 controlPos,
+
253  // float thick,
+
254  // ::Color color) {
+
255  // ::DrawLineBezierQuad(*this, endPos, controlPos, thick, color);
+
256  // return *this;
+
257  //}
+
258 
+
262  inline Vector2& DrawCircle(float radius, ::Color color) {
+
263  ::DrawCircleV(*this, radius, color);
+
264  return *this;
+
265  }
+
266 
+
267  inline Vector2& DrawRectangle(::Vector2 size, ::Color color) {
+
268  ::DrawRectangleV(*this, size, color);
+
269  return *this;
+
270  }
+
271 
+
272  inline Vector2& DrawPoly(int sides, float radius, float rotation, ::Color color) {
+
273  ::DrawPoly(*this, sides, radius, rotation, color);
+
274  return *this;
+
275  }
+
276 
+
280  inline bool CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) const {
+
281  return ::CheckCollisionCircles(*this, radius1, center2, radius2);
+
282  }
+
283 
+
287  inline bool CheckCollisionCircle(float radius, ::Rectangle rec) const {
+
288  return ::CheckCollisionCircleRec(*this, radius, rec);
+
289  }
+
290 
+
294  inline bool CheckCollision(::Rectangle rec) const {
+
295  return ::CheckCollisionPointRec(*this, rec);
296  }
297 
-
301  inline bool CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) const {
-
302  return ::CheckCollisionCircles(*this, radius1, center2, radius2);
+
301  inline bool CheckCollision(::Vector2 center, float radius) const {
+
302  return ::CheckCollisionPointCircle(*this, center, radius);
303  }
304 
-
308  inline bool CheckCollisionCircle(float radius, ::Rectangle rec) const {
-
309  return ::CheckCollisionCircleRec(*this, radius, rec);
+
308  inline bool CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const {
+
309  return ::CheckCollisionPointTriangle(*this, p1, p2, p3);
310  }
311 
-
315  inline bool CheckCollision(::Rectangle rec) const {
-
316  return ::CheckCollisionPointRec(*this, rec);
-
317  }
-
318 
-
322  inline bool CheckCollision(::Vector2 center, float radius) const {
-
323  return ::CheckCollisionPointCircle(*this, center, radius);
-
324  }
-
325 
-
329  inline bool CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const {
-
330  return ::CheckCollisionPointTriangle(*this, p1, p2, p3);
-
331  }
-
332 
-
336  inline bool CheckCollisionLines(
-
337  ::Vector2 endPos1,
-
338  ::Vector2 startPos2, ::Vector2 endPos2,
-
339  ::Vector2 *collisionPoint) const {
-
340  return ::CheckCollisionLines(*this, endPos1, startPos2, endPos2, collisionPoint);
-
341  }
-
342 
-
343  protected:
-
344  inline void set(const ::Vector2& vec) {
-
345  x = vec.x;
-
346  y = vec.y;
-
347  }
-
348 };
-
349 
-
350 } // namespace raylib
-
351 
-
352 #endif // RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
+
315  inline bool CheckCollisionLines(
+
316  ::Vector2 endPos1,
+
317  ::Vector2 startPos2, ::Vector2 endPos2,
+
318  ::Vector2 *collisionPoint) const {
+
319  return ::CheckCollisionLines(*this, endPos1, startPos2, endPos2, collisionPoint);
+
320  }
+
321 
+
322  private:
+
323  inline void set(const ::Vector2& vec) {
+
324  x = vec.x;
+
325  y = vec.y;
+
326  }
+
327 };
+
328 
+
329 } // namespace raylib
+
330 
+
331 #endif // RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
-
bool CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const
Check if point is inside a triangle.
Definition: Vector2.hpp:329
-
Vector2 & operator+=(const ::Vector2 &vector2)
Definition: Vector2.hpp:123
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Vector2 Reflect(const ::Vector2 &normal) const
Calculate reflected vector to normal.
Definition: Vector2.hpp:213
-
Vector2 MoveTowards(const ::Vector2 &target, float maxDistance) const
Move Vector towards target.
Definition: Vector2.hpp:227
-
Vector2 & operator/=(const ::Vector2 &vector2)
Definition: Vector2.hpp:148
-
Vector2 operator-(const ::Vector2 &vector2)
Definition: Vector2.hpp:73
-
float Length() const
Calculate vector length.
Definition: Vector2.hpp:164
-
Vector2 Subtract(const ::Vector2 &vector2) const
Definition: Vector2.hpp:69
-
Vector2(float x, float y)
Definition: Vector2.hpp:43
-
Vector2 Scale(const float scale) const
Definition: Vector2.hpp:93
-
Vector2 & DrawPixel(::Color color)
Definition: Vector2.hpp:246
-
Vector2 & operator/=(const float div)
Definition: Vector2.hpp:154
-
Vector2 & DrawLine(::Vector2 endPos, ::Color color)
Definition: Vector2.hpp:251
-
bool operator==(const ::Vector2 &other)
Definition: Vector2.hpp:55
-
Vector2 Normalize() const
Normalize provided vector.
Definition: Vector2.hpp:178
-
static Vector2 Zero()
Vector with components value 0.0f.
Definition: Vector2.hpp:234
-
Vector2()
Definition: Vector2.hpp:45
-
Vector2 & Divide(const float div)
Definition: Vector2.hpp:109
-
Vector2 Multiply(const ::Vector2 &vector2) const
Definition: Vector2.hpp:85
-
Vector2 operator*(const float scale)
Definition: Vector2.hpp:97
-
bool CheckCollision(::Rectangle rec) const
Check if point is inside rectangle.
Definition: Vector2.hpp:315
-
Vector2 & DrawPoly(int sides, float radius, float rotation, ::Color color)
Definition: Vector2.hpp:293
-
bool CheckCollision(::Vector2 center, float radius) const
Check if point is inside circle.
Definition: Vector2.hpp:322
-
void set(const ::Vector2 &vec)
Definition: Vector2.hpp:344
-
Vector2 & operator-=(const ::Vector2 &vector2)
Definition: Vector2.hpp:129
-
Vector2 operator-()
Definition: Vector2.hpp:81
-
Vector2 operator/(const ::Vector2 &vector2)
Definition: Vector2.hpp:105
-
Vector2 Lerp(const ::Vector2 &vector2, float amount) const
Calculate linear interpolation between two vectors.
Definition: Vector2.hpp:206
-
static Vector2 One()
Vector with components value 1.0f.
Definition: Vector2.hpp:241
-
float LengthSqr() const
Calculate vector square length.
Definition: Vector2.hpp:171
-
Definition: Rectangle.hpp:33
-
Definition: Vector2.hpp:37
-
bool CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) const
Check collision between two circles.
Definition: Vector2.hpp:301
-
Vector2 operator*(const ::Vector2 &vector2)
Definition: Vector2.hpp:89
-
Definition: Color.hpp:35
-
Vector2 & DrawRectangle(::Vector2 size, ::Color color)
Definition: Vector2.hpp:288
-
Vector2(const ::Vector2 &vec)
Definition: Vector2.hpp:39
-
Vector2 Add(const ::Vector2 &vector2) const
Definition: Vector2.hpp:61
-
bool CheckCollisionCircle(float radius, ::Rectangle rec) const
Check collision between circle and rectangle.
Definition: Vector2.hpp:308
-
Vector2 Negate() const
Definition: Vector2.hpp:77
-
Vector2 & DrawLineBezier(::Vector2 endPos, float thick, ::Color color)
Definition: Vector2.hpp:261
-
Vector2 Rotate(float degrees) const
Rotate Vector by float in Degrees.
Definition: Vector2.hpp:220
-
Vector2 & operator*=(const float scale)
Definition: Vector2.hpp:142
-
Vector2 & operator/(const float div)
Definition: Vector2.hpp:116
-
Vector2 & DrawLine(::Vector2 endPos, float thick, ::Color color)
Definition: Vector2.hpp:256
-
float Distance(const ::Vector2 &vector2) const
Calculate distance between two vectors.
Definition: Vector2.hpp:199
-
Vector2 Divide(const ::Vector2 &vector2) const
Definition: Vector2.hpp:101
-
Vector2 & operator*=(const ::Vector2 &vector2)
Definition: Vector2.hpp:136
-
Vector2 operator+(const ::Vector2 &vector2)
Definition: Vector2.hpp:65
-
Vector2(float x)
Definition: Vector2.hpp:44
-
float Angle(const ::Vector2 &vector2) const
Calculate angle from two vectors in X-axis.
Definition: Vector2.hpp:192
-
float DotProduct(const ::Vector2 &vector2) const
Calculate two vectors dot product.
Definition: Vector2.hpp:185
-
Vector2 & DrawCircle(float radius, ::Color color)
Draw line using quadratic bezier curves with a control point.
Definition: Vector2.hpp:283
-
bool CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) const
Check the collision between two lines defined by two points each, returns collision point by referenc...
Definition: Vector2.hpp:336
+
bool CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const
Check if point is inside a triangle.
Definition: Vector2.hpp:308
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Vector2 Reflect(const ::Vector2 &normal) const
Calculate reflected vector to normal.
Definition: Vector2.hpp:192
+
Vector2 MoveTowards(const ::Vector2 &target, float maxDistance) const
Move Vector towards target.
Definition: Vector2.hpp:206
+
float Length() const
Calculate vector length.
Definition: Vector2.hpp:143
+
Vector2 Normalize() const
Normalize provided vector.
Definition: Vector2.hpp:157
+
static Vector2 Zero()
Vector with components value 0.0f.
Definition: Vector2.hpp:213
+
bool CheckCollision(::Rectangle rec) const
Check if point is inside rectangle.
Definition: Vector2.hpp:294
+
bool CheckCollision(::Vector2 center, float radius) const
Check if point is inside circle.
Definition: Vector2.hpp:301
+
Vector2 Lerp(const ::Vector2 &vector2, float amount) const
Calculate linear interpolation between two vectors.
Definition: Vector2.hpp:185
+
static Vector2 One()
Vector with components value 1.0f.
Definition: Vector2.hpp:220
+
float LengthSqr() const
Calculate vector square length.
Definition: Vector2.hpp:150
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:16
+
bool CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) const
Check collision between two circles.
Definition: Vector2.hpp:280
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
bool CheckCollisionCircle(float radius, ::Rectangle rec) const
Check collision between circle and rectangle.
Definition: Vector2.hpp:287
+
Vector2 Rotate(float degrees) const
Rotate Vector by float in Degrees.
Definition: Vector2.hpp:199
+
float Distance(const ::Vector2 &vector2) const
Calculate distance between two vectors.
Definition: Vector2.hpp:178
+
float Angle(const ::Vector2 &vector2) const
Calculate angle from two vectors in X-axis.
Definition: Vector2.hpp:171
+
float DotProduct(const ::Vector2 &vector2) const
Calculate two vectors dot product.
Definition: Vector2.hpp:164
+
Vector2 & DrawCircle(float radius, ::Color color)
Draw line using quadratic bezier curves with a control point.
Definition: Vector2.hpp:262
+
bool CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) const
Check the collision between two lines defined by two points each, returns collision point by referenc...
Definition: Vector2.hpp:315
diff --git a/docs/_vector3_8hpp_source.html b/docs/_vector3_8hpp_source.html index 02e72d5..df125d6 100644 --- a/docs/_vector3_8hpp_source.html +++ b/docs/_vector3_8hpp_source.html @@ -71,406 +71,323 @@ $(function() {
Vector3.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
-
27 
-
28 #ifndef RAYLIB_CPP_NO_MATH
-
29 #include <cmath>
-
30 #endif
-
31 
-
32 #include "./raylib.hpp"
-
33 #include "./raymath.hpp"
-
34 #include "./raylib-cpp-utils.hpp"
-
35 
-
36 namespace raylib {
-
37 class Vector3 : public ::Vector3 {
-
38  public:
-
39  Vector3(const ::Vector3& vec) {
-
40  set(vec);
-
41  }
-
42 
-
43  Vector3(float x, float y, float z) : ::Vector3{x, y, z} {}
-
44  Vector3(float x, float y) : ::Vector3{x, y, 0} {}
-
45  Vector3(float x) : ::Vector3{x, 0, 0} {}
-
46  Vector3() {}
-
47 
-
48  Vector3(::Color color) {
-
49  set(ColorToHSV(color));
-
50  }
-
51 
-
52  GETTERSETTER(float, X, x)
-
53  GETTERSETTER(float, Y, y)
-
54  GETTERSETTER(float, Z, z)
-
55 
-
56  Vector3& operator=(const ::Vector3& vector3) {
-
57  set(vector3);
-
58  return *this;
-
59  }
-
60 
-
61  bool operator==(const ::Vector3& other) {
-
62  return x == other.x
-
63  && y == other.y
-
64  && z == other.z;
+
1 #ifndef RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
+
3 
+
4 #ifndef RAYLIB_CPP_NO_MATH
+
5 #include <cmath>
+
6 #endif
+
7 
+
8 #include "./raylib.hpp"
+
9 #include "./raymath.hpp"
+
10 #include "./raylib-cpp-utils.hpp"
+
11 
+
12 namespace raylib {
+
16 class Vector3 : public ::Vector3 {
+
17  public:
+
18  Vector3(const ::Vector3& vec) {
+
19  set(vec);
+
20  }
+
21 
+
22  Vector3(float x, float y, float z) : ::Vector3{x, y, z} {}
+
23  Vector3(float x, float y) : ::Vector3{x, y, 0} {}
+
24  Vector3(float x) : ::Vector3{x, 0, 0} {}
+
25  Vector3() {}
+
26 
+
27  Vector3(::Color color) {
+
28  set(ColorToHSV(color));
+
29  }
+
30 
+
31  GETTERSETTER(float, X, x)
+
32  GETTERSETTER(float, Y, y)
+
33  GETTERSETTER(float, Z, z)
+
34 
+
35  Vector3& operator=(const ::Vector3& vector3) {
+
36  set(vector3);
+
37  return *this;
+
38  }
+
39 
+
40  bool operator==(const ::Vector3& other) {
+
41  return x == other.x
+
42  && y == other.y
+
43  && z == other.z;
+
44  }
+
45 
+
46 #ifndef RAYLIB_CPP_NO_MATH
+
47  Vector3 Add(const ::Vector3& vector3) {
+
48  return Vector3Add(*this, vector3);
+
49  }
+
50 
+
51  Vector3 operator+(const ::Vector3& vector3) {
+
52  return Vector3Add(*this, vector3);
+
53  }
+
54 
+
55  Vector3 Subtract(const ::Vector3& vector3) {
+
56  return Vector3Subtract(*this, vector3);
+
57  }
+
58 
+
59  Vector3 operator-(const ::Vector3& vector3) {
+
60  return Vector3Subtract(*this, vector3);
+
61  }
+
62 
+
63  Vector3 Negate() {
+
64  return Vector3Negate(*this);
65  }
66 
-
67 #ifndef RAYLIB_CPP_NO_MATH
-
68  Vector3 Add(const ::Vector3& vector3) {
-
69  return Vector3Add(*this, vector3);
-
70  }
-
71 
-
72  Vector3 operator+(const ::Vector3& vector3) {
-
73  return Vector3Add(*this, vector3);
-
74  }
-
75 
-
76  Vector3 Subtract(const ::Vector3& vector3) {
-
77  return Vector3Subtract(*this, vector3);
-
78  }
-
79 
-
80  Vector3 operator-(const ::Vector3& vector3) {
-
81  return Vector3Subtract(*this, vector3);
-
82  }
-
83 
- -
85  return Vector3Negate(*this);
-
86  }
-
87 
- -
89  return Vector3Negate(*this);
-
90  }
-
91 
-
92  Vector3 Multiply(const ::Vector3& vector3) {
-
93  return Vector3Multiply(*this, vector3);
-
94  }
-
95 
-
96  Vector3 operator*(const ::Vector3& vector3) {
-
97  return Vector3Multiply(*this, vector3);
-
98  }
+
67  Vector3 operator-() {
+
68  return Vector3Negate(*this);
+
69  }
+
70 
+
71  Vector3 Multiply(const ::Vector3& vector3) {
+
72  return Vector3Multiply(*this, vector3);
+
73  }
+
74 
+
75  Vector3 operator*(const ::Vector3& vector3) {
+
76  return Vector3Multiply(*this, vector3);
+
77  }
+
78 
+
79  Vector3 Scale(const float scale) {
+
80  return Vector3Scale(*this, scale);
+
81  }
+
82 
+
83  Vector3 operator*(const float scale) {
+
84  return Vector3Scale(*this, scale);
+
85  }
+
86 
+
87  Vector3 Divide(const ::Vector3& vector3) {
+
88  return Vector3Divide(*this, vector3);
+
89  }
+
90 
+
91  Vector3 operator/(const ::Vector3& vector3) {
+
92  return Vector3Divide(*this, vector3);
+
93  }
+
94 
+
95  Vector3& Divide(const float div) {
+
96  x /= div;
+
97  y /= div;
+
98  z /= div;
99 
-
100  Vector3 Scale(const float scale) {
-
101  return Vector3Scale(*this, scale);
-
102  }
-
103 
-
104  Vector3 operator*(const float scale) {
-
105  return Vector3Scale(*this, scale);
-
106  }
-
107 
-
108  Vector3 Divide(const ::Vector3& vector3) {
-
109  return Vector3Divide(*this, vector3);
-
110  }
-
111 
-
112  Vector3 operator/(const ::Vector3& vector3) {
-
113  return Vector3Divide(*this, vector3);
-
114  }
+
100  return *this;
+
101  }
+
102 
+
103  Vector3 operator/(const float div) {
+
104  return Divide(div);
+
105  }
+
106 
+
107  Vector3& operator+=(const ::Vector3& vector3) {
+
108  set(Vector3Add(*this, vector3));
+
109 
+
110  return *this;
+
111  }
+
112 
+
113  Vector3& operator-=(const ::Vector3& vector3) {
+
114  set(Vector3Subtract(*this, vector3));
115 
-
116  Vector3& Divide(const float div) {
-
117  x /= div;
-
118  y /= div;
-
119  z /= div;
-
120 
-
121  return *this;
-
122  }
-
123 
-
124  Vector3 operator/(const float div) {
-
125  return Divide(div);
-
126  }
-
127 
-
128  Vector3& operator+=(const ::Vector3& vector3) {
-
129  set(Vector3Add(*this, vector3));
-
130 
-
131  return *this;
-
132  }
-
133 
-
134  Vector3& operator-=(const ::Vector3& vector3) {
-
135  set(Vector3Subtract(*this, vector3));
+
116  return *this;
+
117  }
+
118 
+
119 
+
120  Vector3& operator*=(const ::Vector3& vector3) {
+
121  set(Vector3Multiply(*this, vector3));
+
122 
+
123  return *this;
+
124  }
+
125 
+
126  Vector3& operator*=(const float scale) {
+
127  set(Vector3Scale(*this, scale));
+
128 
+
129  return *this;
+
130  }
+
131 
+
132  Vector3& operator/=(const ::Vector3& vector3) {
+
133  x /= vector3.x;
+
134  y /= vector3.y;
+
135  z /= vector3.z;
136 
137  return *this;
138  }
139 
-
140 
-
141  Vector3& operator*=(const ::Vector3& vector3) {
-
142  set(Vector3Multiply(*this, vector3));
-
143 
-
144  return *this;
-
145  }
-
146 
-
147  Vector3& operator*=(const float scale) {
-
148  set(Vector3Scale(*this, scale));
-
149 
-
150  return *this;
-
151  }
-
152 
-
153  Vector3& operator/=(const ::Vector3& vector3) {
-
154  x /= vector3.x;
-
155  y /= vector3.y;
-
156  z /= vector3.z;
-
157 
-
158  return *this;
-
159  }
-
160 
-
161  Vector3& operator/=(const float div) {
-
162  x /= div;
-
163  y /= div;
-
164  z /= div;
-
165 
-
166  return *this;
-
167  }
-
168 
-
169  float Length() const {
-
170  return Vector3Length(*this);
-
171  }
-
172 
- -
174  return Vector3Normalize(*this);
-
175  }
-
176 
-
177  float DotProduct(const ::Vector3& vector3) {
-
178  return Vector3DotProduct(*this, vector3);
-
179  }
-
180 
-
181  float Distance(const ::Vector3& vector3) {
-
182  return Vector3Distance(*this, vector3);
-
183  }
-
184 
-
185  Vector3 Lerp(const ::Vector3& vector3, const float amount) {
-
186  return Vector3Lerp(*this, vector3, amount);
-
187  }
-
188 
-
189  Vector3 CrossProduct(const ::Vector3& vector3) {
-
190  return Vector3CrossProduct(*this, vector3);
-
191  }
-
192 
- -
194  return Vector3Perpendicular(*this);
-
195  }
-
196 
-
197  void OrthoNormalize(::Vector3* vector3) {
-
198  Vector3OrthoNormalize(this, vector3);
-
199  }
-
200 
-
201  Vector3 Transform(const ::Matrix& matrix) {
-
202  return Vector3Transform(*this, matrix);
-
203  }
-
204 
-
205  Vector3 RotateByQuaternion(const ::Quaternion& quaternion) {
-
206  return Vector3RotateByQuaternion(*this, quaternion);
-
207  }
-
208 
-
209  Vector3 Reflect(const ::Vector3& normal) {
-
210  return Vector3Reflect(*this, normal);
-
211  }
+
140  Vector3& operator/=(const float div) {
+
141  x /= div;
+
142  y /= div;
+
143  z /= div;
+
144 
+
145  return *this;
+
146  }
+
147 
+
148  float Length() const {
+
149  return Vector3Length(*this);
+
150  }
+
151 
+
152  Vector3 Normalize() {
+
153  return Vector3Normalize(*this);
+
154  }
+
155 
+
156  float DotProduct(const ::Vector3& vector3) {
+
157  return Vector3DotProduct(*this, vector3);
+
158  }
+
159 
+
160  float Distance(const ::Vector3& vector3) {
+
161  return Vector3Distance(*this, vector3);
+
162  }
+
163 
+
164  Vector3 Lerp(const ::Vector3& vector3, const float amount) {
+
165  return Vector3Lerp(*this, vector3, amount);
+
166  }
+
167 
+
168  Vector3 CrossProduct(const ::Vector3& vector3) {
+
169  return Vector3CrossProduct(*this, vector3);
+
170  }
+
171 
+
172  Vector3 Perpendicular() {
+
173  return Vector3Perpendicular(*this);
+
174  }
+
175 
+
176  void OrthoNormalize(::Vector3* vector3) {
+
177  Vector3OrthoNormalize(this, vector3);
+
178  }
+
179 
+
180  Vector3 Transform(const ::Matrix& matrix) {
+
181  return Vector3Transform(*this, matrix);
+
182  }
+
183 
+
184  Vector3 RotateByQuaternion(const ::Quaternion& quaternion) {
+
185  return Vector3RotateByQuaternion(*this, quaternion);
+
186  }
+
187 
+
188  Vector3 Reflect(const ::Vector3& normal) {
+
189  return Vector3Reflect(*this, normal);
+
190  }
+
191 
+
192  Vector3 Min(const ::Vector3& vector3) {
+
193  return Vector3Min(*this, vector3);
+
194  }
+
195 
+
196  Vector3 Max(const ::Vector3& vector3) {
+
197  return Vector3Max(*this, vector3);
+
198  }
+
199 
+
200  Vector3 Barycenter(const ::Vector3& a, const ::Vector3& b, const ::Vector3& c) {
+
201  return Vector3Barycenter(*this, a, b, c);
+
202  }
+
203 
+
204  static Vector3 Zero() {
+
205  return Vector3Zero();
+
206  }
+
207 
+
208  static Vector3 One() {
+
209  return Vector3One();
+
210  }
+
211 #endif
212 
-
213  Vector3 Min(const ::Vector3& vector3) {
-
214  return Vector3Min(*this, vector3);
-
215  }
-
216 
-
217  Vector3 Max(const ::Vector3& vector3) {
-
218  return Vector3Max(*this, vector3);
-
219  }
-
220 
-
221  Vector3 Barycenter(const ::Vector3& a, const ::Vector3& b, const ::Vector3& c) {
-
222  return Vector3Barycenter(*this, a, b, c);
-
223  }
-
224 
-
225  static Vector3 Zero() {
-
226  return Vector3Zero();
-
227  }
-
228 
-
229  static Vector3 One() {
-
230  return Vector3One();
-
231  }
-
232 #endif
-
233 
-
234  inline Vector3& DrawLine3D(const ::Vector3& endPos, ::Color color) {
-
235  ::DrawLine3D(*this, endPos, color);
-
236  return *this;
-
237  }
-
238 
-
239  inline Vector3& DrawPoint3D(::Color color) {
-
240  ::DrawPoint3D(*this, color);
-
241  return *this;
-
242  }
-
243 
- -
245  float radius,
-
246  const ::Vector3& rotationAxis,
-
247  float rotationAngle,
-
248  Color color) {
-
249  ::DrawCircle3D(*this, radius, rotationAxis, rotationAngle, color);
-
250  return *this;
-
251  }
-
252 
-
253  inline Vector3& DrawCube(float width, float height, float length, ::Color color) {
-
254  ::DrawCube(*this, width, height, length, color);
-
255  return *this;
-
256  }
-
257 
-
258  inline Vector3& DrawCube(const ::Vector3& size, ::Color color) {
-
259  ::DrawCubeV(*this, size, color);
-
260  return *this;
-
261  }
-
262 
-
263  inline Vector3& DrawCubeWires(float width, float height, float length, ::Color color) {
-
264  ::DrawCubeWires(*this, width, height, length, color);
-
265  return *this;
-
266  }
-
267 
-
268  inline Vector3& DrawCubeWires(const ::Vector3& size, ::Color color) {
-
269  ::DrawCubeWiresV(*this, size, color);
-
270  return *this;
-
271  }
-
272 
- -
274  const ::Texture2D& texture,
-
275  float width,
-
276  float height,
-
277  float length,
-
278  ::Color color) {
-
279  ::DrawCubeTexture(texture, *this, width, height, length, color);
+
213  inline Vector3& DrawLine3D(const ::Vector3& endPos, ::Color color) {
+
214  ::DrawLine3D(*this, endPos, color);
+
215  return *this;
+
216  }
+
217 
+
218  inline Vector3& DrawPoint3D(::Color color) {
+
219  ::DrawPoint3D(*this, color);
+
220  return *this;
+
221  }
+
222 
+
223  inline Vector3& DrawCircle3D(
+
224  float radius,
+
225  const ::Vector3& rotationAxis,
+
226  float rotationAngle,
+
227  Color color) {
+
228  ::DrawCircle3D(*this, radius, rotationAxis, rotationAngle, color);
+
229  return *this;
+
230  }
+
231 
+
232  inline Vector3& DrawCube(float width, float height, float length, ::Color color) {
+
233  ::DrawCube(*this, width, height, length, color);
+
234  return *this;
+
235  }
+
236 
+
237  inline Vector3& DrawCube(const ::Vector3& size, ::Color color) {
+
238  ::DrawCubeV(*this, size, color);
+
239  return *this;
+
240  }
+
241 
+
242  inline Vector3& DrawCubeWires(float width, float height, float length, ::Color color) {
+
243  ::DrawCubeWires(*this, width, height, length, color);
+
244  return *this;
+
245  }
+
246 
+
247  inline Vector3& DrawCubeWires(const ::Vector3& size, ::Color color) {
+
248  ::DrawCubeWiresV(*this, size, color);
+
249  return *this;
+
250  }
+
251 
+
252  inline Vector3& DrawCubeTexture(
+
253  const ::Texture2D& texture,
+
254  float width,
+
255  float height,
+
256  float length,
+
257  ::Color color) {
+
258  ::DrawCubeTexture(texture, *this, width, height, length, color);
+
259  return *this;
+
260  }
+
261 
+
262  inline Vector3& DrawSphere(float radius, ::Color color) {
+
263  ::DrawSphere(*this, radius, color);
+
264  return *this;
+
265  }
+
266 
+
267  inline Vector3& DrawSphere(float radius, int rings, int slices, ::Color color) {
+
268  ::DrawSphereEx(*this, radius, rings, slices, color);
+
269  return *this;
+
270  }
+
271 
+
272  inline Vector3& DrawSphereWires(float radius, int rings, int slices, ::Color color) {
+
273  ::DrawSphereWires(*this, radius, rings, slices, color);
+
274  return *this;
+
275  }
+
276 
+
277  inline Vector3& DrawCylinder(float radiusTop, float radiusBottom, float height,
+
278  int slices, Color color) {
+
279  ::DrawCylinder(*this, radiusTop, radiusBottom, height, slices, color);
280  return *this;
281  }
282 
-
283  inline Vector3& DrawSphere(float radius, ::Color color) {
-
284  ::DrawSphere(*this, radius, color);
-
285  return *this;
-
286  }
-
287 
-
288  inline Vector3& DrawSphere(float radius, int rings, int slices, ::Color color) {
-
289  ::DrawSphereEx(*this, radius, rings, slices, color);
-
290  return *this;
-
291  }
-
292 
-
293  inline Vector3& DrawSphereWires(float radius, int rings, int slices, ::Color color) {
-
294  ::DrawSphereWires(*this, radius, rings, slices, color);
-
295  return *this;
-
296  }
-
297 
-
298  inline Vector3& DrawCylinder(float radiusTop, float radiusBottom, float height,
-
299  int slices, Color color) {
-
300  ::DrawCylinder(*this, radiusTop, radiusBottom, height, slices, color);
-
301  return *this;
-
302  }
-
303 
-
304  inline Vector3& DrawCylinderWires(float radiusTop, float radiusBottom, float height,
-
305  int slices, Color color) {
-
306  ::DrawCylinderWires(*this, radiusTop, radiusBottom, height, slices, color);
-
307  return *this;
-
308  }
-
309 
-
310  inline Vector3& DrawPlane(const ::Vector2& size, ::Color color) {
-
311  ::DrawPlane(*this, size, color);
-
312  return *this;
-
313  }
+
283  inline Vector3& DrawCylinderWires(float radiusTop, float radiusBottom, float height,
+
284  int slices, Color color) {
+
285  ::DrawCylinderWires(*this, radiusTop, radiusBottom, height, slices, color);
+
286  return *this;
+
287  }
+
288 
+
289  inline Vector3& DrawPlane(const ::Vector2& size, ::Color color) {
+
290  ::DrawPlane(*this, size, color);
+
291  return *this;
+
292  }
+
293 
+
294  inline Vector3& DrawGizmo() {
+
295  ::DrawGizmo(*this);
+
296  return *this;
+
297  }
+
298 
+
302  inline bool CheckCollision(float radius1, const ::Vector3& center2, float radius2) {
+
303  return CheckCollisionSpheres(*this, radius1, center2, radius2);
+
304  }
+
305 
+
306  private:
+
307  inline void set(const ::Vector3& vec) {
+
308  x = vec.x;
+
309  y = vec.y;
+
310  z = vec.z;
+
311  }
+
312 };
+
313 } // namespace raylib
314 
-
315  inline Vector3& DrawGizmo() {
-
316  ::DrawGizmo(*this);
-
317  return *this;
-
318  }
-
319 
-
323  inline bool CheckCollision(float radius1, const ::Vector3& center2, float radius2) {
-
324  return CheckCollisionSpheres(*this, radius1, center2, radius2);
-
325  }
-
326 
-
327  protected:
-
328  inline void set(const ::Vector3& vec) {
-
329  x = vec.x;
-
330  y = vec.y;
-
331  z = vec.z;
-
332  }
-
333 };
-
334 } // namespace raylib
-
335 
-
336 #endif // RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
+
315 #endif // RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Vector3 Perpendicular()
Definition: Vector3.hpp:193
-
Vector3 operator*(const float scale)
Definition: Vector3.hpp:104
-
Vector3 & DrawCircle3D(float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color)
Definition: Vector3.hpp:244
-
Vector3 & DrawSphereWires(float radius, int rings, int slices, ::Color color)
Definition: Vector3.hpp:293
-
Vector3 Reflect(const ::Vector3 &normal)
Definition: Vector3.hpp:209
-
Vector3 operator*(const ::Vector3 &vector3)
Definition: Vector3.hpp:96
-
Vector3 Multiply(const ::Vector3 &vector3)
Definition: Vector3.hpp:92
-
Vector3(::Color color)
Definition: Vector3.hpp:48
-
Vector3 Normalize()
Definition: Vector3.hpp:173
-
Vector3 CrossProduct(const ::Vector3 &vector3)
Definition: Vector3.hpp:189
-
Vector3 Barycenter(const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c)
Definition: Vector3.hpp:221
-
Vector3(float x, float y, float z)
Definition: Vector3.hpp:43
-
Vector3 RotateByQuaternion(const ::Quaternion &quaternion)
Definition: Vector3.hpp:205
-
bool operator==(const ::Vector3 &other)
Definition: Vector3.hpp:61
-
Vector3 & Divide(const float div)
Definition: Vector3.hpp:116
-
Definition: Vector3.hpp:37
-
Vector3 & DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, Color color)
Definition: Vector3.hpp:304
-
Vector3 Max(const ::Vector3 &vector3)
Definition: Vector3.hpp:217
-
Vector3(float x, float y)
Definition: Vector3.hpp:44
-
Vector3 & operator*=(const ::Vector3 &vector3)
Definition: Vector3.hpp:141
-
Vector3 & DrawSphere(float radius, ::Color color)
Definition: Vector3.hpp:283
-
Vector3 operator/(const ::Vector3 &vector3)
Definition: Vector3.hpp:112
-
Vector3 Scale(const float scale)
Definition: Vector3.hpp:100
-
Vector3 operator-(const ::Vector3 &vector3)
Definition: Vector3.hpp:80
-
float Length() const
Definition: Vector3.hpp:169
-
Vector3 & DrawGizmo()
Definition: Vector3.hpp:315
-
Vector3(const ::Vector3 &vec)
Definition: Vector3.hpp:39
-
Vector3 & DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, Color color)
Definition: Vector3.hpp:298
-
Vector3 & operator*=(const float scale)
Definition: Vector3.hpp:147
-
Vector3 & DrawLine3D(const ::Vector3 &endPos, ::Color color)
Definition: Vector3.hpp:234
-
void set(const ::Vector3 &vec)
Definition: Vector3.hpp:328
-
Vector3 Divide(const ::Vector3 &vector3)
Definition: Vector3.hpp:108
-
Definition: Color.hpp:35
-
Vector3 & DrawCubeTexture(const ::Texture2D &texture, float width, float height, float length, ::Color color)
Definition: Vector3.hpp:273
-
bool CheckCollision(float radius1, const ::Vector3 &center2, float radius2)
Detect collision between two spheres.
Definition: Vector3.hpp:323
-
Vector3 & DrawSphere(float radius, int rings, int slices, ::Color color)
Definition: Vector3.hpp:288
-
void OrthoNormalize(::Vector3 *vector3)
Definition: Vector3.hpp:197
-
Vector3 & DrawCubeWires(float width, float height, float length, ::Color color)
Definition: Vector3.hpp:263
-
Vector3(float x)
Definition: Vector3.hpp:45
-
Vector3 Lerp(const ::Vector3 &vector3, const float amount)
Definition: Vector3.hpp:185
-
Vector3 Transform(const ::Matrix &matrix)
Definition: Vector3.hpp:201
-
Vector3 Negate()
Definition: Vector3.hpp:84
-
Vector3 Subtract(const ::Vector3 &vector3)
Definition: Vector3.hpp:76
-
Vector3 operator/(const float div)
Definition: Vector3.hpp:124
-
Vector3 & operator-=(const ::Vector3 &vector3)
Definition: Vector3.hpp:134
-
static Vector3 Zero()
Definition: Vector3.hpp:225
-
Vector3 & DrawPlane(const ::Vector2 &size, ::Color color)
Definition: Vector3.hpp:310
-
float Distance(const ::Vector3 &vector3)
Definition: Vector3.hpp:181
-
Vector3()
Definition: Vector3.hpp:46
-
Vector3 & operator/=(const float div)
Definition: Vector3.hpp:161
-
Vector3 & operator+=(const ::Vector3 &vector3)
Definition: Vector3.hpp:128
-
Vector3 & DrawCubeWires(const ::Vector3 &size, ::Color color)
Definition: Vector3.hpp:268
-
Vector3 Min(const ::Vector3 &vector3)
Definition: Vector3.hpp:213
-
Vector3 operator+(const ::Vector3 &vector3)
Definition: Vector3.hpp:72
-
float DotProduct(const ::Vector3 &vector3)
Definition: Vector3.hpp:177
-
Vector3 & operator/=(const ::Vector3 &vector3)
Definition: Vector3.hpp:153
-
Vector3 & DrawCube(const ::Vector3 &size, ::Color color)
Definition: Vector3.hpp:258
-
static Vector3 One()
Definition: Vector3.hpp:229
-
Vector3 operator-()
Definition: Vector3.hpp:88
-
Vector3 & DrawPoint3D(::Color color)
Definition: Vector3.hpp:239
-
Vector3 Add(const ::Vector3 &vector3)
Definition: Vector3.hpp:68
-
Vector3 & DrawCube(float width, float height, float length, ::Color color)
Definition: Vector3.hpp:253
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Vector3 type.
Definition: Vector3.hpp:16
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
bool CheckCollision(float radius1, const ::Vector3 &center2, float radius2)
Detect collision between two spheres.
Definition: Vector3.hpp:302
diff --git a/docs/_vector4_8hpp_source.html b/docs/_vector4_8hpp_source.html index ba16be4..0b03cff 100644 --- a/docs/_vector4_8hpp_source.html +++ b/docs/_vector4_8hpp_source.html @@ -71,231 +71,174 @@ $(function() {
Vector4.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
-
27 
-
28 #ifndef RAYLIB_CPP_NO_MATH
-
29 #include <cmath>
-
30 #include <utility>
-
31 #endif
+
1 #ifndef RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
+
3 
+
4 #ifndef RAYLIB_CPP_NO_MATH
+
5 #include <cmath>
+
6 #include <utility>
+
7 #endif
+
8 
+
9 #include "./raylib.hpp"
+
10 #include "./raymath.hpp"
+
11 #include "./raylib-cpp-utils.hpp"
+
12 
+
13 namespace raylib {
+
17 class Vector4 : public ::Vector4 {
+
18  public:
+
19  Vector4(const ::Vector4& vec) {
+
20  set(vec);
+
21  }
+
22 
+
23  Vector4(float x, float y, float z, float w) : ::Vector4{x, y, z, w} {}
+
24  Vector4(float x, float y, float z) : ::Vector4{x, y, z, 0} {}
+
25  Vector4(float x, float y) : ::Vector4{x, y, 0, 0} {}
+
26  Vector4(float x) : ::Vector4{x, 0, 0, 0} {}
+
27  Vector4() {}
+
28 
+
29  Vector4(::Color color) {
+
30  set(ColorNormalize(color));
+
31  }
32 
-
33 #include "./raylib.hpp"
-
34 #include "./raymath.hpp"
-
35 #include "./raylib-cpp-utils.hpp"
-
36 
-
37 namespace raylib {
-
38 class Vector4 : public ::Vector4 {
-
39  public:
-
40  Vector4(const ::Vector4& vec) {
-
41  set(vec);
-
42  }
-
43 
-
44  Vector4(float x, float y, float z, float w) : ::Vector4{x, y, z, w} {}
-
45  Vector4(float x, float y, float z) : ::Vector4{x, y, z, 0} {}
-
46  Vector4(float x, float y) : ::Vector4{x, y, 0, 0} {}
-
47  Vector4(float x) : ::Vector4{x, 0, 0, 0} {}
-
48  Vector4() {}
+
33  GETTERSETTER(float, X, x)
+
34  GETTERSETTER(float, Y, y)
+
35  GETTERSETTER(float, Z, z)
+
36  GETTERSETTER(float, W, w)
+
37 
+
38  Vector4& operator=(const ::Vector4& vector4) {
+
39  set(vector4);
+
40  return *this;
+
41  }
+
42 
+
43  bool operator==(const ::Vector4& other) {
+
44  return x == other.x
+
45  && y == other.y
+
46  && z == other.z
+
47  && w == other.w;
+
48  }
49 
-
50  Vector4(::Color color) {
-
51  set(ColorNormalize(color));
+
50  inline ::Rectangle ToRectangle() {
+
51  return {x, y, z, w};
52  }
53 
-
54  GETTERSETTER(float, X, x)
-
55  GETTERSETTER(float, Y, y)
-
56  GETTERSETTER(float, Z, z)
-
57  GETTERSETTER(float, W, w)
-
58 
-
59  Vector4& operator=(const ::Vector4& vector4) {
-
60  set(vector4);
-
61  return *this;
-
62  }
-
63 
-
64  bool operator==(const ::Vector4& other) {
-
65  return x == other.x
-
66  && y == other.y
-
67  && z == other.z
-
68  && w == other.w;
+
54  operator ::Rectangle() const {
+
55  return {x, y, z, w};
+
56  }
+
57 
+
58 #ifndef RAYLIB_CPP_NO_MATH
+
59  Vector4 Multiply(const ::Vector4& vector4) {
+
60  return QuaternionMultiply(*this, vector4);
+
61  }
+
62 
+
63  Vector4 operator*(const ::Vector4& vector4) {
+
64  return QuaternionMultiply(*this, vector4);
+
65  }
+
66 
+
67  Vector4 Lerp(const ::Vector4& vector4, float amount) {
+
68  return QuaternionLerp(*this, vector4, amount);
69  }
70 
-
71  inline ::Rectangle ToRectangle() {
-
72  return {x, y, z, w};
+
71  Vector4 Nlerp(const ::Vector4& vector4, float amount) {
+
72  return QuaternionNlerp(*this, vector4, amount);
73  }
74 
-
75  operator ::Rectangle() const {
-
76  return {x, y, z, w};
+
75  Vector4 Slerp(const ::Vector4& vector4, float amount) {
+
76  return QuaternionSlerp(*this, vector4, amount);
77  }
78 
-
79 #ifndef RAYLIB_CPP_NO_MATH
-
80  Vector4 Multiply(const ::Vector4& vector4) {
-
81  return QuaternionMultiply(*this, vector4);
-
82  }
-
83 
-
84  Vector4 operator*(const ::Vector4& vector4) {
-
85  return QuaternionMultiply(*this, vector4);
-
86  }
-
87 
-
88  Vector4 Lerp(const ::Vector4& vector4, float amount) {
-
89  return QuaternionLerp(*this, vector4, amount);
-
90  }
-
91 
-
92  Vector4 Nlerp(const ::Vector4& vector4, float amount) {
-
93  return QuaternionNlerp(*this, vector4, amount);
-
94  }
-
95 
-
96  Vector4 Slerp(const ::Vector4& vector4, float amount) {
-
97  return QuaternionSlerp(*this, vector4, amount);
-
98  }
-
99 
- -
101  return QuaternionToMatrix(*this);
-
102  }
-
103 
-
104  float Length() const {
-
105  return QuaternionLength(*this);
-
106  }
-
107 
- -
109  return QuaternionNormalize(*this);
-
110  }
-
111 
- -
113  return QuaternionInvert(*this);
-
114  }
-
115 
-
116  void ToAxisAngle(::Vector3 *outAxis, float *outAngle) {
-
117  QuaternionToAxisAngle(*this, outAxis, outAngle);
-
118  }
-
119 
-
120  std::pair<Vector3, float> ToAxisAngle() {
-
121  Vector3 outAxis;
-
122  float outAngle;
-
123 
-
124  QuaternionToAxisAngle(*this, &outAxis, &outAngle);
+
79  Matrix ToMatrix() {
+
80  return QuaternionToMatrix(*this);
+
81  }
+
82 
+
83  float Length() const {
+
84  return QuaternionLength(*this);
+
85  }
+
86 
+
87  Vector4 Normalize() {
+
88  return QuaternionNormalize(*this);
+
89  }
+
90 
+
91  Vector4 Invert() {
+
92  return QuaternionInvert(*this);
+
93  }
+
94 
+
95  void ToAxisAngle(::Vector3 *outAxis, float *outAngle) {
+
96  QuaternionToAxisAngle(*this, outAxis, outAngle);
+
97  }
+
98 
+
99  std::pair<Vector3, float> ToAxisAngle() {
+
100  Vector3 outAxis;
+
101  float outAngle;
+
102 
+
103  QuaternionToAxisAngle(*this, &outAxis, &outAngle);
+
104 
+
105  std::pair<Vector3, float> out(outAxis, outAngle);
+
106 
+
107  return out;
+
108  }
+
109 
+
110  Vector4 Transform(const ::Matrix& matrix) {
+
111  return ::QuaternionTransform(*this, matrix);
+
112  }
+
113 
+
114  static Vector4 Identity() {
+
115  return ::QuaternionIdentity();
+
116  }
+
117 
+
118  static Vector4 FromVector3ToVector3(const ::Vector3& from , const ::Vector3& to) {
+
119  return ::QuaternionFromVector3ToVector3(from , to);
+
120  }
+
121 
+
122  static Vector4 FromMatrix(const ::Matrix& matrix) {
+
123  return ::QuaternionFromMatrix(matrix);
+
124  }
125 
-
126  std::pair<Vector3, float> out(outAxis, outAngle);
-
127 
-
128  return out;
-
129  }
-
130 
-
131  Vector4 Transform(const ::Matrix& matrix) {
-
132  return ::QuaternionTransform(*this, matrix);
-
133  }
-
134 
-
135  static Vector4 Identity() {
-
136  return ::QuaternionIdentity();
-
137  }
-
138 
-
139  static Vector4 FromVector3ToVector3(const ::Vector3& from , const ::Vector3& to) {
-
140  return ::QuaternionFromVector3ToVector3(from , to);
-
141  }
+
126  static Vector4 FromAxisAngle(const ::Vector3& axis, const float angle) {
+
127  return ::QuaternionFromAxisAngle(axis, angle);
+
128  }
+
129 
+
130  static Vector4 FromEuler(const float roll, const float pitch, const float yaw) {
+
131  return ::QuaternionFromEuler(roll, pitch, yaw);
+
132  }
+
133 
+
134  static Vector4 FromEuler(const ::Vector3& vector3) {
+
135  return ::QuaternionFromEuler(vector3.x, vector3.y, vector3.z);
+
136  }
+
137 
+
138  Vector3 ToEuler() {
+
139  return ::QuaternionToEuler(*this);
+
140  }
+
141 #endif
142 
-
143  static Vector4 FromMatrix(const ::Matrix& matrix) {
-
144  return ::QuaternionFromMatrix(matrix);
+
143  inline Color ColorFromNormalized() const {
+
144  return ::ColorFromNormalized(*this);
145  }
146 
-
147  static Vector4 FromAxisAngle(const ::Vector3& axis, const float angle) {
-
148  return ::QuaternionFromAxisAngle(axis, angle);
+
147  operator Color() {
+
148  return ColorFromNormalized();
149  }
150 
-
151  static Vector4 FromEuler(const float roll, const float pitch, const float yaw) {
-
152  return ::QuaternionFromEuler(roll, pitch, yaw);
-
153  }
-
154 
-
155  static Vector4 FromEuler(const ::Vector3& vector3) {
-
156  return ::QuaternionFromEuler(vector3.x, vector3.y, vector3.z);
+
151  private:
+
152  inline void set(const ::Vector4& vec4) {
+
153  x = vec4.x;
+
154  y = vec4.y;
+
155  z = vec4.z;
+
156  w = vec4.w;
157  }
-
158 
- -
160  return ::QuaternionToEuler(*this);
-
161  }
-
162 #endif
+
158 };
+
159 
+
160 // Alias the Vector4 as Quaternion.
+
161 typedef Vector4 Quaternion;
+
162 } // namespace raylib
163 
-
164  inline Color ColorFromNormalized() const {
-
165  return ::ColorFromNormalized(*this);
-
166  }
-
167 
-
168  operator Color() {
-
169  return ColorFromNormalized();
-
170  }
-
171 
-
172  protected:
-
173  inline void set(const ::Vector4& vec4) {
-
174  x = vec4.x;
-
175  y = vec4.y;
-
176  z = vec4.z;
-
177  w = vec4.w;
-
178  }
-
179 };
-
180 
-
181 // Alias the Vector4 as Quaternion.
- -
183 } // namespace raylib
-
184 
-
185 #endif // RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
+
164 #endif // RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
-
inline ::Rectangle ToRectangle()
Definition: Vector4.hpp:71
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Vector4 Lerp(const ::Vector4 &vector4, float amount)
Definition: Vector4.hpp:88
-
Definition: Matrix.hpp:46
-
Vector3 ToEuler()
Definition: Vector4.hpp:159
-
std::pair< Vector3, float > ToAxisAngle()
Definition: Vector4.hpp:120
-
Vector4(float x, float y, float z, float w)
Definition: Vector4.hpp:44
-
static Vector4 FromMatrix(const ::Matrix &matrix)
Definition: Vector4.hpp:143
-
Definition: Vector4.hpp:38
-
Vector4()
Definition: Vector4.hpp:48
-
static Vector4 Identity()
Definition: Vector4.hpp:135
-
Vector4(float x)
Definition: Vector4.hpp:47
-
static Vector4 FromEuler(const ::Vector3 &vector3)
Definition: Vector4.hpp:155
-
Vector4 Quaternion
Definition: Vector4.hpp:182
-
void set(const ::Vector4 &vec4)
Definition: Vector4.hpp:173
-
Vector4 Slerp(const ::Vector4 &vector4, float amount)
Definition: Vector4.hpp:96
-
static Vector4 FromAxisAngle(const ::Vector3 &axis, const float angle)
Definition: Vector4.hpp:147
-
Vector4(::Color color)
Definition: Vector4.hpp:50
-
Vector4 Multiply(const ::Vector4 &vector4)
Definition: Vector4.hpp:80
-
Definition: Vector3.hpp:37
-
Color ColorFromNormalized() const
Definition: Vector4.hpp:164
-
Vector4 Nlerp(const ::Vector4 &vector4, float amount)
Definition: Vector4.hpp:92
-
Vector4 Invert()
Definition: Vector4.hpp:112
-
Vector4 operator*(const ::Vector4 &vector4)
Definition: Vector4.hpp:84
-
Definition: Color.hpp:35
-
Matrix ToMatrix()
Definition: Vector4.hpp:100
-
bool operator==(const ::Vector4 &other)
Definition: Vector4.hpp:64
-
Vector4 Transform(const ::Matrix &matrix)
Definition: Vector4.hpp:131
-
Vector4(const ::Vector4 &vec)
Definition: Vector4.hpp:40
-
Vector4 Normalize()
Definition: Vector4.hpp:108
-
static Vector4 FromVector3ToVector3(const ::Vector3 &from, const ::Vector3 &to)
Definition: Vector4.hpp:139
-
static Vector4 FromEuler(const float roll, const float pitch, const float yaw)
Definition: Vector4.hpp:151
-
float Length() const
Definition: Vector4.hpp:104
-
void ToAxisAngle(::Vector3 *outAxis, float *outAngle)
Definition: Vector4.hpp:116
-
Vector4(float x, float y, float z)
Definition: Vector4.hpp:45
-
Vector4(float x, float y)
Definition: Vector4.hpp:46
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Vector4 type.
Definition: Vector4.hpp:17
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
diff --git a/docs/_vr_simulator_8hpp_source.html b/docs/_vr_simulator_8hpp_source.html index 4f2b432..32f73e1 100644 --- a/docs/_vr_simulator_8hpp_source.html +++ b/docs/_vr_simulator_8hpp_source.html @@ -71,118 +71,92 @@ $(function() {
VrSimulator.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
-
27 
-
28 #include "./raylib.hpp"
-
29 #include "./raylib-cpp-utils.hpp"
-
30 
-
31 namespace raylib {
-
32 class VrSimulator {
-
33  public:
- -
35  Init();
-
36  }
-
37 
-
38  VrSimulator(::VrDeviceInfo info, ::Shader distortion) {
-
39  Init();
-
40  Set(info, distortion);
+
1 #ifndef RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 
+
7 namespace raylib {
+
11 class VrSimulator {
+
12  public:
+
13  VrSimulator() {
+
14  Init();
+
15  }
+
16 
+
17  VrSimulator(::VrDeviceInfo info, ::Shader distortion) {
+
18  Init();
+
19  Set(info, distortion);
+
20  }
+
21 
+
25  inline void Init() {
+
26  InitVrSimulator();
+
27  }
+
28 
+ +
33  Close();
+
34  }
+
35 
+
39  inline bool IsReady() const {
+
40  return ::IsVrSimulatorReady();
41  }
42 
-
46  inline void Init() {
-
47  InitVrSimulator();
-
48  }
-
49 
- -
54  Close();
-
55  }
-
56 
-
60  inline bool IsReady() const {
-
61  return ::IsVrSimulatorReady();
-
62  }
-
63 
-
67  inline VrSimulator& Update(::Camera *camera) {
-
68  ::UpdateVrTracking(camera);
-
69  return *this;
-
70  }
-
71 
-
75  inline VrSimulator& Update(const ::Camera& camera) {
-
76  const ::Camera* cameraPointer = reinterpret_cast<const Camera*>(&camera);
-
77  ::UpdateVrTracking((::Camera*)cameraPointer);
-
78  return *this;
-
79  }
-
80 
-
84  inline VrSimulator& Set(::VrDeviceInfo info, ::Shader distortion) {
-
85  ::SetVrConfiguration(info, distortion);
-
86  return *this;
-
87  }
-
88 
-
92  inline VrSimulator& Toggle() {
-
93  ::ToggleVrMode();
-
94  return *this;
-
95  }
-
96 
- -
101  ::BeginVrDrawing();
-
102  return *this;
-
103  }
-
104 
- -
109  ::EndVrDrawing();
-
110  return *this;
-
111  }
-
112 
-
116  inline void Close() {
-
117  ::CloseVrSimulator();
-
118  }
-
119 };
-
120 } // namespace raylib
-
121 
-
122 #endif // RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
+
46  inline VrSimulator& Update(::Camera *camera) {
+
47  ::UpdateVrTracking(camera);
+
48  return *this;
+
49  }
+
50 
+
54  inline VrSimulator& Update(const ::Camera& camera) {
+
55  const ::Camera* cameraPointer = reinterpret_cast<const Camera*>(&camera);
+
56  ::UpdateVrTracking((::Camera*)cameraPointer);
+
57  return *this;
+
58  }
+
59 
+
63  inline VrSimulator& Set(::VrDeviceInfo info, ::Shader distortion) {
+
64  ::SetVrConfiguration(info, distortion);
+
65  return *this;
+
66  }
+
67 
+
71  inline VrSimulator& Toggle() {
+
72  ::ToggleVrMode();
+
73  return *this;
+
74  }
+
75 
+ +
80  ::BeginVrDrawing();
+
81  return *this;
+
82  }
+
83 
+
87  inline VrSimulator& EndDrawing() {
+
88  ::EndVrDrawing();
+
89  return *this;
+
90  }
+
91 
+
95  inline void Close() {
+
96  ::CloseVrSimulator();
+
97  }
+
98 };
+
99 } // namespace raylib
+
100 
+
101 #endif // RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
~VrSimulator()
Close VR simulator for current device.
Definition: VrSimulator.hpp:53
-
VrSimulator & Update(const ::Camera &camera)
Update VR tracking (position and orientation) and camera.
Definition: VrSimulator.hpp:75
-
VrSimulator & Toggle()
Enable/Disable VR experience.
Definition: VrSimulator.hpp:92
-
VrSimulator(::VrDeviceInfo info, ::Shader distortion)
Definition: VrSimulator.hpp:38
-
Definition: Camera3D.hpp:33
-
VrSimulator & Update(::Camera *camera)
Update VR tracking (position and orientation) and camera.
Definition: VrSimulator.hpp:67
-
void Init()
Init VR simulator for selected device parameters.
Definition: VrSimulator.hpp:46
-
VrSimulator & EndDrawing()
End VR simulator stereo rendering.
-
Definition: Shader.hpp:35
-
void Close()
Close VR simulator for current device.
-
bool IsReady() const
Detect if VR simulator is ready.
Definition: VrSimulator.hpp:60
-
Definition: VrSimulator.hpp:32
-
VrSimulator()
Definition: VrSimulator.hpp:34
-
VrSimulator & Set(::VrDeviceInfo info, ::Shader distortion)
Set stereo rendering configuration parameters.
Definition: VrSimulator.hpp:84
-
VrSimulator & BeginDrawing()
Begin VR simulator stereo rendering.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
~VrSimulator()
Close VR simulator for current device.
Definition: VrSimulator.hpp:32
+
VrSimulator & Update(const ::Camera &camera)
Update VR tracking (position and orientation) and camera.
Definition: VrSimulator.hpp:54
+
VrSimulator & Toggle()
Enable/Disable VR experience.
Definition: VrSimulator.hpp:71
+
Camera type, defines a camera position/orientation in 3d space.
Definition: Camera3D.hpp:12
+
VrSimulator & Update(::Camera *camera)
Update VR tracking (position and orientation) and camera.
Definition: VrSimulator.hpp:46
+
void Init()
Init VR simulator for selected device parameters.
Definition: VrSimulator.hpp:25
+
VrSimulator & EndDrawing()
End VR simulator stereo rendering.
Definition: VrSimulator.hpp:87
+
Shader type (generic)
Definition: Shader.hpp:14
+
void Close()
Close VR simulator for current device.
Definition: VrSimulator.hpp:95
+
bool IsReady() const
Detect if VR simulator is ready.
Definition: VrSimulator.hpp:39
+
VR control functions.
Definition: VrSimulator.hpp:11
+
VrSimulator & Set(::VrDeviceInfo info, ::Shader distortion)
Set stereo rendering configuration parameters.
Definition: VrSimulator.hpp:63
+
VrSimulator & BeginDrawing()
Begin VR simulator stereo rendering.
Definition: VrSimulator.hpp:79
diff --git a/docs/_wave_8hpp_source.html b/docs/_wave_8hpp_source.html index 1932014..ad5d3d9 100644 --- a/docs/_wave_8hpp_source.html +++ b/docs/_wave_8hpp_source.html @@ -71,164 +71,137 @@ $(function() {
Wave.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_WAVE_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_WAVE_HPP_
-
27 
-
28 #include <string>
+
1 #ifndef RAYLIB_CPP_INCLUDE_WAVE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_WAVE_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 
+
9 namespace raylib {
+
13 class Wave : public ::Wave {
+
14  public:
+
15  Wave(const ::Wave& wave) {
+
16  set(wave);
+
17  }
+
18 
+
19  Wave(
+
20  unsigned int SampleCount = 0,
+
21  unsigned int SampleRate = 0,
+
22  unsigned int SampleSize = 0,
+
23  unsigned int Channels = 0) {
+
24  sampleCount = SampleCount;
+
25  sampleRate = SampleRate;
+
26  sampleSize = SampleSize;
+
27  channels = Channels;
+
28  }
29 
-
30 #include "./raylib.hpp"
-
31 #include "./raylib-cpp-utils.hpp"
-
32 
-
33 namespace raylib {
-
34 class Wave : public ::Wave {
-
35  public:
-
36  Wave(const ::Wave& wave) {
-
37  set(wave);
-
38  }
-
39 
- -
41  unsigned int SampleCount = 0,
-
42  unsigned int SampleRate = 0,
-
43  unsigned int SampleSize = 0,
-
44  unsigned int Channels = 0) {
-
45  sampleCount = SampleCount;
-
46  sampleRate = SampleRate;
-
47  sampleSize = SampleSize;
-
48  channels = Channels;
+
33  Wave(const std::string& fileName) {
+
34  set(::LoadWave(fileName.c_str()));
+
35  }
+
36 
+
40  Wave(const std::string& fileType, const unsigned char *fileData, int dataSize) {
+
41  set(::LoadWaveFromMemory(fileType.c_str(), fileData, dataSize));
+
42  }
+
43 
+
47  ~Wave() {
+
48  Unload();
49  }
50 
-
54  Wave(const std::string& fileName) {
-
55  set(::LoadWave(fileName.c_str()));
-
56  }
-
57 
-
61  Wave(const std::string& fileType, const unsigned char *fileData, int dataSize) {
-
62  set(::LoadWaveFromMemory(fileType.c_str(), fileData, dataSize));
-
63  }
-
64 
-
65  ~Wave() {
-
66  Unload();
-
67  }
-
68 
-
69  GETTERSETTER(unsigned int, SampleCount, sampleCount)
-
70  GETTERSETTER(unsigned int, SampleRate, sampleRate)
-
71  GETTERSETTER(unsigned int, SampleSize, sampleSize)
-
72  GETTERSETTER(unsigned int, Channels, channels)
-
73  GETTERSETTER(void *, Data, data)
-
74 
-
75  Wave& operator=(const ::Wave& wave) {
-
76  set(wave);
-
77  return *this;
-
78  }
-
79 
-
83  inline Wave& Format(int SampleRate, int SampleSize, int Channels = 2) {
-
84  ::WaveFormat(this, SampleRate, SampleSize, Channels);
-
85  return *this;
-
86  }
-
87 
-
91  inline ::Wave Copy() {
-
92  return ::WaveCopy(*this);
-
93  }
-
94 
-
98  inline Wave& Crop(int initSample, int finalSample) {
-
99  ::WaveCrop(this, initSample, finalSample);
-
100  return *this;
-
101  }
-
102 
-
106  inline float* LoadSamples() {
-
107  return ::LoadWaveSamples(*this);
-
108  }
-
109 
-
113  inline void UnloadSamples(float *samples) {
-
114  ::UnloadWaveSamples(samples);
-
115  }
-
116 
-
120  inline bool Export(const std::string& fileName) {
-
121  // TODO(RobLoach): Throw exception on error.
-
122  return ::ExportWave(*this, fileName.c_str());
+
51  GETTERSETTER(unsigned int, SampleCount, sampleCount)
+
52  GETTERSETTER(unsigned int, SampleRate, sampleRate)
+
53  GETTERSETTER(unsigned int, SampleSize, sampleSize)
+
54  GETTERSETTER(unsigned int, Channels, channels)
+
55  GETTERSETTER(void *, Data, data)
+
56 
+
57  Wave& operator=(const ::Wave& wave) {
+
58  set(wave);
+
59  return *this;
+
60  }
+
61 
+
65  inline Wave& Format(int SampleRate, int SampleSize, int Channels = 2) {
+
66  ::WaveFormat(this, SampleRate, SampleSize, Channels);
+
67  return *this;
+
68  }
+
69 
+
73  inline ::Wave Copy() {
+
74  return ::WaveCopy(*this);
+
75  }
+
76 
+
80  inline Wave& Crop(int initSample, int finalSample) {
+
81  ::WaveCrop(this, initSample, finalSample);
+
82  return *this;
+
83  }
+
84 
+
88  inline float* LoadSamples() {
+
89  return ::LoadWaveSamples(*this);
+
90  }
+
91 
+
95  inline void UnloadSamples(float *samples) {
+
96  ::UnloadWaveSamples(samples);
+
97  }
+
98 
+
102  inline bool Export(const std::string& fileName) {
+
103  // TODO(RobLoach): Throw exception on error.
+
104  return ::ExportWave(*this, fileName.c_str());
+
105  }
+
106 
+
110  inline bool ExportAsCode(const std::string& fileName) {
+
111  // TODO(RobLoach): Throw exception on error.
+
112  return ::ExportWaveAsCode(*this, fileName.c_str());
+
113  }
+
114 
+
118  void Unload() {
+
119  if (data != NULL) {
+
120  ::UnloadWave(*this);
+
121  data = NULL;
+
122  }
123  }
124 
-
128  inline bool ExportAsCode(const std::string& fileName) {
-
129  // TODO(RobLoach): Throw exception on error.
-
130  return ::ExportWaveAsCode(*this, fileName.c_str());
-
131  }
-
132 
-
136  void Unload() {
-
137  if (data != NULL) {
-
138  ::UnloadWave(*this);
-
139  data = NULL;
-
140  }
-
141  }
-
142 
-
146  inline ::Sound LoadSound() {
-
147  return ::LoadSoundFromWave(*this);
-
148  }
-
149 
-
153  inline operator ::Sound() {
-
154  return LoadSound();
-
155  }
+
128  inline ::Sound LoadSound() {
+
129  return ::LoadSoundFromWave(*this);
+
130  }
+
131 
+
135  inline operator ::Sound() {
+
136  return LoadSound();
+
137  }
+
138 
+
142  inline operator Sound() {
+
143  return LoadSound();
+
144  }
+
145 
+
146  private:
+
147  inline void set(const ::Wave& wave) {
+
148  sampleCount = wave.sampleCount;
+
149  sampleRate = wave.sampleRate;
+
150  sampleSize = wave.sampleSize;
+
151  channels = wave.channels;
+
152  data = wave.data;
+
153  }
+
154 };
+
155 } // namespace raylib
156 
-
160  inline operator Sound() {
-
161  return LoadSound();
-
162  }
-
163 
-
164  protected:
-
165  inline void set(const ::Wave& wave) {
-
166  sampleCount = wave.sampleCount;
-
167  sampleRate = wave.sampleRate;
-
168  sampleSize = wave.sampleSize;
-
169  channels = wave.channels;
-
170  data = wave.data;
-
171  }
-
172 };
-
173 } // namespace raylib
-
174 
-
175 #endif // RAYLIB_CPP_INCLUDE_WAVE_HPP_
+
157 #endif // RAYLIB_CPP_INCLUDE_WAVE_HPP_
-
inline ::Wave Copy()
Copy a wave to a new wave.
Definition: Wave.hpp:91
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Definition: Wave.hpp:34
-
Wave & Crop(int initSample, int finalSample)
Crop a wave to defined samples range.
Definition: Wave.hpp:98
-
void Unload()
Unload wave data.
Definition: Wave.hpp:136
-
float * LoadSamples()
Load samples data from wave as a floats array.
Definition: Wave.hpp:106
-
Wave/Sound management functions.
Definition: Sound.hpp:37
-
Wave(const ::Wave &wave)
Definition: Wave.hpp:36
-
Wave(unsigned int SampleCount=0, unsigned int SampleRate=0, unsigned int SampleSize=0, unsigned int Channels=0)
Definition: Wave.hpp:40
-
bool Export(const std::string &fileName)
Export wave data to file, returns true on success.
Definition: Wave.hpp:120
-
~Wave()
Definition: Wave.hpp:65
-
void set(const ::Wave &wave)
Definition: Wave.hpp:165
-
Wave(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load wave from memory buffer, fileType refers to extension: i.e.
Definition: Wave.hpp:61
-
Wave(const std::string &fileName)
Load wave data from file.
Definition: Wave.hpp:54
-
bool ExportAsCode(const std::string &fileName)
Export wave sample data to code (.h), returns true on success.
Definition: Wave.hpp:128
-
void UnloadSamples(float *samples)
Unload samples data loaded with LoadWaveSamples()
Definition: Wave.hpp:113
-
Wave & Format(int SampleRate, int SampleSize, int Channels=2)
Convert wave data to desired format.
Definition: Wave.hpp:83
-
inline ::Sound LoadSound()
Load sound from wave data.
Definition: Wave.hpp:146
+
inline ::Wave Copy()
Copy a wave to a new wave.
Definition: Wave.hpp:73
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Wave type, defines audio wave data.
Definition: Wave.hpp:13
+
Wave & Crop(int initSample, int finalSample)
Crop a wave to defined samples range.
Definition: Wave.hpp:80
+
void Unload()
Unload wave data.
Definition: Wave.hpp:118
+
float * LoadSamples()
Load samples data from wave as a floats array.
Definition: Wave.hpp:88
+
Wave/Sound management functions.
Definition: Sound.hpp:18
+
bool Export(const std::string &fileName)
Export wave data to file, returns true on success.
Definition: Wave.hpp:102
+
~Wave()
Unload wave data.
Definition: Wave.hpp:47
+
Wave(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load wave from memory buffer, fileType refers to extension: i.e.
Definition: Wave.hpp:40
+
Wave(const std::string &fileName)
Load wave data from file.
Definition: Wave.hpp:33
+
bool ExportAsCode(const std::string &fileName)
Export wave sample data to code (.h), returns true on success.
Definition: Wave.hpp:110
+
void UnloadSamples(float *samples)
Unload samples data loaded with LoadWaveSamples()
Definition: Wave.hpp:95
+
Wave & Format(int SampleRate, int SampleSize, int Channels=2)
Convert wave data to desired format.
Definition: Wave.hpp:65
+
inline ::Sound LoadSound()
Load sound from wave data.
Definition: Wave.hpp:128
diff --git a/docs/_window_8hpp_source.html b/docs/_window_8hpp_source.html index 8e7430a..8c9a9bb 100644 --- a/docs/_window_8hpp_source.html +++ b/docs/_window_8hpp_source.html @@ -71,284 +71,259 @@ $(function() {
Window.hpp
-
1 /*
-
2 * LICENSE: zlib/libpng
-
3 *
-
4 * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
-
5 * BSD-like license that allows static linking with closed source software:
-
6 *
-
7 * Copyright (c) 2020 Rob Loach (@RobLoach)
-
8 *
-
9 * This software is provided "as-is", without any express or implied warranty. In no event
-
10 * will the authors be held liable for any damages arising from the use of this software.
-
11 *
-
12 * Permission is granted to anyone to use this software for any purpose, including commercial
-
13 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
14 *
-
15 * 1. The origin of this software must not be misrepresented; you must not claim that you
-
16 * wrote the original software. If you use this software in a product, an acknowledgment
-
17 * in the product documentation would be appreciated but is not required.
-
18 *
-
19 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
-
20 * as being the original software.
-
21 *
-
22 * 3. This notice may not be removed or altered from any source distribution.
-
23 */
-
24 
-
25 #ifndef RAYLIB_CPP_INCLUDE_WINDOW_HPP_
-
26 #define RAYLIB_CPP_INCLUDE_WINDOW_HPP_
-
27 
-
28 #include <string>
-
29 
-
30 #include "./raylib.hpp"
-
31 
-
32 namespace raylib {
-
44 class Window {
-
45  public:
-
49  Window(int width = 800, int height = 450, const std::string& title = "raylib",
-
50  bool lateInit = false) {
-
51  if (!lateInit) {
-
52  Init(width, height, title);
-
53  }
+
1 #ifndef RAYLIB_CPP_INCLUDE_WINDOW_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_WINDOW_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+
12 class Window {
+
13  public:
+
17  Window(int width = 800, int height = 450, const std::string& title = "raylib",
+
18  bool lateInit = false) {
+
19  if (!lateInit) {
+
20  Init(width, height, title);
+
21  }
+
22  }
+
23 
+
27  ~Window() {
+
28  Close();
+
29  }
+
30 
+
31  void Init(int width = 800, int height = 450, const std::string& title = "raylib") {
+
32  ::InitWindow(width, height, title.c_str());
+
33  }
+
34 
+
38  inline bool ShouldClose() const {
+
39  return ::WindowShouldClose();
+
40  }
+
41 
+
45  inline void Close() {
+
46  ::CloseWindow();
+
47  }
+
48 
+
52  inline bool IsCursorOnScreen() const {
+
53  return ::IsCursorOnScreen();
54  }
55 
-
56  ~Window() {
-
57  Close();
-
58  }
-
59 
-
60  void Init(int width = 800, int height = 450, const std::string& title = "raylib") {
-
61  ::InitWindow(width, height, title.c_str());
-
62  }
-
63 
-
67  inline bool ShouldClose() const {
-
68  return ::WindowShouldClose();
-
69  }
-
70 
-
74  inline void Close() {
-
75  ::CloseWindow();
-
76  }
-
77 
-
81  inline bool IsCursorOnScreen() const {
-
82  return ::IsCursorOnScreen();
-
83  }
-
84 
-
88  inline static bool IsReady() {
-
89  return ::IsWindowReady();
-
90  }
-
91 
-
95  inline bool IsFullscreen() const {
-
96  return ::IsWindowFullscreen();
-
97  }
-
98 
-
102  inline bool IsHidden() const {
-
103  return ::IsWindowHidden();
-
104  }
-
105 
-
109  inline bool IsMinimized() const {
-
110  return ::IsWindowMinimized();
-
111  }
-
112 
-
116  inline bool IsMaximized() const {
-
117  return ::IsWindowMaximized();
+
59  inline static bool IsReady() {
+
60  return ::IsWindowReady();
+
61  }
+
62 
+
66  inline bool IsFullscreen() const {
+
67  return ::IsWindowFullscreen();
+
68  }
+
69 
+
73  inline bool IsHidden() const {
+
74  return ::IsWindowHidden();
+
75  }
+
76 
+
80  inline bool IsMinimized() const {
+
81  return ::IsWindowMinimized();
+
82  }
+
83 
+
87  inline bool IsMaximized() const {
+
88  return ::IsWindowMaximized();
+
89  }
+
90 
+
94  inline bool IsFocused() const {
+
95  return ::IsWindowFocused();
+
96  }
+
97 
+
101  inline bool IsResized() const {
+
102  return ::IsWindowResized();
+
103  }
+
104 
+
108  inline bool IsState(unsigned int flag) const {
+
109  return ::IsWindowState(flag);
+
110  }
+
111 
+
115  inline Window& SetState(unsigned int flag) {
+
116  ::SetWindowState(flag);
+
117  return *this;
118  }
119 
-
123  inline bool IsFocused() const {
-
124  return ::IsWindowFocused();
-
125  }
-
126 
-
130  inline bool IsResized() const {
-
131  return ::IsWindowResized();
-
132  }
-
133 
-
137  inline bool IsState(unsigned int flag) const {
-
138  return ::IsWindowState(flag);
-
139  }
-
140 
-
144  inline Window& SetState(unsigned int flag) {
-
145  ::SetWindowState(flag);
-
146  return *this;
-
147  }
-
148 
-
152  inline Window& ClearState(unsigned int flag) {
-
153  ::ClearWindowState(flag);
-
154  return *this;
-
155  }
-
156 
- - -
162  return *this;
-
163  }
-
164 
-
168  inline Window& SetFullscreen(bool fullscreen) {
-
169  if (fullscreen) {
-
170  if (!IsFullscreen()) {
- -
172  }
-
173  } else {
-
174  if (IsFullscreen()) {
- -
176  }
-
177  }
-
178 
-
179  return *this;
-
180  }
-
181 
-
185  inline Window& Maximize() {
-
186  ::MaximizeWindow();
-
187  return *this;
-
188  }
-
189 
-
193  inline Window& Minimize() {
-
194  ::MinimizeWindow();
-
195  return *this;
-
196  }
-
197 
-
201  inline Window& Restore() {
-
202  ::RestoreWindow();
-
203  return *this;
-
204  }
-
205 
-
209  inline Window& SetIcon(const ::Image& image) {
-
210  ::SetWindowIcon(image);
-
211  return *this;
-
212  }
-
213 
-
217  inline Window& SetTitle(const std::string& title) {
-
218  ::SetWindowTitle(title.c_str());
-
219  return *this;
-
220  }
-
221 
-
225  inline Window& SetPosition(int x, int y) {
-
226  ::SetWindowPosition(x, y);
-
227  return *this;
-
228  }
-
229 
-
233  inline Window& SetPosition(const ::Vector2& position) {
-
234  return SetPosition(static_cast<int>(position.x), static_cast<int>(position.y));
-
235  }
-
236 
-
240  inline Window& SetMonitor(int monitor) {
-
241  ::SetWindowMonitor(monitor);
-
242  return *this;
-
243  }
-
244 
-
248  inline Window& SetMinSize(int width, int height) {
-
249  ::SetWindowMinSize(width, height);
-
250  return *this;
+
123  inline Window& ClearState(unsigned int flag) {
+
124  ::ClearWindowState(flag);
+
125  return *this;
+
126  }
+
127 
+ + +
133  return *this;
+
134  }
+
135 
+
139  inline Window& SetFullscreen(bool fullscreen) {
+
140  if (fullscreen) {
+
141  if (!IsFullscreen()) {
+ +
143  }
+
144  } else {
+
145  if (IsFullscreen()) {
+ +
147  }
+
148  }
+
149 
+
150  return *this;
+
151  }
+
152 
+
156  inline Window& Maximize() {
+
157  ::MaximizeWindow();
+
158  return *this;
+
159  }
+
160 
+
164  inline Window& Minimize() {
+
165  ::MinimizeWindow();
+
166  return *this;
+
167  }
+
168 
+
172  inline Window& Restore() {
+
173  ::RestoreWindow();
+
174  return *this;
+
175  }
+
176 
+
180  inline Window& SetIcon(const ::Image& image) {
+
181  ::SetWindowIcon(image);
+
182  return *this;
+
183  }
+
184 
+
188  inline Window& SetTitle(const std::string& title) {
+
189  ::SetWindowTitle(title.c_str());
+
190  return *this;
+
191  }
+
192 
+
196  inline Window& SetPosition(int x, int y) {
+
197  ::SetWindowPosition(x, y);
+
198  return *this;
+
199  }
+
200 
+
204  inline Window& SetPosition(const ::Vector2& position) {
+
205  return SetPosition(static_cast<int>(position.x), static_cast<int>(position.y));
+
206  }
+
207 
+
211  inline Window& SetMonitor(int monitor) {
+
212  ::SetWindowMonitor(monitor);
+
213  return *this;
+
214  }
+
215 
+
219  inline Window& SetMinSize(int width, int height) {
+
220  ::SetWindowMinSize(width, height);
+
221  return *this;
+
222  }
+
223 
+
227  inline Window& SetSize(int width, int height) {
+
228  ::SetWindowSize(width, height);
+
229  return *this;
+
230  }
+
231 
+
235  inline Window& SetSize(const ::Vector2& size) {
+
236  return SetSize(static_cast<int>(size.x), static_cast<int>(size.y));
+
237  }
+
238 
+
242  inline ::Vector2 GetSize() {
+
243  return {static_cast<float>(GetWidth()), static_cast<float>(GetHeight())};
+
244  }
+
245 
+
249  inline void* GetHandle() const {
+
250  return ::GetWindowHandle();
251  }
252 
-
256  inline Window& SetSize(int width, int height) {
-
257  ::SetWindowSize(width, height);
+
256  inline Window& BeginDrawing() {
+
257  ::BeginDrawing();
258  return *this;
259  }
260 
-
264  inline Window& SetSize(const ::Vector2& size) {
-
265  return SetSize(static_cast<int>(size.x), static_cast<int>(size.y));
-
266  }
-
267 
-
271  inline ::Vector2 GetSize() {
-
272  return {static_cast<float>(GetWidth()), static_cast<float>(GetHeight())};
-
273  }
-
274 
-
278  inline void* GetHandle() const {
-
279  return ::GetWindowHandle();
-
280  }
-
281 
-
285  inline Window& BeginDrawing() {
-
286  ::BeginDrawing();
-
287  return *this;
+
264  inline Window& EndDrawing() {
+
265  ::EndDrawing();
+
266  return *this;
+
267  }
+
268 
+
272  inline int GetWidth() const {
+
273  return ::GetScreenWidth();
+
274  }
+
275 
+
279  inline int GetHeight() const {
+
280  return ::GetScreenHeight();
+
281  }
+
282 
+
286  inline ::Vector2 GetPosition() const {
+
287  return ::GetWindowPosition();
288  }
289 
-
293  inline Window& EndDrawing() {
-
294  ::EndDrawing();
-
295  return *this;
-
296  }
-
297 
-
301  inline int GetWidth() const {
-
302  return ::GetScreenWidth();
+
293  inline ::Vector2 GetScaleDPI() const {
+
294  return ::GetWindowScaleDPI();
+
295  }
+
296 
+
300  inline Window& SetTargetFPS(int fps) {
+
301  ::SetTargetFPS(fps);
+
302  return *this;
303  }
304 
-
308  inline int GetHeight() const {
-
309  return ::GetScreenHeight();
+
308  inline int GetFPS() const {
+
309  return ::GetFPS();
310  }
311 
-
315  inline ::Vector2 GetPosition() const {
-
316  return ::GetWindowPosition();
+
315  inline float GetFrameTime() const {
+
316  return ::GetFrameTime();
317  }
318 
-
322  inline ::Vector2 GetScaleDPI() const {
-
323  return ::GetWindowScaleDPI();
+
322  inline double GetTime() const {
+
323  return ::GetTime();
324  }
-
325 
-
329  inline Window& SetTargetFPS(int fps) {
-
330  ::SetTargetFPS(fps);
-
331  return *this;
-
332  }
-
333 
-
337  inline int GetFPS() const {
-
338  return ::GetFPS();
-
339  }
-
340 
-
344  inline float GetFrameTime() const {
-
345  return ::GetFrameTime();
-
346  }
-
347 
-
351  inline double GetTime() const {
-
352  return ::GetTime();
-
353  }
-
354 };
-
355 } // namespace raylib
-
356 
-
357 #endif // RAYLIB_CPP_INCLUDE_WINDOW_HPP_
+
325 };
+
326 } // namespace raylib
+
327 
+
328 #endif // RAYLIB_CPP_INCLUDE_WINDOW_HPP_
-
inline ::Vector2 GetSize()
Get the screen's width and height.
Definition: Window.hpp:271
-
int GetWidth() const
Get current screen width.
Definition: Window.hpp:301
-
void * GetHandle() const
Get native window handle.
Definition: Window.hpp:278
-
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:31
-
Window & SetMonitor(int monitor)
Set monitor for the current window.
Definition: Window.hpp:240
-
double GetTime() const
Returns elapsed time in seconds since InitWindow()
Definition: Window.hpp:351
-
~Window()
Definition: Window.hpp:56
-
bool IsHidden() const
Check if window is currently hidden.
Definition: Window.hpp:102
-
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:52
-
void Init(int width=800, int height=450, const std::string &title="raylib")
Definition: Window.hpp:60
-
void Close()
Close window and unload OpenGL context.
Definition: Window.hpp:74
-
Window & SetMinSize(int width, int height)
Set window minimum dimensions.
Definition: Window.hpp:248
-
Window & SetState(unsigned int flag)
Set window configuration state using flags.
Definition: Window.hpp:144
-
float GetFrameTime() const
Returns time in seconds for last frame drawn.
Definition: Window.hpp:344
-
bool ShouldClose() const
Check if KEY_ESCAPE pressed or Close icon pressed.
Definition: Window.hpp:67
-
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
Definition: Functions.hpp:45
-
Window & SetFullscreen(bool fullscreen)
Set whether or not the application should be fullscreen.
Definition: Window.hpp:168
-
Window & SetPosition(int x, int y)
Set window position on screen.
Definition: Window.hpp:225
-
Window & SetSize(const ::Vector2 &size)
Set window dimensions.
Definition: Window.hpp:264
-
bool IsMaximized() const
Check if window is currently minimized.
Definition: Window.hpp:116
-
inline ::Vector2 GetScaleDPI() const
Get window scale DPI factor.
Definition: Window.hpp:322
-
Window(int width=800, int height=450, const std::string &title="raylib", bool lateInit=false)
Initialize window and OpenGL context.
Definition: Window.hpp:49
-
bool IsFocused() const
Check if window is currently focused.
Definition: Window.hpp:123
-
bool IsResized() const
Check if window has been resized last frame.
Definition: Window.hpp:130
-
int GetHeight() const
Get current screen height.
Definition: Window.hpp:308
-
Window & EndDrawing()
End canvas drawing and swap buffers (double buffering)
Definition: Window.hpp:293
-
Window & SetSize(int width, int height)
Set window dimensions.
Definition: Window.hpp:256
-
int GetFPS() const
Returns current FPS.
Definition: Window.hpp:337
-
Window & Minimize()
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
Definition: Window.hpp:193
-
Window & ToggleFullscreen()
Toggle window state: fullscreen/windowed.
Definition: Window.hpp:160
-
Window & Maximize()
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
Definition: Window.hpp:185
-
Window & SetTitle(const std::string &title)
Set title for window.
Definition: Window.hpp:217
-
bool IsCursorOnScreen() const
Check if cursor is on the current screen.
Definition: Window.hpp:81
-
bool IsFullscreen() const
Check if window is currently fullscreen.
Definition: Window.hpp:95
-
static bool IsReady()
Check if window has been initialized successfully.
Definition: Window.hpp:88
-
Window & BeginDrawing()
Setup canvas (framebuffer) to start drawing.
Definition: Window.hpp:285
-
Window & ClearState(unsigned int flag)
Clear window configuration state flags.
Definition: Window.hpp:152
-
bool IsState(unsigned int flag) const
Check if one specific window flag is enabled.
Definition: Window.hpp:137
-
Window & SetPosition(const ::Vector2 &position)
Set window position on screen.
Definition: Window.hpp:233
-
Window & SetTargetFPS(int fps)
Set target FPS (maximum)
Definition: Window.hpp:329
-
inline ::Vector2 GetPosition() const
Get window position XY on monitor.
Definition: Window.hpp:315
-
bool IsMinimized() const
Check if window is currently minimized.
Definition: Window.hpp:109
-
Window & Restore()
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
Definition: Window.hpp:201
-
Window & SetIcon(const ::Image &image)
Set icon for window.
Definition: Window.hpp:209
-
Window and Graphics Device Functions.
Definition: Window.hpp:44
+
inline ::Vector2 GetSize()
Get the screen's width and height.
Definition: Window.hpp:242
+
int GetWidth() const
Get current screen width.
Definition: Window.hpp:272
+
void * GetHandle() const
Get native window handle.
Definition: Window.hpp:249
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
+
Window & SetMonitor(int monitor)
Set monitor for the current window.
Definition: Window.hpp:211
+
double GetTime() const
Returns elapsed time in seconds since InitWindow()
Definition: Window.hpp:322
+
~Window()
Close window and unload OpenGL context.
Definition: Window.hpp:27
+
bool IsHidden() const
Check if window is currently hidden.
Definition: Window.hpp:73
+
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:31
+
void Close()
Close window and unload OpenGL context.
Definition: Window.hpp:45
+
Window & SetMinSize(int width, int height)
Set window minimum dimensions.
Definition: Window.hpp:219
+
Window & SetState(unsigned int flag)
Set window configuration state using flags.
Definition: Window.hpp:115
+
float GetFrameTime() const
Returns time in seconds for last frame drawn.
Definition: Window.hpp:315
+
bool ShouldClose() const
Check if KEY_ESCAPE pressed or Close icon pressed.
Definition: Window.hpp:38
+
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
Definition: Functions.hpp:24
+
Window & SetFullscreen(bool fullscreen)
Set whether or not the application should be fullscreen.
Definition: Window.hpp:139
+
Window & SetPosition(int x, int y)
Set window position on screen.
Definition: Window.hpp:196
+
Window & SetSize(const ::Vector2 &size)
Set window dimensions.
Definition: Window.hpp:235
+
bool IsMaximized() const
Check if window is currently minimized.
Definition: Window.hpp:87
+
inline ::Vector2 GetScaleDPI() const
Get window scale DPI factor.
Definition: Window.hpp:293
+
Window(int width=800, int height=450, const std::string &title="raylib", bool lateInit=false)
Initialize window and OpenGL context.
Definition: Window.hpp:17
+
bool IsFocused() const
Check if window is currently focused.
Definition: Window.hpp:94
+
bool IsResized() const
Check if window has been resized last frame.
Definition: Window.hpp:101
+
int GetHeight() const
Get current screen height.
Definition: Window.hpp:279
+
Window & EndDrawing()
End canvas drawing and swap buffers (double buffering)
Definition: Window.hpp:264
+
Window & SetSize(int width, int height)
Set window dimensions.
Definition: Window.hpp:227
+
int GetFPS() const
Returns current FPS.
Definition: Window.hpp:308
+
Window & Minimize()
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
Definition: Window.hpp:164
+
Window & ToggleFullscreen()
Toggle window state: fullscreen/windowed.
Definition: Window.hpp:131
+
Window & Maximize()
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
Definition: Window.hpp:156
+
Window & SetTitle(const std::string &title)
Set title for window.
Definition: Window.hpp:188
+
bool IsCursorOnScreen() const
Check if cursor is on the current screen.
Definition: Window.hpp:52
+
bool IsFullscreen() const
Check if window is currently fullscreen.
Definition: Window.hpp:66
+
static bool IsReady()
Check if window has been initialized successfully.
Definition: Window.hpp:59
+
Window & BeginDrawing()
Setup canvas (framebuffer) to start drawing.
Definition: Window.hpp:256
+
Window & ClearState(unsigned int flag)
Clear window configuration state flags.
Definition: Window.hpp:123
+
bool IsState(unsigned int flag) const
Check if one specific window flag is enabled.
Definition: Window.hpp:108
+
Window & SetPosition(const ::Vector2 &position)
Set window position on screen.
Definition: Window.hpp:204
+
Window & SetTargetFPS(int fps)
Set target FPS (maximum)
Definition: Window.hpp:300
+
inline ::Vector2 GetPosition() const
Get window position XY on monitor.
Definition: Window.hpp:286
+
bool IsMinimized() const
Check if window is currently minimized.
Definition: Window.hpp:80
+
Window & Restore()
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
Definition: Window.hpp:172
+
Window & SetIcon(const ::Image &image)
Set icon for window.
Definition: Window.hpp:180
+
Window and Graphics Device Functions.
Definition: Window.hpp:12
diff --git a/docs/annotated.html b/docs/annotated.html index 605f8e5..e4ceefc 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -69,67 +69,43 @@ $(function() {
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
- + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - -
 ▼NraylibProvides all the classes associated with raylib-cpp
 ▼NraylibAll raylib-cpp classes and functions appear in the raylib namespace
 CAudioDeviceAudio device management functions
 CAudioStreamAudioStream management functions
 CBoundingBoxBounding box type
 CCamera2D
 CCamera3D
 CColor
 CFont
 CGamepad
 CImage
 CMaterial
 CMatrix
 CMesh
 CModel
 CModelAnimationModel animation
 CCamera2DCamera2D type, defines a 2d camera
 CCamera3DCamera type, defines a camera position/orientation in 3d space
 CColorColor type, RGBA (32bit)
 CFontFont type, includes texture and charSet array data
 CGamepadInput-related functions: gamepads
 CImageImage type, bpp always RGBA (32bit)
 CMaterialMaterial type (generic)
 CMatrixMatrix type (OpenGL style 4x4 - right handed, column major)
 CMeshVertex data definning a mesh
 CModelModel type
 CModelAnimationModel animation
 CMouseInput-related functions: mouse
 CMusic
 CPhysics
 CMusicMusic stream type (audio file streaming from memory)
 CPhysics2D Physics library for videogames
 CRayRay type (useful for raycast)
 CRayHitInfoRaycast hit information
 CRectangle
 CRenderTexture
 CShader
 CRectangleRectangle type
 CRenderTextureRenderTexture type, for texture rendering
 CShaderShader type (generic)
 CSoundWave/Sound management functions
 CTexture
 CVector2
 CVector3
 CVector4
 CVrSimulator
 CWave
 CTextureTexture type
 CVector2Vector2 type
 CVector3Vector3 type
 CVector4Vector4 type
 CVrSimulatorVR control functions
 CWaveWave type, defines audio wave data
 CWindowWindow and Graphics Device Functions
 CAudioStream
 CBoundingBox
 CCamera2D
 CCamera3D
 CColor
 CFont
 CImage
 CMaterial
 CMatrix
 CMesh
 CModel
 CModelAnimation
 CMusic
 CRay
 CRayHitInfo
 CRectangle
 CRenderTexture
 CShader
 CSound
 CTexture
 CVector2
 CVector3
 CVector4
 CWave
diff --git a/docs/classes.html b/docs/classes.html index 2f2169f..9cba190 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -71,108 +71,80 @@ $(function() { - - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + - - - - + - - - - - - - - - + + + + - - + + + - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + - -
  a  
Color (raylib)   Matrix   Ray   Texture (raylib)   
  f  
+
  f  
Matrix (raylib)   RayHitInfo   
  v  
-
RayHitInfo (raylib)   Vector3 (raylib)   
Mesh (raylib)   Rectangle (raylib)   Vector4 (raylib)   
AudioDevice (raylib)   Mesh   RayHitInfo (raylib)   
AudioStream   Font   Mesh (raylib)   Rectangle (raylib)   Vector2 (raylib)   
AudioStream (raylib)    Font (raylib)    Model (raylib)   Rectangle   Vector2   RenderTexture (raylib)   VrSimulator (raylib)   
AudioStream (raylib)   
  g  
+
ModelAnimation (raylib)   
  s  
+
  w  
+
  b  
  g  
-
Model   RenderTexture (raylib)   Vector3 (raylib)   Mouse (raylib)   
ModelAnimation (raylib)   RenderTexture   Vector3   
BoundingBox   Gamepad (raylib)   ModelAnimation   
  s  
-
Vector4   
Gamepad (raylib)   Music (raylib)   Shader (raylib)   Wave (raylib)   
BoundingBox (raylib)   
  i  
Mouse (raylib)   Vector4 (raylib)   
  p  
+
Sound (raylib)   Window (raylib)   
  c  
Music   Shader   VrSimulator (raylib)   
Image   Music (raylib)   Shader (raylib)   
  w  
+
  t  
Camera2D   Image (raylib)   
  p  
-
Sound   
Image (raylib)   Physics (raylib)   
Camera2D (raylib)   
  m  
Sound (raylib)   Wave   
Camera3D   Physics (raylib)   
  t  
-
Wave (raylib)   
Camera3D (raylib)   Material (raylib)   
  r  
Window (raylib)   
Color   Material   Texture   Texture (raylib)   
Camera3D (raylib)   
  v  
+
Color (raylib)   Material (raylib)   Ray (raylib)   
Vector2 (raylib)   
Ray (raylib)   
a | b | c | f | g | i | m | p | r | s | t | v | w
diff --git a/docs/classraylib_1_1_audio_device-members.html b/docs/classraylib_1_1_audio_device-members.html index e341a68..5359f06 100644 --- a/docs/classraylib_1_1_audio_device-members.html +++ b/docs/classraylib_1_1_audio_device-members.html @@ -75,7 +75,7 @@ $(function() {

This is the complete list of members for raylib::AudioDevice, including all inherited members.

- + @@ -83,7 +83,7 @@ $(function() {
AudioDevice(bool lateInit=false)raylib::AudioDeviceinline
Close()raylib::AudioDeviceinline
Close()raylib::AudioDeviceinline
Init()raylib::AudioDeviceinline
IsReady() constraylib::AudioDeviceinline
SetVolume(float volume)raylib::AudioDeviceinline
diff --git a/docs/classraylib_1_1_audio_device.html b/docs/classraylib_1_1_audio_device.html index f744e55..1919bc5 100644 --- a/docs/classraylib_1_1_audio_device.html +++ b/docs/classraylib_1_1_audio_device.html @@ -83,26 +83,31 @@ Public Member Functions  AudioDevice (bool lateInit=false)  Initialize audio device and context. More...
  - ~AudioDevice () - Close the audio device and context. More...
+ + ~AudioDevice () + Close the audio device and context.
  -AudioDevice & Close () - Close the audio device and context. More...
-  -AudioDevice & Init () - Initialize audio device and context. More...
+ +void Close () + Close the audio device and context.
+  + +AudioDevice & Init () + Initialize audio device and context.
  -bool IsReady () const - Check if audio device has been initialized successfully. More...
+ +bool IsReady () const + Check if audio device has been initialized successfully.
  -AudioDevice & SetVolume (float volume) - Set master volume (listener). More...
+ +AudioDevice & SetVolume (float volume) + Set master volume (listener).
 

Detailed Description

Audio device management functions.

-

Definition at line 35 of file AudioDevice.hpp.

+

Definition at line 11 of file AudioDevice.hpp.

Constructor & Destructor Documentation

◆ AudioDevice()

@@ -136,169 +141,16 @@ Public Member Functions -

Definition at line 42 of file AudioDevice.hpp.

+

Definition at line 18 of file AudioDevice.hpp.

-

References Init().

- - - - -

◆ ~AudioDevice()

- -
-
- - - - - -
- - - - - - - -
raylib::AudioDevice::~AudioDevice ()
-
-inline
-
- -

Close the audio device and context.

- -

Definition at line 51 of file AudioDevice.hpp.

- -

References Close().

- -
-
-

Member Function Documentation

- -

◆ Close()

- -
-
- - - - - -
- - - - - - - -
AudioDevice& raylib::AudioDevice::Close ()
-
-inline
-
- -

Close the audio device and context.

- -

Definition at line 66 of file AudioDevice.hpp.

- -

Referenced by ~AudioDevice().

- -
-
- -

◆ Init()

- -
-
- - - - - -
- - - - - - - -
AudioDevice& raylib::AudioDevice::Init ()
-
-inline
-
- -

Initialize audio device and context.

- -

Definition at line 58 of file AudioDevice.hpp.

- -

Referenced by AudioDevice().

- -
-
- -

◆ IsReady()

- -
-
- - - - - -
- - - - - - - -
bool raylib::AudioDevice::IsReady () const
-
-inline
-
- -

Check if audio device has been initialized successfully.

- -

Definition at line 74 of file AudioDevice.hpp.

- -
-
- -

◆ SetVolume()

- -
-
- - - - - -
- - - - - - - - -
AudioDevice& raylib::AudioDevice::SetVolume (float volume)
-
-inline
-
- -

Set master volume (listener).

- -

Definition at line 81 of file AudioDevice.hpp.

+

References Init().

diff --git a/docs/classraylib_1_1_audio_stream-members.html b/docs/classraylib_1_1_audio_stream-members.html index 95166c8..7a39b34 100644 --- a/docs/classraylib_1_1_audio_stream-members.html +++ b/docs/classraylib_1_1_audio_stream-members.html @@ -74,7 +74,7 @@ $(function() {

This is the complete list of members for raylib::AudioStream, including all inherited members.

- + @@ -83,25 +83,24 @@ $(function() { - + - - - - - - - - - - - + + + + + + + + + +
AudioStream(const ::AudioStream &music)raylib::AudioStreaminline
AudioStream(const ::AudioStream &music) (defined in raylib::AudioStream)raylib::AudioStreaminline
AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels)raylib::AudioStreaminline
Close()raylib::AudioStreaminline
GetBuffer() constraylib::AudioStreaminline
GetSampleSize() constraylib::AudioStreaminline
IsPlaying() constraylib::AudioStreaminline
IsProcessed() constraylib::AudioStreaminline
operator=(const ::AudioStream &stream)raylib::AudioStreaminline
operator=(const ::AudioStream &stream) (defined in raylib::AudioStream)raylib::AudioStreaminline
Pause()raylib::AudioStreaminline
Play()raylib::AudioStreaminline
Resume()raylib::AudioStreaminline
set(const ::AudioStream &stream)raylib::AudioStreaminlineprotected
SetBuffer(rAudioBuffer *value)raylib::AudioStreaminline
SetBufferSizeDefault(int size)raylib::AudioStreaminlinestatic
SetChannels(unsigned int value)raylib::AudioStreaminline
SetPitch(float pitch)raylib::AudioStreaminline
SetSampleRate(unsigned int value)raylib::AudioStreaminline
SetSampleSize(unsigned int value)raylib::AudioStreaminline
SetVolume(float volume)raylib::AudioStreaminline
Stop()raylib::AudioStreaminline
Update(const void *data, int samplesCount)raylib::AudioStreaminline
~AudioStream()raylib::AudioStreaminline
SetBuffer(rAudioBuffer *value)raylib::AudioStreaminline
SetBufferSizeDefault(int size)raylib::AudioStreaminlinestatic
SetChannels(unsigned int value)raylib::AudioStreaminline
SetPitch(float pitch)raylib::AudioStreaminline
SetSampleRate(unsigned int value)raylib::AudioStreaminline
SetSampleSize(unsigned int value)raylib::AudioStreaminline
SetVolume(float volume)raylib::AudioStreaminline
Stop()raylib::AudioStreaminline
Update(const void *data, int samplesCount)raylib::AudioStreaminline
~AudioStream() (defined in raylib::AudioStream)raylib::AudioStreaminline
diff --git a/docs/classraylib_1_1_audio_stream.html b/docs/classraylib_1_1_audio_stream.html index 33689f7..8ec1368 100644 --- a/docs/classraylib_1_1_audio_stream.html +++ b/docs/classraylib_1_1_audio_stream.html @@ -70,7 +70,6 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::AudioStream Class Reference
@@ -82,217 +81,93 @@ $(function() { - + - - + + - - - - + + + + + + - - + + - - + + - + - - + + - - + + - - + + + + - - + + + + - - + + - - + + - - + +

Public Member Functions

 AudioStream (const ::AudioStream &music)
+ AudioStream (const ::AudioStream &music)
 
 AudioStream (unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels)
 Init audio stream (to stream raw audio pcm data) More...
+ AudioStream (unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels)
 Init audio stream (to stream raw audio pcm data)
 
 ~AudioStream ()
 
void Close ()
 Close audio stream and free memory. More...
+void Close ()
 Close audio stream and free memory.
 
rAudioBuffer * GetBuffer () const
 Retrieves the buffer value for the object. More...
 
unsigned int GetChannels () const
 Retrieves the channels value for the object. More...
 
unsigned int GetSampleRate () const
 Retrieves the sampleRate value for the object. More...
 
unsigned int GetSampleSize () const
 Retrieves the sampleSize value for the object. More...
 
bool IsPlaying () const
 Check if audio stream is playing. More...
+bool IsPlaying () const
 Check if audio stream is playing.
 
bool IsProcessed () const
 Check if any audio stream buffers requires refill. More...
+bool IsProcessed () const
 Check if any audio stream buffers requires refill.
 
AudioStream & operator= (const ::AudioStream &stream)
+AudioStream & operator= (const ::AudioStream &stream)
 
AudioStream & Pause ()
 Pause audio stream. More...
+AudioStream & Pause ()
 Pause audio stream.
 
AudioStream & Play ()
 Play audio stream. More...
+AudioStream & Play ()
 Play audio stream.
 
AudioStream & Resume ()
 Resume audio stream. More...
+AudioStream & Resume ()
 Resume audio stream.
 
void SetBuffer (rAudioBuffer *value)
 Sets the buffer value for the object. More...
 
void SetChannels (unsigned int value)
 Sets the channels value for the object. More...
 
AudioStream & SetPitch (float pitch)
 Set pitch for audio stream (1.0 is base level) More...
+AudioStream & SetPitch (float pitch)
 Set pitch for audio stream (1.0 is base level)
 
void SetSampleRate (unsigned int value)
 Sets the sampleRate value for the object. More...
 
void SetSampleSize (unsigned int value)
 Sets the sampleSize value for the object. More...
 
AudioStream & SetVolume (float volume)
 Set volume for audio stream (1.0 is max level) More...
+AudioStream & SetVolume (float volume)
 Set volume for audio stream (1.0 is max level)
 
AudioStream & Stop ()
 Stop audio stream. More...
+AudioStream & Stop ()
 Stop audio stream.
 
AudioStream & Update (const void *data, int samplesCount)
 Update audio stream buffers with data. More...
+AudioStream & Update (const void *data, int samplesCount)
 Update audio stream buffers with data.
 
- - + + -

Static Public Member Functions

static void SetBufferSizeDefault (int size)
 Default size for new audio streams. More...
+static void SetBufferSizeDefault (int size)
 Default size for new audio streams.
 
- - -

-Protected Member Functions

void set (const ::AudioStream &stream)
 

Detailed Description

AudioStream management functions.

-

Definition at line 35 of file AudioStream.hpp.

-

Constructor & Destructor Documentation

- -

◆ AudioStream() [1/2]

- -
-
- - - - - -
- - - - - - - - -
raylib::AudioStream::AudioStream (const ::AudioStream & music)
-
-inline
-
- -

Definition at line 37 of file AudioStream.hpp.

- -

References set().

- -
-
- -

◆ AudioStream() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::AudioStream::AudioStream (unsigned int SampleRate,
unsigned int SampleSize,
unsigned int Channels 
)
-
-inline
-
- -

Init audio stream (to stream raw audio pcm data)

- -

Definition at line 44 of file AudioStream.hpp.

- -

References set().

- -
-
- -

◆ ~AudioStream()

- -
-
- - - - - -
- - - - - - - -
raylib::AudioStream::~AudioStream ()
-
-inline
-
- -

Definition at line 48 of file AudioStream.hpp.

- -

References Close().

- -
-
-

Member Function Documentation

- -

◆ Close()

- -
-
- - - - - -
- - - - - - - -
void raylib::AudioStream::Close ()
-
-inline
-
- -

Close audio stream and free memory.

- -

Definition at line 73 of file AudioStream.hpp.

- -

Referenced by ~AudioStream().

- -
-
+

Definition at line 11 of file AudioStream.hpp.

+

Member Function Documentation

◆ GetBuffer()

@@ -316,7 +191,10 @@ Protected Member Functions
-

Definition at line 52 of file AudioStream.hpp.

+

Retrieves the buffer value for the object.

+
Returns
The buffer value of the object.
+ +

Definition at line 28 of file AudioStream.hpp.

@@ -343,7 +221,10 @@ Protected Member Functions
-

Definition at line 55 of file AudioStream.hpp.

+

Retrieves the channels value for the object.

+
Returns
The channels value of the object.
+ +

Definition at line 31 of file AudioStream.hpp.

@@ -370,7 +251,10 @@ Protected Member Functions
-

Definition at line 53 of file AudioStream.hpp.

+

Retrieves the sampleRate value for the object.

+
Returns
The sampleRate value of the object.
+ +

Definition at line 29 of file AudioStream.hpp.

@@ -397,212 +281,10 @@ Protected Member Functions
-

Definition at line 54 of file AudioStream.hpp.

+

Retrieves the sampleSize value for the object.

+
Returns
The sampleSize value of the object.
-
- - -

◆ IsPlaying()

- -
-
- - - - - -
- - - - - - - -
bool raylib::AudioStream::IsPlaying () const
-
-inline
-
- -

Check if audio stream is playing.

- -

Definition at line 111 of file AudioStream.hpp.

- -
-
- -

◆ IsProcessed()

- -
-
- - - - - -
- - - - - - - -
bool raylib::AudioStream::IsProcessed () const
-
-inline
-
- -

Check if any audio stream buffers requires refill.

- -

Definition at line 80 of file AudioStream.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
AudioStream& raylib::AudioStream::operator= (const ::AudioStream & stream)
-
-inline
-
- -

Definition at line 57 of file AudioStream.hpp.

- -

References set().

- -
-
- -

◆ Pause()

- -
-
- - - - - -
- - - - - - - -
AudioStream& raylib::AudioStream::Pause ()
-
-inline
-
- -

Pause audio stream.

- -

Definition at line 95 of file AudioStream.hpp.

- -
-
- -

◆ Play()

- -
-
- - - - - -
- - - - - - - -
AudioStream& raylib::AudioStream::Play ()
-
-inline
-
- -

Play audio stream.

- -

Definition at line 87 of file AudioStream.hpp.

- -
-
- -

◆ Resume()

- -
-
- - - - - -
- - - - - - - -
AudioStream& raylib::AudioStream::Resume ()
-
-inline
-
- -

Resume audio stream.

- -

Definition at line 103 of file AudioStream.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::AudioStream::set (const ::AudioStream & stream)
-
-inlineprotected
-
- -

Definition at line 147 of file AudioStream.hpp.

- -

Referenced by AudioStream(), and operator=().

+

Definition at line 30 of file AudioStream.hpp.

@@ -630,37 +312,15 @@ Protected Member Functions
-

Definition at line 52 of file AudioStream.hpp.

+

Sets the buffer value for the object.

+
Parameters
+ + +
valueThe value of which to set buffer to.
+
+
-
- - -

◆ SetBufferSizeDefault()

- -
-
- - - - - -
- - - - - - - - -
static void raylib::AudioStream::SetBufferSizeDefault (int size)
-
-inlinestatic
-
- -

Default size for new audio streams.

- -

Definition at line 142 of file AudioStream.hpp.

+

Definition at line 28 of file AudioStream.hpp.

@@ -688,37 +348,15 @@ Protected Member Functions
-

Definition at line 55 of file AudioStream.hpp.

+

Sets the channels value for the object.

+
Parameters
+ + +
valueThe value of which to set channels to.
+
+
-
- - -

◆ SetPitch()

- -
-
- - - - - -
- - - - - - - - -
AudioStream& raylib::AudioStream::SetPitch (float pitch)
-
-inline
-
- -

Set pitch for audio stream (1.0 is base level)

- -

Definition at line 134 of file AudioStream.hpp.

+

Definition at line 31 of file AudioStream.hpp.

@@ -746,7 +384,15 @@ Protected Member Functions
-

Definition at line 53 of file AudioStream.hpp.

+

Sets the sampleRate value for the object.

+
Parameters
+ + +
valueThe value of which to set sampleRate to.
+
+
+ +

Definition at line 29 of file AudioStream.hpp.

@@ -774,113 +420,22 @@ Protected Member Functions
-

Definition at line 54 of file AudioStream.hpp.

+

Sets the sampleSize value for the object.

+
Parameters
+ + +
valueThe value of which to set sampleSize to.
+
+
-
- - -

◆ SetVolume()

- -
-
- - - - - -
- - - - - - - - -
AudioStream& raylib::AudioStream::SetVolume (float volume)
-
-inline
-
- -

Set volume for audio stream (1.0 is max level)

- -

Definition at line 126 of file AudioStream.hpp.

- -
-
- -

◆ Stop()

- -
-
- - - - - -
- - - - - - - -
AudioStream& raylib::AudioStream::Stop ()
-
-inline
-
- -

Stop audio stream.

- -

Definition at line 118 of file AudioStream.hpp.

- -
-
- -

◆ Update()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
AudioStream& raylib::AudioStream::Update (const void * data,
int samplesCount 
)
-
-inline
-
- -

Update audio stream buffers with data.

- -

Definition at line 65 of file AudioStream.hpp.

+

Definition at line 30 of file AudioStream.hpp.

diff --git a/docs/classraylib_1_1_bounding_box-members.html b/docs/classraylib_1_1_bounding_box-members.html index 110c88d..e4a90f9 100644 --- a/docs/classraylib_1_1_bounding_box-members.html +++ b/docs/classraylib_1_1_bounding_box-members.html @@ -74,23 +74,22 @@ $(function() {

This is the complete list of members for raylib::BoundingBox, including all inherited members.

- + - + - - - - - - + + + + +
BoundingBox(const ::BoundingBox &box)raylib::BoundingBoxinline
BoundingBox(const ::BoundingBox &box) (defined in raylib::BoundingBox)raylib::BoundingBoxinline
BoundingBox(const ::Mesh &mesh)raylib::BoundingBoxinline
BoundingBox(::Vector3 Min, ::Vector3 Max)raylib::BoundingBoxinline
BoundingBox(::Vector3 Min, ::Vector3 Max) (defined in raylib::BoundingBox)raylib::BoundingBoxinline
CheckCollision(const ::BoundingBox &box2) constraylib::BoundingBoxinline
CheckCollision(::Vector3 center, float radius) constraylib::BoundingBoxinline
CheckCollision(const ::Ray &ray) constraylib::BoundingBoxinline
Draw(::Color color={255, 255, 255, 255})raylib::BoundingBoxinline
GetMax() constraylib::BoundingBoxinline
GetMin() constraylib::BoundingBoxinline
operator=(const ::BoundingBox &box)raylib::BoundingBoxinline
set(const ::BoundingBox &box)raylib::BoundingBoxinlineprotected
SetMax(::Vector3 value)raylib::BoundingBoxinline
SetMin(::Vector3 value)raylib::BoundingBoxinline
GetMax() constraylib::BoundingBoxinline
GetMin() constraylib::BoundingBoxinline
operator=(const ::BoundingBox &box) (defined in raylib::BoundingBox)raylib::BoundingBoxinline
SetMax(::Vector3 value)raylib::BoundingBoxinline
SetMin(::Vector3 value)raylib::BoundingBoxinline
diff --git a/docs/classraylib_1_1_bounding_box.html b/docs/classraylib_1_1_bounding_box.html index 160f066..7a66bda 100644 --- a/docs/classraylib_1_1_bounding_box.html +++ b/docs/classraylib_1_1_bounding_box.html @@ -69,7 +69,6 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::BoundingBox Class Reference
@@ -81,48 +80,55 @@ $(function() { - + - + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + + + + + -

Public Member Functions

 BoundingBox (::Vector3 Min, ::Vector3 Max)
+ BoundingBox (::Vector3 Min, ::Vector3 Max)
 
 BoundingBox (const ::BoundingBox &box)
+ BoundingBox (const ::BoundingBox &box)
 
 BoundingBox (const ::Mesh &mesh)
 Compute mesh bounding box limits. More...
+ BoundingBox (const ::Mesh &mesh)
 Compute mesh bounding box limits.
 
bool CheckCollision (::Vector3 center, float radius) const
 Detect collision between box and sphere. More...
+bool CheckCollision (::Vector3 center, float radius) const
 Detect collision between box and sphere.
 
bool CheckCollision (const ::BoundingBox &box2) const
 Detect collision between two boxes. More...
+bool CheckCollision (const ::BoundingBox &box2) const
 Detect collision between two boxes.
 
bool CheckCollision (const ::Ray &ray) const
 Detect collision between ray and bounding box. More...
+bool CheckCollision (const ::Ray &ray) const
 Detect collision between ray and bounding box.
 
BoundingBox & Draw (::Color color={255, 255, 255, 255})
 Draw a bounding box with wires. More...
+BoundingBox & Draw (::Color color={255, 255, 255, 255})
 Draw a bounding box with wires.
 
inline ::Vector3 GetMax () const
 
inline ::Vector3 GetMin () const
 
BoundingBox & operator= (const ::BoundingBox &box)
::Vector3 GetMax () const
 Retrieves the max value for the object. More...
 
::Vector3 GetMin () const
 Retrieves the min value for the object. More...
 
+BoundingBox & operator= (const ::BoundingBox &box)
 
void SetMax (::Vector3 value)
 Sets the max value for the object. More...
 
void SetMin (::Vector3 value)
 Sets the min value for the object. More...
 
- - -

-Protected Member Functions

void set (const ::BoundingBox &box)
 

Detailed Description

Bounding box type.

-

Definition at line 35 of file BoundingBox.hpp.

-

Constructor & Destructor Documentation

- -

◆ BoundingBox() [1/3]

+

Definition at line 11 of file BoundingBox.hpp.

+

Member Function Documentation

+ +

◆ GetMax()

@@ -131,238 +137,7 @@ Protected Member Functions - - - - - - -
raylib::BoundingBox::BoundingBox (const ::BoundingBox & box)
- - -inline - - -
- -

Definition at line 37 of file BoundingBox.hpp.

- -

References set().

- -
-
- -

◆ BoundingBox() [2/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::BoundingBox::BoundingBox (const ::Mesh & mesh)
-
-inline
-
- -

Compute mesh bounding box limits.

- -

Definition at line 44 of file BoundingBox.hpp.

- -

References set().

- -
-
- -

◆ BoundingBox() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::BoundingBox::BoundingBox (::Vector3 Min,
::Vector3 Max 
)
-
-inline
-
- -

Definition at line 48 of file BoundingBox.hpp.

- -
-
-

Member Function Documentation

- -

◆ CheckCollision() [1/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool raylib::BoundingBox::CheckCollision (::Vector3 center,
float radius 
) const
-
-inline
-
- -

Detect collision between box and sphere.

- -

Definition at line 79 of file BoundingBox.hpp.

- -
-
- -

◆ CheckCollision() [2/3]

- -
-
- - - - - -
- - - - - - - - -
bool raylib::BoundingBox::CheckCollision (const ::BoundingBox & box2) const
-
-inline
-
- -

Detect collision between two boxes.

- -

Definition at line 72 of file BoundingBox.hpp.

- -
-
- -

◆ CheckCollision() [3/3]

- -
-
- - - - - -
- - - - - - - - -
bool raylib::BoundingBox::CheckCollision (const ::Ray & ray) const
-
-inline
-
- -

Detect collision between ray and bounding box.

- -

Definition at line 86 of file BoundingBox.hpp.

- -
-
- -

◆ Draw()

- -
-
- - - - - -
- - - - - - - - -
BoundingBox& raylib::BoundingBox::Draw (::Color color = {255, 255, 255, 255})
-
-inline
-
- -

Draw a bounding box with wires.

- -

Definition at line 64 of file BoundingBox.hpp.

- -
-
- -

◆ GetMax()

- -
-
- - -
- - - + @@ -375,12 +150,15 @@ Protected Member Functions
inline ::Vector3 raylib::BoundingBox::GetMax ::Vector3 raylib::BoundingBox::GetMax ( ) const
-

Definition at line 54 of file BoundingBox.hpp.

+

Retrieves the max value for the object.

+
Returns
The max value of the object.
+ +

Definition at line 30 of file BoundingBox.hpp.

- -

◆ GetMin()

+ +

◆ GetMin()

@@ -389,7 +167,7 @@ Protected Member Functions
- + @@ -402,67 +180,10 @@ Protected Member Functions
inline ::Vector3 raylib::BoundingBox::GetMin ::Vector3 raylib::BoundingBox::GetMin ( ) const
-

Definition at line 53 of file BoundingBox.hpp.

+

Retrieves the min value for the object.

+
Returns
The min value of the object.
-
- - -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
BoundingBox& raylib::BoundingBox::operator= (const ::BoundingBox & box)
-
-inline
-
- -

Definition at line 56 of file BoundingBox.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::BoundingBox::set (const ::BoundingBox & box)
-
-inlineprotected
-
- -

Definition at line 91 of file BoundingBox.hpp.

- -

Referenced by BoundingBox(), and operator=().

+

Definition at line 29 of file BoundingBox.hpp.

@@ -490,7 +211,15 @@ Protected Member Functions
-

Definition at line 54 of file BoundingBox.hpp.

+

Sets the max value for the object.

+
Parameters
+ + +
valueThe value of which to set max to.
+
+
+ +

Definition at line 30 of file BoundingBox.hpp.

@@ -518,14 +247,22 @@ Protected Member Functions
-

Definition at line 53 of file BoundingBox.hpp.

+

Sets the min value for the object.

+
Parameters
+ + +
valueThe value of which to set min to.
+
+
+ +

Definition at line 29 of file BoundingBox.hpp.

diff --git a/docs/classraylib_1_1_camera2_d-members.html b/docs/classraylib_1_1_camera2_d-members.html index a326a2d..442a859 100644 --- a/docs/classraylib_1_1_camera2_d-members.html +++ b/docs/classraylib_1_1_camera2_d-members.html @@ -74,28 +74,27 @@ $(function() {

This is the complete list of members for raylib::Camera2D, including all inherited members.

- - - - - + + + + + - + - + - - - - - - + + + + +
BeginMode()raylib::Camera2Dinline
Camera2D()raylib::Camera2Dinline
Camera2D(const ::Camera2D &camera)raylib::Camera2Dinline
Camera2D(::Vector2 offsetValue, ::Vector2 targetValue, float rotationValue=0, float zoomValue=1)raylib::Camera2Dinline
EndMode()raylib::Camera2Dinline
BeginMode() (defined in raylib::Camera2D)raylib::Camera2Dinline
Camera2D() (defined in raylib::Camera2D)raylib::Camera2Dinline
Camera2D(const ::Camera2D &camera) (defined in raylib::Camera2D)raylib::Camera2Dinline
Camera2D(::Vector2 offsetValue, ::Vector2 targetValue, float rotationValue=0, float zoomValue=1) (defined in raylib::Camera2D)raylib::Camera2Dinline
EndMode() (defined in raylib::Camera2D)raylib::Camera2Dinline
GetMatrix() constraylib::Camera2Dinline
GetOffset() constraylib::Camera2Dinline
GetOffset() constraylib::Camera2Dinline
GetRotation() constraylib::Camera2Dinline
GetScreenToWorld(::Vector2 position) constraylib::Camera2Dinline
GetTarget() constraylib::Camera2Dinline
GetTarget() constraylib::Camera2Dinline
GetWorldToScreen(::Vector2 position) constraylib::Camera2Dinline
GetZoom() constraylib::Camera2Dinline
operator=(const ::Camera2D &camera)raylib::Camera2Dinline
set(const ::Camera2D &camera)raylib::Camera2Dinlineprotected
SetOffset(::Vector2 value)raylib::Camera2Dinline
SetRotation(float value)raylib::Camera2Dinline
SetTarget(::Vector2 value)raylib::Camera2Dinline
SetZoom(float value)raylib::Camera2Dinline
operator=(const ::Camera2D &camera) (defined in raylib::Camera2D)raylib::Camera2Dinline
SetOffset(::Vector2 value)raylib::Camera2Dinline
SetRotation(float value)raylib::Camera2Dinline
SetTarget(::Vector2 value)raylib::Camera2Dinline
SetZoom(float value)raylib::Camera2Dinline
diff --git a/docs/classraylib_1_1_camera2_d.html b/docs/classraylib_1_1_camera2_d.html index 9de21eb..3e4ed7e 100644 --- a/docs/classraylib_1_1_camera2_d.html +++ b/docs/classraylib_1_1_camera2_d.html @@ -69,64 +69,76 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Camera2D Class Reference
+ +

Camera2D type, defines a 2d camera. + More...

- - - + - + - + - + - - + + - - + + + + - - + + - - - - + + + + + + - + + + + + -

Public Member Functions

 Camera2D ()
 
 Camera2D (::Vector2 offsetValue, ::Vector2 targetValue, float rotationValue=0, float zoomValue=1)
+ Camera2D (::Vector2 offsetValue, ::Vector2 targetValue, float rotationValue=0, float zoomValue=1)
 
 Camera2D (const ::Camera2D &camera)
+ Camera2D (const ::Camera2D &camera)
 
Camera2D & BeginMode ()
+Camera2D & BeginMode ()
 
Camera2D & EndMode ()
+Camera2D & EndMode ()
 
Matrix GetMatrix () const
 Returns camera 2d transform matrix. More...
+Matrix GetMatrix () const
 Returns camera 2d transform matrix.
 
inline ::Vector2 GetOffset () const
 
::Vector2 GetOffset () const
 Retrieves the offset value for the object. More...
 
float GetRotation () const
 Retrieves the rotation value for the object. More...
 
Vector2 GetScreenToWorld (::Vector2 position) const
 Returns the world space position for a 2d camera screen space position. More...
+Vector2 GetScreenToWorld (::Vector2 position) const
 Returns the world space position for a 2d camera screen space position.
 
inline ::Vector2 GetTarget () const
 
Vector2 GetWorldToScreen (::Vector2 position) const
 Returns the screen space position for a 3d world space position. More...
::Vector2 GetTarget () const
 Retrieves the target value for the object. More...
 
+Vector2 GetWorldToScreen (::Vector2 position) const
 Returns the screen space position for a 3d world space position.
 
float GetZoom () const
 Retrieves the zoom value for the object. More...
 
Camera2D & operator= (const ::Camera2D &camera)
+Camera2D & operator= (const ::Camera2D &camera)
 
void SetOffset (::Vector2 value)
 Sets the offset value for the object. More...
 
void SetRotation (float value)
 Sets the rotation value for the object. More...
 
void SetTarget (::Vector2 value)
 Sets the target value for the object. More...
 
void SetZoom (float value)
 Sets the zoom value for the object. More...
 
- - -

-Protected Member Functions

void set (const ::Camera2D &camera)
 

Detailed Description

-
-

Definition at line 33 of file Camera2D.hpp.

-

Constructor & Destructor Documentation

- -

◆ Camera2D() [1/3]

+

Camera2D type, defines a 2d camera.

+ +

Definition at line 12 of file Camera2D.hpp.

+

Member Function Documentation

+ +

◆ GetOffset()

@@ -135,169 +147,7 @@ Protected Member Functions - - - - - -
raylib::Camera2D::Camera2D ()
- - -inline - - -
- -

Definition at line 35 of file Camera2D.hpp.

- -
-
- -

◆ Camera2D() [2/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::Camera2D::Camera2D (const ::Camera2D & camera)
-
-inline
-
- -

Definition at line 36 of file Camera2D.hpp.

- -

References set().

- -
-
- -

◆ Camera2D() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Camera2D::Camera2D (::Vector2 offsetValue,
::Vector2 targetValue,
float rotationValue = 0,
float zoomValue = 1 
)
-
-inline
-
- -

Definition at line 40 of file Camera2D.hpp.

- -
-
-

Member Function Documentation

- -

◆ BeginMode()

- -
-
- - - - - -
- - - - - - - -
Camera2D& raylib::Camera2D::BeginMode ()
-
-inline
-
- -

Definition at line 48 of file Camera2D.hpp.

- -
-
- -

◆ EndMode()

- -
-
- - - - - -
- - - - - - - -
Camera2D& raylib::Camera2D::EndMode ()
-
-inline
-
- -

Definition at line 53 of file Camera2D.hpp.

- -
-
- -

◆ GetMatrix()

- -
-
- - -
- - - + @@ -310,36 +160,10 @@ Protected Member Functions
Matrix raylib::Camera2D::GetMatrix ::Vector2 raylib::Camera2D::GetOffset ( ) const
-

Returns camera 2d transform matrix.

+

Retrieves the offset value for the object.

+
Returns
The offset value of the object.
-

Definition at line 71 of file Camera2D.hpp.

- -
- - -

◆ GetOffset()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Camera2D::GetOffset () const
-
-inline
-
- -

Definition at line 58 of file Camera2D.hpp.

+

Definition at line 37 of file Camera2D.hpp.

@@ -366,12 +190,15 @@ Protected Member Functions
-

Definition at line 60 of file Camera2D.hpp.

+

Retrieves the rotation value for the object.

+
Returns
The rotation value of the object.
+ +

Definition at line 39 of file Camera2D.hpp.

- -

◆ GetScreenToWorld()

+ +

◆ GetTarget()

@@ -380,37 +207,7 @@ Protected Member Functions - - - - - - -
Vector2 raylib::Camera2D::GetScreenToWorld (::Vector2 position) const
- - -inline - - -
- -

Returns the world space position for a 2d camera screen space position.

- -

Definition at line 85 of file Camera2D.hpp.

- -
-
- -

◆ GetTarget()

- -
-
- - -
- - - + @@ -423,37 +220,10 @@ Protected Member Functions
inline ::Vector2 raylib::Camera2D::GetTarget ::Vector2 raylib::Camera2D::GetTarget ( ) const
-

Definition at line 59 of file Camera2D.hpp.

+

Retrieves the target value for the object.

+
Returns
The target value of the object.
-
- - -

◆ GetWorldToScreen()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Camera2D::GetWorldToScreen (::Vector2 position) const
-
-inline
-
- -

Returns the screen space position for a 3d world space position.

- -

Definition at line 78 of file Camera2D.hpp.

+

Definition at line 38 of file Camera2D.hpp.

@@ -480,67 +250,10 @@ Protected Member Functions
-

Definition at line 61 of file Camera2D.hpp.

+

Retrieves the zoom value for the object.

+
Returns
The zoom value of the object.
-
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Camera2D& raylib::Camera2D::operator= (const ::Camera2D & camera)
-
-inline
-
- -

Definition at line 63 of file Camera2D.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Camera2D::set (const ::Camera2D & camera)
-
-inlineprotected
-
- -

Definition at line 90 of file Camera2D.hpp.

- -

Referenced by Camera2D(), and operator=().

+

Definition at line 40 of file Camera2D.hpp.

@@ -568,7 +281,15 @@ Protected Member Functions
-

Definition at line 58 of file Camera2D.hpp.

+

Sets the offset value for the object.

+
Parameters
+ + +
valueThe value of which to set offset to.
+
+
+ +

Definition at line 37 of file Camera2D.hpp.

@@ -596,7 +317,15 @@ Protected Member Functions
-

Definition at line 60 of file Camera2D.hpp.

+

Sets the rotation value for the object.

+
Parameters
+ + +
valueThe value of which to set rotation to.
+
+
+ +

Definition at line 39 of file Camera2D.hpp.

@@ -624,7 +353,15 @@ Protected Member Functions
-

Definition at line 59 of file Camera2D.hpp.

+

Sets the target value for the object.

+
Parameters
+ + +
valueThe value of which to set target to.
+
+
+ +

Definition at line 38 of file Camera2D.hpp.

@@ -652,14 +389,22 @@ Protected Member Functions
-

Definition at line 61 of file Camera2D.hpp.

+

Sets the zoom value for the object.

+
Parameters
+ + +
valueThe value of which to set zoom to.
+
+
+ +

Definition at line 40 of file Camera2D.hpp.

diff --git a/docs/classraylib_1_1_camera3_d-members.html b/docs/classraylib_1_1_camera3_d-members.html index f4317ec..1903ca5 100644 --- a/docs/classraylib_1_1_camera3_d-members.html +++ b/docs/classraylib_1_1_camera3_d-members.html @@ -75,37 +75,36 @@ $(function() {

This is the complete list of members for raylib::Camera3D, including all inherited members.

- - - + + + - - + + - + - - - - - - - - - - - - - + + + + + + + + + + + +
BeginMode()raylib::Camera3Dinline
Camera3D(const ::Camera3D &camera)raylib::Camera3Dinline
Camera3D(::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue, float fovyValue=0, int typeValue=0)raylib::Camera3Dinline
Camera3D()raylib::Camera3Dinline
Camera3D(const ::Camera3D &camera) (defined in raylib::Camera3D)raylib::Camera3Dinline
Camera3D(::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue, float fovyValue=0, int typeValue=0) (defined in raylib::Camera3D)raylib::Camera3Dinline
Camera3D() (defined in raylib::Camera3D)raylib::Camera3Dinline
DrawBillboard(const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})raylib::Camera3Dinline
DrawBillboard(const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})raylib::Camera3Dinline
EndMode()raylib::Camera3Dinline
GetFovy() constraylib::Camera3Dinline
GetMatrix() constraylib::Camera3Dinline
GetMouseRay(::Vector2 mousePosition) constraylib::Camera3Dinline
GetPosition() constraylib::Camera3Dinline
GetTarget() constraylib::Camera3Dinline
GetPosition() constraylib::Camera3Dinline
GetTarget() constraylib::Camera3Dinline
GetType() constraylib::Camera3Dinline
GetUp() constraylib::Camera3Dinline
GetUp() constraylib::Camera3Dinline
GetWorldToScreen(::Vector3 position) constraylib::Camera3Dinline
operator=(const ::Camera3D &camera)raylib::Camera3Dinline
set(const ::Camera3D &camera)raylib::Camera3Dinlineprotected
SetAltControl(int altKey)raylib::Camera3Dinline
SetFovy(float value)raylib::Camera3Dinline
SetMode(int mode)raylib::Camera3Dinline
SetMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)raylib::Camera3Dinline
SetPosition(::Vector3 value)raylib::Camera3Dinline
SetSmoothZoomControl(int szKey)raylib::Camera3Dinline
SetTarget(::Vector3 value)raylib::Camera3Dinline
SetType(int value)raylib::Camera3Dinline
SetUp(::Vector3 value)raylib::Camera3Dinline
Update()raylib::Camera3Dinline
UpdateVrTracking()raylib::Camera3Dinline
operator=(const ::Camera3D &camera) (defined in raylib::Camera3D)raylib::Camera3Dinline
SetAltControl(int altKey)raylib::Camera3Dinline
SetFovy(float value)raylib::Camera3Dinline
SetMode(int mode)raylib::Camera3Dinline
SetMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)raylib::Camera3Dinline
SetPosition(::Vector3 value)raylib::Camera3Dinline
SetSmoothZoomControl(int szKey)raylib::Camera3Dinline
SetTarget(::Vector3 value)raylib::Camera3Dinline
SetType(int value)raylib::Camera3Dinline
SetUp(::Vector3 value)raylib::Camera3Dinline
Update()raylib::Camera3Dinline
UpdateVrTracking()raylib::Camera3Dinline
diff --git a/docs/classraylib_1_1_camera3_d.html b/docs/classraylib_1_1_camera3_d.html index 8252642..77fe03d 100644 --- a/docs/classraylib_1_1_camera3_d.html +++ b/docs/classraylib_1_1_camera3_d.html @@ -69,374 +69,114 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Camera3D Class Reference
+ +

Camera type, defines a camera position/orientation in 3d space. + More...

- - - + - + - - + + - - + + - - + + - - + + + - - + + - - + + - - - - + + + + + + + - - - - + + + + + - + - - + + + - - + + - - + + + - - + + + + + - - + + - - + + -

Public Member Functions

 Camera3D ()
 
 Camera3D (::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue, float fovyValue=0, int typeValue=0)
+ Camera3D (::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue, float fovyValue=0, int typeValue=0)
 
 Camera3D (const ::Camera3D &camera)
+ Camera3D (const ::Camera3D &camera)
 
Camera3D & BeginMode ()
 Initializes 3D mode with custom camera (3D) More...
+Camera3D & BeginMode ()
 Initializes 3D mode with custom camera (3D)
 
Camera3D & DrawBillboard (const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
 Draw a billboard texture defined by source. More...
+Camera3D & DrawBillboard (const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
 Draw a billboard texture defined by source.
 
Camera3D & DrawBillboard (const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
 Draw a billboard texture. More...
+Camera3D & DrawBillboard (const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255})
 Draw a billboard texture.
 
Camera3D & EndMode ()
 Ends 3D mode and returns to default 2D orthographic mode. More...
+Camera3D & EndMode ()
 Ends 3D mode and returns to default 2D orthographic mode.
 
float GetFovy () const
 Retrieves the fovy value for the object. More...
 
Matrix GetMatrix () const
 Get transform matrix for camera. More...
+Matrix GetMatrix () const
 Get transform matrix for camera.
 
Ray GetMouseRay (::Vector2 mousePosition) const
 Returns a ray trace from mouse position. More...
+Ray GetMouseRay (::Vector2 mousePosition) const
 Returns a ray trace from mouse position.
 
inline ::Vector3 GetPosition () const
 
inline ::Vector3 GetTarget () const
 
::Vector3 GetPosition () const
 Retrieves the position value for the object. More...
 
::Vector3 GetTarget () const
 Retrieves the target value for the object. More...
 
int GetType () const
 Retrieves the type value for the object. More...
 
inline ::Vector3 GetUp () const
 
Vector2 GetWorldToScreen (::Vector3 position) const
 Returns the screen space position for a 3d world space position. More...
::Vector3 GetUp () const
 Retrieves the up value for the object. More...
 
+Vector2 GetWorldToScreen (::Vector3 position) const
 Returns the screen space position for a 3d world space position.
 
Camera3D & operator= (const ::Camera3D &camera)
+Camera3D & operator= (const ::Camera3D &camera)
 
Camera3D & SetAltControl (int altKey)
 Set camera alt key to combine with mouse movement (free camera) More...
+Camera3D & SetAltControl (int altKey)
 Set camera alt key to combine with mouse movement (free camera)
 
void SetFovy (float value)
 Sets the fovy value for the object. More...
 
Camera3D & SetMode (int mode)
 Set camera mode (multiple camera modes available) More...
+Camera3D & SetMode (int mode)
 Set camera mode (multiple camera modes available)
 
Camera3D & SetMoveControls (int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
 Set camera move controls (1st person and 3rd person cameras) More...
+Camera3D & SetMoveControls (int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
 Set camera move controls (1st person and 3rd person cameras)
 
void SetPosition (::Vector3 value)
 Sets the position value for the object. More...
 
Camera3D & SetSmoothZoomControl (int szKey)
 Set camera smooth zoom key to combine with mouse (free camera) More...
+Camera3D & SetSmoothZoomControl (int szKey)
 Set camera smooth zoom key to combine with mouse (free camera)
 
void SetTarget (::Vector3 value)
 Sets the target value for the object. More...
 
void SetType (int value)
 Sets the type value for the object. More...
 
void SetUp (::Vector3 value)
 Sets the up value for the object. More...
 
Camera3D & Update ()
 Update camera position for selected mode. More...
+Camera3D & Update ()
 Update camera position for selected mode.
 
Camera3D & UpdateVrTracking ()
 Update VR tracking (position and orientation) and camera. More...
+Camera3D & UpdateVrTracking ()
 Update VR tracking (position and orientation) and camera.
 
- - -

-Protected Member Functions

void set (const ::Camera3D &camera)
 

Detailed Description

-
-

Definition at line 33 of file Camera3D.hpp.

-

Constructor & Destructor Documentation

- -

◆ Camera3D() [1/3]

+

Camera type, defines a camera position/orientation in 3d space.

-
-
- - - - - -
- - - - - - - - -
raylib::Camera3D::Camera3D (const ::Camera3D & camera)
-
-inline
-
- -

Definition at line 35 of file Camera3D.hpp.

- -

References set().

- -
-
- -

◆ Camera3D() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Camera3D::Camera3D (::Vector3 positionValue,
::Vector3 targetValue,
::Vector3 upValue,
float fovyValue = 0,
int typeValue = 0 
)
-
-inline
-
- -

Definition at line 39 of file Camera3D.hpp.

- -
-
- -

◆ Camera3D() [3/3]

- -
-
- - - - - -
- - - - - - - -
raylib::Camera3D::Camera3D ()
-
-inline
-
- -

Definition at line 48 of file Camera3D.hpp.

- -
-
-

Member Function Documentation

- -

◆ BeginMode()

- -
-
- - - - - -
- - - - - - - -
Camera3D& raylib::Camera3D::BeginMode ()
-
-inline
-
- -

Initializes 3D mode with custom camera (3D)

- -

Definition at line 64 of file Camera3D.hpp.

- -
-
- -

◆ DrawBillboard() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Camera3D& raylib::Camera3D::DrawBillboard (const ::Texture2D & texture,
::Rectangle sourceRec,
::Vector3 center,
float size,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw a billboard texture defined by source.

- -

Definition at line 164 of file Camera3D.hpp.

- -
-
- -

◆ DrawBillboard() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Camera3D& raylib::Camera3D::DrawBillboard (const ::Texture2D & texture,
::Vector3 center,
float size,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw a billboard texture.

- -

Definition at line 152 of file Camera3D.hpp.

- -
-
- -

◆ EndMode()

- -
-
- - - - - -
- - - - - - - -
Camera3D& raylib::Camera3D::EndMode ()
-
-inline
-
- -

Ends 3D mode and returns to default 2D orthographic mode.

- -

Definition at line 72 of file Camera3D.hpp.

- -
-
+

Definition at line 12 of file Camera3D.hpp.

+

Member Function Documentation

◆ GetFovy()

@@ -460,12 +200,15 @@ Protected Member Functions
-

Definition at line 53 of file Camera3D.hpp.

+

Retrieves the fovy value for the object.

+
Returns
The fovy value of the object.
+ +

Definition at line 32 of file Camera3D.hpp.

- -

◆ GetMatrix()

+ +

◆ GetPosition()

@@ -474,7 +217,7 @@ Protected Member Functions - + @@ -487,14 +230,15 @@ Protected Member Functions
Matrix raylib::Camera3D::GetMatrix ::Vector3 raylib::Camera3D::GetPosition ( ) const
-

Get transform matrix for camera.

+

Retrieves the position value for the object.

+
Returns
The position value of the object.
-

Definition at line 80 of file Camera3D.hpp.

+

Definition at line 29 of file Camera3D.hpp.

- -

◆ GetMouseRay()

+ +

◆ GetTarget()

@@ -503,37 +247,7 @@ Protected Member Functions - - - - - - -
Ray raylib::Camera3D::GetMouseRay (::Vector2 mousePosition) const
- - -inline - - -
- -

Returns a ray trace from mouse position.

- -

Definition at line 138 of file Camera3D.hpp.

- -
-
- -

◆ GetPosition()

- -
-
- - -
- - - + @@ -546,34 +260,10 @@ Protected Member Functions
inline ::Vector3 raylib::Camera3D::GetPosition ::Vector3 raylib::Camera3D::GetTarget ( ) const
-

Definition at line 50 of file Camera3D.hpp.

+

Retrieves the target value for the object.

+
Returns
The target value of the object.
-
- - -

◆ GetTarget()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector3 raylib::Camera3D::GetTarget () const
-
-inline
-
- -

Definition at line 51 of file Camera3D.hpp.

+

Definition at line 30 of file Camera3D.hpp.

@@ -600,12 +290,15 @@ Protected Member Functions
-

Definition at line 54 of file Camera3D.hpp.

+

Retrieves the type value for the object.

+
Returns
The type value of the object.
+ +

Definition at line 33 of file Camera3D.hpp.

- -

◆ GetUp()

+ +

◆ GetUp()

@@ -614,7 +307,7 @@ Protected Member Functions - + @@ -627,127 +320,10 @@ Protected Member Functions
inline ::Vector3 raylib::Camera3D::GetUp ::Vector3 raylib::Camera3D::GetUp ( ) const
-

Definition at line 52 of file Camera3D.hpp.

+

Retrieves the up value for the object.

+
Returns
The up value of the object.
-
-
- -

◆ GetWorldToScreen()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Camera3D::GetWorldToScreen (::Vector3 position) const
-
-inline
-
- -

Returns the screen space position for a 3d world space position.

- -

Definition at line 145 of file Camera3D.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Camera3D& raylib::Camera3D::operator= (const ::Camera3D & camera)
-
-inline
-
- -

Definition at line 56 of file Camera3D.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Camera3D::set (const ::Camera3D & camera)
-
-inlineprotected
-
- -

Definition at line 175 of file Camera3D.hpp.

- -

Referenced by Camera3D(), and operator=().

- -
-
- -

◆ SetAltControl()

- -
-
- - - - - -
- - - - - - - - -
Camera3D& raylib::Camera3D::SetAltControl (int altKey)
-
-inline
-
- -

Set camera alt key to combine with mouse movement (free camera)

- -

Definition at line 95 of file Camera3D.hpp.

+

Definition at line 31 of file Camera3D.hpp.

@@ -775,101 +351,15 @@ Protected Member Functions
-

Definition at line 53 of file Camera3D.hpp.

+

Sets the fovy value for the object.

+
Parameters
+ + +
valueThe value of which to set fovy to.
+
+
-
- - -

◆ SetMode()

- -
-
- - - - - -
- - - - - - - - -
Camera3D& raylib::Camera3D::SetMode (int mode)
-
-inline
-
- -

Set camera mode (multiple camera modes available)

- -

Definition at line 87 of file Camera3D.hpp.

- -
-
- -

◆ SetMoveControls()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Camera3D& raylib::Camera3D::SetMoveControls (int frontKey,
int backKey,
int rightKey,
int leftKey,
int upKey,
int downKey 
)
-
-inline
-
- -

Set camera move controls (1st person and 3rd person cameras)

- -

Definition at line 111 of file Camera3D.hpp.

+

Definition at line 32 of file Camera3D.hpp.

@@ -897,37 +387,15 @@ Protected Member Functions
-

Definition at line 50 of file Camera3D.hpp.

+

Sets the position value for the object.

+
Parameters
+ + +
valueThe value of which to set position to.
+
+
-
- - -

◆ SetSmoothZoomControl()

- -
-
- - - - - -
- - - - - - - - -
Camera3D& raylib::Camera3D::SetSmoothZoomControl (int szKey)
-
-inline
-
- -

Set camera smooth zoom key to combine with mouse (free camera)

- -

Definition at line 103 of file Camera3D.hpp.

+

Definition at line 29 of file Camera3D.hpp.

@@ -955,7 +423,15 @@ Protected Member Functions
-

Definition at line 51 of file Camera3D.hpp.

+

Sets the target value for the object.

+
Parameters
+ + +
valueThe value of which to set target to.
+
+
+ +

Definition at line 30 of file Camera3D.hpp.

@@ -983,7 +459,15 @@ Protected Member Functions
-

Definition at line 54 of file Camera3D.hpp.

+

Sets the type value for the object.

+
Parameters
+ + +
valueThe value of which to set type to.
+
+
+ +

Definition at line 33 of file Camera3D.hpp.

@@ -1011,74 +495,22 @@ Protected Member Functions
-

Definition at line 52 of file Camera3D.hpp.

+

Sets the up value for the object.

+
Parameters
+ + +
valueThe value of which to set up to.
+
+
-
- - -

◆ Update()

- -
-
- - - - - -
- - - - - - - -
Camera3D& raylib::Camera3D::Update ()
-
-inline
-
- -

Update camera position for selected mode.

- -

Definition at line 122 of file Camera3D.hpp.

- -

References raylib::UpdateCamera().

- -
-
- -

◆ UpdateVrTracking()

- -
-
- - - - - -
- - - - - - - -
Camera3D& raylib::Camera3D::UpdateVrTracking ()
-
-inline
-
- -

Update VR tracking (position and orientation) and camera.

- -

Definition at line 130 of file Camera3D.hpp.

+

Definition at line 31 of file Camera3D.hpp.

diff --git a/docs/classraylib_1_1_color-members.html b/docs/classraylib_1_1_color-members.html index 0a0035e..0c7e077 100644 --- a/docs/classraylib_1_1_color-members.html +++ b/docs/classraylib_1_1_color-members.html @@ -76,76 +76,75 @@ $(function() { - - - - - + + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
Alpha(float alpha) constraylib::Colorinline
AlphaBlend(::Color dst, ::Color tint) constraylib::Colorinline
Beige()raylib::Colorinlinestatic
Black()raylib::Colorinlinestatic
Blank()raylib::Colorinlinestatic
Blue()raylib::Colorinlinestatic
Brown()raylib::Colorinlinestatic
Beige() (defined in raylib::Color)raylib::Colorinlinestatic
Black() (defined in raylib::Color)raylib::Colorinlinestatic
Blank() (defined in raylib::Color)raylib::Colorinlinestatic
Blue() (defined in raylib::Color)raylib::Colorinlinestatic
Brown() (defined in raylib::Color)raylib::Colorinlinestatic
ClearBackground()raylib::Colorinline
Color(const ::Color &color)raylib::Colorinline
Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)raylib::Colorinline
Color(unsigned char red, unsigned char green, unsigned char blue)raylib::Colorinline
Color(const ::Color &color) (defined in raylib::Color)raylib::Colorinline
Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha) (defined in raylib::Color)raylib::Colorinline
Color(unsigned char red, unsigned char green, unsigned char blue) (defined in raylib::Color)raylib::Colorinline
Color()raylib::Colorinline
Color(::Vector3 hsv)raylib::Colorinline
Color(int hexValue)raylib::Colorinline
Color(::Vector4 normalized)raylib::Colorinline
DarkBlue()raylib::Colorinlinestatic
DarkBrown()raylib::Colorinlinestatic
DarkGray()raylib::Colorinlinestatic
DarkGreen()raylib::Colorinlinestatic
DarkPurple()raylib::Colorinlinestatic
DarkBlue() (defined in raylib::Color)raylib::Colorinlinestatic
DarkBrown() (defined in raylib::Color)raylib::Colorinlinestatic
DarkGray() (defined in raylib::Color)raylib::Colorinlinestatic
DarkGreen() (defined in raylib::Color)raylib::Colorinlinestatic
DarkPurple() (defined in raylib::Color)raylib::Colorinlinestatic
DrawLine(int startPosX, int startPosY, int endPosX, int endPosY)raylib::Colorinline
DrawLine(::Vector2 startPos, ::Vector2 endPos)raylib::Colorinline
DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick)raylib::Colorinline
DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick)raylib::Colorinline
DrawLineStrip(::Vector2 *points, int numPoints)raylib::Colorinline
DrawPixel(int x, int y)raylib::Colorinline
DrawLine(::Vector2 startPos, ::Vector2 endPos) (defined in raylib::Color)raylib::Colorinline
DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick) (defined in raylib::Color)raylib::Colorinline
DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick) (defined in raylib::Color)raylib::Colorinline
DrawLineStrip(::Vector2 *points, int numPoints) (defined in raylib::Color)raylib::Colorinline
DrawPixel(int x, int y) (defined in raylib::Color)raylib::Colorinline
DrawPixel(::Vector2 pos)raylib::Colorinline
DrawRectangle(int posX, int posY, int width, int height)raylib::Colorinline
DrawRectangle(::Vector2 position, ::Vector2 size)raylib::Colorinline
DrawRectangle(::Rectangle rec)raylib::Colorinline
DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation)raylib::Colorinline
DrawRectangleLines(int posX, int posY, int width, int height)raylib::Colorinline
DrawRectangleLines(::Rectangle rec, int lineThick)raylib::Colorinline
DrawText(const std::string &text, int posX, int posY, int fontSize)raylib::Colorinline
DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing)raylib::Colorinline
DrawText(const ::Font &font, const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false)raylib::Colorinline
DrawRectangle(int posX, int posY, int width, int height) (defined in raylib::Color)raylib::Colorinline
DrawRectangle(::Vector2 position, ::Vector2 size) (defined in raylib::Color)raylib::Colorinline
DrawRectangle(::Rectangle rec) (defined in raylib::Color)raylib::Colorinline
DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation) (defined in raylib::Color)raylib::Colorinline
DrawRectangleLines(int posX, int posY, int width, int height) (defined in raylib::Color)raylib::Colorinline
DrawRectangleLines(::Rectangle rec, int lineThick) (defined in raylib::Color)raylib::Colorinline
DrawText(const std::string &text, int posX, int posY, int fontSize) (defined in raylib::Color)raylib::Colorinline
DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing) (defined in raylib::Color)raylib::Colorinline
DrawText(const ::Font &font, const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false) (defined in raylib::Color)raylib::Colorinline
Fade(float alpha) constraylib::Colorinline
FromHSV(float hue, float saturation, float value)raylib::Colorinlinestatic
GetA() constraylib::Colorinline
GetB() constraylib::Colorinline
GetG() constraylib::Colorinline
GetR() constraylib::Colorinline
Gold()raylib::Colorinlinestatic
Gray()raylib::Colorinlinestatic
Green()raylib::Colorinlinestatic
LightGray()raylib::Colorinlinestatic
Lime()raylib::Colorinlinestatic
Magenta()raylib::Colorinlinestatic
Maroon()raylib::Colorinlinestatic
Gold() (defined in raylib::Color)raylib::Colorinlinestatic
Gray() (defined in raylib::Color)raylib::Colorinlinestatic
Green() (defined in raylib::Color)raylib::Colorinlinestatic
LightGray() (defined in raylib::Color)raylib::Colorinlinestatic
Lime() (defined in raylib::Color)raylib::Colorinlinestatic
Magenta() (defined in raylib::Color)raylib::Colorinlinestatic
Maroon() (defined in raylib::Color)raylib::Colorinlinestatic
Normalize() constraylib::Colorinline
operator int() constraylib::Colorinline
operator=(const ::Color &color)raylib::Colorinline
Orange()raylib::Colorinlinestatic
Pink()raylib::Colorinlinestatic
Purple()raylib::Colorinlinestatic
RayWhite()raylib::Colorinlinestatic
Red()raylib::Colorinlinestatic
set(const ::Color &color)raylib::Colorinlineprotected
SetA(unsigned char value)raylib::Colorinline
SetB(unsigned char value)raylib::Colorinline
SetG(unsigned char value)raylib::Colorinline
SetR(unsigned char value)raylib::Colorinline
SkyBlue()raylib::Colorinlinestatic
ToHSV() constraylib::Colorinline
ToInt() constraylib::Colorinline
Violet()raylib::Colorinlinestatic
White()raylib::Colorinlinestatic
Yellow()raylib::Colorinlinestatic
operator=(const ::Color &color) (defined in raylib::Color)raylib::Colorinline
Orange() (defined in raylib::Color)raylib::Colorinlinestatic
Pink() (defined in raylib::Color)raylib::Colorinlinestatic
Purple() (defined in raylib::Color)raylib::Colorinlinestatic
RayWhite() (defined in raylib::Color)raylib::Colorinlinestatic
Red() (defined in raylib::Color)raylib::Colorinlinestatic
SetA(unsigned char value)raylib::Colorinline
SetB(unsigned char value)raylib::Colorinline
SetG(unsigned char value)raylib::Colorinline
SetR(unsigned char value)raylib::Colorinline
SkyBlue() (defined in raylib::Color)raylib::Colorinlinestatic
ToHSV() constraylib::Colorinline
ToInt() constraylib::Colorinline
Violet() (defined in raylib::Color)raylib::Colorinlinestatic
White() (defined in raylib::Color)raylib::Colorinlinestatic
Yellow() (defined in raylib::Color)raylib::Colorinlinestatic
diff --git a/docs/classraylib_1_1_color.html b/docs/classraylib_1_1_color.html index 8c4e9cc..427a8bc 100644 --- a/docs/classraylib_1_1_color.html +++ b/docs/classraylib_1_1_color.html @@ -70,1572 +70,242 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Color Class Reference
+ +

Color type, RGBA (32bit) + More...

- - + + - - + + - - + + - + - - + + - + - + - - + + - - + + - - + + - + - + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + + + + + - - + + - - + + - + + + + + - - + + - - + +

Public Member Functions

 Color ()
 Black. More...
+ Color ()
 Black.
 
 Color (::Vector3 hsv)
 Returns a Color from HSV values. More...
+ Color (::Vector3 hsv)
 Returns a Color from HSV values.
 
 Color (::Vector4 normalized)
 Returns Color from normalized values [0..1]. More...
+ Color (::Vector4 normalized)
 Returns Color from normalized values [0..1].
 
 Color (const ::Color &color)
+ Color (const ::Color &color)
 
 Color (int hexValue)
 Get Color structure from hexadecimal value. More...
+ Color (int hexValue)
 Get Color structure from hexadecimal value.
 
 Color (unsigned char red, unsigned char green, unsigned char blue)
+ Color (unsigned char red, unsigned char green, unsigned char blue)
 
 Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
+ Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
 
Color Alpha (float alpha) const
 Returns color with alpha applied, alpha goes from 0.0f to 1.0f. More...
+Color Alpha (float alpha) const
 Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
 
Color AlphaBlend (::Color dst, ::Color tint) const
 Returns src alpha-blended into dst color with tint. More...
+Color AlphaBlend (::Color dst, ::Color tint) const
 Returns src alpha-blended into dst color with tint.
 
Color & ClearBackground ()
 Set background color (framebuffer clear color) More...
+Color & ClearBackground ()
 Set background color (framebuffer clear color)
 
Color & DrawLine (::Vector2 startPos, ::Vector2 endPos)
+Color & DrawLine (::Vector2 startPos, ::Vector2 endPos)
 
Color & DrawLine (::Vector2 startPos, ::Vector2 endPos, float thick)
+Color & DrawLine (::Vector2 startPos, ::Vector2 endPos, float thick)
 
Color & DrawLine (int startPosX, int startPosY, int endPosX, int endPosY)
 Draw a line. More...
+Color & DrawLine (int startPosX, int startPosY, int endPosX, int endPosY)
 Draw a line.
 
Color & DrawLineBezier (::Vector2 startPos, ::Vector2 endPos, float thick)
+Color & DrawLineBezier (::Vector2 startPos, ::Vector2 endPos, float thick)
 
Color & DrawLineStrip (::Vector2 *points, int numPoints)
+Color & DrawLineStrip (::Vector2 *points, int numPoints)
 
Color & DrawPixel (::Vector2 pos)
 Draw a pixel. More...
+Color & DrawPixel (::Vector2 pos)
 Draw a pixel.
 
Color & DrawPixel (int x, int y)
+Color & DrawPixel (int x, int y)
 
Color & DrawRectangle (::Rectangle rec)
+Color & DrawRectangle (::Rectangle rec)
 
Color & DrawRectangle (::Rectangle rec, ::Vector2 origin, float rotation)
+Color & DrawRectangle (::Rectangle rec, ::Vector2 origin, float rotation)
 
Color & DrawRectangle (::Vector2 position, ::Vector2 size)
+Color & DrawRectangle (::Vector2 position, ::Vector2 size)
 
Color & DrawRectangle (int posX, int posY, int width, int height)
+Color & DrawRectangle (int posX, int posY, int width, int height)
 
Color & DrawRectangleLines (::Rectangle rec, int lineThick)
+Color & DrawRectangleLines (::Rectangle rec, int lineThick)
 
Color & DrawRectangleLines (int posX, int posY, int width, int height)
+Color & DrawRectangleLines (int posX, int posY, int width, int height)
 
Color & DrawText (const ::Font &font, const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false)
+Color & DrawText (const ::Font &font, const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false)
 
Color & DrawText (const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing)
+Color & DrawText (const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing)
 
Color & DrawText (const std::string &text, int posX, int posY, int fontSize)
+Color & DrawText (const std::string &text, int posX, int posY, int fontSize)
 
Color Fade (float alpha) const
 Returns color with alpha applied, alpha goes from 0.0f to 1.0f. More...
+Color Fade (float alpha) const
 Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
 
unsigned char GetA () const
 Retrieves the a value for the object. More...
 
unsigned char GetB () const
 Retrieves the b value for the object. More...
 
unsigned char GetG () const
 Retrieves the g value for the object. More...
 
unsigned char GetR () const
 Retrieves the r value for the object. More...
 
Vector4 Normalize () const
 Returns Color normalized as float [0..1]. More...
+Vector4 Normalize () const
 Returns Color normalized as float [0..1].
 
 operator int () const
 Returns hexadecimal value for a Color. More...
+ operator int () const
 Returns hexadecimal value for a Color.
 
Color & operator= (const ::Color &color)
+Color & operator= (const ::Color &color)
 
void SetA (unsigned char value)
 Sets the a value for the object. More...
 
void SetB (unsigned char value)
 Sets the b value for the object. More...
 
void SetG (unsigned char value)
 Sets the g value for the object. More...
 
void SetR (unsigned char value)
 Sets the r value for the object. More...
 
Vector3 ToHSV () const
 Returns HSV values for a Color. More...
+Vector3 ToHSV () const
 Returns HSV values for a Color.
 
int ToInt () const
 Returns hexadecimal value for a Color. More...
+int ToInt () const
 Returns hexadecimal value for a Color.
 
- + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + -

Static Public Member Functions

static Color Beige ()
+static Color Beige ()
 
static Color Black ()
+static Color Black ()
 
static Color Blank ()
+static Color Blank ()
 
static Color Blue ()
+static Color Blue ()
 
static Color Brown ()
+static Color Brown ()
 
static Color DarkBlue ()
+static Color DarkBlue ()
 
static Color DarkBrown ()
+static Color DarkBrown ()
 
static Color DarkGray ()
+static Color DarkGray ()
 
static Color DarkGreen ()
+static Color DarkGreen ()
 
static Color DarkPurple ()
+static Color DarkPurple ()
 
::Color FromHSV (float hue, float saturation, float value)
 Returns a Color from HSV values. More...
+::Color FromHSV (float hue, float saturation, float value)
 Returns a Color from HSV values.
 
static Color Gold ()
+static Color Gold ()
 
static Color Gray ()
+static Color Gray ()
 
static Color Green ()
+static Color Green ()
 
static Color LightGray ()
+static Color LightGray ()
 
static Color Lime ()
+static Color Lime ()
 
static Color Magenta ()
+static Color Magenta ()
 
static Color Maroon ()
+static Color Maroon ()
 
static Color Orange ()
+static Color Orange ()
 
static Color Pink ()
+static Color Pink ()
 
static Color Purple ()
+static Color Purple ()
 
static Color RayWhite ()
+static Color RayWhite ()
 
static Color Red ()
+static Color Red ()
 
static Color SkyBlue ()
+static Color SkyBlue ()
 
static Color Violet ()
+static Color Violet ()
 
static Color White ()
+static Color White ()
 
static Color Yellow ()
+static Color Yellow ()
 
- - -

-Protected Member Functions

void set (const ::Color &color)
 

Detailed Description

-
-

Definition at line 35 of file Color.hpp.

-

Constructor & Destructor Documentation

- -

◆ Color() [1/7]

+

Color type, RGBA (32bit)

-
-
- - - - - -
- - - - - - - - -
raylib::Color::Color (const ::Color & color)
-
-inline
-
- -

Definition at line 37 of file Color.hpp.

- -

References set().

- -
-
- -

◆ Color() [2/7]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Color::Color (unsigned char red,
unsigned char green,
unsigned char blue,
unsigned char alpha 
)
-
-inline
-
- -

Definition at line 41 of file Color.hpp.

- -
-
- -

◆ Color() [3/7]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Color::Color (unsigned char red,
unsigned char green,
unsigned char blue 
)
-
-inline
-
- -

Definition at line 44 of file Color.hpp.

- -
-
- -

◆ Color() [4/7]

- -
-
- - - - - -
- - - - - - - -
raylib::Color::Color ()
-
-inline
-
- -

Black.

- -

Definition at line 50 of file Color.hpp.

- -
-
- -

◆ Color() [5/7]

- -
-
- - - - - -
- - - - - - - - -
raylib::Color::Color (::Vector3 hsv)
-
-inline
-
- -

Returns a Color from HSV values.

- -

Definition at line 55 of file Color.hpp.

- -

References set().

- -
-
- -

◆ Color() [6/7]

- -
-
- - - - - -
- - - - - - - - -
raylib::Color::Color (int hexValue)
-
-inline
-
- -

Get Color structure from hexadecimal value.

- -

Definition at line 69 of file Color.hpp.

- -

References set().

- -
-
- -

◆ Color() [7/7]

- -
-
- - - - - -
- - - - - - - - -
raylib::Color::Color (::Vector4 normalized)
-
-inline
-
- -

Returns Color from normalized values [0..1].

- -

Definition at line 76 of file Color.hpp.

- -

References set().

- -
-
-

Member Function Documentation

- -

◆ Alpha()

- -
-
- - - - - -
- - - - - - - - -
Color raylib::Color::Alpha (float alpha) const
-
-inline
-
- -

Returns color with alpha applied, alpha goes from 0.0f to 1.0f.

- -

Definition at line 229 of file Color.hpp.

- -
-
- -

◆ AlphaBlend()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Color raylib::Color::AlphaBlend (::Color dst,
::Color tint 
) const
-
-inline
-
- -

Returns src alpha-blended into dst color with tint.

- -

Definition at line 236 of file Color.hpp.

- -
-
- -

◆ Beige()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Beige ()
-
-inlinestatic
-
- -

Definition at line 258 of file Color.hpp.

- -
-
- -

◆ Black()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Black ()
-
-inlinestatic
-
- -

Definition at line 262 of file Color.hpp.

- -
-
- -

◆ Blank()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Blank ()
-
-inlinestatic
-
- -

Definition at line 263 of file Color.hpp.

- -
-
- -

◆ Blue()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Blue ()
-
-inlinestatic
-
- -

Definition at line 253 of file Color.hpp.

- -
-
- -

◆ Brown()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Brown ()
-
-inlinestatic
-
- -

Definition at line 259 of file Color.hpp.

- -
-
- -

◆ ClearBackground()

- -
-
- - - - - -
- - - - - - - -
Color& raylib::Color::ClearBackground ()
-
-inline
-
- -

Set background color (framebuffer clear color)

- -

Definition at line 128 of file Color.hpp.

- -
-
- -

◆ DarkBlue()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::DarkBlue ()
-
-inlinestatic
-
- -

Definition at line 254 of file Color.hpp.

- -
-
- -

◆ DarkBrown()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::DarkBrown ()
-
-inlinestatic
-
- -

Definition at line 260 of file Color.hpp.

- -
-
- -

◆ DarkGray()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::DarkGray ()
-
-inlinestatic
-
- -

Definition at line 242 of file Color.hpp.

- -
-
- -

◆ DarkGreen()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::DarkGreen ()
-
-inlinestatic
-
- -

Definition at line 251 of file Color.hpp.

- -
-
- -

◆ DarkPurple()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::DarkPurple ()
-
-inlinestatic
-
- -

Definition at line 257 of file Color.hpp.

- -
-
- -

◆ DrawLine() [1/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawLine (::Vector2 startPos,
::Vector2 endPos 
)
-
-inline
-
- -

Definition at line 154 of file Color.hpp.

- -
-
- -

◆ DrawLine() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawLine (::Vector2 startPos,
::Vector2 endPos,
float thick 
)
-
-inline
-
- -

Definition at line 159 of file Color.hpp.

- -
-
- -

◆ DrawLine() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawLine (int startPosX,
int startPosY,
int endPosX,
int endPosY 
)
-
-inline
-
- -

Draw a line.

- -

Definition at line 149 of file Color.hpp.

- -
-
- -

◆ DrawLineBezier()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawLineBezier (::Vector2 startPos,
::Vector2 endPos,
float thick 
)
-
-inline
-
- -

Definition at line 164 of file Color.hpp.

- -
-
- -

◆ DrawLineStrip()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawLineStrip (::Vector2 * points,
int numPoints 
)
-
-inline
-
- -

Definition at line 169 of file Color.hpp.

- -
-
- -

◆ DrawPixel() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Color& raylib::Color::DrawPixel (::Vector2 pos)
-
-inline
-
- -

Draw a pixel.

- -

Definition at line 141 of file Color.hpp.

- -
-
- -

◆ DrawPixel() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawPixel (int x,
int y 
)
-
-inline
-
- -

Definition at line 133 of file Color.hpp.

- -
-
- -

◆ DrawRectangle() [1/4]

- -
-
- - - - - -
- - - - - - - - -
Color& raylib::Color::DrawRectangle (::Rectangle rec)
-
-inline
-
- -

Definition at line 206 of file Color.hpp.

- -
-
- -

◆ DrawRectangle() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawRectangle (::Rectangle rec,
::Vector2 origin,
float rotation 
)
-
-inline
-
- -

Definition at line 211 of file Color.hpp.

- -
-
- -

◆ DrawRectangle() [3/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawRectangle (::Vector2 position,
::Vector2 size 
)
-
-inline
-
- -

Definition at line 201 of file Color.hpp.

- -
-
- -

◆ DrawRectangle() [4/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawRectangle (int posX,
int posY,
int width,
int height 
)
-
-inline
-
- -

Definition at line 196 of file Color.hpp.

- -
-
- -

◆ DrawRectangleLines() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawRectangleLines (::Rectangle rec,
int lineThick 
)
-
-inline
-
- -

Definition at line 221 of file Color.hpp.

- -
-
- -

◆ DrawRectangleLines() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawRectangleLines (int posX,
int posY,
int width,
int height 
)
-
-inline
-
- -

Definition at line 216 of file Color.hpp.

- -
-
- -

◆ DrawText() [1/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawText (const ::Font & font,
const std::string & text,
::Rectangle rec,
float fontSize,
float spacing,
bool wordWrap = false 
)
-
-inline
-
- -

Definition at line 185 of file Color.hpp.

- -
-
- -

◆ DrawText() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawText (const ::Font & font,
const std::string & text,
::Vector2 position,
float fontSize,
float spacing 
)
-
-inline
-
- -

Definition at line 179 of file Color.hpp.

- -
-
- -

◆ DrawText() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Color& raylib::Color::DrawText (const std::string & text,
int posX,
int posY,
int fontSize 
)
-
-inline
-
- -

Definition at line 174 of file Color.hpp.

- -
-
- -

◆ Fade()

- -
-
- - - - - -
- - - - - - - - -
Color raylib::Color::Fade (float alpha) const
-
-inline
-
- -

Returns color with alpha applied, alpha goes from 0.0f to 1.0f.

- -

Definition at line 97 of file Color.hpp.

- -
-
- -

◆ FromHSV()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Color raylib::Color::FromHSV (float hue,
float saturation,
float value 
)
-
-inlinestatic
-
- -

Returns a Color from HSV values.

- -

Definition at line 62 of file Color.hpp.

- -
-
+

Definition at line 14 of file Color.hpp.

+

Member Function Documentation

◆ GetA()

@@ -1659,7 +329,10 @@ Protected Member Functions
-

Definition at line 118 of file Color.hpp.

+

Retrieves the a value for the object.

+
Returns
The a value of the object.
+ +

Definition at line 97 of file Color.hpp.

@@ -1686,7 +359,10 @@ Protected Member Functions
-

Definition at line 117 of file Color.hpp.

+

Retrieves the b value for the object.

+
Returns
The b value of the object.
+ +

Definition at line 96 of file Color.hpp.

@@ -1713,7 +389,10 @@ Protected Member Functions
-

Definition at line 116 of file Color.hpp.

+

Retrieves the g value for the object.

+
Returns
The g value of the object.
+ +

Definition at line 95 of file Color.hpp.

@@ -1740,449 +419,10 @@ Protected Member Functions
-

Definition at line 115 of file Color.hpp.

+

Retrieves the r value for the object.

+
Returns
The r value of the object.
-
- - -

◆ Gold()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Gold ()
-
-inlinestatic
-
- -

Definition at line 244 of file Color.hpp.

- -
-
- -

◆ Gray()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Gray ()
-
-inlinestatic
-
- -

Definition at line 241 of file Color.hpp.

- -
-
- -

◆ Green()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Green ()
-
-inlinestatic
-
- -

Definition at line 249 of file Color.hpp.

- -
-
- -

◆ LightGray()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::LightGray ()
-
-inlinestatic
-
- -

Definition at line 240 of file Color.hpp.

- -
-
- -

◆ Lime()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Lime ()
-
-inlinestatic
-
- -

Definition at line 250 of file Color.hpp.

- -
-
- -

◆ Magenta()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Magenta ()
-
-inlinestatic
-
- -

Definition at line 264 of file Color.hpp.

- -
-
- -

◆ Maroon()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Maroon ()
-
-inlinestatic
-
- -

Definition at line 248 of file Color.hpp.

- -
-
- -

◆ Normalize()

- -
-
- - - - - -
- - - - - - - -
Vector4 raylib::Color::Normalize () const
-
-inline
-
- -

Returns Color normalized as float [0..1].

- -

Definition at line 104 of file Color.hpp.

- -
-
- -

◆ operator int()

- -
-
- - - - - -
- - - - - - - -
raylib::Color::operator int () const
-
-inline
-
- -

Returns hexadecimal value for a Color.

- -

Definition at line 90 of file Color.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Color& raylib::Color::operator= (const ::Color & color)
-
-inline
-
- -

Definition at line 120 of file Color.hpp.

- -

References set().

- -
-
- -

◆ Orange()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Orange ()
-
-inlinestatic
-
- -

Definition at line 245 of file Color.hpp.

- -
-
- -

◆ Pink()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Pink ()
-
-inlinestatic
-
- -

Definition at line 246 of file Color.hpp.

- -
-
- -

◆ Purple()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Purple ()
-
-inlinestatic
-
- -

Definition at line 255 of file Color.hpp.

- -
-
- -

◆ RayWhite()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::RayWhite ()
-
-inlinestatic
-
- -

Definition at line 265 of file Color.hpp.

- -
-
- -

◆ Red()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Red ()
-
-inlinestatic
-
- -

Definition at line 247 of file Color.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Color::set (const ::Color & color)
-
-inlineprotected
-
- -

Definition at line 268 of file Color.hpp.

- -

Referenced by Color(), and operator=().

+

Definition at line 94 of file Color.hpp.

@@ -2210,7 +450,15 @@ Protected Member Functions
-

Definition at line 118 of file Color.hpp.

+

Sets the a value for the object.

+
Parameters
+ + +
valueThe value of which to set a to.
+
+
+ +

Definition at line 97 of file Color.hpp.

@@ -2238,7 +486,15 @@ Protected Member Functions
-

Definition at line 117 of file Color.hpp.

+

Sets the b value for the object.

+
Parameters
+ + +
valueThe value of which to set b to.
+
+
+ +

Definition at line 96 of file Color.hpp.

@@ -2266,7 +522,15 @@ Protected Member Functions
-

Definition at line 116 of file Color.hpp.

+

Sets the g value for the object.

+
Parameters
+ + +
valueThe value of which to set g to.
+
+
+ +

Definition at line 95 of file Color.hpp.

@@ -2294,180 +558,22 @@ Protected Member Functions
-

Definition at line 115 of file Color.hpp.

+

Sets the r value for the object.

+
Parameters
+ + +
valueThe value of which to set r to.
+
+
-
- - -

◆ SkyBlue()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::SkyBlue ()
-
-inlinestatic
-
- -

Definition at line 252 of file Color.hpp.

- -
-
- -

◆ ToHSV()

- -
-
- - - - - -
- - - - - - - -
Vector3 raylib::Color::ToHSV () const
-
-inline
-
- -

Returns HSV values for a Color.

- -

Definition at line 111 of file Color.hpp.

- -
-
- -

◆ ToInt()

- -
-
- - - - - -
- - - - - - - -
int raylib::Color::ToInt () const
-
-inline
-
- -

Returns hexadecimal value for a Color.

- -

Definition at line 83 of file Color.hpp.

- -
-
- -

◆ Violet()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Violet ()
-
-inlinestatic
-
- -

Definition at line 256 of file Color.hpp.

- -
-
- -

◆ White()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::White ()
-
-inlinestatic
-
- -

Definition at line 261 of file Color.hpp.

- -
-
- -

◆ Yellow()

- -
-
- - - - - -
- - - - - - - -
static Color raylib::Color::Yellow ()
-
-inlinestatic
-
- -

Definition at line 243 of file Color.hpp.

+

Definition at line 94 of file Color.hpp.

diff --git a/docs/classraylib_1_1_font-members.html b/docs/classraylib_1_1_font-members.html index 2bcc6df..59cb44b 100644 --- a/docs/classraylib_1_1_font-members.html +++ b/docs/classraylib_1_1_font-members.html @@ -75,38 +75,37 @@ $(function() {

This is the complete list of members for raylib::Font, including all inherited members.

- + - - - - - - + + + + + + - + - - + + - - - - - - - - - - + + + + + + + + +
DrawText(const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE)raylib::Fontinline
DrawText(const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false, ::Color tint=WHITE)raylib::Fontinline
DrawText(const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false, ::Color tint=WHITE) (defined in raylib::Font)raylib::Fontinline
DrawText(const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText, ::Color selectBack)raylib::Fontinline
DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint={ 255, 255, 255, 255 })raylib::Fontinline
Font()raylib::Fontinline
Font(const ::Font &font)raylib::Fontinline
Font(const std::string &fileName)raylib::Fontinline
Font(const std::string &fileName, int fontSize, int *fontChars, int charCount)raylib::Fontinline
Font(const ::Image &image, ::Color key, int firstChar)raylib::Fontinline
Font(const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)raylib::Fontinline
Font() (defined in raylib::Font)raylib::Fontinline
Font(const ::Font &font) (defined in raylib::Font)raylib::Fontinline
Font(const std::string &fileName) (defined in raylib::Font)raylib::Fontinline
Font(const std::string &fileName, int fontSize, int *fontChars, int charCount) (defined in raylib::Font)raylib::Fontinline
Font(const ::Image &image, ::Color key, int firstChar) (defined in raylib::Font)raylib::Fontinline
Font(const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount) (defined in raylib::Font)raylib::Fontinline
GetBaseSize() constraylib::Fontinline
GetChars() constraylib::Fontinline
GetChars() constraylib::Fontinline
GetCharsCount() constraylib::Fontinline
GetCharsPadding() constraylib::Fontinline
GetGlyphIndex(int character) constraylib::Fontinline
GetRecs() constraylib::Fontinline
GetTexture() constraylib::Fontinline
GetRecs() constraylib::Fontinline
GetTexture() constraylib::Fontinline
ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) constraylib::Fontinline
MeasureText(const std::string &text, float fontSize, float spacing) constraylib::Fontinline
operator=(const ::Font &font)raylib::Fontinline
set(const ::Font &font)raylib::Fontinlineprotected
SetBaseSize(int value)raylib::Fontinline
SetChars(::CharInfo *value)raylib::Fontinline
SetCharsCount(int value)raylib::Fontinline
SetCharsPadding(int value)raylib::Fontinline
SetRecs(::Rectangle *value)raylib::Fontinline
SetTexture(::Texture2D value)raylib::Fontinline
Unload()raylib::Fontinline
~Font()raylib::Fontinline
operator=(const ::Font &font) (defined in raylib::Font)raylib::Fontinline
SetBaseSize(int value)raylib::Fontinline
SetChars(::CharInfo *value)raylib::Fontinline
SetCharsCount(int value)raylib::Fontinline
SetCharsPadding(int value)raylib::Fontinline
SetRecs(::Rectangle *value)raylib::Fontinline
SetTexture(::Texture2D value)raylib::Fontinline
Unload() (defined in raylib::Font)raylib::Fontinline
~Font() (defined in raylib::Font)raylib::Fontinline
diff --git a/docs/classraylib_1_1_font.html b/docs/classraylib_1_1_font.html index c3f5ec2..72fdfed 100644 --- a/docs/classraylib_1_1_font.html +++ b/docs/classraylib_1_1_font.html @@ -69,628 +69,107 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Font Class Reference
+ +

Font type, includes texture and charSet array data. + More...

- - - + - + - + - + - + - - - - + + - + - - + + - - + + + - - + + + + + - - + + - - - - - - + + + + + + + + - - + + - + + + + + + - + + - + -

Public Member Functions

 Font ()
 
 Font (const ::Font &font)
+ Font (const ::Font &font)
 
 Font (const ::Image &image, ::Color key, int firstChar)
+ Font (const ::Image &image, ::Color key, int firstChar)
 
 Font (const std::string &fileName)
+ Font (const std::string &fileName)
 
 Font (const std::string &fileName, int fontSize, int *fontChars, int charCount)
+ Font (const std::string &fileName, int fontSize, int *fontChars, int charCount)
 
 Font (const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
+ Font (const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
 
 ~Font ()
 
Font & DrawText (const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText, ::Color selectBack)
 Draw text using font inside rectangle limits with support for text selection. More...
+Font & DrawText (const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText, ::Color selectBack)
 Draw text using font inside rectangle limits with support for text selection.
 
Font & DrawText (const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false, ::Color tint=WHITE)
+Font & DrawText (const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap=false, ::Color tint=WHITE)
 
Font & DrawText (const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE)
 Draw text using font and additional parameters. More...
+Font & DrawText (const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE)
 Draw text using font and additional parameters.
 
Font & DrawText (int codepoint, ::Vector2 position, float fontSize, ::Color tint={ 255, 255, 255, 255 })
 Draw one character (codepoint) More...
+Font & DrawText (int codepoint, ::Vector2 position, float fontSize, ::Color tint={ 255, 255, 255, 255 })
 Draw one character (codepoint)
 
int GetBaseSize () const
 Retrieves the baseSize value for the object. More...
 
inline ::CharInfo * GetChars () const
 
::CharInfo * GetChars () const
 Retrieves the chars value for the object. More...
 
int GetCharsCount () const
 Retrieves the charsCount value for the object. More...
 
int GetCharsPadding () const
 Retrieves the charsPadding value for the object. More...
 
int GetGlyphIndex (int character) const
 Get index position for a unicode character on font. More...
+int GetGlyphIndex (int character) const
 Get index position for a unicode character on font.
 
inline ::Rectangle * GetRecs () const
 
inline ::Texture2D GetTexture () const
 
inline ::Image ImageText (const std::string &text, float fontSize, float spacing, ::Color tint) const
 Create an image from text (custom sprite font) More...
::Rectangle * GetRecs () const
 Retrieves the recs value for the object. More...
 
::Texture2D GetTexture () const
 Retrieves the texture value for the object. More...
 
+inline ::Image ImageText (const std::string &text, float fontSize, float spacing, ::Color tint) const
 Create an image from text (custom sprite font)
 
Vector2 MeasureText (const std::string &text, float fontSize, float spacing) const
 Measure string size for Font. More...
+Vector2 MeasureText (const std::string &text, float fontSize, float spacing) const
 Measure string size for Font.
 
Font & operator= (const ::Font &font)
+Font & operator= (const ::Font &font)
 
void SetBaseSize (int value)
 Sets the baseSize value for the object. More...
 
void SetChars (::CharInfo *value)
 Sets the chars value for the object. More...
 
void SetCharsCount (int value)
 Sets the charsCount value for the object. More...
 
void SetCharsPadding (int value)
 Sets the charsPadding value for the object. More...
 
void SetRecs (::Rectangle *value)
 Sets the recs value for the object. More...
 
void SetTexture (::Texture2D value)
void SetTexture (::Texture2D value)
 Sets the texture value for the object. More...
 
void Unload ()
+void Unload ()
 
- - -

-Protected Member Functions

void set (const ::Font &font)
 

Detailed Description

-
-

Definition at line 34 of file Font.hpp.

-

Constructor & Destructor Documentation

- -

◆ Font() [1/6]

+

Font type, includes texture and charSet array data.

-
-
- - - - - -
- - - - - - - -
raylib::Font::Font ()
-
-inline
-
- -

Definition at line 36 of file Font.hpp.

- -

References set().

- -
-
- -

◆ Font() [2/6]

- -
-
- - - - - -
- - - - - - - - -
raylib::Font::Font (const ::Font & font)
-
-inline
-
- -

Definition at line 40 of file Font.hpp.

- -

References set().

- -
-
- -

◆ Font() [3/6]

- -
-
- - - - - -
- - - - - - - - -
raylib::Font::Font (const std::string & fileName)
-
-inline
-
- -

Definition at line 44 of file Font.hpp.

- -

References set().

- -
-
- -

◆ Font() [4/6]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Font::Font (const std::string & fileName,
int fontSize,
int * fontChars,
int charCount 
)
-
-inline
-
- -

Definition at line 48 of file Font.hpp.

- -

References set().

- -
-
- -

◆ Font() [5/6]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Font::Font (const ::Image & image,
::Color key,
int firstChar 
)
-
-inline
-
- -

Definition at line 52 of file Font.hpp.

- -

References set().

- -
-
- -

◆ Font() [6/6]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Font::Font (const std::string & fileType,
const unsigned char * fileData,
int dataSize,
int fontSize,
int * fontChars,
int charsCount 
)
-
-inline
-
- -

Definition at line 56 of file Font.hpp.

- -

References set().

- -
-
- -

◆ ~Font()

- -
-
- - - - - -
- - - - - - - -
raylib::Font::~Font ()
-
-inline
-
- -

Definition at line 62 of file Font.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ DrawText() [1/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Font& raylib::Font::DrawText (const std::string & text,
::Rectangle rec,
float fontSize,
float spacing,
bool wordWrap,
::Color tint,
int selectStart,
int selectLength,
::Color selectText,
::Color selectBack 
)
-
-inline
-
- -

Draw text using font inside rectangle limits with support for text selection.

- -

Definition at line 100 of file Font.hpp.

- -
-
- -

◆ DrawText() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Font& raylib::Font::DrawText (const std::string & text,
::Rectangle rec,
float fontSize,
float spacing,
bool wordWrap = false,
::Color tint = WHITE 
)
-
-inline
-
- -

Definition at line 91 of file Font.hpp.

- -
-
- -

◆ DrawText() [3/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Font& raylib::Font::DrawText (const std::string & text,
::Vector2 position,
float fontSize,
float spacing,
::Color tint = WHITE 
)
-
-inline
-
- -

Draw text using font and additional parameters.

- -

Definition at line 85 of file Font.hpp.

- -
-
- -

◆ DrawText() [4/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Font& raylib::Font::DrawText (int codepoint,
::Vector2 position,
float fontSize,
::Color tint = { 255, 255, 255, 255 } 
)
-
-inline
-
- -

Draw one character (codepoint)

- -

Definition at line 111 of file Font.hpp.

- -
-
+

Definition at line 13 of file Font.hpp.

+

Member Function Documentation

◆ GetBaseSize()

@@ -714,12 +193,15 @@ Protected Member Functions
-

Definition at line 70 of file Font.hpp.

+

Retrieves the baseSize value for the object.

+
Returns
The baseSize value of the object.
+ +

Definition at line 49 of file Font.hpp.

- -

◆ GetChars()

+ +

◆ GetChars()

@@ -728,7 +210,7 @@ Protected Member Functions - + @@ -741,7 +223,10 @@ Protected Member Functions
inline ::CharInfo* raylib::Font::GetChars ::CharInfo* raylib::Font::GetChars ( ) const
-

Definition at line 75 of file Font.hpp.

+

Retrieves the chars value for the object.

+
Returns
The chars value of the object.
+ +

Definition at line 54 of file Font.hpp.

@@ -768,7 +253,10 @@ Protected Member Functions
-

Definition at line 71 of file Font.hpp.

+

Retrieves the charsCount value for the object.

+
Returns
The charsCount value of the object.
+ +

Definition at line 50 of file Font.hpp.

@@ -795,12 +283,15 @@ Protected Member Functions
-

Definition at line 72 of file Font.hpp.

+

Retrieves the charsPadding value for the object.

+
Returns
The charsPadding value of the object.
+ +

Definition at line 51 of file Font.hpp.

- -

◆ GetGlyphIndex()

+ +

◆ GetRecs()

@@ -809,37 +300,7 @@ Protected Member Functions - - - - - - -
int raylib::Font::GetGlyphIndex (int character) const
- - -inline - - -
- -

Get index position for a unicode character on font.

- -

Definition at line 129 of file Font.hpp.

- -
-
- -

◆ GetRecs()

- -
-
- - -
- - - + @@ -852,12 +313,15 @@ Protected Member Functions
inline ::Rectangle* raylib::Font::GetRecs ::Rectangle* raylib::Font::GetRecs ( ) const
-

Definition at line 74 of file Font.hpp.

+

Retrieves the recs value for the object.

+
Returns
The recs value of the object.
+ +

Definition at line 53 of file Font.hpp.

- -

◆ GetTexture()

+ +

◆ GetTexture()

@@ -866,7 +330,7 @@ Protected Member Functions
- + @@ -879,165 +343,10 @@ Protected Member Functions
inline ::Texture2D raylib::Font::GetTexture ::Texture2D raylib::Font::GetTexture ( ) const
-

Definition at line 73 of file Font.hpp.

+

Retrieves the texture value for the object.

+
Returns
The texture value of the object.
-
- - -

◆ ImageText()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
inline ::Image raylib::Font::ImageText (const std::string & text,
float fontSize,
float spacing,
::Color tint 
) const
-
-inline
-
- -

Create an image from text (custom sprite font)

- -

Definition at line 136 of file Font.hpp.

- -
-
- -

◆ MeasureText()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Vector2 raylib::Font::MeasureText (const std::string & text,
float fontSize,
float spacing 
) const
-
-inline
-
- -

Measure string size for Font.

- -

Definition at line 122 of file Font.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Font& raylib::Font::operator= (const ::Font & font)
-
-inline
-
- -

Definition at line 77 of file Font.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Font::set (const ::Font & font)
-
-inlineprotected
-
- -

Definition at line 142 of file Font.hpp.

- -

Referenced by Font(), and operator=().

+

Definition at line 52 of file Font.hpp.

@@ -1065,7 +374,15 @@ Protected Member Functions
-

Definition at line 70 of file Font.hpp.

+

Sets the baseSize value for the object.

+
Parameters
+ + +
valueThe value of which to set baseSize to.
+
+
+ +

Definition at line 49 of file Font.hpp.

@@ -1093,7 +410,15 @@ Protected Member Functions
-

Definition at line 75 of file Font.hpp.

+

Sets the chars value for the object.

+
Parameters
+ + +
valueThe value of which to set chars to.
+
+
+ +

Definition at line 54 of file Font.hpp.

@@ -1121,7 +446,15 @@ Protected Member Functions
-

Definition at line 71 of file Font.hpp.

+

Sets the charsCount value for the object.

+
Parameters
+ + +
valueThe value of which to set charsCount to.
+
+
+ +

Definition at line 50 of file Font.hpp.

@@ -1149,7 +482,15 @@ Protected Member Functions
-

Definition at line 72 of file Font.hpp.

+

Sets the charsPadding value for the object.

+
Parameters
+ + +
valueThe value of which to set charsPadding to.
+
+
+ +

Definition at line 51 of file Font.hpp.

@@ -1177,7 +518,15 @@ Protected Member Functions
-

Definition at line 74 of file Font.hpp.

+

Sets the recs value for the object.

+
Parameters
+ + +
valueThe value of which to set recs to.
+
+
+ +

Definition at line 53 of file Font.hpp.

@@ -1193,7 +542,7 @@ Protected Member Functions void raylib::Font::SetTexture ( - ::Texture2D  + ::Texture2D  value) @@ -1205,43 +554,22 @@ Protected Member Functions
-

Definition at line 73 of file Font.hpp.

+

Sets the texture value for the object.

+
Parameters
+ + +
valueThe value of which to set texture to.
+
+
-
- - -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Font::Unload ()
-
-inline
-
- -

Definition at line 66 of file Font.hpp.

- -

Referenced by ~Font().

+

Definition at line 52 of file Font.hpp.

diff --git a/docs/classraylib_1_1_gamepad-members.html b/docs/classraylib_1_1_gamepad-members.html index 2ab15cb..1f28a35 100644 --- a/docs/classraylib_1_1_gamepad-members.html +++ b/docs/classraylib_1_1_gamepad-members.html @@ -74,7 +74,7 @@ $(function() {

This is the complete list of members for raylib::Gamepad, including all inherited members.

- + @@ -87,17 +87,16 @@ $(function() { - - + + - - - - + + +
Gamepad(int gamepadNumber=0)raylib::Gamepadinline
Gamepad(int gamepadNumber=0) (defined in raylib::Gamepad)raylib::Gamepadinline
GetAxisCount() constraylib::Gamepadinline
GetAxisMovement(int axis) constraylib::Gamepadinline
GetButtonPressed() constraylib::Gamepadinline
IsButtonReleased(int button) constraylib::Gamepadinline
IsButtonUp(int button) constraylib::Gamepadinline
IsName(const std::string &name) constraylib::Gamepadinline
numberraylib::Gamepad
operator int() constraylib::Gamepadinline
number (defined in raylib::Gamepad)raylib::Gamepad
operator int() const (defined in raylib::Gamepad)raylib::Gamepadinline
operator std::string() constraylib::Gamepadinline
operator=(const Gamepad &gamepad)raylib::Gamepadinline
operator=(int gamepadNumber)raylib::Gamepadinline
set(int gamepadNumber)raylib::Gamepadinlineprotected
SetNumber(int value)raylib::Gamepadinline
operator=(const Gamepad &gamepad) (defined in raylib::Gamepad)raylib::Gamepadinline
operator=(int gamepadNumber) (defined in raylib::Gamepad)raylib::Gamepadinline
SetNumber(int value)raylib::Gamepadinline
diff --git a/docs/classraylib_1_1_gamepad.html b/docs/classraylib_1_1_gamepad.html index 93a237a..13220b7 100644 --- a/docs/classraylib_1_1_gamepad.html +++ b/docs/classraylib_1_1_gamepad.html @@ -71,237 +71,98 @@ $(function() { Public Member Functions | Static Public Member Functions | Public Attributes | -Protected Member Functions | List of all members
raylib::Gamepad Class Reference
+ +

Input-related functions: gamepads. + More...

- + - - + + - - + + - - + + - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + - + +

Public Member Functions

 Gamepad (int gamepadNumber=0)
+ Gamepad (int gamepadNumber=0)
 
int GetAxisCount () const
 Return gamepad axis count for a gamepad. More...
+int GetAxisCount () const
 Return gamepad axis count for a gamepad.
 
float GetAxisMovement (int axis) const
 Return axis movement value for a gamepad axis. More...
+float GetAxisMovement (int axis) const
 Return axis movement value for a gamepad axis.
 
int GetButtonPressed () const
 Get the last gamepad button pressed. More...
+int GetButtonPressed () const
 Get the last gamepad button pressed.
 
std::string GetName () const
 Return gamepad internal name id. More...
+std::string GetName () const
 Return gamepad internal name id.
 
int GetNumber () const
 Retrieves the number value for the object. More...
 
bool IsAvailable () const
 Detect if a gamepad is available. More...
+bool IsAvailable () const
 Detect if a gamepad is available.
 
bool IsButtonDown (int button) const
 Detect if a gamepad button is being pressed. More...
+bool IsButtonDown (int button) const
 Detect if a gamepad button is being pressed.
 
bool IsButtonPressed (int button) const
 Detect if a gamepad button has been pressed once. More...
+bool IsButtonPressed (int button) const
 Detect if a gamepad button has been pressed once.
 
bool IsButtonReleased (int button) const
 Detect if a gamepad button has been released once. More...
+bool IsButtonReleased (int button) const
 Detect if a gamepad button has been released once.
 
bool IsButtonUp (int button) const
 Detect if a gamepad button is NOT being pressed. More...
+bool IsButtonUp (int button) const
 Detect if a gamepad button is NOT being pressed.
 
bool IsName (const std::string &name) const
 Check gamepad name (if available) More...
+bool IsName (const std::string &name) const
 Check gamepad name (if available)
 
 operator int () const
+ operator int () const
 
 operator std::string () const
 Return gamepad internal name id. More...
+ operator std::string () const
 Return gamepad internal name id.
 
Gamepad & operator= (const Gamepad &gamepad)
+Gamepad & operator= (const Gamepad &gamepad)
 
Gamepad & operator= (int gamepadNumber)
+Gamepad & operator= (int gamepadNumber)
 
void SetNumber (int value)
 Sets the number value for the object. More...
 
- - + +

Static Public Member Functions

static bool IsAvailable (int number)
 Detect if a gamepad is available. More...
+static bool IsAvailable (int number)
 Detect if a gamepad is available.
 
- + -

Public Attributes

int number
+int number
 
- - -

-Protected Member Functions

void set (int gamepadNumber)
 

Detailed Description

-
-

Definition at line 34 of file Gamepad.hpp.

-

Constructor & Destructor Documentation

- -

◆ Gamepad()

+

Input-related functions: gamepads.

-
-
- - - - - -
- - - - - - - - -
raylib::Gamepad::Gamepad (int gamepadNumber = 0)
-
-inline
-
- -

Definition at line 36 of file Gamepad.hpp.

- -

References set().

- -
-
-

Member Function Documentation

- -

◆ GetAxisCount()

- -
-
- - - - - -
- - - - - - - -
int raylib::Gamepad::GetAxisCount () const
-
-inline
-
- -

Return gamepad axis count for a gamepad.

- -

Definition at line 128 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ GetAxisMovement()

- -
-
- - - - - -
- - - - - - - - -
float raylib::Gamepad::GetAxisMovement (int axis) const
-
-inline
-
- -

Return axis movement value for a gamepad axis.

- -

Definition at line 135 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ GetButtonPressed()

- -
-
- - - - - -
- - - - - - - -
int raylib::Gamepad::GetButtonPressed () const
-
-inline
-
- -

Get the last gamepad button pressed.

- -

Definition at line 121 of file Gamepad.hpp.

- -
-
- -

◆ GetName()

- -
-
- - - - - -
- - - - - - - -
std::string raylib::Gamepad::GetName () const
-
-inline
-
- -

Return gamepad internal name id.

- -

Definition at line 79 of file Gamepad.hpp.

- -

References number.

- -

Referenced by operator std::string().

- -
-
+

Definition at line 13 of file Gamepad.hpp.

+

Member Function Documentation

◆ GetNumber()

@@ -325,382 +186,10 @@ Protected Member Functions
-

Definition at line 41 of file Gamepad.hpp.

+

Retrieves the number value for the object.

+
Returns
The number value of the object.
-
- - -

◆ IsAvailable() [1/2]

- -
-
- - - - - -
- - - - - - - -
bool raylib::Gamepad::IsAvailable () const
-
-inline
-
- -

Detect if a gamepad is available.

- -

Definition at line 58 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ IsAvailable() [2/2]

- -
-
- - - - - -
- - - - - - - - -
static bool raylib::Gamepad::IsAvailable (int number)
-
-inlinestatic
-
- -

Detect if a gamepad is available.

- -

Definition at line 65 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ IsButtonDown()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Gamepad::IsButtonDown (int button) const
-
-inline
-
- -

Detect if a gamepad button is being pressed.

- -

Definition at line 100 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ IsButtonPressed()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Gamepad::IsButtonPressed (int button) const
-
-inline
-
- -

Detect if a gamepad button has been pressed once.

- -

Definition at line 93 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ IsButtonReleased()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Gamepad::IsButtonReleased (int button) const
-
-inline
-
- -

Detect if a gamepad button has been released once.

- -

Definition at line 107 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ IsButtonUp()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Gamepad::IsButtonUp (int button) const
-
-inline
-
- -

Detect if a gamepad button is NOT being pressed.

- -

Definition at line 114 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ IsName()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Gamepad::IsName (const std::string & name) const
-
-inline
-
- -

Check gamepad name (if available)

- -

Definition at line 72 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ operator int()

- -
-
- - - - - -
- - - - - - - -
raylib::Gamepad::operator int () const
-
-inline
-
- -

Definition at line 53 of file Gamepad.hpp.

- -

References number.

- -
-
- -

◆ operator std::string()

- -
-
- - - - - -
- - - - - - - -
raylib::Gamepad::operator std::string () const
-
-inline
-
- -

Return gamepad internal name id.

- -

Definition at line 86 of file Gamepad.hpp.

- -

References GetName().

- -
-
- -

◆ operator=() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Gamepad& raylib::Gamepad::operator= (const Gamepad & gamepad)
-
-inline
-
- -

Definition at line 43 of file Gamepad.hpp.

- -

References set().

- -
-
- -

◆ operator=() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Gamepad& raylib::Gamepad::operator= (int gamepadNumber)
-
-inline
-
- -

Definition at line 48 of file Gamepad.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Gamepad::set (int gamepadNumber)
-
-inlineprotected
-
- -

Definition at line 140 of file Gamepad.hpp.

- -

References number.

- -

Referenced by Gamepad(), and operator=().

+

Definition at line 20 of file Gamepad.hpp.

@@ -728,33 +217,22 @@ Protected Member Functions
-

Definition at line 41 of file Gamepad.hpp.

+

Sets the number value for the object.

+
Parameters
+ + +
valueThe value of which to set number to.
+
+
-
- -

Member Data Documentation

- -

◆ number

- -
-
- - - - -
int raylib::Gamepad::number
-
- -

Definition at line 39 of file Gamepad.hpp.

- -

Referenced by GetAxisCount(), GetAxisMovement(), GetName(), IsAvailable(), IsButtonDown(), IsButtonPressed(), IsButtonReleased(), IsButtonUp(), IsName(), operator int(), and set().

+

Definition at line 20 of file Gamepad.hpp.

diff --git a/docs/classraylib_1_1_image-members.html b/docs/classraylib_1_1_image-members.html index 4e0a969..805211d 100644 --- a/docs/classraylib_1_1_image-members.html +++ b/docs/classraylib_1_1_image-members.html @@ -92,20 +92,20 @@ $(function() { Crop(::Vector2 size)raylib::Imageinline Crop(int offsetX, int offsetY, int newWidth, int newHeight)raylib::Imageinline Dither(int rBpp, int gBpp, int bBpp, int aBpp)raylib::Imageinline - Draw(const ::Image &src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint={255, 255, 255, 255})raylib::Imageinline - DrawCircle(int centerX, int centerY, int radius, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawCircle(::Vector2 center, int radius, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawLine(::Vector2 start, ::Vector2 end, ::Color color={255, 255, 255, 255})raylib::Imageinline + Draw(const ::Image &src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawCircle(int centerX, int centerY, int radius, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawCircle(::Vector2 center, int radius, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawLine(::Vector2 start, ::Vector2 end, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline DrawPixel(int posX, int posY, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawPixel(::Vector2 position, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawRectangle(int posX, int posY, int width, int height, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawRectangle(Vector2 position, Vector2 size, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawRectangle(::Rectangle rec, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawRectangleLines(::Rectangle rec, int thick, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawText(const std::string &text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawText(const std::string &text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255})raylib::Imageinline - DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})raylib::Imageinline + DrawPixel(::Vector2 position, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawRectangle(int posX, int posY, int width, int height, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawRectangle(Vector2 position, Vector2 size, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawRectangle(::Rectangle rec, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawRectangleLines(::Rectangle rec, int thick, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawText(const std::string &text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawText(const std::string &text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline Export(const std::string &fileName)raylib::Imageinline ExportAsCode(const std::string &fileName)raylib::Imageinline FlipHorizontal()raylib::Imageinline @@ -123,14 +123,14 @@ $(function() { GradientH(int width, int height, ::Color left, ::Color right)raylib::Imageinlinestatic GradientRadial(int width, int height, float density, ::Color inner, ::Color outer)raylib::Imageinlinestatic GradientV(int width, int height, ::Color top, ::Color bottom)raylib::Imageinlinestatic - Image(const ::Image &image)raylib::Imageinline - Image(const std::string &fileName)raylib::Imageinline - Image(const std::string &fileName, int width, int height, int format, int headerSize)raylib::Imageinline - Image(const std::string &fileName, int *frames)raylib::Imageinline - Image(const std::string &fileType, const unsigned char *fileData, int dataSize)raylib::Imageinline - Image(const ::Texture2D &texture)raylib::Imageinline - Image(int width, int height, ::Color color={255, 255, 255, 255})raylib::Imageinline - Image(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})raylib::Imageinline + Image(const ::Image &image) (defined in raylib::Image)raylib::Imageinline + Image(const std::string &fileName) (defined in raylib::Image)raylib::Imageinline + Image(const std::string &fileName, int width, int height, int format, int headerSize) (defined in raylib::Image)raylib::Imageinline + Image(const std::string &fileName, int *frames) (defined in raylib::Image)raylib::Imageinline + Image(const std::string &fileType, const unsigned char *fileData, int dataSize) (defined in raylib::Image)raylib::Imageinline + Image(const ::Texture2D &texture) (defined in raylib::Image)raylib::Imageinline + Image(int width, int height, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline + Image(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline Load(const std::string &fileName)raylib::Imageinline LoadAnim(const std::string &fileName, int *frames)raylib::Imageinline LoadColors()raylib::Imageinline @@ -140,29 +140,28 @@ $(function() { LoadTexture()raylib::Imageinline Mipmaps()raylib::Imageinline operator::Texture2D()raylib::Imageinline - operator=(const ::Image &image)raylib::Imageinline + operator=(const ::Image &image) (defined in raylib::Image)raylib::Imageinline PerlinNoise(int width, int height, int offsetX, int offsetY, float scale=1.0f)raylib::Imageinlinestatic Resize(int newWidth, int newHeight)raylib::Imageinline ResizeCanvas(int newWidth, int newHeight, int offsetX, int offsetY, ::Color color={255, 255, 255, 255})raylib::Imageinline ResizeNN(int newWidth, int newHeight)raylib::Imageinline RotateCCW()raylib::Imageinline RotateCW()raylib::Imageinline - set(const ::Image &image)raylib::Imageinlineprotected - SetData(void *value)raylib::Imageinline - SetFormat(int value)raylib::Imageinline - SetHeight(int value)raylib::Imageinline - SetMipmaps(int value)raylib::Imageinline - SetWidth(int value)raylib::Imageinline - Text(const std::string &text, int fontSize, ::Color color={255, 255, 255, 255})raylib::Imageinlinestatic - Text(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})raylib::Imageinlinestatic - ToPOT(::Color fillColor)raylib::Imageinline - Unload()raylib::Imageinline - WhiteNoise(int width, int height, float factor)raylib::Imageinlinestatic - ~Image()raylib::Imageinline + SetData(void *value)raylib::Imageinline + SetFormat(int value)raylib::Imageinline + SetHeight(int value)raylib::Imageinline + SetMipmaps(int value)raylib::Imageinline + SetWidth(int value)raylib::Imageinline + Text(const std::string &text, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinlinestatic + Text(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinlinestatic + ToPOT(::Color fillColor)raylib::Imageinline + Unload()raylib::Imageinline + WhiteNoise(int width, int height, float factor)raylib::Imageinlinestatic + ~Image() (defined in raylib::Image)raylib::Imageinline diff --git a/docs/classraylib_1_1_image.html b/docs/classraylib_1_1_image.html index 5cad0b1..a8755e0 100644 --- a/docs/classraylib_1_1_image.html +++ b/docs/classraylib_1_1_image.html @@ -70,44 +70,56 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Image Class Reference
+ +

Image type, bpp always RGBA (32bit) + More...

- + - + - + - + - + - + - + - + - - - - + + - - + + - - + + - - + + @@ -115,155 +127,211 @@ Public Member Functions - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + + + + + - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + + + + + + - - + + - - + +

Public Member Functions

 Image (const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
+ Image (const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
 
 Image (const ::Image &image)
+ Image (const ::Image &image)
 
 Image (const ::Texture2D &texture)
+ Image (const ::Texture2D &texture)
 
 Image (const std::string &fileName)
+ Image (const std::string &fileName)
 
 Image (const std::string &fileName, int *frames)
+ Image (const std::string &fileName, int *frames)
 
 Image (const std::string &fileName, int width, int height, int format, int headerSize)
+ Image (const std::string &fileName, int width, int height, int format, int headerSize)
 
 Image (const std::string &fileType, const unsigned char *fileData, int dataSize)
+ Image (const std::string &fileType, const unsigned char *fileData, int dataSize)
 
 Image (int width, int height, ::Color color={255, 255, 255, 255})
+ Image (int width, int height, ::Color color={255, 255, 255, 255})
 
 ~Image ()
 
Image & AlphaCrop (float threshold)
 Crop image depending on alpha value. More...
+Image & AlphaCrop (float threshold)
 Crop image depending on alpha value.
 
Image & AlphaMask (const ::Image &alphaMask)
 Apply alpha mask to image. More...
+Image & AlphaMask (const ::Image &alphaMask)
 Apply alpha mask to image.
 
Image & AlphaPremultiply ()
 Premultiply alpha channel. More...
+Image & AlphaPremultiply ()
 Premultiply alpha channel.
 
Image & ClearBackground (::Color color={0, 0, 0, 255})
 Clear image background with given color. More...
+Image & ClearBackground (::Color color={0, 0, 0, 255})
 Clear image background with given color.
 
Image & ColorBrightness (int brightness)
 Modify image color: brightness. More...
Image & ColorContrast (float contrast)
 Modify image color: contrast. More...
 
Image & ColorGrayscale ()
 Modify image color: grayscale. More...
+Image & ColorGrayscale ()
 Modify image color: grayscale.
 
Image & ColorInvert ()
 Modify image color: invert. More...
+Image & ColorInvert ()
 Modify image color: invert.
 
Image & ColorReplace (::Color color, ::Color replace)
 Modify image color: replace color. More...
+Image & ColorReplace (::Color color, ::Color replace)
 Modify image color: replace color.
 
Image & ColorTint (::Color color={255, 255, 255, 255})
 Modify image color: tint. More...
+Image & ColorTint (::Color color={255, 255, 255, 255})
 Modify image color: tint.
 
inline ::Image Copy ()
 Create an image duplicate (useful for transformations) More...
+inline ::Image Copy ()
 Create an image duplicate (useful for transformations)
 
Image & Crop (::Rectangle crop)
 Crop an image to area defined by a rectangle. More...
+Image & Crop (::Rectangle crop)
 Crop an image to area defined by a rectangle.
 
Image & Crop (::Vector2 size)
 Crop an image to a new given width and height based on a vector. More...
+Image & Crop (::Vector2 size)
 Crop an image to a new given width and height based on a vector.
 
Image & Crop (int offsetX, int offsetY, int newWidth, int newHeight)
 Crop an image to area defined by a rectangle. More...
+Image & Crop (int offsetX, int offsetY, int newWidth, int newHeight)
 Crop an image to area defined by a rectangle.
 
Image & Dither (int rBpp, int gBpp, int bBpp, int aBpp)
 Dither image data to 16bpp or lower (Floyd-Steinberg dithering) More...
+Image & Dither (int rBpp, int gBpp, int bBpp, int aBpp)
 Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
 
Image & Draw (const ::Image &src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint={255, 255, 255, 255})
+Image & Draw (const ::Image &src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint={255, 255, 255, 255})
 
Image & DrawCircle (::Vector2 center, int radius, ::Color color={255, 255, 255, 255})
+Image & DrawCircle (::Vector2 center, int radius, ::Color color={255, 255, 255, 255})
 
Image & DrawCircle (int centerX, int centerY, int radius, ::Color color={255, 255, 255, 255})
+Image & DrawCircle (int centerX, int centerY, int radius, ::Color color={255, 255, 255, 255})
 
Image & DrawLine (::Vector2 start, ::Vector2 end, ::Color color={255, 255, 255, 255})
+Image & DrawLine (::Vector2 start, ::Vector2 end, ::Color color={255, 255, 255, 255})
 
Image & DrawLine (int startPosX, int startPosY, int endPosX, int endPosY, ::Color color={255, 255, 255, 255})
+Image & DrawLine (int startPosX, int startPosY, int endPosX, int endPosY, ::Color color={255, 255, 255, 255})
 
Image & DrawPixel (::Vector2 position, ::Color color={255, 255, 255, 255})
+Image & DrawPixel (::Vector2 position, ::Color color={255, 255, 255, 255})
 
Image & DrawPixel (int posX, int posY, ::Color color={255, 255, 255, 255})
 Draw pixel within an image. More...
+Image & DrawPixel (int posX, int posY, ::Color color={255, 255, 255, 255})
 Draw pixel within an image.
 
Image & DrawRectangle (::Rectangle rec, ::Color color={255, 255, 255, 255})
+Image & DrawRectangle (::Rectangle rec, ::Color color={255, 255, 255, 255})
 
Image & DrawRectangle (int posX, int posY, int width, int height, ::Color color={255, 255, 255, 255})
+Image & DrawRectangle (int posX, int posY, int width, int height, ::Color color={255, 255, 255, 255})
 
Image & DrawRectangle (Vector2 position, Vector2 size, ::Color color={255, 255, 255, 255})
+Image & DrawRectangle (Vector2 position, Vector2 size, ::Color color={255, 255, 255, 255})
 
Image & DrawRectangleLines (::Rectangle rec, int thick, ::Color color={255, 255, 255, 255})
+Image & DrawRectangleLines (::Rectangle rec, int thick, ::Color color={255, 255, 255, 255})
 
Image & DrawText (const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
+Image & DrawText (const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
 
Image & DrawText (const std::string &text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255})
+Image & DrawText (const std::string &text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255})
 
Image & DrawText (const std::string &text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255})
+Image & DrawText (const std::string &text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255})
 
bool Export (const std::string &fileName)
 Export image data to file, returns true on success. More...
+bool Export (const std::string &fileName)
 Export image data to file, returns true on success.
 
bool ExportAsCode (const std::string &fileName)
 Export image as code file defining an array of bytes, returns true on success. More...
+bool ExportAsCode (const std::string &fileName)
 Export image as code file defining an array of bytes, returns true on success.
 
Image & FlipHorizontal ()
 Flip image horizontally. More...
+Image & FlipHorizontal ()
 Flip image horizontally.
 
Image & FlipVertical ()
 Flip image vertically. More...
+Image & FlipVertical ()
 Flip image vertically.
 
Image & Format (int newFormat)
 Convert image data to desired format. More...
+Image & Format (int newFormat)
 Convert image data to desired format.
 
inline ::Image FromImage (::Rectangle rec)
 Create an image from another image piece. More...
+inline ::Image FromImage (::Rectangle rec)
 Create an image from another image piece.
 
Rectangle GetAlphaBorder (float threshold) const
 Get image alpha border rectangle. More...
 
void * GetData () const
 Retrieves the data value for the object. More...
 
int GetFormat () const
 Retrieves the format value for the object. More...
 
int GetHeight () const
 Retrieves the height value for the object. More...
 
int GetMipmaps () const
 Retrieves the mipmaps value for the object. More...
 
inline ::Vector2 GetSize ()
 Retrieve the width and height of the image. More...
+inline ::Vector2 GetSize ()
 Retrieve the width and height of the image.
 
int GetWidth () const
 Retrieves the width value for the object. More...
 
void Load (const std::string &fileName)
 Load image from file into CPU memory (RAM) More...
+void Load (const std::string &fileName)
 Load image from file into CPU memory (RAM)
 
void LoadAnim (const std::string &fileName, int *frames)
 Load image sequence from file (frames appended to image.data). More...
+void LoadAnim (const std::string &fileName, int *frames)
 Load image sequence from file (frames appended to image.data).
 
inline ::Color * LoadColors ()
 Load color data from image as a Color array (RGBA - 32bit) More...
+inline ::Color * LoadColors ()
 Load color data from image as a Color array (RGBA - 32bit)
 
void LoadFromMemory (const std::string &fileType, const unsigned char *fileData, int dataSize)
 Load image from memory buffer, fileType refers to extension: i.e. More...
 
inline ::Color * LoadPalette (int maxPaletteSize, int *colorsCount)
 Load colors palette from image as a Color array (RGBA - 32bit) More...
+inline ::Color * LoadPalette (int maxPaletteSize, int *colorsCount)
 Load colors palette from image as a Color array (RGBA - 32bit)
 
void LoadRaw (const std::string &fileName, int width, int height, int format, int headerSize)
 Load image from RAW file data. More...
+void LoadRaw (const std::string &fileName, int width, int height, int format, int headerSize)
 Load image from RAW file data.
 
inline ::Texture2D LoadTexture ()
 Load texture from image data. More...
+inline ::Texture2D LoadTexture ()
 Load texture from image data.
 
Image & Mipmaps ()
 Generate all mipmap levels for a provided image. More...
+Image & Mipmaps ()
 Generate all mipmap levels for a provided image.
 
 operator::Texture2D ()
 Load texture from image data. More...
+ operator::Texture2D ()
 Load texture from image data.
 
Image & operator= (const ::Image &image)
+Image & operator= (const ::Image &image)
 
Image & Resize (int newWidth, int newHeight)
 Resize and image to new size. More...
+Image & Resize (int newWidth, int newHeight)
 Resize and image to new size.
 
Image & ResizeCanvas (int newWidth, int newHeight, int offsetX, int offsetY, ::Color color={255, 255, 255, 255})
 Resize canvas and fill with color. More...
+Image & ResizeCanvas (int newWidth, int newHeight, int offsetX, int offsetY, ::Color color={255, 255, 255, 255})
 Resize canvas and fill with color.
 
Image & ResizeNN (int newWidth, int newHeight)
 Resize and image to new size using Nearest-Neighbor scaling algorithm. More...
+Image & ResizeNN (int newWidth, int newHeight)
 Resize and image to new size using Nearest-Neighbor scaling algorithm.
 
Image & RotateCCW ()
 Rotate image counter-clockwise 90deg. More...
+Image & RotateCCW ()
 Rotate image counter-clockwise 90deg.
 
Image & RotateCW ()
 Rotate image clockwise 90deg. More...
+Image & RotateCW ()
 Rotate image clockwise 90deg.
 
void SetData (void *value)
 Sets the data value for the object. More...
 
void SetFormat (int value)
 Sets the format value for the object. More...
 
void SetHeight (int value)
 Sets the height value for the object. More...
 
void SetMipmaps (int value)
 Sets the mipmaps value for the object. More...
 
void SetWidth (int value)
 Sets the width value for the object. More...
 
Image & ToPOT (::Color fillColor)
 Convert image to POT (power-of-two) More...
+Image & ToPOT (::Color fillColor)
 Convert image to POT (power-of-two)
 
void Unload ()
 Unload image from CPU memory (RAM) More...
+void Unload ()
 Unload image from CPU memory (RAM)
 
- - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + -

@@ -271,497 +339,51 @@ Static Public Member Functions

::Image Cellular (int width, int height, int tileSize)
 Generate image: cellular algorithm. More...
 
::Image Checked (int width, int height, int checksX, int checksY, ::Color col1, ::Color col2)
 Generate image: checked. More...
+::Image Checked (int width, int height, int checksX, int checksY, ::Color col1, ::Color col2)
 Generate image: checked.
 
::Image Color (int width, int height, ::Color color={255, 255, 255, 255})
 Generate image: plain color. More...
+::Image Color (int width, int height, ::Color color={255, 255, 255, 255})
 Generate image: plain color.
 
::Image GetScreenData ()
 Get pixel data from screen buffer and return an Image (screenshot) More...
+::Image GetScreenData ()
 Get pixel data from screen buffer and return an Image (screenshot)
 
::Image GradientH (int width, int height, ::Color left, ::Color right)
 Generate image: horizontal gradient. More...
+::Image GradientH (int width, int height, ::Color left, ::Color right)
 Generate image: horizontal gradient.
 
::Image GradientRadial (int width, int height, float density, ::Color inner, ::Color outer)
 Generate image: radial gradient. More...
+::Image GradientRadial (int width, int height, float density, ::Color inner, ::Color outer)
 Generate image: radial gradient.
 
::Image GradientV (int width, int height, ::Color top, ::Color bottom)
 Generate image: vertical gradient. More...
+::Image GradientV (int width, int height, ::Color top, ::Color bottom)
 Generate image: vertical gradient.
 
::Image PerlinNoise (int width, int height, int offsetX, int offsetY, float scale=1.0f)
 Generate image: perlin noise. More...
+::Image PerlinNoise (int width, int height, int offsetX, int offsetY, float scale=1.0f)
 Generate image: perlin noise.
 
::Image Text (const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
+::Image Text (const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
 
::Image Text (const std::string &text, int fontSize, ::Color color={255, 255, 255, 255})
+::Image Text (const std::string &text, int fontSize, ::Color color={255, 255, 255, 255})
 
::Image WhiteNoise (int width, int height, float factor)
 Generate image: white noise. More...
+::Image WhiteNoise (int width, int height, float factor)
 Generate image: white noise.
 
- - -

-Protected Member Functions

void set (const ::Image &image)
 

Detailed Description

-
-

Definition at line 34 of file Image.hpp.

-

Constructor & Destructor Documentation

- -

◆ Image() [1/8]

+

Image type, bpp always RGBA (32bit)

+

Data stored in CPU memory (RAM)

-
-
- - - - - -
- - - - - - - - -
raylib::Image::Image (const ::Image & image)
-
-inline
-
- -

Definition at line 36 of file Image.hpp.

- -

References set().

- -
-
- -

◆ Image() [2/8]

- -
-
- - - - - -
- - - - - - - - -
raylib::Image::Image (const std::string & fileName)
-
-inline
-
- -

Definition at line 40 of file Image.hpp.

- -

References Load().

- -
-
- -

◆ Image() [3/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Image::Image (const std::string & fileName,
int width,
int height,
int format,
int headerSize 
)
-
-inline
-
- -

Definition at line 44 of file Image.hpp.

- -

References LoadRaw().

- -
-
- -

◆ Image() [4/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Image::Image (const std::string & fileName,
int * frames 
)
-
-inline
-
- -

Definition at line 48 of file Image.hpp.

- -

References LoadAnim().

- -
-
- -

◆ Image() [5/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Image::Image (const std::string & fileType,
const unsigned char * fileData,
int dataSize 
)
-
-inline
-
- -

Definition at line 52 of file Image.hpp.

- -

References LoadFromMemory().

- -
-
- -

◆ Image() [6/8]

- -
-
- - - - - -
- - - - - - - - -
raylib::Image::Image (const ::Texture2D & texture)
-
-inline
-
- -

Definition at line 56 of file Image.hpp.

- -

References set().

- -
-
- -

◆ Image() [7/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Image::Image (int width,
int height,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 60 of file Image.hpp.

- -
-
- -

◆ Image() [8/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Image::Image (const ::Font & font,
const std::string & text,
float fontSize,
float spacing,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 64 of file Image.hpp.

- -
-
- -

◆ ~Image()

- -
-
- - - - - -
- - - - - - - -
raylib::Image::~Image ()
-
-inline
-
- -

Definition at line 145 of file Image.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ AlphaCrop()

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::AlphaCrop (float threshold)
-
-inline
-
- -

Crop image depending on alpha value.

- -

Definition at line 264 of file Image.hpp.

- -
-
- -

◆ AlphaMask()

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::AlphaMask (const ::Image & alphaMask)
-
-inline
-
- -

Apply alpha mask to image.

- -

Definition at line 256 of file Image.hpp.

- -
-
- -

◆ AlphaPremultiply()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::AlphaPremultiply ()
-
-inline
-
- -

Premultiply alpha channel.

- -

Definition at line 272 of file Image.hpp.

- -
-
+

Definition at line 15 of file Image.hpp.

+

Member Function Documentation

◆ Cellular()

@@ -805,147 +427,7 @@ Protected Member Functions

Generate image: cellular algorithm.

Bigger tileSize means bigger cells

-

Definition at line 141 of file Image.hpp.

- -
- - -

◆ Checked()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::Checked (int width,
int height,
int checksX,
int checksY,
::Color col1,
::Color col2 
)
-
-inlinestatic
-
- -

Generate image: checked.

- -

Definition at line 118 of file Image.hpp.

- -
-
- -

◆ ClearBackground()

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::ClearBackground (::Color color = {0, 0, 0, 255})
-
-inline
-
- -

Clear image background with given color.

- -

Definition at line 443 of file Image.hpp.

- -
-
- -

◆ Color()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::Color (int width,
int height,
::Color color = {255, 255, 255, 255} 
)
-
-inlinestatic
-
- -

Generate image: plain color.

- -

Definition at line 89 of file Image.hpp.

+

Definition at line 122 of file Image.hpp.

@@ -981,7 +463,7 @@ Protected Member Functions -

Definition at line 418 of file Image.hpp.

+

Definition at line 399 of file Image.hpp.

@@ -1017,1188 +499,7 @@ Protected Member Functions -

Definition at line 408 of file Image.hpp.

- - - - -

◆ ColorGrayscale()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::ColorGrayscale ()
-
-inline
-
- -

Modify image color: grayscale.

- -

Definition at line 398 of file Image.hpp.

- -
-
- -

◆ ColorInvert()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::ColorInvert ()
-
-inline
-
- -

Modify image color: invert.

- -

Definition at line 390 of file Image.hpp.

- -
-
- -

◆ ColorReplace()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Image& raylib::Image::ColorReplace (::Color color,
::Color replace 
)
-
-inline
-
- -

Modify image color: replace color.

- -

Definition at line 426 of file Image.hpp.

- -
-
- -

◆ ColorTint()

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::ColorTint (::Color color = {255, 255, 255, 255})
-
-inline
-
- -

Modify image color: tint.

- -

Definition at line 382 of file Image.hpp.

- -
-
- -

◆ Copy()

- -
-
- - - - - -
- - - - - - - -
inline ::Image raylib::Image::Copy ()
-
-inline
-
- -

Create an image duplicate (useful for transformations)

- -

Definition at line 226 of file Image.hpp.

- -
-
- -

◆ Crop() [1/3]

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::Crop (::Rectangle crop)
-
-inline
-
- -

Crop an image to area defined by a rectangle.

- -

Definition at line 280 of file Image.hpp.

- -

Referenced by Crop().

- -
-
- -

◆ Crop() [2/3]

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::Crop (::Vector2 size)
-
-inline
-
- -

Crop an image to a new given width and height based on a vector.

- -

Definition at line 288 of file Image.hpp.

- -

References Crop().

- -
-
- -

◆ Crop() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::Crop (int offsetX,
int offsetY,
int newWidth,
int newHeight 
)
-
-inline
-
- -

Crop an image to area defined by a rectangle.

- -

Definition at line 295 of file Image.hpp.

- -
-
- -

◆ Dither()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::Dither (int rBpp,
int gBpp,
int bBpp,
int aBpp 
)
-
-inline
-
- -

Dither image data to 16bpp or lower (Floyd-Steinberg dithering)

- -

Definition at line 342 of file Image.hpp.

- -
-
- -

◆ Draw()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::Draw (const ::Image & src,
::Rectangle srcRec,
::Rectangle dstRec,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 507 of file Image.hpp.

- -
-
- -

◆ DrawCircle() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawCircle (::Vector2 center,
int radius,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 478 of file Image.hpp.

- -
-
- -

◆ DrawCircle() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawCircle (int centerX,
int centerY,
int radius,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 472 of file Image.hpp.

- -
-
- -

◆ DrawLine() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawLine (::Vector2 start,
::Vector2 end,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 467 of file Image.hpp.

- -
-
- -

◆ DrawLine() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawLine (int startPosX,
int startPosY,
int endPosX,
int endPosY,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 461 of file Image.hpp.

- -
-
- -

◆ DrawPixel() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawPixel (::Vector2 position,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 456 of file Image.hpp.

- -
-
- -

◆ DrawPixel() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawPixel (int posX,
int posY,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw pixel within an image.

- -

Definition at line 451 of file Image.hpp.

- -
-
- -

◆ DrawRectangle() [1/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawRectangle (::Rectangle rec,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 496 of file Image.hpp.

- -
-
- -

◆ DrawRectangle() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawRectangle (int posX,
int posY,
int width,
int height,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 484 of file Image.hpp.

- -
-
- -

◆ DrawRectangle() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawRectangle (Vector2 position,
Vector2 size,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 490 of file Image.hpp.

- -
-
- -

◆ DrawRectangleLines()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawRectangleLines (::Rectangle rec,
int thick,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 501 of file Image.hpp.

- -
-
- -

◆ DrawText() [1/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawText (const ::Font & font,
const std::string & text,
::Vector2 position,
float fontSize,
float spacing,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 530 of file Image.hpp.

- -
-
- -

◆ DrawText() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawText (const std::string & text,
::Vector2 position,
int fontSize,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 513 of file Image.hpp.

- -
-
- -

◆ DrawText() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::DrawText (const std::string & text,
int x,
int y,
int fontSize,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 524 of file Image.hpp.

- -
-
- -

◆ Export()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Image::Export (const std::string & fileName)
-
-inline
-
- -

Export image data to file, returns true on success.

- -

Definition at line 198 of file Image.hpp.

- -
-
- -

◆ ExportAsCode()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Image::ExportAsCode (const std::string & fileName)
-
-inline
-
- -

Export image as code file defining an array of bytes, returns true on success.

- -

Definition at line 206 of file Image.hpp.

- -
-
- -

◆ FlipHorizontal()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::FlipHorizontal ()
-
-inline
-
- -

Flip image horizontally.

- -

Definition at line 358 of file Image.hpp.

- -
-
- -

◆ FlipVertical()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::FlipVertical ()
-
-inline
-
- -

Flip image vertically.

- -

Definition at line 350 of file Image.hpp.

- -
-
- -

◆ Format()

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::Format (int newFormat)
-
-inline
-
- -

Convert image data to desired format.

- -

Definition at line 248 of file Image.hpp.

- -
-
- -

◆ FromImage()

- -
-
- - - - - -
- - - - - - - - -
inline ::Image raylib::Image::FromImage (::Rectangle rec)
-
-inline
-
- -

Create an image from another image piece.

- -

Definition at line 233 of file Image.hpp.

+

Definition at line 389 of file Image.hpp.

@@ -2234,7 +535,7 @@ Protected Member Functions -

Definition at line 436 of file Image.hpp.

+

Definition at line 417 of file Image.hpp.

@@ -2261,7 +562,10 @@ Protected Member Functions
-

Definition at line 210 of file Image.hpp.

+

Retrieves the data value for the object.

+
Returns
The data value of the object.
+ +

Definition at line 191 of file Image.hpp.

@@ -2288,7 +592,10 @@ Protected Member Functions
-

Definition at line 214 of file Image.hpp.

+

Retrieves the format value for the object.

+
Returns
The format value of the object.
+ +

Definition at line 195 of file Image.hpp.

@@ -2315,7 +622,10 @@ Protected Member Functions
-

Definition at line 212 of file Image.hpp.

+

Retrieves the height value for the object.

+
Returns
The height value of the object.
+ +

Definition at line 193 of file Image.hpp.

@@ -2342,65 +652,10 @@ Protected Member Functions
-

Definition at line 213 of file Image.hpp.

+

Retrieves the mipmaps value for the object.

+
Returns
The mipmaps value of the object.
-
- - -

◆ GetScreenData()

- -
-
- - - - - -
- - - - - - - -
::Image raylib::Image::GetScreenData ()
-
-inlinestatic
-
- -

Get pixel data from screen buffer and return an Image (screenshot)

- -

Definition at line 82 of file Image.hpp.

- -
-
- -

◆ GetSize()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Image::GetSize ()
-
-inline
-
- -

Retrieve the width and height of the image.

- -

Definition at line 219 of file Image.hpp.

+

Definition at line 194 of file Image.hpp.

@@ -2427,276 +682,10 @@ Protected Member Functions
-

Definition at line 211 of file Image.hpp.

+

Retrieves the width value for the object.

+
Returns
The width value of the object.
-
- - -

◆ GradientH()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::GradientH (int width,
int height,
::Color left,
::Color right 
)
-
-inlinestatic
-
- -

Generate image: horizontal gradient.

- -

Definition at line 103 of file Image.hpp.

- -
-
- -

◆ GradientRadial()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::GradientRadial (int width,
int height,
float density,
::Color inner,
::Color outer 
)
-
-inlinestatic
-
- -

Generate image: radial gradient.

- -

Definition at line 110 of file Image.hpp.

- -
-
- -

◆ GradientV()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::GradientV (int width,
int height,
::Color top,
::Color bottom 
)
-
-inlinestatic
-
- -

Generate image: vertical gradient.

- -

Definition at line 96 of file Image.hpp.

- -
-
- -

◆ Load()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Image::Load (const std::string & fileName)
-
-inline
-
- -

Load image from file into CPU memory (RAM)

- -

Definition at line 157 of file Image.hpp.

- -

References raylib::LoadImage(), and set().

- -

Referenced by Image().

- -
-
- -

◆ LoadAnim()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void raylib::Image::LoadAnim (const std::string & fileName,
int * frames 
)
-
-inline
-
- -

Load image sequence from file (frames appended to image.data).

- -

Definition at line 171 of file Image.hpp.

- -

References raylib::LoadImageAnim(), and set().

- -

Referenced by Image().

- -
-
- -

◆ LoadColors()

- -
-
- - - - - -
- - - - - - - -
inline ::Color* raylib::Image::LoadColors ()
-
-inline
-
- -

Load color data from image as a Color array (RGBA - 32bit)

- -

Definition at line 539 of file Image.hpp.

+

Definition at line 192 of file Image.hpp.

@@ -2743,518 +732,9 @@ Protected Member Functions

Load image from memory buffer, fileType refers to extension: i.e.

"png".

-

Definition at line 178 of file Image.hpp.

+

Definition at line 159 of file Image.hpp.

-

References raylib::LoadImageFromMemory(), and set().

- -

Referenced by Image().

- - - - -

◆ LoadPalette()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
inline ::Color* raylib::Image::LoadPalette (int maxPaletteSize,
int * colorsCount 
)
-
-inline
-
- -

Load colors palette from image as a Color array (RGBA - 32bit)

- -

Definition at line 546 of file Image.hpp.

- -
-
- -

◆ LoadRaw()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void raylib::Image::LoadRaw (const std::string & fileName,
int width,
int height,
int format,
int headerSize 
)
-
-inline
-
- -

Load image from RAW file data.

- -

Definition at line 164 of file Image.hpp.

- -

References raylib::LoadImageRaw(), and set().

- -

Referenced by Image().

- -
-
- -

◆ LoadTexture()

- -
-
- - - - - -
- - - - - - - -
inline ::Texture2D raylib::Image::LoadTexture ()
-
-inline
-
- -

Load texture from image data.

- -

Definition at line 553 of file Image.hpp.

- -

Referenced by operator::Texture2D().

- -
-
- -

◆ Mipmaps()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::Mipmaps ()
-
-inline
-
- -

Generate all mipmap levels for a provided image.

- -

Definition at line 334 of file Image.hpp.

- -
-
- -

◆ operator::Texture2D()

- -
-
- - - - - -
- - - - - - - -
raylib::Image::operator::Texture2D ()
-
-inline
-
- -

Load texture from image data.

- -

Definition at line 560 of file Image.hpp.

- -

References LoadTexture().

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::operator= (const ::Image & image)
-
-inline
-
- -

Definition at line 149 of file Image.hpp.

- -

References set().

- -
-
- -

◆ PerlinNoise()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::PerlinNoise (int width,
int height,
int offsetX,
int offsetY,
float scale = 1.0f 
)
-
-inlinestatic
-
- -

Generate image: perlin noise.

- -

Definition at line 133 of file Image.hpp.

- -
-
- -

◆ Resize()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Image& raylib::Image::Resize (int newWidth,
int newHeight 
)
-
-inline
-
- -

Resize and image to new size.

- -

Definition at line 309 of file Image.hpp.

- -
-
- -

◆ ResizeCanvas()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image& raylib::Image::ResizeCanvas (int newWidth,
int newHeight,
int offsetX,
int offsetY,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Resize canvas and fill with color.

- -

Definition at line 325 of file Image.hpp.

- -
-
- -

◆ ResizeNN()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Image& raylib::Image::ResizeNN (int newWidth,
int newHeight 
)
-
-inline
-
- -

Resize and image to new size using Nearest-Neighbor scaling algorithm.

- -

Definition at line 317 of file Image.hpp.

- -
-
- -

◆ RotateCCW()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::RotateCCW ()
-
-inline
-
- -

Rotate image counter-clockwise 90deg.

- -

Definition at line 374 of file Image.hpp.

- -
-
- -

◆ RotateCW()

- -
-
- - - - - -
- - - - - - - -
Image& raylib::Image::RotateCW ()
-
-inline
-
- -

Rotate image clockwise 90deg.

- -

Definition at line 366 of file Image.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Image::set (const ::Image & image)
-
-inlineprotected
-
- -

Definition at line 565 of file Image.hpp.

- -

Referenced by Image(), Load(), LoadAnim(), LoadFromMemory(), LoadRaw(), and operator=().

+

References raylib::LoadImageFromMemory().

@@ -3282,7 +762,15 @@ Protected Member Functions
-

Definition at line 210 of file Image.hpp.

+

Sets the data value for the object.

+
Parameters
+ + +
valueThe value of which to set data to.
+
+
+ +

Definition at line 191 of file Image.hpp.

@@ -3310,7 +798,15 @@ Protected Member Functions
-

Definition at line 214 of file Image.hpp.

+

Sets the format value for the object.

+
Parameters
+ + +
valueThe value of which to set format to.
+
+
+ +

Definition at line 195 of file Image.hpp.

@@ -3338,7 +834,15 @@ Protected Member Functions
-

Definition at line 212 of file Image.hpp.

+

Sets the height value for the object.

+
Parameters
+ + +
valueThe value of which to set height to.
+
+
+ +

Definition at line 193 of file Image.hpp.

@@ -3366,7 +870,15 @@ Protected Member Functions
-

Definition at line 213 of file Image.hpp.

+

Sets the mipmaps value for the object.

+
Parameters
+ + +
valueThe value of which to set mipmaps to.
+
+
+ +

Definition at line 194 of file Image.hpp.

@@ -3394,221 +906,22 @@ Protected Member Functions
-

Definition at line 211 of file Image.hpp.

+

Sets the width value for the object.

+
Parameters
+ + +
valueThe value of which to set width to.
+
+
-
- - -

◆ Text() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::Text (const ::Font & font,
const std::string & text,
float fontSize,
float spacing,
::Color tint = {255, 255, 255, 255} 
)
-
-inlinestatic
-
- -

Definition at line 74 of file Image.hpp.

- -
-
- -

◆ Text() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::Text (const std::string & text,
int fontSize,
::Color color = {255, 255, 255, 255} 
)
-
-inlinestatic
-
- -

Definition at line 69 of file Image.hpp.

- -
-
- -

◆ ToPOT()

- -
-
- - - - - -
- - - - - - - - -
Image& raylib::Image::ToPOT (::Color fillColor)
-
-inline
-
- -

Convert image to POT (power-of-two)

- -

Definition at line 240 of file Image.hpp.

- -
-
- -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Image::Unload ()
-
-inline
-
- -

Unload image from CPU memory (RAM)

- -

Definition at line 188 of file Image.hpp.

- -

Referenced by ~Image().

- -
-
- -

◆ WhiteNoise()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Image raylib::Image::WhiteNoise (int width,
int height,
float factor 
)
-
-inlinestatic
-
- -

Generate image: white noise.

- -

Definition at line 126 of file Image.hpp.

+

Definition at line 192 of file Image.hpp.

diff --git a/docs/classraylib_1_1_material-members.html b/docs/classraylib_1_1_material-members.html index 3bcea2b..1d01954 100644 --- a/docs/classraylib_1_1_material-members.html +++ b/docs/classraylib_1_1_material-members.html @@ -74,24 +74,23 @@ $(function() {

This is the complete list of members for raylib::Material, including all inherited members.

- + - + - + - - - - - - - - + + + + + + +
GetMaps() constraylib::Materialinline
GetMaps() constraylib::Materialinline
GetParams() constraylib::Materialinline
GetShader() constraylib::Materialinline
GetShader() constraylib::Materialinline
Load(const std::string &fileName)raylib::Materialinlinestatic
Material(const ::Material &material)raylib::Materialinline
Material(const ::Material &material) (defined in raylib::Material)raylib::Materialinline
Material()raylib::Materialinline
operator=(const ::Material &material)raylib::Materialinline
set(const ::Material &material)raylib::Materialinlineprotected
SetMaps(::MaterialMap *value)raylib::Materialinline
SetParams(float *value)raylib::Materialinline
SetShader(::Shader value)raylib::Materialinline
SetTexture(int mapType, const ::Texture2D &texture)raylib::Materialinline
Unload()raylib::Materialinline
~Material()raylib::Materialinline
operator=(const ::Material &material) (defined in raylib::Material)raylib::Materialinline
SetMaps(::MaterialMap *value)raylib::Materialinline
SetParams(float *value)raylib::Materialinline
SetShader(::Shader value)raylib::Materialinline
SetTexture(int mapType, const ::Texture2D &texture)raylib::Materialinline
Unload()raylib::Materialinline
~Material() (defined in raylib::Material)raylib::Materialinline
diff --git a/docs/classraylib_1_1_material.html b/docs/classraylib_1_1_material.html index 4f737c5..1d5df52 100644 --- a/docs/classraylib_1_1_material.html +++ b/docs/classraylib_1_1_material.html @@ -70,60 +70,68 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Material Class Reference
+ +

Material type (generic) + More...

- - + + - + - - - - + + + + - - - + + + + + + + - - + + - - + +

Public Member Functions

 Material ()
 Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) More...
+ Material ()
 Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
 
 Material (const ::Material &material)
+ Material (const ::Material &material)
 
 ~Material ()
 
inline ::MaterialMap * GetMaps () const
 
::MaterialMap * GetMaps () const
 Retrieves the maps value for the object. More...
 
float * GetParams () const
 Retrieves the params value for the object. More...
 
inline ::Shader GetShader () const
 
Material & operator= (const ::Material &material)
::Shader GetShader () const
 Retrieves the shader value for the object. More...
 
+Material & operator= (const ::Material &material)
 
void SetMaps (::MaterialMap *value)
 Sets the maps value for the object. More...
 
void SetParams (float *value)
 Sets the params value for the object. More...
 
void SetShader (::Shader value)
 Sets the shader value for the object. More...
 
Material & SetTexture (int mapType, const ::Texture2D &texture)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) More...
+Material & SetTexture (int mapType, const ::Texture2D &texture)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
 
void Unload ()
 Unload material from memory. More...
+void Unload ()
 Unload material from memory.
 
- - + + -

Static Public Member Functions

static std::vector< Material > Load (const std::string &fileName)
 Load materials from model file. More...
+static std::vector< Material > Load (const std::string &fileName)
 Load materials from model file.
 
- - -

-Protected Member Functions

void set (const ::Material &material)
 

Detailed Description

-
-

Definition at line 35 of file Material.hpp.

-

Constructor & Destructor Documentation

- -

◆ Material() [1/2]

+

Material type (generic)

+ +

Definition at line 14 of file Material.hpp.

+

Member Function Documentation

+ +

◆ GetMaps()

@@ -132,98 +140,7 @@ Protected Member Functions - - - - - - -
raylib::Material::Material (const ::Material & material)
- - -inline - - -
- -

Definition at line 37 of file Material.hpp.

- -

References set().

- -
-
- -

◆ Material() [2/2]

- -
-
- - - - - -
- - - - - - - -
raylib::Material::Material ()
-
-inline
-
- -

Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)

- -

Definition at line 44 of file Material.hpp.

- -

References set().

- -
-
- -

◆ ~Material()

- -
-
- - - - - -
- - - - - - - -
raylib::Material::~Material ()
-
-inline
-
- -

Definition at line 48 of file Material.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ GetMaps()

- -
-
- - -
- - - + @@ -236,7 +153,10 @@ Protected Member Functions
inline ::MaterialMap* raylib::Material::GetMaps ::MaterialMap* raylib::Material::GetMaps ( ) const
-

Definition at line 62 of file Material.hpp.

+

Retrieves the maps value for the object.

+
Returns
The maps value of the object.
+ +

Definition at line 41 of file Material.hpp.

@@ -263,12 +183,15 @@ Protected Member Functions
-

Definition at line 63 of file Material.hpp.

+

Retrieves the params value for the object.

+
Returns
The params value of the object.
+ +

Definition at line 42 of file Material.hpp.

- -

◆ GetShader()

+ +

◆ GetShader()

@@ -277,7 +200,7 @@ Protected Member Functions - + @@ -290,97 +213,10 @@ Protected Member Functions
inline ::Shader raylib::Material::GetShader ::Shader raylib::Material::GetShader ( ) const
-

Definition at line 61 of file Material.hpp.

+

Retrieves the shader value for the object.

+
Returns
The shader value of the object.
-
-
- -

◆ Load()

- -
-
- - - - - -
- - - - - - - - -
static std::vector<Material> raylib::Material::Load (const std::string & fileName)
-
-inlinestatic
-
- -

Load materials from model file.

- -

Definition at line 55 of file Material.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Material& raylib::Material::operator= (const ::Material & material)
-
-inline
-
- -

Definition at line 65 of file Material.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Material::set (const ::Material & material)
-
-inlineprotected
-
- -

Definition at line 89 of file Material.hpp.

- -

Referenced by Material(), and operator=().

+

Definition at line 40 of file Material.hpp.

@@ -408,7 +244,15 @@ Protected Member Functions
-

Definition at line 62 of file Material.hpp.

+

Sets the maps value for the object.

+
Parameters
+ + +
valueThe value of which to set maps to.
+
+
+ +

Definition at line 41 of file Material.hpp.

@@ -436,7 +280,15 @@ Protected Member Functions
-

Definition at line 63 of file Material.hpp.

+

Sets the params value for the object.

+
Parameters
+ + +
valueThe value of which to set params to.
+
+
+ +

Definition at line 42 of file Material.hpp.

@@ -464,85 +316,22 @@ Protected Member Functions
-

Definition at line 61 of file Material.hpp.

+

Sets the shader value for the object.

+
Parameters
+ + +
valueThe value of which to set shader to.
+
+
-
- - -

◆ SetTexture()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Material& raylib::Material::SetTexture (int mapType,
const ::Texture2D & texture 
)
-
-inline
-
- -

Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)

- -

Definition at line 83 of file Material.hpp.

- -
-
- -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Material::Unload ()
-
-inline
-
- -

Unload material from memory.

- -

Definition at line 73 of file Material.hpp.

- -

Referenced by ~Material().

+

Definition at line 40 of file Material.hpp.

diff --git a/docs/classraylib_1_1_matrix-members.html b/docs/classraylib_1_1_matrix-members.html index 57edd8b..a5df9fc 100644 --- a/docs/classraylib_1_1_matrix-members.html +++ b/docs/classraylib_1_1_matrix-members.html @@ -74,8 +74,8 @@ $(function() {

This is the complete list of members for raylib::Matrix, including all inherited members.

- - + + @@ -94,57 +94,56 @@ $(function() { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Add(const ::Matrix &right)raylib::Matrixinline
Frustum(double left, double right, double bottom, double top, double near, double far)raylib::Matrixinlinestatic
Add(const ::Matrix &right) (defined in raylib::Matrix)raylib::Matrixinline
Frustum(double left, double right, double bottom, double top, double near, double far) (defined in raylib::Matrix)raylib::Matrixinlinestatic
GetM0() constraylib::Matrixinline
GetM1() constraylib::Matrixinline
GetM10() constraylib::Matrixinline
GetM9() constraylib::Matrixinline
GetModelview()raylib::Matrixinlinestatic
GetProjection()raylib::Matrixinlinestatic
Identity()raylib::Matrixinlinestatic
Invert() constraylib::Matrixinline
LookAt(Vector3 eye, Vector3 target, Vector3 up)raylib::Matrixinlinestatic
Matrix(const ::Matrix &mat)raylib::Matrixinline
Matrix(float M0=0, float M1=0, float M2=0, float M3=0, float M4=0, float M5=0, float M6=0, float M7=0, float M8=0, float M9=0, float M10=0, float M11=0, float M12=0, float M13=0, float M14=0, float M15=0)raylib::Matrixinline
Multiply(const ::Matrix &right) constraylib::Matrixinline
Normalize() constraylib::Matrixinline
operator float16()raylib::Matrixinline
operator*(const ::Matrix &matrix)raylib::Matrixinline
operator+(const ::Matrix &matrix)raylib::Matrixinline
operator-(const ::Matrix &matrix)raylib::Matrixinline
operator=(const ::Matrix &matrix)raylib::Matrixinline
operator=(const Matrix &matrix)raylib::Matrixinline
operator==(const ::Matrix &other)raylib::Matrixinline
Ortho(double left, double right, double bottom, double top, double near, double far)raylib::Matrixinlinestatic
Perspective(double fovy, double aspect, double near, double far)raylib::Matrixinlinestatic
Rotate(Vector3 axis, float angle)raylib::Matrixinlinestatic
RotateX(float angle)raylib::Matrixinlinestatic
RotateXYZ(Vector3 angle)raylib::Matrixinlinestatic
RotateY(float angle)raylib::Matrixinlinestatic
RotateZ(float angle)raylib::Matrixinlinestatic
Scale(float x, float y, float z)raylib::Matrixinlinestatic
set(const ::Matrix &mat)raylib::Matrixinlineprotected
SetM0(float value)raylib::Matrixinline
SetM1(float value)raylib::Matrixinline
SetM10(float value)raylib::Matrixinline
SetM11(float value)raylib::Matrixinline
SetM12(float value)raylib::Matrixinline
SetM13(float value)raylib::Matrixinline
SetM14(float value)raylib::Matrixinline
SetM15(float value)raylib::Matrixinline
SetM2(float value)raylib::Matrixinline
SetM3(float value)raylib::Matrixinline
SetM4(float value)raylib::Matrixinline
SetM5(float value)raylib::Matrixinline
SetM6(float value)raylib::Matrixinline
SetM7(float value)raylib::Matrixinline
SetM8(float value)raylib::Matrixinline
SetM9(float value)raylib::Matrixinline
SetModelview()raylib::Matrixinline
SetProjection()raylib::Matrixinline
SetShaderValue(::Shader shader, int uniformLoc)raylib::Matrixinline
Subtract(const ::Matrix &right)raylib::Matrixinline
ToFloatV() constraylib::Matrixinline
Trace() constraylib::Matrixinline
Translate(float x, float y, float z)raylib::Matrixinlinestatic
Transpose() constraylib::Matrixinline
Identity() (defined in raylib::Matrix)raylib::Matrixinlinestatic
Invert() const (defined in raylib::Matrix)raylib::Matrixinline
LookAt(Vector3 eye, Vector3 target, Vector3 up) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Matrix(const ::Matrix &mat) (defined in raylib::Matrix)raylib::Matrixinline
Matrix(float M0=0, float M1=0, float M2=0, float M3=0, float M4=0, float M5=0, float M6=0, float M7=0, float M8=0, float M9=0, float M10=0, float M11=0, float M12=0, float M13=0, float M14=0, float M15=0) (defined in raylib::Matrix)raylib::Matrixinline
Multiply(const ::Matrix &right) const (defined in raylib::Matrix)raylib::Matrixinline
Normalize() const (defined in raylib::Matrix)raylib::Matrixinline
operator float16() (defined in raylib::Matrix)raylib::Matrixinline
operator*(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator+(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator-(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator=(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator=(const Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator==(const ::Matrix &other) (defined in raylib::Matrix)raylib::Matrixinline
Ortho(double left, double right, double bottom, double top, double near, double far) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Perspective(double fovy, double aspect, double near, double far) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Rotate(Vector3 axis, float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateX(float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateXYZ(Vector3 angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateY(float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateZ(float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Scale(float x, float y, float z) (defined in raylib::Matrix)raylib::Matrixinlinestatic
SetM0(float value)raylib::Matrixinline
SetM1(float value)raylib::Matrixinline
SetM10(float value)raylib::Matrixinline
SetM11(float value)raylib::Matrixinline
SetM12(float value)raylib::Matrixinline
SetM13(float value)raylib::Matrixinline
SetM14(float value)raylib::Matrixinline
SetM15(float value)raylib::Matrixinline
SetM2(float value)raylib::Matrixinline
SetM3(float value)raylib::Matrixinline
SetM4(float value)raylib::Matrixinline
SetM5(float value)raylib::Matrixinline
SetM6(float value)raylib::Matrixinline
SetM7(float value)raylib::Matrixinline
SetM8(float value)raylib::Matrixinline
SetM9(float value)raylib::Matrixinline
SetModelview()raylib::Matrixinline
SetProjection()raylib::Matrixinline
SetShaderValue(::Shader shader, int uniformLoc)raylib::Matrixinline
Subtract(const ::Matrix &right) (defined in raylib::Matrix)raylib::Matrixinline
ToFloatV() const (defined in raylib::Matrix)raylib::Matrixinline
Trace() constraylib::Matrixinline
Translate(float x, float y, float z) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Transpose() constraylib::Matrixinline
diff --git a/docs/classraylib_1_1_matrix.html b/docs/classraylib_1_1_matrix.html index 0c7fc63..c957676 100644 --- a/docs/classraylib_1_1_matrix.html +++ b/docs/classraylib_1_1_matrix.html @@ -70,410 +70,231 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Matrix Class Reference
+ +

Matrix type (OpenGL style 4x4 - right handed, column major) + More...

- + - + - + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - + - + - - + + - - + +

Public Member Functions

 Matrix (const ::Matrix &mat)
+ Matrix (const ::Matrix &mat)
 
 Matrix (float M0=0, float M1=0, float M2=0, float M3=0, float M4=0, float M5=0, float M6=0, float M7=0, float M8=0, float M9=0, float M10=0, float M11=0, float M12=0, float M13=0, float M14=0, float M15=0)
+ Matrix (float M0=0, float M1=0, float M2=0, float M3=0, float M4=0, float M5=0, float M6=0, float M7=0, float M8=0, float M9=0, float M10=0, float M11=0, float M12=0, float M13=0, float M14=0, float M15=0)
 
Matrix Add (const ::Matrix &right)
+Matrix Add (const ::Matrix &right)
 
float GetM0 () const
 Retrieves the m0 value for the object. More...
 
float GetM1 () const
 Retrieves the m1 value for the object. More...
 
float GetM10 () const
 Retrieves the m10 value for the object. More...
 
float GetM11 () const
 Retrieves the m11 value for the object. More...
 
float GetM12 () const
 Retrieves the m12 value for the object. More...
 
float GetM13 () const
 Retrieves the m13 value for the object. More...
 
float GetM14 () const
 Retrieves the m14 value for the object. More...
 
float GetM15 () const
 Retrieves the m15 value for the object. More...
 
float GetM2 () const
 Retrieves the m2 value for the object. More...
 
float GetM3 () const
 Retrieves the m3 value for the object. More...
 
float GetM4 () const
 Retrieves the m4 value for the object. More...
 
float GetM5 () const
 Retrieves the m5 value for the object. More...
 
float GetM6 () const
 Retrieves the m6 value for the object. More...
 
float GetM7 () const
 Retrieves the m7 value for the object. More...
 
float GetM8 () const
 Retrieves the m8 value for the object. More...
 
float GetM9 () const
 Retrieves the m9 value for the object. More...
 
Matrix Invert () const
+Matrix Invert () const
 
Matrix Multiply (const ::Matrix &right) const
+Matrix Multiply (const ::Matrix &right) const
 
Matrix Normalize () const
+Matrix Normalize () const
 
 operator float16 ()
+ operator float16 ()
 
Matrix operator* (const ::Matrix &matrix)
+Matrix operator* (const ::Matrix &matrix)
 
Matrix operator+ (const ::Matrix &matrix)
+Matrix operator+ (const ::Matrix &matrix)
 
Matrix operator- (const ::Matrix &matrix)
+Matrix operator- (const ::Matrix &matrix)
 
Matrix & operator= (const ::Matrix &matrix)
+Matrix & operator= (const ::Matrix &matrix)
 
Matrix & operator= (const Matrix &matrix)
+Matrix & operator= (const Matrix &matrix)
 
bool operator== (const ::Matrix &other)
+bool operator== (const ::Matrix &other)
 
void SetM0 (float value)
 Sets the m0 value for the object. More...
 
void SetM1 (float value)
 Sets the m1 value for the object. More...
 
void SetM10 (float value)
 Sets the m10 value for the object. More...
 
void SetM11 (float value)
 Sets the m11 value for the object. More...
 
void SetM12 (float value)
 Sets the m12 value for the object. More...
 
void SetM13 (float value)
 Sets the m13 value for the object. More...
 
void SetM14 (float value)
 Sets the m14 value for the object. More...
 
void SetM15 (float value)
 Sets the m15 value for the object. More...
 
void SetM2 (float value)
 Sets the m2 value for the object. More...
 
void SetM3 (float value)
 Sets the m3 value for the object. More...
 
void SetM4 (float value)
 Sets the m4 value for the object. More...
 
void SetM5 (float value)
 Sets the m5 value for the object. More...
 
void SetM6 (float value)
 Sets the m6 value for the object. More...
 
void SetM7 (float value)
 Sets the m7 value for the object. More...
 
void SetM8 (float value)
 Sets the m8 value for the object. More...
 
void SetM9 (float value)
 Sets the m9 value for the object. More...
 
Matrix & SetModelview ()
 Set a custom modelview matrix (replaces internal modelview matrix) More...
+Matrix & SetModelview ()
 Set a custom modelview matrix (replaces internal modelview matrix)
 
Matrix & SetProjection ()
 Set a custom projection matrix (replaces internal projection matrix) More...
+Matrix & SetProjection ()
 Set a custom projection matrix (replaces internal projection matrix)
 
Matrix & SetShaderValue (::Shader shader, int uniformLoc)
 Set shader uniform value (matrix 4x4) More...
+Matrix & SetShaderValue (::Shader shader, int uniformLoc)
 Set shader uniform value (matrix 4x4)
 
Matrix Subtract (const ::Matrix &right)
+Matrix Subtract (const ::Matrix &right)
 
float16 ToFloatV () const
+float16 ToFloatV () const
 
float Trace () const
 Returns the trace of the matrix (sum of the values along the diagonal) More...
+float Trace () const
 Returns the trace of the matrix (sum of the values along the diagonal)
 
Matrix Transpose () const
 Transposes provided matrix. More...
+Matrix Transpose () const
 Transposes provided matrix.
 
- + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + -

Static Public Member Functions

static Matrix Frustum (double left, double right, double bottom, double top, double near, double far)
+static Matrix Frustum (double left, double right, double bottom, double top, double near, double far)
 
static Matrix GetModelview ()
 Get internal modelview matrix. More...
+static Matrix GetModelview ()
 Get internal modelview matrix.
 
static Matrix GetProjection ()
 Get internal projection matrix. More...
+static Matrix GetProjection ()
 Get internal projection matrix.
 
static Matrix Identity ()
+static Matrix Identity ()
 
static Matrix LookAt (Vector3 eye, Vector3 target, Vector3 up)
+static Matrix LookAt (Vector3 eye, Vector3 target, Vector3 up)
 
static Matrix Ortho (double left, double right, double bottom, double top, double near, double far)
+static Matrix Ortho (double left, double right, double bottom, double top, double near, double far)
 
static Matrix Perspective (double fovy, double aspect, double near, double far)
+static Matrix Perspective (double fovy, double aspect, double near, double far)
 
static Matrix Rotate (Vector3 axis, float angle)
+static Matrix Rotate (Vector3 axis, float angle)
 
static Matrix RotateX (float angle)
+static Matrix RotateX (float angle)
 
static Matrix RotateXYZ (Vector3 angle)
+static Matrix RotateXYZ (Vector3 angle)
 
static Matrix RotateY (float angle)
+static Matrix RotateY (float angle)
 
static Matrix RotateZ (float angle)
+static Matrix RotateZ (float angle)
 
static Matrix Scale (float x, float y, float z)
+static Matrix Scale (float x, float y, float z)
 
static Matrix Translate (float x, float y, float z)
+static Matrix Translate (float x, float y, float z)
 
- - -

-Protected Member Functions

void set (const ::Matrix &mat)
 

Detailed Description

-
-

Definition at line 46 of file Matrix.hpp.

-

Constructor & Destructor Documentation

- -

◆ Matrix() [1/2]

+

Matrix type (OpenGL style 4x4 - right handed, column major)

-
-
- - - - - -
- - - - - - - - -
raylib::Matrix::Matrix (const ::Matrix & mat)
-
-inline
-
- -

Definition at line 48 of file Matrix.hpp.

- -

References set().

- -
-
- -

◆ Matrix() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Matrix::Matrix (float M0 = 0,
float M1 = 0,
float M2 = 0,
float M3 = 0,
float M4 = 0,
float M5 = 0,
float M6 = 0,
float M7 = 0,
float M8 = 0,
float M9 = 0,
float M10 = 0,
float M11 = 0,
float M12 = 0,
float M13 = 0,
float M14 = 0,
float M15 = 0 
)
-
-inline
-
- -

Definition at line 52 of file Matrix.hpp.

- -
-
-

Member Function Documentation

- -

◆ Add()

- -
-
- - - - - -
- - - - - - - - -
Matrix raylib::Matrix::Add (const ::Matrix & right)
-
-inline
-
- -

Definition at line 176 of file Matrix.hpp.

- -
-
- -

◆ Frustum()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static Matrix raylib::Matrix::Frustum (double left,
double right,
double bottom,
double top,
double near,
double far 
)
-
-inlinestatic
-
- -

Definition at line 228 of file Matrix.hpp.

- -
-
+

Definition at line 16 of file Matrix.hpp.

+

Member Function Documentation

◆ GetM0()

@@ -497,7 +318,10 @@ Protected Member Functions
-

Definition at line 73 of file Matrix.hpp.

+

Retrieves the m0 value for the object.

+
Returns
The m0 value of the object.
+ +

Definition at line 43 of file Matrix.hpp.

@@ -524,7 +348,10 @@ Protected Member Functions
-

Definition at line 74 of file Matrix.hpp.

+

Retrieves the m1 value for the object.

+
Returns
The m1 value of the object.
+ +

Definition at line 44 of file Matrix.hpp.

@@ -551,7 +378,10 @@ Protected Member Functions
-

Definition at line 83 of file Matrix.hpp.

+

Retrieves the m10 value for the object.

+
Returns
The m10 value of the object.
+ +

Definition at line 53 of file Matrix.hpp.

@@ -578,7 +408,10 @@ Protected Member Functions
-

Definition at line 84 of file Matrix.hpp.

+

Retrieves the m11 value for the object.

+
Returns
The m11 value of the object.
+ +

Definition at line 54 of file Matrix.hpp.

@@ -605,7 +438,10 @@ Protected Member Functions
-

Definition at line 85 of file Matrix.hpp.

+

Retrieves the m12 value for the object.

+
Returns
The m12 value of the object.
+ +

Definition at line 55 of file Matrix.hpp.

@@ -632,7 +468,10 @@ Protected Member Functions
-

Definition at line 86 of file Matrix.hpp.

+

Retrieves the m13 value for the object.

+
Returns
The m13 value of the object.
+ +

Definition at line 56 of file Matrix.hpp.

@@ -659,7 +498,10 @@ Protected Member Functions
-

Definition at line 87 of file Matrix.hpp.

+

Retrieves the m14 value for the object.

+
Returns
The m14 value of the object.
+ +

Definition at line 57 of file Matrix.hpp.

@@ -686,7 +528,10 @@ Protected Member Functions
-

Definition at line 88 of file Matrix.hpp.

+

Retrieves the m15 value for the object.

+
Returns
The m15 value of the object.
+ +

Definition at line 58 of file Matrix.hpp.

@@ -713,7 +558,10 @@ Protected Member Functions
-

Definition at line 75 of file Matrix.hpp.

+

Retrieves the m2 value for the object.

+
Returns
The m2 value of the object.
+ +

Definition at line 45 of file Matrix.hpp.

@@ -740,7 +588,10 @@ Protected Member Functions
-

Definition at line 76 of file Matrix.hpp.

+

Retrieves the m3 value for the object.

+
Returns
The m3 value of the object.
+ +

Definition at line 46 of file Matrix.hpp.

@@ -767,7 +618,10 @@ Protected Member Functions
-

Definition at line 77 of file Matrix.hpp.

+

Retrieves the m4 value for the object.

+
Returns
The m4 value of the object.
+ +

Definition at line 47 of file Matrix.hpp.

@@ -794,7 +648,10 @@ Protected Member Functions
-

Definition at line 78 of file Matrix.hpp.

+

Retrieves the m5 value for the object.

+
Returns
The m5 value of the object.
+ +

Definition at line 48 of file Matrix.hpp.

@@ -821,7 +678,10 @@ Protected Member Functions
-

Definition at line 79 of file Matrix.hpp.

+

Retrieves the m6 value for the object.

+
Returns
The m6 value of the object.
+ +

Definition at line 49 of file Matrix.hpp.

@@ -848,7 +708,10 @@ Protected Member Functions
-

Definition at line 80 of file Matrix.hpp.

+

Retrieves the m7 value for the object.

+
Returns
The m7 value of the object.
+ +

Definition at line 50 of file Matrix.hpp.

@@ -875,7 +738,10 @@ Protected Member Functions
-

Definition at line 81 of file Matrix.hpp.

+

Retrieves the m8 value for the object.

+
Returns
The m8 value of the object.
+ +

Definition at line 51 of file Matrix.hpp.

@@ -902,755 +768,10 @@ Protected Member Functions
-

Definition at line 82 of file Matrix.hpp.

+

Retrieves the m9 value for the object.

+
Returns
The m9 value of the object.
-
- - -

◆ GetModelview()

- -
-
- - - - - -
- - - - - - - -
static Matrix raylib::Matrix::GetModelview ()
-
-inlinestatic
-
- -

Get internal modelview matrix.

- -

Definition at line 138 of file Matrix.hpp.

- -
-
- -

◆ GetProjection()

- -
-
- - - - - -
- - - - - - - -
static Matrix raylib::Matrix::GetProjection ()
-
-inlinestatic
-
- -

Get internal projection matrix.

- -

Definition at line 145 of file Matrix.hpp.

- -
-
- -

◆ Identity()

- -
-
- - - - - -
- - - - - - - -
static Matrix raylib::Matrix::Identity ()
-
-inlinestatic
-
- -

Definition at line 172 of file Matrix.hpp.

- -
-
- -

◆ Invert()

- -
-
- - - - - -
- - - - - - - -
Matrix raylib::Matrix::Invert () const
-
-inline
-
- -

Definition at line 164 of file Matrix.hpp.

- -
-
- -

◆ LookAt()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static Matrix raylib::Matrix::LookAt (Vector3 eye,
Vector3 target,
Vector3 up 
)
-
-inlinestatic
-
- -

Definition at line 242 of file Matrix.hpp.

- -
-
- -

◆ Multiply()

- -
-
- - - - - -
- - - - - - - - -
Matrix raylib::Matrix::Multiply (const ::Matrix & right) const
-
-inline
-
- -

Definition at line 220 of file Matrix.hpp.

- -
-
- -

◆ Normalize()

- -
-
- - - - - -
- - - - - - - -
Matrix raylib::Matrix::Normalize () const
-
-inline
-
- -

Definition at line 168 of file Matrix.hpp.

- -
-
- -

◆ operator float16()

- -
-
- - - - - -
- - - - - - - -
raylib::Matrix::operator float16 ()
-
-inline
-
- -

Definition at line 250 of file Matrix.hpp.

- -

References ToFloatV().

- -
-
- -

◆ operator*()

- -
-
- - - - - -
- - - - - - - - -
Matrix raylib::Matrix::operator* (const ::Matrix & matrix)
-
-inline
-
- -

Definition at line 224 of file Matrix.hpp.

- -
-
- -

◆ operator+()

- -
-
- - - - - -
- - - - - - - - -
Matrix raylib::Matrix::operator+ (const ::Matrix & matrix)
-
-inline
-
- -

Definition at line 180 of file Matrix.hpp.

- -
-
- -

◆ operator-()

- -
-
- - - - - -
- - - - - - - - -
Matrix raylib::Matrix::operator- (const ::Matrix & matrix)
-
-inline
-
- -

Definition at line 188 of file Matrix.hpp.

- -
-
- -

◆ operator=() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Matrix& raylib::Matrix::operator= (const ::Matrix & matrix)
-
-inline
-
- -

Definition at line 90 of file Matrix.hpp.

- -

References set().

- -
-
- -

◆ operator=() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Matrix& raylib::Matrix::operator= (const Matrix & matrix)
-
-inline
-
- -

Definition at line 95 of file Matrix.hpp.

- -

References set().

- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Matrix::operator== (const ::Matrix & other)
-
-inline
-
- -

Definition at line 100 of file Matrix.hpp.

- -
-
- -

◆ Ortho()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static Matrix raylib::Matrix::Ortho (double left,
double right,
double bottom,
double top,
double near,
double far 
)
-
-inlinestatic
-
- -

Definition at line 237 of file Matrix.hpp.

- -
-
- -

◆ Perspective()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static Matrix raylib::Matrix::Perspective (double fovy,
double aspect,
double near,
double far 
)
-
-inlinestatic
-
- -

Definition at line 233 of file Matrix.hpp.

- -
-
- -

◆ Rotate()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static Matrix raylib::Matrix::Rotate (Vector3 axis,
float angle 
)
-
-inlinestatic
-
- -

Definition at line 196 of file Matrix.hpp.

- -
-
- -

◆ RotateX()

- -
-
- - - - - -
- - - - - - - - -
static Matrix raylib::Matrix::RotateX (float angle)
-
-inlinestatic
-
- -

Definition at line 204 of file Matrix.hpp.

- -
-
- -

◆ RotateXYZ()

- -
-
- - - - - -
- - - - - - - - -
static Matrix raylib::Matrix::RotateXYZ (Vector3 angle)
-
-inlinestatic
-
- -

Definition at line 200 of file Matrix.hpp.

- -
-
- -

◆ RotateY()

- -
-
- - - - - -
- - - - - - - - -
static Matrix raylib::Matrix::RotateY (float angle)
-
-inlinestatic
-
- -

Definition at line 208 of file Matrix.hpp.

- -
-
- -

◆ RotateZ()

- -
-
- - - - - -
- - - - - - - - -
static Matrix raylib::Matrix::RotateZ (float angle)
-
-inlinestatic
-
- -

Definition at line 212 of file Matrix.hpp.

- -
-
- -

◆ Scale()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static Matrix raylib::Matrix::Scale (float x,
float y,
float z 
)
-
-inlinestatic
-
- -

Definition at line 216 of file Matrix.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Matrix::set (const ::Matrix & mat)
-
-inlineprotected
-
- -

Definition at line 265 of file Matrix.hpp.

- -

Referenced by Matrix(), and operator=().

+

Definition at line 52 of file Matrix.hpp.

@@ -1678,7 +799,15 @@ Protected Member Functions
-

Definition at line 73 of file Matrix.hpp.

+

Sets the m0 value for the object.

+
Parameters
+ + +
valueThe value of which to set m0 to.
+
+
+ +

Definition at line 43 of file Matrix.hpp.

@@ -1706,7 +835,15 @@ Protected Member Functions
-

Definition at line 74 of file Matrix.hpp.

+

Sets the m1 value for the object.

+
Parameters
+ + +
valueThe value of which to set m1 to.
+
+
+ +

Definition at line 44 of file Matrix.hpp.

@@ -1734,7 +871,15 @@ Protected Member Functions
-

Definition at line 83 of file Matrix.hpp.

+

Sets the m10 value for the object.

+
Parameters
+ + +
valueThe value of which to set m10 to.
+
+
+ +

Definition at line 53 of file Matrix.hpp.

@@ -1762,7 +907,15 @@ Protected Member Functions
-

Definition at line 84 of file Matrix.hpp.

+

Sets the m11 value for the object.

+
Parameters
+ + +
valueThe value of which to set m11 to.
+
+
+ +

Definition at line 54 of file Matrix.hpp.

@@ -1790,7 +943,15 @@ Protected Member Functions
-

Definition at line 85 of file Matrix.hpp.

+

Sets the m12 value for the object.

+
Parameters
+ + +
valueThe value of which to set m12 to.
+
+
+ +

Definition at line 55 of file Matrix.hpp.

@@ -1818,7 +979,15 @@ Protected Member Functions
-

Definition at line 86 of file Matrix.hpp.

+

Sets the m13 value for the object.

+
Parameters
+ + +
valueThe value of which to set m13 to.
+
+
+ +

Definition at line 56 of file Matrix.hpp.

@@ -1846,7 +1015,15 @@ Protected Member Functions
-

Definition at line 87 of file Matrix.hpp.

+

Sets the m14 value for the object.

+
Parameters
+ + +
valueThe value of which to set m14 to.
+
+
+ +

Definition at line 57 of file Matrix.hpp.

@@ -1874,7 +1051,15 @@ Protected Member Functions
-

Definition at line 88 of file Matrix.hpp.

+

Sets the m15 value for the object.

+
Parameters
+ + +
valueThe value of which to set m15 to.
+
+
+ +

Definition at line 58 of file Matrix.hpp.

@@ -1902,7 +1087,15 @@ Protected Member Functions
-

Definition at line 75 of file Matrix.hpp.

+

Sets the m2 value for the object.

+
Parameters
+ + +
valueThe value of which to set m2 to.
+
+
+ +

Definition at line 45 of file Matrix.hpp.

@@ -1930,7 +1123,15 @@ Protected Member Functions
-

Definition at line 76 of file Matrix.hpp.

+

Sets the m3 value for the object.

+
Parameters
+ + +
valueThe value of which to set m3 to.
+
+
+ +

Definition at line 46 of file Matrix.hpp.

@@ -1958,7 +1159,15 @@ Protected Member Functions
-

Definition at line 77 of file Matrix.hpp.

+

Sets the m4 value for the object.

+
Parameters
+ + +
valueThe value of which to set m4 to.
+
+
+ +

Definition at line 47 of file Matrix.hpp.

@@ -1986,7 +1195,15 @@ Protected Member Functions
-

Definition at line 78 of file Matrix.hpp.

+

Sets the m5 value for the object.

+
Parameters
+ + +
valueThe value of which to set m5 to.
+
+
+ +

Definition at line 48 of file Matrix.hpp.

@@ -2014,7 +1231,15 @@ Protected Member Functions
-

Definition at line 79 of file Matrix.hpp.

+

Sets the m6 value for the object.

+
Parameters
+ + +
valueThe value of which to set m6 to.
+
+
+ +

Definition at line 49 of file Matrix.hpp.

@@ -2042,7 +1267,15 @@ Protected Member Functions
-

Definition at line 80 of file Matrix.hpp.

+

Sets the m7 value for the object.

+
Parameters
+ + +
valueThe value of which to set m7 to.
+
+
+ +

Definition at line 50 of file Matrix.hpp.

@@ -2070,7 +1303,15 @@ Protected Member Functions
-

Definition at line 81 of file Matrix.hpp.

+

Sets the m8 value for the object.

+
Parameters
+ + +
valueThe value of which to set m8 to.
+
+
+ +

Definition at line 51 of file Matrix.hpp.

@@ -2098,271 +1339,22 @@ Protected Member Functions
-

Definition at line 82 of file Matrix.hpp.

+

Sets the m9 value for the object.

+
Parameters
+ + +
valueThe value of which to set m9 to.
+
+
-
- - -

◆ SetModelview()

- -
-
- - - - - -
- - - - - - - -
Matrix& raylib::Matrix::SetModelview ()
-
-inline
-
- -

Set a custom modelview matrix (replaces internal modelview matrix)

- -

Definition at line 130 of file Matrix.hpp.

- -
-
- -

◆ SetProjection()

- -
-
- - - - - -
- - - - - - - -
Matrix& raylib::Matrix::SetProjection ()
-
-inline
-
- -

Set a custom projection matrix (replaces internal projection matrix)

- -

Definition at line 122 of file Matrix.hpp.

- -
-
- -

◆ SetShaderValue()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Matrix& raylib::Matrix::SetShaderValue (::Shader shader,
int uniformLoc 
)
-
-inline
-
- -

Set shader uniform value (matrix 4x4)

- -

Definition at line 257 of file Matrix.hpp.

- -
-
- -

◆ Subtract()

- -
-
- - - - - -
- - - - - - - - -
Matrix raylib::Matrix::Subtract (const ::Matrix & right)
-
-inline
-
- -

Definition at line 184 of file Matrix.hpp.

- -
-
- -

◆ ToFloatV()

- -
-
- - - - - -
- - - - - - - -
float16 raylib::Matrix::ToFloatV () const
-
-inline
-
- -

Definition at line 246 of file Matrix.hpp.

- -

Referenced by operator float16().

- -
-
- -

◆ Trace()

- -
-
- - - - - -
- - - - - - - -
float raylib::Matrix::Trace () const
-
-inline
-
- -

Returns the trace of the matrix (sum of the values along the diagonal)

- -

Definition at line 153 of file Matrix.hpp.

- -
-
- -

◆ Translate()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static Matrix raylib::Matrix::Translate (float x,
float y,
float z 
)
-
-inlinestatic
-
- -

Definition at line 192 of file Matrix.hpp.

- -
-
- -

◆ Transpose()

- -
-
- - - - - -
- - - - - - - -
Matrix raylib::Matrix::Transpose () const
-
-inline
-
- -

Transposes provided matrix.

- -

Definition at line 160 of file Matrix.hpp.

+

Definition at line 52 of file Matrix.hpp.

diff --git a/docs/classraylib_1_1_mesh-members.html b/docs/classraylib_1_1_mesh-members.html index 41945aa..2207e94 100644 --- a/docs/classraylib_1_1_mesh-members.html +++ b/docs/classraylib_1_1_mesh-members.html @@ -100,39 +100,38 @@ $(function() { Knot(float radius, float size, int radSeg, int sides)raylib::Meshinlinestatic Load(const std::string &fileName)raylib::Meshinlinestatic LoadModelFrom() constraylib::Meshinline - Mesh(const ::Mesh &mesh)raylib::Meshinline - Mesh(int VertexCount=0, int TriangleCount=0)raylib::Meshinline + Mesh(const ::Mesh &mesh) (defined in raylib::Mesh)raylib::Meshinline + Mesh(int VertexCount=0, int TriangleCount=0) (defined in raylib::Mesh)raylib::Meshinline NormalsSmooth()raylib::Meshinline operator raylib::BoundingBox()raylib::Meshinline operator raylib::Model()raylib::Meshinline - operator=(const ::Mesh &mesh)raylib::Meshinline + operator=(const ::Mesh &mesh) (defined in raylib::Mesh)raylib::Meshinline Plane(float width, float length, int resX, int resZ)raylib::Meshinlinestatic Poly(int sides, float radius)raylib::Meshinlinestatic - set(const ::Mesh &mesh)raylib::Meshinlineprotected - SetAnimNormals(float *value)raylib::Meshinline - SetAnimVertices(float *value)raylib::Meshinline - SetBoneIds(int *value)raylib::Meshinline - SetBoneWeights(float *value)raylib::Meshinline - SetColors(unsigned char *value)raylib::Meshinline - SetIndices(unsigned short *value)raylib::Meshinline - SetNormals(float *value)raylib::Meshinline - SetTangents(float *value)raylib::Meshinline - SetTexCoords(float *value)raylib::Meshinline - SetTexCoords2(float *value)raylib::Meshinline - SetTriangleCount(int value)raylib::Meshinline - SetVaoId(unsigned int value)raylib::Meshinline - SetVboId(unsigned int *value)raylib::Meshinline - SetVertexCount(int value)raylib::Meshinline - SetVertices(float *value)raylib::Meshinline - Sphere(float radius, int rings, int slices)raylib::Meshinlinestatic - Tangents()raylib::Meshinline - Torus(float radius, float size, int radSeg, int sides)raylib::Meshinlinestatic - Unload()raylib::Meshinline - ~Mesh()raylib::Meshinline + SetAnimNormals(float *value)raylib::Meshinline + SetAnimVertices(float *value)raylib::Meshinline + SetBoneIds(int *value)raylib::Meshinline + SetBoneWeights(float *value)raylib::Meshinline + SetColors(unsigned char *value)raylib::Meshinline + SetIndices(unsigned short *value)raylib::Meshinline + SetNormals(float *value)raylib::Meshinline + SetTangents(float *value)raylib::Meshinline + SetTexCoords(float *value)raylib::Meshinline + SetTexCoords2(float *value)raylib::Meshinline + SetTriangleCount(int value)raylib::Meshinline + SetVaoId(unsigned int value)raylib::Meshinline + SetVboId(unsigned int *value)raylib::Meshinline + SetVertexCount(int value)raylib::Meshinline + SetVertices(float *value)raylib::Meshinline + Sphere(float radius, int rings, int slices)raylib::Meshinlinestatic + Tangents()raylib::Meshinline + Torus(float radius, float size, int radSeg, int sides)raylib::Meshinlinestatic + Unload()raylib::Meshinline + ~Mesh() (defined in raylib::Mesh)raylib::Meshinline diff --git a/docs/classraylib_1_1_mesh.html b/docs/classraylib_1_1_mesh.html index 907e848..8e59d47 100644 --- a/docs/classraylib_1_1_mesh.html +++ b/docs/classraylib_1_1_mesh.html @@ -70,475 +70,205 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Mesh Class Reference
+ +

Vertex data definning a mesh. + More...

- + - + - - - - + + - - + + - - + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - + + + + + + + + + + + + + + + + - - + + - + +

Public Member Functions

 Mesh (const ::Mesh &mesh)
+ Mesh (const ::Mesh &mesh)
 
 Mesh (int VertexCount=0, int TriangleCount=0)
+ Mesh (int VertexCount=0, int TriangleCount=0)
 
 ~Mesh ()
 
Mesh & Binormals ()
 Compute mesh binormals (aka bitangent) More...
+Mesh & Binormals ()
 Compute mesh binormals (aka bitangent)
 
raylib::BoundingBox BoundingBox () const
 Compute mesh bounding box limits. More...
+raylib::BoundingBox BoundingBox () const
 Compute mesh bounding box limits.
 
bool Export (const std::string &fileName)
 Export mesh data to file. More...
+bool Export (const std::string &fileName)
 Export mesh data to file.
 
float * GetAnimNormals () const
 Retrieves the animNormals value for the object. More...
 
float * GetAnimVertices () const
 Retrieves the animVertices value for the object. More...
 
int * GetBoneIds () const
 Retrieves the boneIds value for the object. More...
 
float * GetBoneWeights () const
 Retrieves the boneWeights value for the object. More...
 
unsigned char * GetColors () const
 Retrieves the colors value for the object. More...
 
unsigned short * GetIndices () const
 Retrieves the indices value for the object. More...
 
float * GetNormals () const
 Retrieves the normals value for the object. More...
 
float * GetTangents () const
 Retrieves the tangents value for the object. More...
 
float * GetTexCoords () const
 Retrieves the texcoords value for the object. More...
 
float * GetTexCoords2 () const
 Retrieves the texcoords2 value for the object. More...
 
int GetTriangleCount () const
 Retrieves the triangleCount value for the object. More...
 
unsigned int GetVaoId () const
 Retrieves the vaoId value for the object. More...
 
unsigned int * GetVboId () const
 Retrieves the vboId value for the object. More...
 
int GetVertexCount () const
 Retrieves the vertexCount value for the object. More...
 
float * GetVertices () const
 Retrieves the vertices value for the object. More...
 
raylib::Model LoadModelFrom () const
 Load model from generated mesh. More...
+raylib::Model LoadModelFrom () const
 Load model from generated mesh.
 
Mesh & NormalsSmooth ()
 Smooth (average) vertex normals. More...
+Mesh & NormalsSmooth ()
 Smooth (average) vertex normals.
 
 operator raylib::BoundingBox ()
 Compute mesh bounding box limits. More...
+ operator raylib::BoundingBox ()
 Compute mesh bounding box limits.
 
 operator raylib::Model ()
 Load model from generated mesh. More...
+ operator raylib::Model ()
 Load model from generated mesh.
 
Mesh & operator= (const ::Mesh &mesh)
+Mesh & operator= (const ::Mesh &mesh)
 
void SetAnimNormals (float *value)
 Sets the animNormals value for the object. More...
 
void SetAnimVertices (float *value)
 Sets the animVertices value for the object. More...
 
void SetBoneIds (int *value)
 Sets the boneIds value for the object. More...
 
void SetBoneWeights (float *value)
 Sets the boneWeights value for the object. More...
 
void SetColors (unsigned char *value)
 Sets the colors value for the object. More...
 
void SetIndices (unsigned short *value)
 Sets the indices value for the object. More...
 
void SetNormals (float *value)
 Sets the normals value for the object. More...
 
void SetTangents (float *value)
 Sets the tangents value for the object. More...
 
void SetTexCoords (float *value)
 Sets the texcoords value for the object. More...
 
void SetTexCoords2 (float *value)
 Sets the texcoords2 value for the object. More...
 
void SetTriangleCount (int value)
 Sets the triangleCount value for the object. More...
 
void SetVaoId (unsigned int value)
 Sets the vaoId value for the object. More...
 
void SetVboId (unsigned int *value)
 Sets the vboId value for the object. More...
 
void SetVertexCount (int value)
 Sets the vertexCount value for the object. More...
 
void SetVertices (float *value)
 Sets the vertices value for the object. More...
 
Mesh & Tangents ()
 Compute mesh tangents. More...
+Mesh & Tangents ()
 Compute mesh tangents.
 
void Unload ()
+void Unload ()
 Unload mesh from memory (RAM and/or VRAM)
 
- - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + -

Static Public Member Functions

::Mesh Cube (float width, float height, float length)
 Generate cuboid mesh. More...
+::Mesh Cube (float width, float height, float length)
 Generate cuboid mesh.
 
::Mesh Cubicmap (const ::Image &cubicmap, ::Vector3 cubeSize)
 Generate cubes-based map mesh from image data. More...
+::Mesh Cubicmap (const ::Image &cubicmap, ::Vector3 cubeSize)
 Generate cubes-based map mesh from image data.
 
::Mesh Cylinder (float radius, float height, int slices)
 Generate cylinder mesh. More...
+::Mesh Cylinder (float radius, float height, int slices)
 Generate cylinder mesh.
 
::Mesh Heightmap (const ::Image &heightmap, ::Vector3 size)
 Generate heightmap mesh from image data. More...
+::Mesh Heightmap (const ::Image &heightmap, ::Vector3 size)
 Generate heightmap mesh from image data.
 
::Mesh HemiSphere (float radius, int rings, int slices)
 Generate half-sphere mesh (no bottom cap) More...
+::Mesh HemiSphere (float radius, int rings, int slices)
 Generate half-sphere mesh (no bottom cap)
 
::Mesh Knot (float radius, float size, int radSeg, int sides)
 Generate trefoil knot mesh. More...
+::Mesh Knot (float radius, float size, int radSeg, int sides)
 Generate trefoil knot mesh.
 
static std::vector< Mesh > Load (const std::string &fileName)
 Load meshes from model file. More...
+static std::vector< Mesh > Load (const std::string &fileName)
 Load meshes from model file.
 
::Mesh Plane (float width, float length, int resX, int resZ)
 Generate plane mesh (with subdivisions) More...
+::Mesh Plane (float width, float length, int resX, int resZ)
 Generate plane mesh (with subdivisions)
 
::Mesh Poly (int sides, float radius)
 Generate polygonal mesh. More...
+::Mesh Poly (int sides, float radius)
 Generate polygonal mesh.
 
::Mesh Sphere (float radius, int rings, int slices)
 Generate sphere mesh (standard sphere) More...
+::Mesh Sphere (float radius, int rings, int slices)
 Generate sphere mesh (standard sphere)
 
::Mesh Torus (float radius, float size, int radSeg, int sides)
 Generate torus mesh. More...
+::Mesh Torus (float radius, float size, int radSeg, int sides)
 Generate torus mesh.
 
- - -

-Protected Member Functions

void set (const ::Mesh &mesh)
 

Detailed Description

-
-

Definition at line 37 of file Mesh.hpp.

-

Constructor & Destructor Documentation

- -

◆ Mesh() [1/2]

+

Vertex data definning a mesh.

-
-
- - - - - -
- - - - - - - - -
raylib::Mesh::Mesh (const ::Mesh & mesh)
-
-inline
-
- -

Definition at line 39 of file Mesh.hpp.

- -

References set().

- -
-
- -

◆ Mesh() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Mesh::Mesh (int VertexCount = 0,
int TriangleCount = 0 
)
-
-inline
-
- -

Definition at line 43 of file Mesh.hpp.

- -
-
- -

◆ ~Mesh()

- -
-
- - - - - -
- - - - - - - -
raylib::Mesh::~Mesh ()
-
-inline
-
- -

Definition at line 148 of file Mesh.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ Binormals()

- -
-
- - - - - -
- - - - - - - -
Mesh& raylib::Mesh::Binormals ()
-
-inline
-
- -

Compute mesh binormals (aka bitangent)

- -

Definition at line 192 of file Mesh.hpp.

- -
-
- -

◆ BoundingBox()

- -
-
- - - - - -
- - - - - - - -
raylib::BoundingBox raylib::Mesh::BoundingBox () const
-
-inline
-
- -

Compute mesh bounding box limits.

- -

Definition at line 170 of file Mesh.hpp.

- -

Referenced by operator raylib::BoundingBox().

- -
-
- -

◆ Cube()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Cube (float width,
float height,
float length 
)
-
-inlinestatic
-
- -

Generate cuboid mesh.

- -

Definition at line 74 of file Mesh.hpp.

- -
-
- -

◆ Cubicmap()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Cubicmap (const ::Image & cubicmap,
::Vector3 cubeSize 
)
-
-inlinestatic
-
- -

Generate cubes-based map mesh from image data.

- -

Definition at line 123 of file Mesh.hpp.

- -
-
- -

◆ Cylinder()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Cylinder (float radius,
float height,
int slices 
)
-
-inlinestatic
-
- -

Generate cylinder mesh.

- -

Definition at line 95 of file Mesh.hpp.

- -
-
- -

◆ Export()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Mesh::Export (const std::string & fileName)
-
-inline
-
- -

Export mesh data to file.

- -

Definition at line 155 of file Mesh.hpp.

- -
-
+

Definition at line 16 of file Mesh.hpp.

+

Member Function Documentation

◆ GetAnimNormals()

@@ -562,7 +292,10 @@ Protected Member Functions
-

Definition at line 137 of file Mesh.hpp.

+

Retrieves the animNormals value for the object.

+
Returns
The animNormals value of the object.
+ +

Definition at line 116 of file Mesh.hpp.

@@ -589,7 +322,10 @@ Protected Member Functions
-

Definition at line 136 of file Mesh.hpp.

+

Retrieves the animVertices value for the object.

+
Returns
The animVertices value of the object.
+ +

Definition at line 115 of file Mesh.hpp.

@@ -616,7 +352,10 @@ Protected Member Functions
-

Definition at line 138 of file Mesh.hpp.

+

Retrieves the boneIds value for the object.

+
Returns
The boneIds value of the object.
+ +

Definition at line 117 of file Mesh.hpp.

@@ -643,7 +382,10 @@ Protected Member Functions
-

Definition at line 139 of file Mesh.hpp.

+

Retrieves the boneWeights value for the object.

+
Returns
The boneWeights value of the object.
+ +

Definition at line 118 of file Mesh.hpp.

@@ -670,7 +412,10 @@ Protected Member Functions
-

Definition at line 134 of file Mesh.hpp.

+

Retrieves the colors value for the object.

+
Returns
The colors value of the object.
+ +

Definition at line 113 of file Mesh.hpp.

@@ -697,7 +442,10 @@ Protected Member Functions
-

Definition at line 135 of file Mesh.hpp.

+

Retrieves the indices value for the object.

+
Returns
The indices value of the object.
+ +

Definition at line 114 of file Mesh.hpp.

@@ -724,7 +472,10 @@ Protected Member Functions
-

Definition at line 132 of file Mesh.hpp.

+

Retrieves the normals value for the object.

+
Returns
The normals value of the object.
+ +

Definition at line 111 of file Mesh.hpp.

@@ -751,7 +502,10 @@ Protected Member Functions
-

Definition at line 133 of file Mesh.hpp.

+

Retrieves the tangents value for the object.

+
Returns
The tangents value of the object.
+ +

Definition at line 112 of file Mesh.hpp.

@@ -778,7 +532,10 @@ Protected Member Functions
-

Definition at line 130 of file Mesh.hpp.

+

Retrieves the texcoords value for the object.

+
Returns
The texcoords value of the object.
+ +

Definition at line 109 of file Mesh.hpp.

@@ -805,7 +562,10 @@ Protected Member Functions
-

Definition at line 131 of file Mesh.hpp.

+

Retrieves the texcoords2 value for the object.

+
Returns
The texcoords2 value of the object.
+ +

Definition at line 110 of file Mesh.hpp.

@@ -832,7 +592,10 @@ Protected Member Functions
-

Definition at line 128 of file Mesh.hpp.

+

Retrieves the triangleCount value for the object.

+
Returns
The triangleCount value of the object.
+ +

Definition at line 107 of file Mesh.hpp.

@@ -859,7 +622,10 @@ Protected Member Functions
-

Definition at line 140 of file Mesh.hpp.

+

Retrieves the vaoId value for the object.

+
Returns
The vaoId value of the object.
+ +

Definition at line 119 of file Mesh.hpp.

@@ -886,7 +652,10 @@ Protected Member Functions
-

Definition at line 141 of file Mesh.hpp.

+

Retrieves the vboId value for the object.

+
Returns
The vboId value of the object.
+ +

Definition at line 120 of file Mesh.hpp.

@@ -913,7 +682,10 @@ Protected Member Functions
-

Definition at line 127 of file Mesh.hpp.

+

Retrieves the vertexCount value for the object.

+
Returns
The vertexCount value of the object.
+ +

Definition at line 106 of file Mesh.hpp.

@@ -940,445 +712,10 @@ Protected Member Functions
-

Definition at line 129 of file Mesh.hpp.

+

Retrieves the vertices value for the object.

+
Returns
The vertices value of the object.
-
- - -

◆ Heightmap()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Heightmap (const ::Image & heightmap,
::Vector3 size 
)
-
-inlinestatic
-
- -

Generate heightmap mesh from image data.

- -

Definition at line 116 of file Mesh.hpp.

- -
-
- -

◆ HemiSphere()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::HemiSphere (float radius,
int rings,
int slices 
)
-
-inlinestatic
-
- -

Generate half-sphere mesh (no bottom cap)

- -

Definition at line 88 of file Mesh.hpp.

- -
-
- -

◆ Knot()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Knot (float radius,
float size,
int radSeg,
int sides 
)
-
-inlinestatic
-
- -

Generate trefoil knot mesh.

- -

Definition at line 109 of file Mesh.hpp.

- -
-
- -

◆ Load()

- -
-
- - - - - -
- - - - - - - - -
static std::vector<Mesh> raylib::Mesh::Load (const std::string & fileName)
-
-inlinestatic
-
- -

Load meshes from model file.

- -

Definition at line 51 of file Mesh.hpp.

- -
-
- -

◆ LoadModelFrom()

- -
-
- - - - - -
- - - - - - - -
raylib::Model raylib::Mesh::LoadModelFrom () const
-
-inline
-
- -

Load model from generated mesh.

- -

Definition at line 208 of file Mesh.hpp.

- -
-
- -

◆ NormalsSmooth()

- -
-
- - - - - -
- - - - - - - -
Mesh& raylib::Mesh::NormalsSmooth ()
-
-inline
-
- -

Smooth (average) vertex normals.

- -

Definition at line 200 of file Mesh.hpp.

- -
-
- -

◆ operator raylib::BoundingBox()

- -
-
- - - - - -
- - - - - - - -
raylib::Mesh::operator raylib::BoundingBox ()
-
-inline
-
- -

Compute mesh bounding box limits.

- -

Definition at line 177 of file Mesh.hpp.

- -

References BoundingBox().

- -
-
- -

◆ operator raylib::Model()

- -
-
- - - - - -
- - - - - - - -
raylib::Mesh::operator raylib::Model ()
-
-inline
-
- -

Load model from generated mesh.

- -

Definition at line 215 of file Mesh.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Mesh& raylib::Mesh::operator= (const ::Mesh & mesh)
-
-inline
-
- -

Definition at line 143 of file Mesh.hpp.

- -

References set().

- -
-
- -

◆ Plane()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Plane (float width,
float length,
int resX,
int resZ 
)
-
-inlinestatic
-
- -

Generate plane mesh (with subdivisions)

- -

Definition at line 67 of file Mesh.hpp.

- -
-
- -

◆ Poly()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Poly (int sides,
float radius 
)
-
-inlinestatic
-
- -

Generate polygonal mesh.

- -

Definition at line 60 of file Mesh.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Mesh::set (const ::Mesh & mesh)
-
-inlineprotected
-
- -

Definition at line 220 of file Mesh.hpp.

- -

Referenced by Mesh(), and operator=().

+

Definition at line 108 of file Mesh.hpp.

@@ -1406,7 +743,15 @@ Protected Member Functions
-

Definition at line 137 of file Mesh.hpp.

+

Sets the animNormals value for the object.

+
Parameters
+ + +
valueThe value of which to set animNormals to.
+
+
+ +

Definition at line 116 of file Mesh.hpp.

@@ -1434,7 +779,15 @@ Protected Member Functions
-

Definition at line 136 of file Mesh.hpp.

+

Sets the animVertices value for the object.

+
Parameters
+ + +
valueThe value of which to set animVertices to.
+
+
+ +

Definition at line 115 of file Mesh.hpp.

@@ -1462,7 +815,15 @@ Protected Member Functions
-

Definition at line 138 of file Mesh.hpp.

+

Sets the boneIds value for the object.

+
Parameters
+ + +
valueThe value of which to set boneIds to.
+
+
+ +

Definition at line 117 of file Mesh.hpp.

@@ -1490,7 +851,15 @@ Protected Member Functions
-

Definition at line 139 of file Mesh.hpp.

+

Sets the boneWeights value for the object.

+
Parameters
+ + +
valueThe value of which to set boneWeights to.
+
+
+ +

Definition at line 118 of file Mesh.hpp.

@@ -1518,7 +887,15 @@ Protected Member Functions
-

Definition at line 134 of file Mesh.hpp.

+

Sets the colors value for the object.

+
Parameters
+ + +
valueThe value of which to set colors to.
+
+
+ +

Definition at line 113 of file Mesh.hpp.

@@ -1546,7 +923,15 @@ Protected Member Functions
-

Definition at line 135 of file Mesh.hpp.

+

Sets the indices value for the object.

+
Parameters
+ + +
valueThe value of which to set indices to.
+
+
+ +

Definition at line 114 of file Mesh.hpp.

@@ -1574,7 +959,15 @@ Protected Member Functions
-

Definition at line 132 of file Mesh.hpp.

+

Sets the normals value for the object.

+
Parameters
+ + +
valueThe value of which to set normals to.
+
+
+ +

Definition at line 111 of file Mesh.hpp.

@@ -1602,7 +995,15 @@ Protected Member Functions
-

Definition at line 133 of file Mesh.hpp.

+

Sets the tangents value for the object.

+
Parameters
+ + +
valueThe value of which to set tangents to.
+
+
+ +

Definition at line 112 of file Mesh.hpp.

@@ -1630,7 +1031,15 @@ Protected Member Functions
-

Definition at line 130 of file Mesh.hpp.

+

Sets the texcoords value for the object.

+
Parameters
+ + +
valueThe value of which to set texcoords to.
+
+
+ +

Definition at line 109 of file Mesh.hpp.

@@ -1658,7 +1067,15 @@ Protected Member Functions
-

Definition at line 131 of file Mesh.hpp.

+

Sets the texcoords2 value for the object.

+
Parameters
+ + +
valueThe value of which to set texcoords2 to.
+
+
+ +

Definition at line 110 of file Mesh.hpp.

@@ -1686,7 +1103,15 @@ Protected Member Functions
-

Definition at line 128 of file Mesh.hpp.

+

Sets the triangleCount value for the object.

+
Parameters
+ + +
valueThe value of which to set triangleCount to.
+
+
+ +

Definition at line 107 of file Mesh.hpp.

@@ -1714,7 +1139,15 @@ Protected Member Functions
-

Definition at line 140 of file Mesh.hpp.

+

Sets the vaoId value for the object.

+
Parameters
+ + +
valueThe value of which to set vaoId to.
+
+
+ +

Definition at line 119 of file Mesh.hpp.

@@ -1742,7 +1175,15 @@ Protected Member Functions
-

Definition at line 141 of file Mesh.hpp.

+

Sets the vboId value for the object.

+
Parameters
+ + +
valueThe value of which to set vboId to.
+
+
+ +

Definition at line 120 of file Mesh.hpp.

@@ -1770,7 +1211,15 @@ Protected Member Functions
-

Definition at line 127 of file Mesh.hpp.

+

Sets the vertexCount value for the object.

+
Parameters
+ + +
valueThe value of which to set vertexCount to.
+
+
+ +

Definition at line 106 of file Mesh.hpp.

@@ -1798,170 +1247,22 @@ Protected Member Functions
-

Definition at line 129 of file Mesh.hpp.

+

Sets the vertices value for the object.

+
Parameters
+ + +
valueThe value of which to set vertices to.
+
+
-
- - -

◆ Sphere()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Sphere (float radius,
int rings,
int slices 
)
-
-inlinestatic
-
- -

Generate sphere mesh (standard sphere)

- -

Definition at line 81 of file Mesh.hpp.

- -
-
- -

◆ Tangents()

- -
-
- - - - - -
- - - - - - - -
Mesh& raylib::Mesh::Tangents ()
-
-inline
-
- -

Compute mesh tangents.

- -

Definition at line 184 of file Mesh.hpp.

- -
-
- -

◆ Torus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::Mesh raylib::Mesh::Torus (float radius,
float size,
int radSeg,
int sides 
)
-
-inlinestatic
-
- -

Generate torus mesh.

- -

Definition at line 102 of file Mesh.hpp.

- -
-
- -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Mesh::Unload ()
-
-inline
-
- -

Definition at line 160 of file Mesh.hpp.

- -

Referenced by ~Mesh().

+

Definition at line 108 of file Mesh.hpp.

diff --git a/docs/classraylib_1_1_model-members.html b/docs/classraylib_1_1_model-members.html index 000059d..49e2b10 100644 --- a/docs/classraylib_1_1_model-members.html +++ b/docs/classraylib_1_1_model-members.html @@ -78,40 +78,39 @@ $(function() { Draw(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})raylib::Modelinline DrawWires(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})raylib::Modelinline DrawWires(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})raylib::Modelinline - GetBindPoe() constraylib::Modelinline + GetBindPoe() constraylib::Modelinline GetBoneCount() constraylib::Modelinline - GetBones() constraylib::Modelinline + GetBones() constraylib::Modelinline GetCollision(const ::Ray &ray) constraylib::Modelinline GetMaterialCount() constraylib::Modelinline - GetMaterials() constraylib::Modelinline + GetMaterials() constraylib::Modelinline GetMeshCount() constraylib::Modelinline - GetMeshes() constraylib::Modelinline + GetMeshes() constraylib::Modelinline GetMeshMaterial() constraylib::Modelinline - GetTransform() constraylib::Modelinline + GetTransform() constraylib::Modelinline IsModelAnimationValid(const ::ModelAnimation &anim) constraylib::Modelinline - Model(const ::Model &model)raylib::Modelinline - Model(const std::string &fileName)raylib::Modelinline - Model(const ::Mesh &mesh)raylib::Modelinline - operator=(const ::Model &model)raylib::Modelinline - set(const ::Model &model)raylib::Modelinlineprotected - SetBindPoe(::Transform *value)raylib::Modelinline - SetBoneCount(int value)raylib::Modelinline - SetBones(::BoneInfo *value)raylib::Modelinline - SetMaterialCount(int value)raylib::Modelinline - SetMaterials(::Material *value)raylib::Modelinline - SetMeshCount(int value)raylib::Modelinline - SetMeshes(::Mesh *value)raylib::Modelinline - SetMeshMaterial(int *value)raylib::Modelinline - SetMeshMaterial(int meshId, int materialId)raylib::Modelinline - SetTransform(::Matrix value)raylib::Modelinline - Unload()raylib::Modelinline - UnloadKeepMeshes()raylib::Modelinline - UpdateModelAnimation(const ::ModelAnimation &anim, int frame)raylib::Modelinline - ~Model()raylib::Modelinline + Model(const ::Model &model) (defined in raylib::Model)raylib::Modelinline + Model(const std::string &fileName) (defined in raylib::Model)raylib::Modelinline + Model(const ::Mesh &mesh) (defined in raylib::Model)raylib::Modelinline + operator=(const ::Model &model) (defined in raylib::Model)raylib::Modelinline + SetBindPoe(::Transform *value)raylib::Modelinline + SetBoneCount(int value)raylib::Modelinline + SetBones(::BoneInfo *value)raylib::Modelinline + SetMaterialCount(int value)raylib::Modelinline + SetMaterials(::Material *value)raylib::Modelinline + SetMeshCount(int value)raylib::Modelinline + SetMeshes(::Mesh *value)raylib::Modelinline + SetMeshMaterial(int *value)raylib::Modelinline + SetMeshMaterial(int meshId, int materialId)raylib::Modelinline + SetTransform(::Matrix value)raylib::Modelinline + Unload()raylib::Modelinline + UnloadKeepMeshes()raylib::Modelinline + UpdateModelAnimation(const ::ModelAnimation &anim, int frame)raylib::Modelinline + ~Model() (defined in raylib::Model)raylib::Modelinline diff --git a/docs/classraylib_1_1_model.html b/docs/classraylib_1_1_model.html index c04c3c4..3f5cf59 100644 --- a/docs/classraylib_1_1_model.html +++ b/docs/classraylib_1_1_model.html @@ -69,103 +69,131 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Model Class Reference
+ +

Model type. + More...

- + - + - + - - - - + + - - + + - - + + - - + + - - + + + + - - - - + + + + + + - - + + + + - - + + + + - - - - + + + + + - + + + + + + + + + - - + + + - - + + - - + + - - + + -

Public Member Functions

 Model (const ::Mesh &mesh)
+ Model (const ::Mesh &mesh)
 
 Model (const ::Model &model)
+ Model (const ::Model &model)
 
 Model (const std::string &fileName)
+ Model (const std::string &fileName)
 
 ~Model ()
 
Model & Draw (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
 Draw a model with extended parameters. More...
+Model & Draw (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
 Draw a model with extended parameters.
 
Model & Draw (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 Draw a model (with texture if set) More...
+Model & Draw (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 Draw a model (with texture if set)
 
Model & DrawWires (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
 Draw a model wires (with texture if set) with extended parameters. More...
+Model & DrawWires (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
 Draw a model wires (with texture if set) with extended parameters.
 
Model & DrawWires (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 Draw a model wires (with texture if set) More...
+Model & DrawWires (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 Draw a model wires (with texture if set)
 
inline ::Transform * GetBindPoe () const
 
::Transform * GetBindPoe () const
 Retrieves the bindPose value for the object. More...
 
int GetBoneCount () const
 Retrieves the boneCount value for the object. More...
 
inline ::BoneInfo * GetBones () const
 
RayHitInfo GetCollision (const ::Ray &ray) const
 Get collision info between ray and model. More...
::BoneInfo * GetBones () const
 Retrieves the bones value for the object. More...
 
+RayHitInfo GetCollision (const ::Ray &ray) const
 Get collision info between ray and model.
 
int GetMaterialCount () const
 Retrieves the materialCount value for the object. More...
 
inline ::Material * GetMaterials () const
 
::Material * GetMaterials () const
 Retrieves the materials value for the object. More...
 
int GetMeshCount () const
 Retrieves the meshCount value for the object. More...
 
inline ::Mesh * GetMeshes () const
 
::Mesh * GetMeshes () const
 Retrieves the meshes value for the object. More...
 
int * GetMeshMaterial () const
 Retrieves the meshMaterial value for the object. More...
 
inline ::Matrix GetTransform () const
 
bool IsModelAnimationValid (const ::ModelAnimation &anim) const
 Check model animation skeleton match. More...
::Matrix GetTransform () const
 Retrieves the transform value for the object. More...
 
+bool IsModelAnimationValid (const ::ModelAnimation &anim) const
 Check model animation skeleton match.
 
Model & operator= (const ::Model &model)
+Model & operator= (const ::Model &model)
 
void SetBindPoe (::Transform *value)
 Sets the bindPose value for the object. More...
 
void SetBoneCount (int value)
 Sets the boneCount value for the object. More...
 
void SetBones (::BoneInfo *value)
 Sets the bones value for the object. More...
 
void SetMaterialCount (int value)
 Sets the materialCount value for the object. More...
 
void SetMaterials (::Material *value)
 Sets the materials value for the object. More...
 
void SetMeshCount (int value)
 Sets the meshCount value for the object. More...
 
void SetMeshes (::Mesh *value)
 Sets the meshes value for the object. More...
 
void SetMeshMaterial (int *value)
 Sets the meshMaterial value for the object. More...
 
Model & SetMeshMaterial (int meshId, int materialId)
 Set material for a mesh. More...
+Model & SetMeshMaterial (int meshId, int materialId)
 Set material for a mesh.
 
void SetTransform (::Matrix value)
 Sets the transform value for the object. More...
 
void Unload ()
 Unload model (including meshes) from memory (RAM and/or VRAM) More...
+void Unload ()
 Unload model (including meshes) from memory (RAM and/or VRAM)
 
Model & UnloadKeepMeshes ()
 Unload model (but not meshes) from memory (RAM and/or VRAM) More...
+Model & UnloadKeepMeshes ()
 Unload model (but not meshes) from memory (RAM and/or VRAM)
 
Model & UpdateModelAnimation (const ::ModelAnimation &anim, int frame)
 Update model animation pose. More...
+Model & UpdateModelAnimation (const ::ModelAnimation &anim, int frame)
 Update model animation pose.
 
- - -

-Protected Member Functions

void set (const ::Model &model)
 

Detailed Description

-
-

Definition at line 35 of file Model.hpp.

-

Constructor & Destructor Documentation

- -

◆ Model() [1/3]

+

Model type.

+ +

Definition at line 14 of file Model.hpp.

+

Member Function Documentation

+ +

◆ GetBindPoe()

@@ -174,335 +202,7 @@ Protected Member Functions - - - - - - -
raylib::Model::Model (const ::Model & model)
- - -inline - - -
- -

Definition at line 37 of file Model.hpp.

- -

References set().

- -
-
- -

◆ Model() [2/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::Model::Model (const std::string & fileName)
-
-inline
-
- -

Definition at line 41 of file Model.hpp.

- -

References set().

- -
-
- -

◆ Model() [3/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::Model::Model (const ::Mesh & mesh)
-
-inline
-
- -

Definition at line 45 of file Model.hpp.

- -

References set().

- -
-
- -

◆ ~Model()

- -
-
- - - - - -
- - - - - - - -
raylib::Model::~Model ()
-
-inline
-
- -

Definition at line 49 of file Model.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ Draw() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Model& raylib::Model::Draw (::Vector3 position,
::Vector3 rotationAxis,
float rotationAngle = 0.0f,
::Vector3 scale = {1.0f, 1.0f, 1.0f},
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw a model with extended parameters.

- -

Definition at line 130 of file Model.hpp.

- -
-
- -

◆ Draw() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Model& raylib::Model::Draw (::Vector3 position,
float scale = 1.0f,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw a model (with texture if set)

- -

Definition at line 120 of file Model.hpp.

- -
-
- -

◆ DrawWires() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Model& raylib::Model::DrawWires (::Vector3 position,
::Vector3 rotationAxis,
float rotationAngle = 0.0f,
::Vector3 scale = {1.0f, 1.0f, 1.0f},
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw a model wires (with texture if set) with extended parameters.

- -

Definition at line 153 of file Model.hpp.

- -
-
- -

◆ DrawWires() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Model& raylib::Model::DrawWires (::Vector3 position,
float scale = 1.0f,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw a model wires (with texture if set)

- -

Definition at line 143 of file Model.hpp.

- -
-
- -

◆ GetBindPoe()

- -
-
- - -
- - - + @@ -515,7 +215,10 @@ Protected Member Functions
inline ::Transform* raylib::Model::GetBindPoe ::Transform* raylib::Model::GetBindPoe ( ) const
-

Definition at line 61 of file Model.hpp.

+

Retrieves the bindPose value for the object.

+
Returns
The bindPose value of the object.
+ +

Definition at line 40 of file Model.hpp.

@@ -542,12 +245,15 @@ Protected Member Functions
-

Definition at line 59 of file Model.hpp.

+

Retrieves the boneCount value for the object.

+
Returns
The boneCount value of the object.
+ +

Definition at line 38 of file Model.hpp.

- -

◆ GetBones()

+ +

◆ GetBones()

@@ -556,7 +262,7 @@ Protected Member Functions - + @@ -569,37 +275,10 @@ Protected Member Functions
inline ::BoneInfo* raylib::Model::GetBones ::BoneInfo* raylib::Model::GetBones ( ) const
-

Definition at line 60 of file Model.hpp.

+

Retrieves the bones value for the object.

+
Returns
The bones value of the object.
-
-
- -

◆ GetCollision()

- -
-
- - - - - -
- - - - - - - - -
RayHitInfo raylib::Model::GetCollision (const ::Ray & ray) const
-
-inline
-
- -

Get collision info between ray and model.

- -

Definition at line 98 of file Model.hpp.

+

Definition at line 39 of file Model.hpp.

@@ -626,12 +305,15 @@ Protected Member Functions
-

Definition at line 55 of file Model.hpp.

+

Retrieves the materialCount value for the object.

+
Returns
The materialCount value of the object.
+ +

Definition at line 34 of file Model.hpp.

- -

◆ GetMaterials()

+ +

◆ GetMaterials()

@@ -640,7 +322,7 @@ Protected Member Functions - + @@ -653,7 +335,10 @@ Protected Member Functions
inline ::Material* raylib::Model::GetMaterials ::Material* raylib::Model::GetMaterials ( ) const
-

Definition at line 57 of file Model.hpp.

+

Retrieves the materials value for the object.

+
Returns
The materials value of the object.
+ +

Definition at line 36 of file Model.hpp.

@@ -680,12 +365,15 @@ Protected Member Functions
-

Definition at line 54 of file Model.hpp.

+

Retrieves the meshCount value for the object.

+
Returns
The meshCount value of the object.
+ +

Definition at line 33 of file Model.hpp.

- -

◆ GetMeshes()

+ +

◆ GetMeshes()

@@ -694,7 +382,7 @@ Protected Member Functions - + @@ -707,7 +395,10 @@ Protected Member Functions
inline ::Mesh* raylib::Model::GetMeshes ::Mesh* raylib::Model::GetMeshes ( ) const
-

Definition at line 56 of file Model.hpp.

+

Retrieves the meshes value for the object.

+
Returns
The meshes value of the object.
+ +

Definition at line 35 of file Model.hpp.

@@ -734,12 +425,15 @@ Protected Member Functions
-

Definition at line 58 of file Model.hpp.

+

Retrieves the meshMaterial value for the object.

+
Returns
The meshMaterial value of the object.
+ +

Definition at line 37 of file Model.hpp.

- -

◆ GetTransform()

+ +

◆ GetTransform()

@@ -748,7 +442,7 @@ Protected Member Functions - + @@ -761,97 +455,10 @@ Protected Member Functions
inline ::Matrix raylib::Model::GetTransform ::Matrix raylib::Model::GetTransform ( ) const
-

Definition at line 53 of file Model.hpp.

+

Retrieves the transform value for the object.

+
Returns
The transform value of the object.
-
-
- -

◆ IsModelAnimationValid()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Model::IsModelAnimationValid (const ::ModelAnimation & anim) const
-
-inline
-
- -

Check model animation skeleton match.

- -

Definition at line 113 of file Model.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Model& raylib::Model::operator= (const ::Model & model)
-
-inline
-
- -

Definition at line 63 of file Model.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Model::set (const ::Model & model)
-
-inlineprotected
-
- -

Definition at line 164 of file Model.hpp.

- -

Referenced by Model(), and operator=().

+

Definition at line 32 of file Model.hpp.

@@ -879,7 +486,15 @@ Protected Member Functions
-

Definition at line 61 of file Model.hpp.

+

Sets the bindPose value for the object.

+
Parameters
+ + +
valueThe value of which to set bindPose to.
+
+
+ +

Definition at line 40 of file Model.hpp.

@@ -907,7 +522,15 @@ Protected Member Functions
-

Definition at line 59 of file Model.hpp.

+

Sets the boneCount value for the object.

+
Parameters
+ + +
valueThe value of which to set boneCount to.
+
+
+ +

Definition at line 38 of file Model.hpp.

@@ -935,7 +558,15 @@ Protected Member Functions
-

Definition at line 60 of file Model.hpp.

+

Sets the bones value for the object.

+
Parameters
+ + +
valueThe value of which to set bones to.
+
+
+ +

Definition at line 39 of file Model.hpp.

@@ -963,7 +594,15 @@ Protected Member Functions
-

Definition at line 55 of file Model.hpp.

+

Sets the materialCount value for the object.

+
Parameters
+ + +
valueThe value of which to set materialCount to.
+
+
+ +

Definition at line 34 of file Model.hpp.

@@ -991,7 +630,15 @@ Protected Member Functions
-

Definition at line 57 of file Model.hpp.

+

Sets the materials value for the object.

+
Parameters
+ + +
valueThe value of which to set materials to.
+
+
+ +

Definition at line 36 of file Model.hpp.

@@ -1019,7 +666,15 @@ Protected Member Functions
-

Definition at line 54 of file Model.hpp.

+

Sets the meshCount value for the object.

+
Parameters
+ + +
valueThe value of which to set meshCount to.
+
+
+ +

Definition at line 33 of file Model.hpp.

@@ -1047,12 +702,20 @@ Protected Member Functions
-

Definition at line 56 of file Model.hpp.

+

Sets the meshes value for the object.

+
Parameters
+ + +
valueThe value of which to set meshes to.
+
+
+ +

Definition at line 35 of file Model.hpp.

-

◆ SetMeshMaterial() [1/2]

+

◆ SetMeshMaterial()

@@ -1075,47 +738,15 @@ Protected Member Functions
-

Definition at line 58 of file Model.hpp.

+

Sets the meshMaterial value for the object.

+
Parameters
+ + +
valueThe value of which to set meshMaterial to.
+
+
-
-
- -

◆ SetMeshMaterial() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Model& raylib::Model::SetMeshMaterial (int meshId,
int materialId 
)
-
-inline
-
- -

Set material for a mesh.

- -

Definition at line 90 of file Model.hpp.

+

Definition at line 37 of file Model.hpp.

@@ -1143,114 +774,22 @@ Protected Member Functions
-

Definition at line 53 of file Model.hpp.

+

Sets the transform value for the object.

+
Parameters
+ + +
valueThe value of which to set transform to.
+
+
-
- - -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Model::Unload ()
-
-inline
-
- -

Unload model (including meshes) from memory (RAM and/or VRAM)

- -

Definition at line 71 of file Model.hpp.

- -

Referenced by ~Model().

- -
-
- -

◆ UnloadKeepMeshes()

- -
-
- - - - - -
- - - - - - - -
Model& raylib::Model::UnloadKeepMeshes ()
-
-inline
-
- -

Unload model (but not meshes) from memory (RAM and/or VRAM)

- -

Definition at line 82 of file Model.hpp.

- -
-
- -

◆ UpdateModelAnimation()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Model& raylib::Model::UpdateModelAnimation (const ::ModelAnimation & anim,
int frame 
)
-
-inline
-
- -

Update model animation pose.

- -

Definition at line 105 of file Model.hpp.

+

Definition at line 32 of file Model.hpp.

diff --git a/docs/classraylib_1_1_model_animation-members.html b/docs/classraylib_1_1_model_animation-members.html index c73afa6..00c9635 100644 --- a/docs/classraylib_1_1_model_animation-members.html +++ b/docs/classraylib_1_1_model_animation-members.html @@ -75,25 +75,24 @@ $(function() {

This is the complete list of members for raylib::ModelAnimation, including all inherited members.

- + - + - - - - - - - - - - + + + + + + + + +
GetBoneCount() constraylib::ModelAnimationinline
GetBones() constraylib::ModelAnimationinline
GetBones() constraylib::ModelAnimationinline
GetFrameCount() constraylib::ModelAnimationinline
GetFramePoses() constraylib::ModelAnimationinline
GetFramePoses() constraylib::ModelAnimationinline
IsValid(const ::Model &model) constraylib::ModelAnimationinline
Load(const std::string &fileName)raylib::ModelAnimationinlinestatic
ModelAnimation(const ::ModelAnimation &model)raylib::ModelAnimationinline
operator=(const ::ModelAnimation &model)raylib::ModelAnimationinline
set(const ::ModelAnimation &model)raylib::ModelAnimationinlineprotected
SetBoneCount(int value)raylib::ModelAnimationinline
SetBones(::BoneInfo *value)raylib::ModelAnimationinline
SetFrameCount(int value)raylib::ModelAnimationinline
SetFramePoses(::Transform **value)raylib::ModelAnimationinline
Unload()raylib::ModelAnimationinline
Update(const ::Model &model, int frame)raylib::ModelAnimationinline
~ModelAnimation()raylib::ModelAnimationinline
ModelAnimation(const ::ModelAnimation &model) (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
operator=(const ::ModelAnimation &model) (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
SetBoneCount(int value)raylib::ModelAnimationinline
SetBones(::BoneInfo *value)raylib::ModelAnimationinline
SetFrameCount(int value)raylib::ModelAnimationinline
SetFramePoses(::Transform **value)raylib::ModelAnimationinline
Unload()raylib::ModelAnimationinline
Update(const ::Model &model, int frame)raylib::ModelAnimationinline
~ModelAnimation() (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
diff --git a/docs/classraylib_1_1_model_animation.html b/docs/classraylib_1_1_model_animation.html index 296f419..9e52f49 100644 --- a/docs/classraylib_1_1_model_animation.html +++ b/docs/classraylib_1_1_model_animation.html @@ -70,126 +70,72 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::ModelAnimation Class Reference
-

Model animation. +

Model animation. More...

- + - - + - - + + + + - - - - + + + + + - + + + + + - - + + - - + +

Public Member Functions

 ModelAnimation (const ::ModelAnimation &model)
+ ModelAnimation (const ::ModelAnimation &model)
 
 ~ModelAnimation ()
 
int GetBoneCount () const
 Retrieves the boneCount value for the object. More...
 
inline ::BoneInfo * GetBones () const
 
::BoneInfo * GetBones () const
 Retrieves the bones value for the object. More...
 
int GetFrameCount () const
 Retrieves the frameCount value for the object. More...
 
inline ::Transform ** GetFramePoses () const
 
bool IsValid (const ::Model &model) const
 Check model animation skeleton match. More...
::Transform ** GetFramePoses () const
 Retrieves the framePoses value for the object. More...
 
+bool IsValid (const ::Model &model) const
 Check model animation skeleton match.
 
ModelAnimation & operator= (const ::ModelAnimation &model)
+ModelAnimation & operator= (const ::ModelAnimation &model)
 
void SetBoneCount (int value)
 Sets the boneCount value for the object. More...
 
void SetBones (::BoneInfo *value)
 Sets the bones value for the object. More...
 
void SetFrameCount (int value)
 Sets the frameCount value for the object. More...
 
void SetFramePoses (::Transform **value)
 Sets the framePoses value for the object. More...
 
void Unload ()
 Unload animation data. More...
+void Unload ()
 Unload animation data.
 
ModelAnimation & Update (const ::Model &model, int frame)
 Update model animation pose. More...
+ModelAnimation & Update (const ::Model &model, int frame)
 Update model animation pose.
 
- - + + -

Static Public Member Functions

static std::vector< ModelAnimation > Load (const std::string &fileName)
 Load model animations from file. More...
+static std::vector< ModelAnimation > Load (const std::string &fileName)
 Load model animations from file.
 
- - -

-Protected Member Functions

void set (const ::ModelAnimation &model)
 

Detailed Description

-

Model animation.

+

Model animation.

-

Definition at line 39 of file ModelAnimation.hpp.

-

Constructor & Destructor Documentation

- -

◆ ModelAnimation()

- -
-
- - - - - -
- - - - - - - - -
raylib::ModelAnimation::ModelAnimation (const ::ModelAnimation & model)
-
-inline
-
- -

Definition at line 41 of file ModelAnimation.hpp.

- -

References set().

- -
-
- -

◆ ~ModelAnimation()

- -
-
- - - - - -
- - - - - - - -
raylib::ModelAnimation::~ModelAnimation ()
-
-inline
-
- -

Definition at line 45 of file ModelAnimation.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

+

Definition at line 15 of file ModelAnimation.hpp.

+

Member Function Documentation

◆ GetBoneCount()

@@ -213,12 +159,15 @@ Protected Member Functions
-

Definition at line 58 of file ModelAnimation.hpp.

+

Retrieves the boneCount value for the object.

+
Returns
The boneCount value of the object.
+ +

Definition at line 34 of file ModelAnimation.hpp.

- -

◆ GetBones()

+ +

◆ GetBones()

@@ -227,7 +176,7 @@ Protected Member Functions - + @@ -240,7 +189,10 @@ Protected Member Functions
inline ::BoneInfo* raylib::ModelAnimation::GetBones ::BoneInfo* raylib::ModelAnimation::GetBones ( ) const
-

Definition at line 59 of file ModelAnimation.hpp.

+

Retrieves the bones value for the object.

+
Returns
The bones value of the object.
+ +

Definition at line 35 of file ModelAnimation.hpp.

@@ -267,12 +219,15 @@ Protected Member Functions
-

Definition at line 60 of file ModelAnimation.hpp.

+

Retrieves the frameCount value for the object.

+
Returns
The frameCount value of the object.
+ +

Definition at line 36 of file ModelAnimation.hpp.

- -

◆ GetFramePoses()

+ +

◆ GetFramePoses()

@@ -281,7 +236,7 @@ Protected Member Functions - + @@ -294,127 +249,10 @@ Protected Member Functions
inline ::Transform** raylib::ModelAnimation::GetFramePoses ::Transform** raylib::ModelAnimation::GetFramePoses ( ) const
-

Definition at line 61 of file ModelAnimation.hpp.

+

Retrieves the framePoses value for the object.

+
Returns
The framePoses value of the object.
-
-
- -

◆ IsValid()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::ModelAnimation::IsValid (const ::Model & model) const
-
-inline
-
- -

Check model animation skeleton match.

- -

Definition at line 86 of file ModelAnimation.hpp.

- -
-
- -

◆ Load()

- -
-
- - - - - -
- - - - - - - - -
static std::vector<ModelAnimation> raylib::ModelAnimation::Load (const std::string & fileName)
-
-inlinestatic
-
- -

Load model animations from file.

- -

Definition at line 52 of file ModelAnimation.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
ModelAnimation& raylib::ModelAnimation::operator= (const ::ModelAnimation & model)
-
-inline
-
- -

Definition at line 63 of file ModelAnimation.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::ModelAnimation::set (const ::ModelAnimation & model)
-
-inlineprotected
-
- -

Definition at line 91 of file ModelAnimation.hpp.

- -

Referenced by ModelAnimation(), and operator=().

+

Definition at line 37 of file ModelAnimation.hpp.

@@ -442,7 +280,15 @@ Protected Member Functions
-

Definition at line 58 of file ModelAnimation.hpp.

+

Sets the boneCount value for the object.

+
Parameters
+ + +
valueThe value of which to set boneCount to.
+
+
+ +

Definition at line 34 of file ModelAnimation.hpp.

@@ -470,7 +316,15 @@ Protected Member Functions
-

Definition at line 59 of file ModelAnimation.hpp.

+

Sets the bones value for the object.

+
Parameters
+ + +
valueThe value of which to set bones to.
+
+
+ +

Definition at line 35 of file ModelAnimation.hpp.

@@ -498,7 +352,15 @@ Protected Member Functions
-

Definition at line 60 of file ModelAnimation.hpp.

+

Sets the frameCount value for the object.

+
Parameters
+ + +
valueThe value of which to set frameCount to.
+
+
+ +

Definition at line 36 of file ModelAnimation.hpp.

@@ -526,85 +388,22 @@ Protected Member Functions
-

Definition at line 61 of file ModelAnimation.hpp.

+

Sets the framePoses value for the object.

+
Parameters
+ + +
valueThe value of which to set framePoses to.
+
+
-
- - -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::ModelAnimation::Unload ()
-
-inline
-
- -

Unload animation data.

- -

Definition at line 71 of file ModelAnimation.hpp.

- -

Referenced by ~ModelAnimation().

- -
-
- -

◆ Update()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
ModelAnimation& raylib::ModelAnimation::Update (const ::Model & model,
int frame 
)
-
-inline
-
- -

Update model animation pose.

- -

Definition at line 78 of file ModelAnimation.hpp.

+

Definition at line 37 of file ModelAnimation.hpp.

diff --git a/docs/classraylib_1_1_mouse-members.html b/docs/classraylib_1_1_mouse-members.html index a499df7..3c58f8f 100644 --- a/docs/classraylib_1_1_mouse-members.html +++ b/docs/classraylib_1_1_mouse-members.html @@ -74,28 +74,28 @@ $(function() {

This is the complete list of members for raylib::Mouse, including all inherited members.

- - - - - - - - + + + + + + + + - - - - - - - + + + + + + +
GetCursor()raylib::Mouseinlinestatic
GetPosition()raylib::Mouseinlinestatic
GetTouchPosition(int index)raylib::Mouseinlinestatic
GetTouchX()raylib::Mouseinlinestatic
GetTouchY()raylib::Mouseinlinestatic
GetWheelMove()raylib::Mouseinlinestatic
GetX()raylib::Mouseinlinestatic
GetY()raylib::Mouseinlinestatic
GetCursor() (defined in raylib::Mouse)raylib::Mouseinlinestatic
GetPosition() (defined in raylib::Mouse)raylib::Mouseinlinestatic
GetTouchPosition(int index) (defined in raylib::Mouse)raylib::Mouseinlinestatic
GetTouchX() (defined in raylib::Mouse)raylib::Mouseinlinestatic
GetTouchY() (defined in raylib::Mouse)raylib::Mouseinlinestatic
GetWheelMove() (defined in raylib::Mouse)raylib::Mouseinlinestatic
GetX() (defined in raylib::Mouse)raylib::Mouseinlinestatic
GetY() (defined in raylib::Mouse)raylib::Mouseinlinestatic
IsButtonDown(int button)raylib::Mouseinlinestatic
IsButtonPressed(int button)raylib::Mouseinlinestatic
IsButtonReleased(int button)raylib::Mouseinlinestatic
IsButtonUp(int button)raylib::Mouseinlinestatic
SetCursor(int cursor)raylib::Mouseinlinestatic
SetOffset(int offsetX, int offsetY)raylib::Mouseinlinestatic
SetPosition(int x, int y)raylib::Mouseinlinestatic
SetScale(float scaleX, float scaleY)raylib::Mouseinlinestatic
SetX(int x)raylib::Mouseinlinestatic
SetY(int y)raylib::Mouseinlinestatic
IsButtonUp(int button) (defined in raylib::Mouse)raylib::Mouseinlinestatic
SetCursor(int cursor) (defined in raylib::Mouse)raylib::Mouseinlinestatic
SetOffset(int offsetX, int offsetY) (defined in raylib::Mouse)raylib::Mouseinlinestatic
SetPosition(int x, int y) (defined in raylib::Mouse)raylib::Mouseinlinestatic
SetScale(float scaleX, float scaleY) (defined in raylib::Mouse)raylib::Mouseinlinestatic
SetX(int x) (defined in raylib::Mouse)raylib::Mouseinlinestatic
SetY(int y) (defined in raylib::Mouse)raylib::Mouseinlinestatic
diff --git a/docs/classraylib_1_1_mouse.html b/docs/classraylib_1_1_mouse.html index fac6c5c..8e0cb74 100644 --- a/docs/classraylib_1_1_mouse.html +++ b/docs/classraylib_1_1_mouse.html @@ -80,596 +80,72 @@ $(function() { - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - + - + - +

Static Public Member Functions

static int GetCursor ()
+static int GetCursor ()
 
static Vector2 GetPosition ()
+static Vector2 GetPosition ()
 
static Vector2 GetTouchPosition (int index)
+static Vector2 GetTouchPosition (int index)
 
static int GetTouchX ()
+static int GetTouchX ()
 
static int GetTouchY ()
+static int GetTouchY ()
 
static float GetWheelMove ()
+static float GetWheelMove ()
 
static int GetX ()
+static int GetX ()
 
static int GetY ()
+static int GetY ()
 
static bool IsButtonDown (int button)
 Detect if a mouse button is being pressed. More...
+static bool IsButtonDown (int button)
 Detect if a mouse button is being pressed.
 
static bool IsButtonPressed (int button)
 Detect if a mouse button has been pressed once. More...
+static bool IsButtonPressed (int button)
 Detect if a mouse button has been pressed once.
 
static bool IsButtonReleased (int button)
 Detect if a mouse button has been released once. More...
+static bool IsButtonReleased (int button)
 Detect if a mouse button has been released once.
 
static bool IsButtonUp (int button)
+static bool IsButtonUp (int button)
 
static void SetCursor (int cursor)
+static void SetCursor (int cursor)
 
static void SetOffset (int offsetX, int offsetY)
+static void SetOffset (int offsetX, int offsetY)
 
static void SetPosition (int x, int y)
+static void SetPosition (int x, int y)
 
static void SetScale (float scaleX, float scaleY)
+static void SetScale (float scaleX, float scaleY)
 
static void SetX (int x)
+static void SetX (int x)
 
static void SetY (int y)
+static void SetY (int y)
 

Detailed Description

Input-related functions: mouse.

-

Definition at line 36 of file Mouse.hpp.

-

Member Function Documentation

- -

◆ GetCursor()

- -
-
- - - - - -
- - - - - - - -
static int raylib::Mouse::GetCursor ()
-
-inlinestatic
-
- -

Definition at line 99 of file Mouse.hpp.

- -
-
- -

◆ GetPosition()

- -
-
- - - - - -
- - - - - - - -
static Vector2 raylib::Mouse::GetPosition ()
-
-inlinestatic
-
- -

Definition at line 79 of file Mouse.hpp.

- -
-
- -

◆ GetTouchPosition()

- -
-
- - - - - -
- - - - - - - - -
static Vector2 raylib::Mouse::GetTouchPosition (int index)
-
-inlinestatic
-
- -

Definition at line 115 of file Mouse.hpp.

- -
-
- -

◆ GetTouchX()

- -
-
- - - - - -
- - - - - - - -
static int raylib::Mouse::GetTouchX ()
-
-inlinestatic
-
- -

Definition at line 107 of file Mouse.hpp.

- -
-
- -

◆ GetTouchY()

- -
-
- - - - - -
- - - - - - - -
static int raylib::Mouse::GetTouchY ()
-
-inlinestatic
-
- -

Definition at line 111 of file Mouse.hpp.

- -
-
- -

◆ GetWheelMove()

- -
-
- - - - - -
- - - - - - - -
static float raylib::Mouse::GetWheelMove ()
-
-inlinestatic
-
- -

Definition at line 95 of file Mouse.hpp.

- -
-
- -

◆ GetX()

- -
-
- - - - - -
- - - - - - - -
static int raylib::Mouse::GetX ()
-
-inlinestatic
-
- -

Definition at line 63 of file Mouse.hpp.

- -

Referenced by SetY().

- -
-
- -

◆ GetY()

- -
-
- - - - - -
- - - - - - - -
static int raylib::Mouse::GetY ()
-
-inlinestatic
-
- -

Definition at line 67 of file Mouse.hpp.

- -

Referenced by SetX().

- -
-
- -

◆ IsButtonDown()

- -
-
- - - - - -
- - - - - - - - -
static bool raylib::Mouse::IsButtonDown (int button)
-
-inlinestatic
-
- -

Detect if a mouse button is being pressed.

- -

Definition at line 48 of file Mouse.hpp.

- -
-
- -

◆ IsButtonPressed()

- -
-
- - - - - -
- - - - - - - - -
static bool raylib::Mouse::IsButtonPressed (int button)
-
-inlinestatic
-
- -

Detect if a mouse button has been pressed once.

- -

Definition at line 41 of file Mouse.hpp.

- -
-
- -

◆ IsButtonReleased()

- -
-
- - - - - -
- - - - - - - - -
static bool raylib::Mouse::IsButtonReleased (int button)
-
-inlinestatic
-
- -

Detect if a mouse button has been released once.

- -

Definition at line 55 of file Mouse.hpp.

- -
-
- -

◆ IsButtonUp()

- -
-
- - - - - -
- - - - - - - - -
static bool raylib::Mouse::IsButtonUp (int button)
-
-inlinestatic
-
- -

Definition at line 59 of file Mouse.hpp.

- -
-
- -

◆ SetCursor()

- -
-
- - - - - -
- - - - - - - - -
static void raylib::Mouse::SetCursor (int cursor)
-
-inlinestatic
-
- -

Definition at line 103 of file Mouse.hpp.

- -
-
- -

◆ SetOffset()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static void raylib::Mouse::SetOffset (int offsetX,
int offsetY 
)
-
-inlinestatic
-
- -

Definition at line 87 of file Mouse.hpp.

- -
-
- -

◆ SetPosition()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static void raylib::Mouse::SetPosition (int x,
int y 
)
-
-inlinestatic
-
- -

Definition at line 83 of file Mouse.hpp.

- -
-
- -

◆ SetScale()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static void raylib::Mouse::SetScale (float scaleX,
float scaleY 
)
-
-inlinestatic
-
- -

Definition at line 91 of file Mouse.hpp.

- -
-
- -

◆ SetX()

- -
-
- - - - - -
- - - - - - - - -
static void raylib::Mouse::SetX (int x)
-
-inlinestatic
-
- -

Definition at line 71 of file Mouse.hpp.

- -

References GetY().

- -
-
- -

◆ SetY()

- -
-
- - - - - -
- - - - - - - - -
static void raylib::Mouse::SetY (int y)
-
-inlinestatic
-
- -

Definition at line 75 of file Mouse.hpp.

- -

References GetX().

- -
-
- +

Definition at line 11 of file Mouse.hpp.

+ diff --git a/docs/classraylib_1_1_music-members.html b/docs/classraylib_1_1_music-members.html index 056109f..0e0fba6 100644 --- a/docs/classraylib_1_1_music-members.html +++ b/docs/classraylib_1_1_music-members.html @@ -78,32 +78,31 @@ $(function() { GetCtxType() constraylib::Musicinline GetLooping() constraylib::Musicinline GetSampleCount() constraylib::Musicinline - GetStream() constraylib::Musicinline + GetStream() constraylib::Musicinline GetTimeLength() constraylib::Musicinline GetTimePlayed() constraylib::Musicinline IsPlaying() constraylib::Musicinline - Music(const ::Music &music)raylib::Musicinline + Music(const ::Music &music) (defined in raylib::Music)raylib::Musicinline Music(const std::string &fileName)raylib::Musicinline - operator=(const ::Music &music)raylib::Musicinline + operator=(const ::Music &music) (defined in raylib::Music)raylib::Musicinline Pause()raylib::Musicinline Play()raylib::Musicinline Resume()raylib::Musicinline - set(const ::Music &music)raylib::Musicinlineprotected - SetCtxData(void *value)raylib::Musicinline - SetCtxType(int value)raylib::Musicinline - SetLooping(bool value)raylib::Musicinline - SetPitch(float pitch)raylib::Musicinline - SetSampleCount(unsigned int value)raylib::Musicinline - SetStream(::AudioStream value)raylib::Musicinline - SetVolume(float volume)raylib::Musicinline - Stop()raylib::Musicinline - Unload()raylib::Musicinline - Update()raylib::Musicinline - ~Music()raylib::Musicinline + SetCtxData(void *value)raylib::Musicinline + SetCtxType(int value)raylib::Musicinline + SetLooping(bool value)raylib::Musicinline + SetPitch(float pitch)raylib::Musicinline + SetSampleCount(unsigned int value)raylib::Musicinline + SetStream(::AudioStream value)raylib::Musicinline + SetVolume(float volume)raylib::Musicinline + Stop()raylib::Musicinline + Unload()raylib::Musicinline + Update()raylib::Musicinline + ~Music()raylib::Musicinline diff --git a/docs/classraylib_1_1_music.html b/docs/classraylib_1_1_music.html index 51c2bb9..051f202 100644 --- a/docs/classraylib_1_1_music.html +++ b/docs/classraylib_1_1_music.html @@ -69,182 +69,111 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Music Class Reference
+ +

Music stream type (audio file streaming from memory) + More...

- + - - + + - - + + + + + + - - - - + + + + + - - + + - - + + - + - - + + - - + + - - + + + + + - - + + + + - - + + - - + + - - + + - - + + -

Public Member Functions

 Music (const ::Music &music)
+ Music (const ::Music &music)
 
 Music (const std::string &fileName)
 Load music stream from file. More...
+ Music (const std::string &fileName)
 Load music stream from file.
 
 ~Music ()
 Unload music stream. More...
+ ~Music ()
 Unload music stream.
 
void * GetCtxData () const
 Retrieves the ctxData value for the object. More...
 
int GetCtxType () const
 Retrieves the ctxType value for the object. More...
 
bool GetLooping () const
 Retrieves the looping value for the object. More...
 
unsigned int GetSampleCount () const
 Retrieves the sampleCount value for the object. More...
 
inline ::AudioStream GetStream () const
 
float GetTimeLength () const
 Get music time length (in seconds) More...
::AudioStream GetStream () const
 Retrieves the stream value for the object. More...
 
+float GetTimeLength () const
 Get music time length (in seconds)
 
float GetTimePlayed () const
 Get current music time played (in seconds) More...
+float GetTimePlayed () const
 Get current music time played (in seconds)
 
bool IsPlaying () const
 Check if music is playing. More...
+bool IsPlaying () const
 Check if music is playing.
 
Music & operator= (const ::Music &music)
+Music & operator= (const ::Music &music)
 
Music & Pause ()
 Pause music playing. More...
+Music & Pause ()
 Pause music playing.
 
Music & Play ()
 Start music playing. More...
+Music & Play ()
 Start music playing.
 
Music & Resume ()
 Resume music playing. More...
+Music & Resume ()
 Resume music playing.
 
void SetCtxData (void *value)
 Sets the ctxData value for the object. More...
 
void SetCtxType (int value)
 Sets the ctxType value for the object. More...
 
void SetLooping (bool value)
 Sets the looping value for the object. More...
 
Music & SetPitch (float pitch)
 Set pitch for music. More...
+Music & SetPitch (float pitch)
 Set pitch for music.
 
void SetSampleCount (unsigned int value)
 Sets the sampleCount value for the object. More...
 
void SetStream (::AudioStream value)
 Sets the stream value for the object. More...
 
Music & SetVolume (float volume)
 Set volume for music. More...
+Music & SetVolume (float volume)
 Set volume for music.
 
Music & Stop ()
 Stop music playing. More...
+Music & Stop ()
 Stop music playing.
 
void Unload ()
 Unload music stream. More...
+void Unload ()
 Unload music stream.
 
Music & Update ()
 Updates buffers for music streaming. More...
+Music & Update ()
 Updates buffers for music streaming.
 
- - -

-Protected Member Functions

void set (const ::Music &music)
 

Detailed Description

-
-

Definition at line 34 of file Music.hpp.

-

Constructor & Destructor Documentation

- -

◆ Music() [1/2]

+

Music stream type (audio file streaming from memory)

-
-
- - - - - -
- - - - - - - - -
raylib::Music::Music (const ::Music & music)
-
-inline
-
- -

Definition at line 36 of file Music.hpp.

- -

References set().

- -
-
- -

◆ Music() [2/2]

- -
-
- - - - - -
- - - - - - - - -
raylib::Music::Music (const std::string & fileName)
-
-inline
-
- -

Load music stream from file.

- -

Definition at line 43 of file Music.hpp.

- -

References set().

- -
-
- -

◆ ~Music()

- -
-
- - - - - -
- - - - - - - -
raylib::Music::~Music ()
-
-inline
-
- -

Unload music stream.

- -

Definition at line 50 of file Music.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

+

Definition at line 13 of file Music.hpp.

+

Member Function Documentation

◆ GetCtxData()

@@ -268,7 +197,10 @@ Protected Member Functions
-

Definition at line 58 of file Music.hpp.

+

Retrieves the ctxData value for the object.

+
Returns
The ctxData value of the object.
+ +

Definition at line 37 of file Music.hpp.

@@ -295,7 +227,10 @@ Protected Member Functions
-

Definition at line 57 of file Music.hpp.

+

Retrieves the ctxType value for the object.

+
Returns
The ctxType value of the object.
+ +

Definition at line 36 of file Music.hpp.

@@ -322,7 +257,10 @@ Protected Member Functions
-

Definition at line 56 of file Music.hpp.

+

Retrieves the looping value for the object.

+
Returns
The looping value of the object.
+ +

Definition at line 35 of file Music.hpp.

@@ -349,12 +287,15 @@ Protected Member Functions
-

Definition at line 55 of file Music.hpp.

+

Retrieves the sampleCount value for the object.

+
Returns
The sampleCount value of the object.
+ +

Definition at line 34 of file Music.hpp.

- -

◆ GetStream()

+ +

◆ GetStream()

@@ -363,7 +304,7 @@ Protected Member Functions - + @@ -376,241 +317,10 @@ Protected Member Functions
inline ::AudioStream raylib::Music::GetStream ::AudioStream raylib::Music::GetStream ( ) const
-

Definition at line 54 of file Music.hpp.

+

Retrieves the stream value for the object.

+
Returns
The stream value of the object.
-
-
- -

◆ GetTimeLength()

- -
-
- - - - - -
- - - - - - - -
float raylib::Music::GetTimeLength () const
-
-inline
-
- -

Get music time length (in seconds)

- -

Definition at line 138 of file Music.hpp.

- -
-
- -

◆ GetTimePlayed()

- -
-
- - - - - -
- - - - - - - -
float raylib::Music::GetTimePlayed () const
-
-inline
-
- -

Get current music time played (in seconds)

- -

Definition at line 145 of file Music.hpp.

- -
-
- -

◆ IsPlaying()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Music::IsPlaying () const
-
-inline
-
- -

Check if music is playing.

- -

Definition at line 115 of file Music.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Music& raylib::Music::operator= (const ::Music & music)
-
-inline
-
- -

Definition at line 60 of file Music.hpp.

- -

References set().

- -
-
- -

◆ Pause()

- -
-
- - - - - -
- - - - - - - -
Music& raylib::Music::Pause ()
-
-inline
-
- -

Pause music playing.

- -

Definition at line 99 of file Music.hpp.

- -
-
- -

◆ Play()

- -
-
- - - - - -
- - - - - - - -
Music& raylib::Music::Play ()
-
-inline
-
- -

Start music playing.

- -

Definition at line 75 of file Music.hpp.

- -
-
- -

◆ Resume()

- -
-
- - - - - -
- - - - - - - -
Music& raylib::Music::Resume ()
-
-inline
-
- -

Resume music playing.

- -

Definition at line 107 of file Music.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Music::set (const ::Music & music)
-
-inlineprotected
-
- -

Definition at line 150 of file Music.hpp.

- -

Referenced by Music(), and operator=().

+

Definition at line 33 of file Music.hpp.

@@ -638,7 +348,15 @@ Protected Member Functions
-

Definition at line 58 of file Music.hpp.

+

Sets the ctxData value for the object.

+
Parameters
+ + +
valueThe value of which to set ctxData to.
+
+
+ +

Definition at line 37 of file Music.hpp.

@@ -666,7 +384,15 @@ Protected Member Functions
-

Definition at line 57 of file Music.hpp.

+

Sets the ctxType value for the object.

+
Parameters
+ + +
valueThe value of which to set ctxType to.
+
+
+ +

Definition at line 36 of file Music.hpp.

@@ -694,37 +420,15 @@ Protected Member Functions
-

Definition at line 56 of file Music.hpp.

+

Sets the looping value for the object.

+
Parameters
+ + +
valueThe value of which to set looping to.
+
+
-
- - -

◆ SetPitch()

- -
-
- - - - - -
- - - - - - - - -
Music& raylib::Music::SetPitch (float pitch)
-
-inline
-
- -

Set pitch for music.

- -

Definition at line 130 of file Music.hpp.

+

Definition at line 35 of file Music.hpp.

@@ -752,7 +456,15 @@ Protected Member Functions
-

Definition at line 55 of file Music.hpp.

+

Sets the sampleCount value for the object.

+
Parameters
+ + +
valueThe value of which to set sampleCount to.
+
+
+ +

Definition at line 34 of file Music.hpp.

@@ -780,133 +492,22 @@ Protected Member Functions
-

Definition at line 54 of file Music.hpp.

+

Sets the stream value for the object.

+
Parameters
+ + +
valueThe value of which to set stream to.
+
+
-
- - -

◆ SetVolume()

- -
-
- - - - - -
- - - - - - - - -
Music& raylib::Music::SetVolume (float volume)
-
-inline
-
- -

Set volume for music.

- -

Definition at line 122 of file Music.hpp.

- -
-
- -

◆ Stop()

- -
-
- - - - - -
- - - - - - - -
Music& raylib::Music::Stop ()
-
-inline
-
- -

Stop music playing.

- -

Definition at line 91 of file Music.hpp.

- -
-
- -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Music::Unload ()
-
-inline
-
- -

Unload music stream.

- -

Definition at line 68 of file Music.hpp.

- -

Referenced by ~Music().

- -
-
- -

◆ Update()

- -
-
- - - - - -
- - - - - - - -
Music& raylib::Music::Update ()
-
-inline
-
- -

Updates buffers for music streaming.

- -

Definition at line 83 of file Music.hpp.

+

Definition at line 33 of file Music.hpp.

diff --git a/docs/classraylib_1_1_physics-members.html b/docs/classraylib_1_1_physics-members.html index 2ee2369..84fea16 100644 --- a/docs/classraylib_1_1_physics-members.html +++ b/docs/classraylib_1_1_physics-members.html @@ -74,34 +74,34 @@ $(function() {

This is the complete list of members for raylib::Physics, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
AddForce(PhysicsBody body, Vector2 force)raylib::Physicsinline
AddTorque(PhysicsBody body, float amount)raylib::Physicsinline
Close()raylib::Physicsinline
CreateBodyCircle(Vector2 pos, float radius, float density)raylib::Physicsinline
CreateBodyPolygon(Vector2 pos, float radius, int sides, float density)raylib::Physicsinline
CreateBodyRectangle(Vector2 pos, float width, float height, float density)raylib::Physicsinline
DestroyBody(PhysicsBody body)raylib::Physicsinline
GetBodiesCount() constraylib::Physicsinline
GetBody(int index) constraylib::Physicsinline
GetShapeType(int index) constraylib::Physicsinline
GetShapeVertex(PhysicsBody body, int vertex) constraylib::Physicsinline
GetShapeVerticesCount(int index) constraylib::Physicsinline
Init()raylib::Physicsinline
IsEnabled() constraylib::Physicsinline
Physics()raylib::Physicsinline
Physics(float gravityY)raylib::Physicsinline
Physics(float gravityX, float gravityY)raylib::Physicsinline
Reset()raylib::Physicsinline
RunStep()raylib::Physicsinline
SetBodyRotation(PhysicsBody body, float radians)raylib::Physicsinline
SetGravity(float x, float y)raylib::Physicsinline
SetTimeStep(double delta)raylib::Physicsinline
Shatter(PhysicsBody body, Vector2 position, float force)raylib::Physicsinline
~Physics()raylib::Physicsinline
AddForce(PhysicsBody body, Vector2 force) (defined in raylib::Physics)raylib::Physicsinline
AddTorque(PhysicsBody body, float amount) (defined in raylib::Physics)raylib::Physicsinline
Close() (defined in raylib::Physics)raylib::Physicsinline
CreateBodyCircle(Vector2 pos, float radius, float density) (defined in raylib::Physics)raylib::Physicsinline
CreateBodyPolygon(Vector2 pos, float radius, int sides, float density) (defined in raylib::Physics)raylib::Physicsinline
CreateBodyRectangle(Vector2 pos, float width, float height, float density) (defined in raylib::Physics)raylib::Physicsinline
DestroyBody(PhysicsBody body) (defined in raylib::Physics)raylib::Physicsinline
GetBodiesCount() const (defined in raylib::Physics)raylib::Physicsinline
GetBody(int index) const (defined in raylib::Physics)raylib::Physicsinline
GetShapeType(int index) const (defined in raylib::Physics)raylib::Physicsinline
GetShapeVertex(PhysicsBody body, int vertex) const (defined in raylib::Physics)raylib::Physicsinline
GetShapeVerticesCount(int index) const (defined in raylib::Physics)raylib::Physicsinline
Init() (defined in raylib::Physics)raylib::Physicsinline
IsEnabled() const (defined in raylib::Physics)raylib::Physicsinline
Physics() (defined in raylib::Physics)raylib::Physicsinline
Physics(float gravityY) (defined in raylib::Physics)raylib::Physicsinline
Physics(float gravityX, float gravityY) (defined in raylib::Physics)raylib::Physicsinline
Reset() (defined in raylib::Physics)raylib::Physicsinline
RunStep() (defined in raylib::Physics)raylib::Physicsinline
SetBodyRotation(PhysicsBody body, float radians) (defined in raylib::Physics)raylib::Physicsinline
SetGravity(float x, float y) (defined in raylib::Physics)raylib::Physicsinline
SetTimeStep(double delta) (defined in raylib::Physics)raylib::Physicsinline
Shatter(PhysicsBody body, Vector2 position, float force) (defined in raylib::Physics)raylib::Physicsinline
~Physics() (defined in raylib::Physics)raylib::Physicsinline
diff --git a/docs/classraylib_1_1_physics.html b/docs/classraylib_1_1_physics.html index baa272d..63c4e99 100644 --- a/docs/classraylib_1_1_physics.html +++ b/docs/classraylib_1_1_physics.html @@ -74,881 +74,87 @@ $(function() {
raylib::Physics Class Reference
+ +

2D Physics library for videogames + More...

- - - + - + - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

Public Member Functions

 Physics ()
 
 Physics (float gravityX, float gravityY)
+ Physics (float gravityX, float gravityY)
 
 Physics (float gravityY)
+ Physics (float gravityY)
 
 ~Physics ()
 
Physics & AddForce (PhysicsBody body, Vector2 force)
+Physics & AddForce (PhysicsBody body, Vector2 force)
 
Physics & AddTorque (PhysicsBody body, float amount)
+Physics & AddTorque (PhysicsBody body, float amount)
 
Physics & Close ()
+Physics & Close ()
 
PhysicsBody CreateBodyCircle (Vector2 pos, float radius, float density)
+PhysicsBody CreateBodyCircle (Vector2 pos, float radius, float density)
 
PhysicsBody CreateBodyPolygon (Vector2 pos, float radius, int sides, float density)
+PhysicsBody CreateBodyPolygon (Vector2 pos, float radius, int sides, float density)
 
PhysicsBody CreateBodyRectangle (Vector2 pos, float width, float height, float density)
+PhysicsBody CreateBodyRectangle (Vector2 pos, float width, float height, float density)
 
Physics & DestroyBody (PhysicsBody body)
+Physics & DestroyBody (PhysicsBody body)
 
int GetBodiesCount () const
+int GetBodiesCount () const
 
PhysicsBody GetBody (int index) const
+PhysicsBody GetBody (int index) const
 
int GetShapeType (int index) const
+int GetShapeType (int index) const
 
Vector2 GetShapeVertex (PhysicsBody body, int vertex) const
+Vector2 GetShapeVertex (PhysicsBody body, int vertex) const
 
int GetShapeVerticesCount (int index) const
+int GetShapeVerticesCount (int index) const
 
Physics & Init ()
+Physics & Init ()
 
bool IsEnabled () const
+bool IsEnabled () const
 
Physics & Reset ()
+Physics & Reset ()
 
Physics & RunStep ()
+Physics & RunStep ()
 
Physics & SetBodyRotation (PhysicsBody body, float radians)
+Physics & SetBodyRotation (PhysicsBody body, float radians)
 
Physics & SetGravity (float x, float y)
+Physics & SetGravity (float x, float y)
 
Physics & SetTimeStep (double delta)
+Physics & SetTimeStep (double delta)
 
Physics & Shatter (PhysicsBody body, Vector2 position, float force)
+Physics & Shatter (PhysicsBody body, Vector2 position, float force)
 

Detailed Description

-
-

Definition at line 41 of file Physics.hpp.

-

Constructor & Destructor Documentation

- -

◆ Physics() [1/3]

+

2D Physics library for videogames

-
-
- - - - - -
- - - - - - - -
raylib::Physics::Physics ()
-
-inline
-
- -

Definition at line 43 of file Physics.hpp.

- -

References Init().

- -
-
- -

◆ Physics() [2/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::Physics::Physics (float gravityY)
-
-inline
-
- -

Definition at line 47 of file Physics.hpp.

- -

References Init(), and SetGravity().

- -
-
- -

◆ Physics() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Physics::Physics (float gravityX,
float gravityY 
)
-
-inline
-
- -

Definition at line 52 of file Physics.hpp.

- -

References Init(), and SetGravity().

- -
-
- -

◆ ~Physics()

- -
-
- - - - - -
- - - - - - - -
raylib::Physics::~Physics ()
-
-inline
-
- -

Definition at line 57 of file Physics.hpp.

- -

References Close().

- -
-
-

Member Function Documentation

- -

◆ AddForce()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Physics& raylib::Physics::AddForce (PhysicsBody body,
Vector2 force 
)
-
-inline
-
- -

Definition at line 102 of file Physics.hpp.

- -
-
- -

◆ AddTorque()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Physics& raylib::Physics::AddTorque (PhysicsBody body,
float amount 
)
-
-inline
-
- -

Definition at line 107 of file Physics.hpp.

- -
-
- -

◆ Close()

- -
-
- - - - - -
- - - - - - - -
Physics& raylib::Physics::Close ()
-
-inline
-
- -

Definition at line 66 of file Physics.hpp.

- -

Referenced by ~Physics().

- -
-
- -

◆ CreateBodyCircle()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
PhysicsBody raylib::Physics::CreateBodyCircle (Vector2 pos,
float radius,
float density 
)
-
-inline
-
- -

Definition at line 90 of file Physics.hpp.

- -
-
- -

◆ CreateBodyPolygon()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicsBody raylib::Physics::CreateBodyPolygon (Vector2 pos,
float radius,
int sides,
float density 
)
-
-inline
-
- -

Definition at line 98 of file Physics.hpp.

- -
-
- -

◆ CreateBodyRectangle()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicsBody raylib::Physics::CreateBodyRectangle (Vector2 pos,
float width,
float height,
float density 
)
-
-inline
-
- -

Definition at line 94 of file Physics.hpp.

- -
-
- -

◆ DestroyBody()

- -
-
- - - - - -
- - - - - - - - -
Physics& raylib::Physics::DestroyBody (PhysicsBody body)
-
-inline
-
- -

Definition at line 142 of file Physics.hpp.

- -
-
- -

◆ GetBodiesCount()

- -
-
- - - - - -
- - - - - - - -
int raylib::Physics::GetBodiesCount () const
-
-inline
-
- -

Definition at line 117 of file Physics.hpp.

- -
-
- -

◆ GetBody()

- -
-
- - - - - -
- - - - - - - - -
PhysicsBody raylib::Physics::GetBody (int index) const
-
-inline
-
- -

Definition at line 121 of file Physics.hpp.

- -
-
- -

◆ GetShapeType()

- -
-
- - - - - -
- - - - - - - - -
int raylib::Physics::GetShapeType (int index) const
-
-inline
-
- -

Definition at line 125 of file Physics.hpp.

- -
-
- -

◆ GetShapeVertex()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector2 raylib::Physics::GetShapeVertex (PhysicsBody body,
int vertex 
) const
-
-inline
-
- -

Definition at line 133 of file Physics.hpp.

- -
-
- -

◆ GetShapeVerticesCount()

- -
-
- - - - - -
- - - - - - - - -
int raylib::Physics::GetShapeVerticesCount (int index) const
-
-inline
-
- -

Definition at line 129 of file Physics.hpp.

- -
-
- -

◆ Init()

- -
-
- - - - - -
- - - - - - - -
Physics& raylib::Physics::Init ()
-
-inline
-
- -

Definition at line 61 of file Physics.hpp.

- -

Referenced by Physics().

- -
-
- -

◆ IsEnabled()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Physics::IsEnabled () const
-
-inline
-
- -

Definition at line 81 of file Physics.hpp.

- -
-
- -

◆ Reset()

- -
-
- - - - - -
- - - - - - - -
Physics& raylib::Physics::Reset ()
-
-inline
-
- -

Definition at line 147 of file Physics.hpp.

- -
-
- -

◆ RunStep()

- -
-
- - - - - -
- - - - - - - -
Physics& raylib::Physics::RunStep ()
-
-inline
-
- -

Definition at line 71 of file Physics.hpp.

- -
-
- -

◆ SetBodyRotation()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Physics& raylib::Physics::SetBodyRotation (PhysicsBody body,
float radians 
)
-
-inline
-
- -

Definition at line 137 of file Physics.hpp.

- -
-
- -

◆ SetGravity()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Physics& raylib::Physics::SetGravity (float x,
float y 
)
-
-inline
-
- -

Definition at line 85 of file Physics.hpp.

- -

Referenced by Physics().

- -
-
- -

◆ SetTimeStep()

- -
-
- - - - - -
- - - - - - - - -
Physics& raylib::Physics::SetTimeStep (double delta)
-
-inline
-
- -

Definition at line 76 of file Physics.hpp.

- -
-
- -

◆ Shatter()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Physics& raylib::Physics::Shatter (PhysicsBody body,
Vector2 position,
float force 
)
-
-inline
-
- -

Definition at line 112 of file Physics.hpp.

- -
-
-
+

Definition at line 12 of file Physics.hpp.

+
diff --git a/docs/classraylib_1_1_ray-members.html b/docs/classraylib_1_1_ray-members.html index f897b02..37b71af 100644 --- a/docs/classraylib_1_1_ray-members.html +++ b/docs/classraylib_1_1_ray-members.html @@ -78,22 +78,21 @@ $(function() { CheckCollisionSphere(::Vector3 center, float radius) constraylib::Rayinline CheckCollisionSphere(::Vector3 center, float radius, ::Vector3 *collisionPoint) constraylib::Rayinline Draw(::Color color)raylib::Rayinline - GetCollision(const ::Model &model)raylib::Rayinline - GetCollisionGround(float groundHeight)raylib::Rayinline - GetCollisionTriangle(::Vector3 p1, ::Vector3 p2, ::Vector3 p3)raylib::Rayinline - GetDirection() constraylib::Rayinline - GetPosition() constraylib::Rayinline - operator=(const ::Ray &ray)raylib::Rayinline - Ray(const ::Ray &ray)raylib::Rayinline - Ray(::Vector3 Position, ::Vector3 Direction)raylib::Rayinline - Ray(::Vector2 mousePosition, ::Camera camera)raylib::Rayinline - set(const ::Ray &ray)raylib::Rayinlineprotected - SetDirection(::Vector3 value)raylib::Rayinline - SetPosition(::Vector3 value)raylib::Rayinline + GetCollision(const ::Model &model) constraylib::Rayinline + GetCollisionGround(float groundHeight) constraylib::Rayinline + GetCollisionTriangle(::Vector3 p1, ::Vector3 p2, ::Vector3 p3) constraylib::Rayinline + GetDirection() constraylib::Rayinline + GetPosition() constraylib::Rayinline + operator=(const ::Ray &ray) (defined in raylib::Ray)raylib::Rayinline + Ray(const ::Ray &ray) (defined in raylib::Ray)raylib::Rayinline + Ray(::Vector3 Position, ::Vector3 Direction) (defined in raylib::Ray)raylib::Rayinline + Ray(::Vector2 mousePosition, ::Camera camera) (defined in raylib::Ray)raylib::Rayinline + SetDirection(::Vector3 value)raylib::Rayinline + SetPosition(::Vector3 value)raylib::Rayinline diff --git a/docs/classraylib_1_1_ray.html b/docs/classraylib_1_1_ray.html index e37ac12..e2cd421 100644 --- a/docs/classraylib_1_1_ray.html +++ b/docs/classraylib_1_1_ray.html @@ -69,7 +69,6 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Ray Class Reference
@@ -81,56 +80,66 @@ $(function() { - + - + - + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + -

Public Member Functions

 Ray (::Vector2 mousePosition, ::Camera camera)
+ Ray (::Vector2 mousePosition, ::Camera camera)
 
 Ray (::Vector3 Position, ::Vector3 Direction)
+ Ray (::Vector3 Position, ::Vector3 Direction)
 
 Ray (const ::Ray &ray)
+ Ray (const ::Ray &ray)
 
bool CheckCollision (const ::BoundingBox &box) const
 Detect collision between ray and box. More...
+bool CheckCollision (const ::BoundingBox &box) const
 Detect collision between ray and box.
 
bool CheckCollisionSphere (::Vector3 center, float radius) const
 Detect collision between ray and sphere. More...
+bool CheckCollisionSphere (::Vector3 center, float radius) const
 Detect collision between ray and sphere.
 
bool CheckCollisionSphere (::Vector3 center, float radius, ::Vector3 *collisionPoint) const
 Detect collision between ray and sphere, returns collision point. More...
+bool CheckCollisionSphere (::Vector3 center, float radius, ::Vector3 *collisionPoint) const
 Detect collision between ray and sphere, returns collision point.
 
Ray & Draw (::Color color)
 Draw a ray line. More...
+Ray & Draw (::Color color)
 Draw a ray line.
 
RayHitInfo GetCollision (const ::Model &model)
 Get collision info between ray and model. More...
 
RayHitInfo GetCollisionGround (float groundHeight)
 Get collision info between ray and ground plane (Y-normal plane) More...
 
RayHitInfo GetCollisionTriangle (::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
 Get collision info between ray and triangle. More...
 
inline ::Vector3 GetDirection () const
 
inline ::Vector3 GetPosition () const
 
Ray & operator= (const ::Ray &ray)
+RayHitInfo GetCollision (const ::Model &model) const
 Get collision info between ray and model.
 
+RayHitInfo GetCollisionGround (float groundHeight) const
 Get collision info between ray and ground plane (Y-normal plane)
 
+RayHitInfo GetCollisionTriangle (::Vector3 p1, ::Vector3 p2, ::Vector3 p3) const
 Get collision info between ray and triangle.
 
::Vector3 GetDirection () const
 Retrieves the direction value for the object. More...
 
::Vector3 GetPosition () const
 Retrieves the position value for the object. More...
 
+Ray & operator= (const ::Ray &ray)
 
void SetDirection (::Vector3 value)
 Sets the direction value for the object. More...
 
void SetPosition (::Vector3 value)
 Sets the position value for the object. More...
 
- - -

-Protected Member Functions

void set (const ::Ray &ray)
 

Detailed Description

Ray type (useful for raycast)

-

Definition at line 38 of file Ray.hpp.

-

Constructor & Destructor Documentation

- -

◆ Ray() [1/3]

+

Definition at line 12 of file Ray.hpp.

+

Member Function Documentation

+ +

◆ GetDirection()

@@ -139,368 +148,7 @@ Protected Member Functions - - - - - - -
raylib::Ray::Ray (const ::Ray & ray)
- - -inline - - -
- -

Definition at line 40 of file Ray.hpp.

- -

References set().

- -
-
- -

◆ Ray() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Ray::Ray (::Vector3 Position,
::Vector3 Direction 
)
-
-inline
-
- -

Definition at line 44 of file Ray.hpp.

- -
-
- -

◆ Ray() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Ray::Ray (::Vector2 mousePosition,
::Camera camera 
)
-
-inline
-
- -

Definition at line 49 of file Ray.hpp.

- -

References set().

- -
-
-

Member Function Documentation

- -

◆ CheckCollision()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Ray::CheckCollision (const ::BoundingBox & box) const
-
-inline
-
- -

Detect collision between ray and box.

- -

Definition at line 87 of file Ray.hpp.

- -
-
- -

◆ CheckCollisionSphere() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool raylib::Ray::CheckCollisionSphere (::Vector3 center,
float radius 
) const
-
-inline
-
- -

Detect collision between ray and sphere.

- -

Definition at line 72 of file Ray.hpp.

- -
-
- -

◆ CheckCollisionSphere() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
bool raylib::Ray::CheckCollisionSphere (::Vector3 center,
float radius,
::Vector3 * collisionPoint 
) const
-
-inline
-
- -

Detect collision between ray and sphere, returns collision point.

- -

Definition at line 79 of file Ray.hpp.

- -
-
- -

◆ Draw()

- -
-
- - - - - -
- - - - - - - - -
Ray& raylib::Ray::Draw (::Color color)
-
-inline
-
- -

Draw a ray line.

- -

Definition at line 64 of file Ray.hpp.

- -
-
- -

◆ GetCollision()

- -
-
- - - - - -
- - - - - - - - -
RayHitInfo raylib::Ray::GetCollision (const ::Model & model)
-
-inline
-
- -

Get collision info between ray and model.

- -

Definition at line 94 of file Ray.hpp.

- -
-
- -

◆ GetCollisionGround()

- -
-
- - - - - -
- - - - - - - - -
RayHitInfo raylib::Ray::GetCollisionGround (float groundHeight)
-
-inline
-
- -

Get collision info between ray and ground plane (Y-normal plane)

- -

Definition at line 108 of file Ray.hpp.

- -
-
- -

◆ GetCollisionTriangle()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
RayHitInfo raylib::Ray::GetCollisionTriangle (::Vector3 p1,
::Vector3 p2,
::Vector3 p3 
)
-
-inline
-
- -

Get collision info between ray and triangle.

- -

Definition at line 101 of file Ray.hpp.

- -
-
- -

◆ GetDirection()

- -
-
- - -
- - - + @@ -513,12 +161,15 @@ Protected Member Functions
inline ::Vector3 raylib::Ray::GetDirection ::Vector3 raylib::Ray::GetDirection ( ) const
-

Definition at line 59 of file Ray.hpp.

+

Retrieves the direction value for the object.

+
Returns
The direction value of the object.
+ +

Definition at line 33 of file Ray.hpp.

- -

◆ GetPosition()

+ +

◆ GetPosition()

@@ -527,7 +178,7 @@ Protected Member Functions
- + @@ -540,67 +191,10 @@ Protected Member Functions
inline ::Vector3 raylib::Ray::GetPosition ::Vector3 raylib::Ray::GetPosition ( ) const
-

Definition at line 58 of file Ray.hpp.

+

Retrieves the position value for the object.

+
Returns
The position value of the object.
-
- - -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Ray& raylib::Ray::operator= (const ::Ray & ray)
-
-inline
-
- -

Definition at line 53 of file Ray.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Ray::set (const ::Ray & ray)
-
-inlineprotected
-
- -

Definition at line 113 of file Ray.hpp.

- -

Referenced by operator=(), and Ray().

+

Definition at line 32 of file Ray.hpp.

@@ -628,7 +222,15 @@ Protected Member Functions
-

Definition at line 59 of file Ray.hpp.

+

Sets the direction value for the object.

+
Parameters
+ + +
valueThe value of which to set direction to.
+
+
+ +

Definition at line 33 of file Ray.hpp.

@@ -656,14 +258,22 @@ Protected Member Functions
-

Definition at line 58 of file Ray.hpp.

+

Sets the position value for the object.

+
Parameters
+ + +
valueThe value of which to set position to.
+
+
+ +

Definition at line 32 of file Ray.hpp.

diff --git a/docs/classraylib_1_1_ray_hit_info-members.html b/docs/classraylib_1_1_ray_hit_info-members.html index 1b90254..89574e3 100644 --- a/docs/classraylib_1_1_ray_hit_info-members.html +++ b/docs/classraylib_1_1_ray_hit_info-members.html @@ -76,15 +76,15 @@ $(function() { - - - - - - - - - + + + + + + + + + @@ -92,7 +92,7 @@ $(function() {
GetDistance() constraylib::RayHitInfoinline
GetHit() constraylib::RayHitInfoinline
GetNormal() constraylib::RayHitInfoinline
GetPosition() constraylib::RayHitInfoinline
operator=(const ::RayHitInfo &ray)raylib::RayHitInfoinline
RayHitInfo(const ::RayHitInfo &ray)raylib::RayHitInfoinline
RayHitInfo(bool Hit, float Distance, ::Vector3 Position, ::Vector3 Normal)raylib::RayHitInfoinline
RayHitInfo(const ::Ray &ray, const ::Model &model)raylib::RayHitInfoinline
RayHitInfo(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)raylib::RayHitInfoinline
RayHitInfo(const ::Ray &ray, float groundHeight)raylib::RayHitInfoinline
set(const ::RayHitInfo &ray)raylib::RayHitInfoinlineprotected
GetNormal() constraylib::RayHitInfoinline
GetPosition() constraylib::RayHitInfoinline
operator=(const ::RayHitInfo &ray) (defined in raylib::RayHitInfo)raylib::RayHitInfoinline
RayHitInfo(const ::RayHitInfo &ray) (defined in raylib::RayHitInfo)raylib::RayHitInfoinline
RayHitInfo(bool Hit, float Distance, ::Vector3 Position, ::Vector3 Normal) (defined in raylib::RayHitInfo)raylib::RayHitInfoinline
RayHitInfo(const ::Ray &ray, const ::Mesh &mesh, const ::Matrix &transform)raylib::RayHitInfoinline
RayHitInfo(const ::Ray &ray, const ::Model &model)raylib::RayHitInfoinline
RayHitInfo(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)raylib::RayHitInfoinline
RayHitInfo(const ::Ray &ray, float groundHeight)raylib::RayHitInfoinline
SetDistance(float value)raylib::RayHitInfoinline
SetHit(bool value)raylib::RayHitInfoinline
SetNormal(::Vector3 value)raylib::RayHitInfoinline
diff --git a/docs/classraylib_1_1_ray_hit_info.html b/docs/classraylib_1_1_ray_hit_info.html index 4656de9..52bed88 100644 --- a/docs/classraylib_1_1_ray_hit_info.html +++ b/docs/classraylib_1_1_ray_hit_info.html @@ -69,7 +69,6 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::RayHitInfo Class Reference
@@ -81,267 +80,61 @@ $(function() { - + - - + + - - + + + + + - - + + - + + + - - - - - + + + + + + + + + + + -

Public Member Functions

 RayHitInfo (bool Hit, float Distance, ::Vector3 Position, ::Vector3 Normal)
+ RayHitInfo (bool Hit, float Distance, ::Vector3 Position, ::Vector3 Normal)
 
 RayHitInfo (const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
 Get collision info between ray and triangle. More...
+ RayHitInfo (const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
 Get collision info between ray and triangle.
 
 RayHitInfo (const ::Ray &ray, const ::Model &model)
 Get collision info between ray and model. More...
+ RayHitInfo (const ::Ray &ray, const ::Mesh &mesh, const ::Matrix &transform)
 Get collision info between ray and mesh.
 
+ RayHitInfo (const ::Ray &ray, const ::Model &model)
 Get collision info between ray and model.
 
 RayHitInfo (const ::Ray &ray, float groundHeight)
 Get collision info between ray and ground plane (Y-normal plane) More...
+ RayHitInfo (const ::Ray &ray, float groundHeight)
 Get collision info between ray and ground plane (Y-normal plane)
 
 RayHitInfo (const ::RayHitInfo &ray)
+ RayHitInfo (const ::RayHitInfo &ray)
 
float GetDistance () const
 Retrieves the distance value for the object. More...
 
bool GetHit () const
 Retrieves the hit value for the object. More...
 
inline ::Vector3 GetNormal () const
 
inline ::Vector3 GetPosition () const
 
RayHitInfo & operator= (const ::RayHitInfo &ray)
::Vector3 GetNormal () const
 Retrieves the normal value for the object. More...
 
::Vector3 GetPosition () const
 Retrieves the position value for the object. More...
 
+RayHitInfo & operator= (const ::RayHitInfo &ray)
 
void SetDistance (float value)
 Sets the distance value for the object. More...
 
void SetHit (bool value)
 Sets the hit value for the object. More...
 
void SetNormal (::Vector3 value)
 Sets the normal value for the object. More...
 
void SetPosition (::Vector3 value)
 Sets the position value for the object. More...
 
- - -

-Protected Member Functions

void set (const ::RayHitInfo &ray)
 

Detailed Description

Raycast hit information.

-

Definition at line 35 of file RayHitInfo.hpp.

-

Constructor & Destructor Documentation

- -

◆ RayHitInfo() [1/5]

- -
-
- - - - - -
- - - - - - - - -
raylib::RayHitInfo::RayHitInfo (const ::RayHitInfo & ray)
-
-inline
-
- -

Definition at line 37 of file RayHitInfo.hpp.

- -

References set().

- -
-
- -

◆ RayHitInfo() [2/5]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::RayHitInfo::RayHitInfo (bool Hit,
float Distance,
::Vector3 Position,
::Vector3 Normal 
)
-
-inline
-
- -

Definition at line 41 of file RayHitInfo.hpp.

- -
-
- -

◆ RayHitInfo() [3/5]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::RayHitInfo::RayHitInfo (const ::Ray & ray,
const ::Model & model 
)
-
-inline
-
- -

Get collision info between ray and model.

- -

Definition at line 51 of file RayHitInfo.hpp.

- -

References set().

- -
-
- -

◆ RayHitInfo() [4/5]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::RayHitInfo::RayHitInfo (const ::Ray & ray,
::Vector3 p1,
::Vector3 p2,
::Vector3 p3 
)
-
-inline
-
- -

Get collision info between ray and triangle.

- -

Definition at line 58 of file RayHitInfo.hpp.

- -

References set().

- -
-
- -

◆ RayHitInfo() [5/5]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::RayHitInfo::RayHitInfo (const ::Ray & ray,
float groundHeight 
)
-
-inline
-
- -

Get collision info between ray and ground plane (Y-normal plane)

- -

Definition at line 65 of file RayHitInfo.hpp.

- -

References set().

- -
-
-

Member Function Documentation

+

Definition at line 11 of file RayHitInfo.hpp.

+

Member Function Documentation

◆ GetDistance()

@@ -365,7 +158,10 @@ Protected Member Functions
-

Definition at line 75 of file RayHitInfo.hpp.

+

Retrieves the distance value for the object.

+
Returns
The distance value of the object.
+ +

Definition at line 58 of file RayHitInfo.hpp.

@@ -392,12 +188,15 @@ Protected Member Functions
-

Definition at line 74 of file RayHitInfo.hpp.

+

Retrieves the hit value for the object.

+
Returns
The hit value of the object.
+ +

Definition at line 57 of file RayHitInfo.hpp.

- -

◆ GetNormal()

+ +

◆ GetNormal()

@@ -406,7 +205,7 @@ Protected Member Functions - + @@ -419,12 +218,15 @@ Protected Member Functions
inline ::Vector3 raylib::RayHitInfo::GetNormal ::Vector3 raylib::RayHitInfo::GetNormal ( ) const
-

Definition at line 77 of file RayHitInfo.hpp.

+

Retrieves the normal value for the object.

+
Returns
The normal value of the object.
+ +

Definition at line 60 of file RayHitInfo.hpp.

- -

◆ GetPosition()

+ +

◆ GetPosition()

@@ -433,7 +235,7 @@ Protected Member Functions - + @@ -446,67 +248,10 @@ Protected Member Functions
inline ::Vector3 raylib::RayHitInfo::GetPosition ::Vector3 raylib::RayHitInfo::GetPosition ( ) const
-

Definition at line 76 of file RayHitInfo.hpp.

+

Retrieves the position value for the object.

+
Returns
The position value of the object.
-
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
RayHitInfo& raylib::RayHitInfo::operator= (const ::RayHitInfo & ray)
-
-inline
-
- -

Definition at line 69 of file RayHitInfo.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::RayHitInfo::set (const ::RayHitInfo & ray)
-
-inlineprotected
-
- -

Definition at line 80 of file RayHitInfo.hpp.

- -

Referenced by operator=(), and RayHitInfo().

+

Definition at line 59 of file RayHitInfo.hpp.

@@ -534,7 +279,15 @@ Protected Member Functions
-

Definition at line 75 of file RayHitInfo.hpp.

+

Sets the distance value for the object.

+
Parameters
+ + +
valueThe value of which to set distance to.
+
+
+ +

Definition at line 58 of file RayHitInfo.hpp.

@@ -562,7 +315,15 @@ Protected Member Functions
-

Definition at line 74 of file RayHitInfo.hpp.

+

Sets the hit value for the object.

+
Parameters
+ + +
valueThe value of which to set hit to.
+
+
+ +

Definition at line 57 of file RayHitInfo.hpp.

@@ -590,7 +351,15 @@ Protected Member Functions
-

Definition at line 77 of file RayHitInfo.hpp.

+

Sets the normal value for the object.

+
Parameters
+ + +
valueThe value of which to set normal to.
+
+
+ +

Definition at line 60 of file RayHitInfo.hpp.

@@ -618,14 +387,22 @@ Protected Member Functions
-

Definition at line 76 of file RayHitInfo.hpp.

+

Sets the position value for the object.

+
Parameters
+ + +
valueThe value of which to set position to.
+
+
+ +

Definition at line 59 of file RayHitInfo.hpp.

diff --git a/docs/classraylib_1_1_rectangle-members.html b/docs/classraylib_1_1_rectangle-members.html index 32db33d..fbba79d 100644 --- a/docs/classraylib_1_1_rectangle-members.html +++ b/docs/classraylib_1_1_rectangle-members.html @@ -78,45 +78,44 @@ $(function() { CheckCollision(::Vector2 point) constraylib::Rectangleinline CheckCollision(::Vector2 center, float radius)raylib::Rectangleinline Draw(::Color color)raylib::Rectangleinline - Draw(::Vector2 origin, float rotation, ::Color color)raylib::Rectangleinline - DrawGradient(::Color col1, ::Color col2, ::Color col3, ::Color col4)raylib::Rectangleinline - DrawGradientH(::Color color1, ::Color color2)raylib::Rectangleinline - DrawGradientV(::Color color1, ::Color color2)raylib::Rectangleinline - DrawLines(::Color color)raylib::Rectangleinline - DrawLines(::Color color, int lineThick)raylib::Rectangleinline - DrawRounded(float roundness, int segments, ::Color color)raylib::Rectangleinline - DrawRoundedLines(float roundness, int segments, int lineThick, ::Color color)raylib::Rectangleinline + Draw(::Vector2 origin, float rotation, ::Color color) (defined in raylib::Rectangle)raylib::Rectangleinline + DrawGradient(::Color col1, ::Color col2, ::Color col3, ::Color col4) (defined in raylib::Rectangle)raylib::Rectangleinline + DrawGradientH(::Color color1, ::Color color2) (defined in raylib::Rectangle)raylib::Rectangleinline + DrawGradientV(::Color color1, ::Color color2) (defined in raylib::Rectangle)raylib::Rectangleinline + DrawLines(::Color color) (defined in raylib::Rectangle)raylib::Rectangleinline + DrawLines(::Color color, int lineThick) (defined in raylib::Rectangle)raylib::Rectangleinline + DrawRounded(float roundness, int segments, ::Color color) (defined in raylib::Rectangle)raylib::Rectangleinline + DrawRoundedLines(float roundness, int segments, int lineThick, ::Color color) (defined in raylib::Rectangle)raylib::Rectangleinline GetCollision(::Rectangle rec2) constraylib::Rectangleinline GetHeight() constraylib::Rectangleinline - GetPosition()raylib::Rectangleinline - GetSize()raylib::Rectangleinline + GetPosition() (defined in raylib::Rectangle)raylib::Rectangleinline + GetSize() (defined in raylib::Rectangle)raylib::Rectangleinline GetWidth() constraylib::Rectangleinline GetX() constraylib::Rectangleinline GetY() constraylib::Rectangleinline - operator::Vector4() constraylib::Rectangleinline - operator=(const ::Rectangle &rect)raylib::Rectangleinline - Rectangle(const ::Rectangle &vec)raylib::Rectangleinline - Rectangle(float x, float y, float width, float height)raylib::Rectangleinline - Rectangle(float x, float y, float width)raylib::Rectangleinline - Rectangle(float x, float y)raylib::Rectangleinline - Rectangle(float x)raylib::Rectangleinline - Rectangle()raylib::Rectangleinline - Rectangle(::Vector2 position, ::Vector2 size)raylib::Rectangleinline - Rectangle(::Vector2 size)raylib::Rectangleinline - set(const ::Rectangle &rect)raylib::Rectangleinlineprotected - SetHeight(float value)raylib::Rectangleinline - SetPosition(float newX, float newY)raylib::Rectangleinline - SetPosition(const ::Vector2 &position)raylib::Rectangleinline - SetSize(float newWidth, float newHeight)raylib::Rectangleinline - SetSize(const ::Vector2 &size)raylib::Rectangleinline - SetWidth(float value)raylib::Rectangleinline - SetX(float value)raylib::Rectangleinline - SetY(float value)raylib::Rectangleinline - ToVector4()raylib::Rectangleinline + operator::Vector4() const (defined in raylib::Rectangle)raylib::Rectangleinline + operator=(const ::Rectangle &rect) (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle(const ::Rectangle &vec) (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle(float x, float y, float width, float height) (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle(float x, float y, float width) (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle(float x, float y) (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle(float x) (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle() (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle(::Vector2 position, ::Vector2 size) (defined in raylib::Rectangle)raylib::Rectangleinline + Rectangle(::Vector2 size) (defined in raylib::Rectangle)raylib::Rectangleinline + SetHeight(float value)raylib::Rectangleinline + SetPosition(float newX, float newY) (defined in raylib::Rectangle)raylib::Rectangleinline + SetPosition(const ::Vector2 &position) (defined in raylib::Rectangle)raylib::Rectangleinline + SetSize(float newWidth, float newHeight) (defined in raylib::Rectangle)raylib::Rectangleinline + SetSize(const ::Vector2 &size) (defined in raylib::Rectangle)raylib::Rectangleinline + SetWidth(float value)raylib::Rectangleinline + SetX(float value)raylib::Rectangleinline + SetY(float value)raylib::Rectangleinline + ToVector4() (defined in raylib::Rectangle)raylib::Rectangleinline diff --git a/docs/classraylib_1_1_rectangle.html b/docs/classraylib_1_1_rectangle.html index 7707278..9ff71a3 100644 --- a/docs/classraylib_1_1_rectangle.html +++ b/docs/classraylib_1_1_rectangle.html @@ -69,880 +69,139 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Rectangle Class Reference
+ +

Rectangle type. + More...

- - - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - - + + + - + - + + + + - + - + + - + - + - + - + + + + - + -

Public Member Functions

 Rectangle ()
 
 Rectangle (::Vector2 position, ::Vector2 size)
+ Rectangle (::Vector2 position, ::Vector2 size)
 
 Rectangle (::Vector2 size)
+ Rectangle (::Vector2 size)
 
 Rectangle (const ::Rectangle &vec)
+ Rectangle (const ::Rectangle &vec)
 
 Rectangle (float x)
+ Rectangle (float x)
 
 Rectangle (float x, float y)
+ Rectangle (float x, float y)
 
 Rectangle (float x, float y, float width)
+ Rectangle (float x, float y, float width)
 
 Rectangle (float x, float y, float width, float height)
+ Rectangle (float x, float y, float width, float height)
 
bool CheckCollision (::Rectangle rec2) const
 Check collision between two rectangles. More...
+bool CheckCollision (::Rectangle rec2) const
 Check collision between two rectangles.
 
bool CheckCollision (::Vector2 center, float radius)
 Check collision between circle and rectangle. More...
+bool CheckCollision (::Vector2 center, float radius)
 Check collision between circle and rectangle.
 
bool CheckCollision (::Vector2 point) const
 Check if point is inside rectangle. More...
+bool CheckCollision (::Vector2 point) const
 Check if point is inside rectangle.
 
Rectangle & Draw (::Color color)
 Draw a color-filled rectangle. More...
+Rectangle & Draw (::Color color)
 Draw a color-filled rectangle.
 
Rectangle & Draw (::Vector2 origin, float rotation, ::Color color)
+Rectangle & Draw (::Vector2 origin, float rotation, ::Color color)
 
Rectangle & DrawGradient (::Color col1, ::Color col2, ::Color col3, ::Color col4)
+Rectangle & DrawGradient (::Color col1, ::Color col2, ::Color col3, ::Color col4)
 
Rectangle & DrawGradientH (::Color color1, ::Color color2)
+Rectangle & DrawGradientH (::Color color1, ::Color color2)
 
Rectangle & DrawGradientV (::Color color1, ::Color color2)
+Rectangle & DrawGradientV (::Color color1, ::Color color2)
 
Rectangle & DrawLines (::Color color)
+Rectangle & DrawLines (::Color color)
 
Rectangle & DrawLines (::Color color, int lineThick)
+Rectangle & DrawLines (::Color color, int lineThick)
 
Rectangle & DrawRounded (float roundness, int segments, ::Color color)
+Rectangle & DrawRounded (float roundness, int segments, ::Color color)
 
Rectangle & DrawRoundedLines (float roundness, int segments, int lineThick, ::Color color)
+Rectangle & DrawRoundedLines (float roundness, int segments, int lineThick, ::Color color)
 
inline ::Rectangle GetCollision (::Rectangle rec2) const
 Get collision rectangle for two rectangles collision. More...
+inline ::Rectangle GetCollision (::Rectangle rec2) const
 Get collision rectangle for two rectangles collision.
 
float GetHeight () const
 Retrieves the height value for the object. More...
 
inline ::Vector2 GetPosition ()
+inline ::Vector2 GetPosition ()
 
inline ::Vector2 GetSize ()
+inline ::Vector2 GetSize ()
 
float GetWidth () const
 Retrieves the width value for the object. More...
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
 operator::Vector4 () const
+ operator::Vector4 () const
 
Rectangle & operator= (const ::Rectangle &rect)
+Rectangle & operator= (const ::Rectangle &rect)
 
void SetHeight (float value)
 Sets the height value for the object. More...
 
Rectangle & SetPosition (const ::Vector2 &position)
+Rectangle & SetPosition (const ::Vector2 &position)
 
Rectangle & SetPosition (float newX, float newY)
+Rectangle & SetPosition (float newX, float newY)
 
Rectangle & SetSize (const ::Vector2 &size)
+Rectangle & SetSize (const ::Vector2 &size)
 
Rectangle & SetSize (float newWidth, float newHeight)
+Rectangle & SetSize (float newWidth, float newHeight)
 
void SetWidth (float value)
 Sets the width value for the object. More...
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
inline ::Vector4 ToVector4 ()
+inline ::Vector4 ToVector4 ()
 
- - -

-Protected Member Functions

void set (const ::Rectangle &rect)
 

Detailed Description

-
-

Definition at line 33 of file Rectangle.hpp.

-

Constructor & Destructor Documentation

- -

◆ Rectangle() [1/8]

+

Rectangle type.

-
-
- - - - - -
- - - - - - - - -
raylib::Rectangle::Rectangle (const ::Rectangle & vec)
-
-inline
-
- -

Definition at line 35 of file Rectangle.hpp.

- -

References set().

- -
-
- -

◆ Rectangle() [2/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Rectangle::Rectangle (float x,
float y,
float width,
float height 
)
-
-inline
-
- -

Definition at line 39 of file Rectangle.hpp.

- -
-
- -

◆ Rectangle() [3/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Rectangle::Rectangle (float x,
float y,
float width 
)
-
-inline
-
- -

Definition at line 40 of file Rectangle.hpp.

- -
-
- -

◆ Rectangle() [4/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Rectangle::Rectangle (float x,
float y 
)
-
-inline
-
- -

Definition at line 41 of file Rectangle.hpp.

- -
-
- -

◆ Rectangle() [5/8]

- -
-
- - - - - -
- - - - - - - - -
raylib::Rectangle::Rectangle (float x)
-
-inline
-
- -

Definition at line 42 of file Rectangle.hpp.

- -
-
- -

◆ Rectangle() [6/8]

- -
-
- - - - - -
- - - - - - - -
raylib::Rectangle::Rectangle ()
-
-inline
-
- -

Definition at line 43 of file Rectangle.hpp.

- -
-
- -

◆ Rectangle() [7/8]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Rectangle::Rectangle (::Vector2 position,
::Vector2 size 
)
-
-inline
-
- -

Definition at line 45 of file Rectangle.hpp.

- -
-
- -

◆ Rectangle() [8/8]

- -
-
- - - - - -
- - - - - - - - -
raylib::Rectangle::Rectangle (::Vector2 size)
-
-inline
-
- -

Definition at line 47 of file Rectangle.hpp.

- -
-
-

Member Function Documentation

- -

◆ CheckCollision() [1/3]

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Rectangle::CheckCollision (::Rectangle rec2) const
-
-inline
-
- -

Check collision between two rectangles.

- -

Definition at line 123 of file Rectangle.hpp.

- -
-
- -

◆ CheckCollision() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool raylib::Rectangle::CheckCollision (::Vector2 center,
float radius 
)
-
-inline
-
- -

Check collision between circle and rectangle.

- -

Definition at line 144 of file Rectangle.hpp.

- -
-
- -

◆ CheckCollision() [3/3]

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Rectangle::CheckCollision (::Vector2 point) const
-
-inline
-
- -

Check if point is inside rectangle.

- -

Definition at line 137 of file Rectangle.hpp.

- -
-
- -

◆ Draw() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Rectangle& raylib::Rectangle::Draw (::Color color)
-
-inline
-
- -

Draw a color-filled rectangle.

- -

Definition at line 70 of file Rectangle.hpp.

- -
-
- -

◆ Draw() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::Draw (::Vector2 origin,
float rotation,
::Color color 
)
-
-inline
-
- -

Definition at line 76 of file Rectangle.hpp.

- -
-
- -

◆ DrawGradient()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::DrawGradient (::Color col1,
::Color col2,
::Color col3,
::Color col4 
)
-
-inline
-
- -

Definition at line 93 of file Rectangle.hpp.

- -
-
- -

◆ DrawGradientH()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::DrawGradientH (::Color color1,
::Color color2 
)
-
-inline
-
- -

Definition at line 87 of file Rectangle.hpp.

- -
-
- -

◆ DrawGradientV()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::DrawGradientV (::Color color1,
::Color color2 
)
-
-inline
-
- -

Definition at line 81 of file Rectangle.hpp.

- -
-
- -

◆ DrawLines() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Rectangle& raylib::Rectangle::DrawLines (::Color color)
-
-inline
-
- -

Definition at line 98 of file Rectangle.hpp.

- -
-
- -

◆ DrawLines() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::DrawLines (::Color color,
int lineThick 
)
-
-inline
-
- -

Definition at line 104 of file Rectangle.hpp.

- -
-
- -

◆ DrawRounded()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::DrawRounded (float roundness,
int segments,
::Color color 
)
-
-inline
-
- -

Definition at line 109 of file Rectangle.hpp.

- -
-
- -

◆ DrawRoundedLines()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::DrawRoundedLines (float roundness,
int segments,
int lineThick,
::Color color 
)
-
-inline
-
- -

Definition at line 114 of file Rectangle.hpp.

- -
-
- -

◆ GetCollision()

- -
-
- - - - - -
- - - - - - - - -
inline ::Rectangle raylib::Rectangle::GetCollision (::Rectangle rec2) const
-
-inline
-
- -

Get collision rectangle for two rectangles collision.

- -

Definition at line 130 of file Rectangle.hpp.

- -
-
+

Definition at line 12 of file Rectangle.hpp.

+

Member Function Documentation

◆ GetHeight()

@@ -966,61 +225,10 @@ Protected Member Functions
-

Definition at line 52 of file Rectangle.hpp.

+

Retrieves the height value for the object.

+
Returns
The height value of the object.
-
- - -

◆ GetPosition()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Rectangle::GetPosition ()
-
-inline
-
- -

Definition at line 162 of file Rectangle.hpp.

- -
-
- -

◆ GetSize()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Rectangle::GetSize ()
-
-inline
-
- -

Definition at line 148 of file Rectangle.hpp.

+

Definition at line 31 of file Rectangle.hpp.

@@ -1047,7 +255,10 @@ Protected Member Functions
-

Definition at line 51 of file Rectangle.hpp.

+

Retrieves the width value for the object.

+
Returns
The width value of the object.
+ +

Definition at line 30 of file Rectangle.hpp.

@@ -1074,7 +285,10 @@ Protected Member Functions
-

Definition at line 49 of file Rectangle.hpp.

+

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 28 of file Rectangle.hpp.

@@ -1101,94 +315,10 @@ Protected Member Functions
-

Definition at line 50 of file Rectangle.hpp.

+

Retrieves the y value for the object.

+
Returns
The y value of the object.
-
- - -

◆ operator::Vector4()

- -
-
- - - - - -
- - - - - - - -
raylib::Rectangle::operator::Vector4 () const
-
-inline
-
- -

Definition at line 63 of file Rectangle.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Rectangle& raylib::Rectangle::operator= (const ::Rectangle & rect)
-
-inline
-
- -

Definition at line 54 of file Rectangle.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Rectangle::set (const ::Rectangle & rect)
-
-inlineprotected
-
- -

Definition at line 177 of file Rectangle.hpp.

- -

Referenced by operator=(), and Rectangle().

+

Definition at line 29 of file Rectangle.hpp.

@@ -1216,147 +346,15 @@ Protected Member Functions
-

Definition at line 52 of file Rectangle.hpp.

+

Sets the height value for the object.

+
Parameters
+ + +
valueThe value of which to set height to.
+
+
-
- - -

◆ SetPosition() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Rectangle& raylib::Rectangle::SetPosition (const ::Vector2 & position)
-
-inline
-
- -

Definition at line 172 of file Rectangle.hpp.

- -

References SetPosition().

- -
-
- -

◆ SetPosition() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::SetPosition (float newX,
float newY 
)
-
-inline
-
- -

Definition at line 166 of file Rectangle.hpp.

- -

Referenced by SetPosition().

- -
-
- -

◆ SetSize() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Rectangle& raylib::Rectangle::SetSize (const ::Vector2 & size)
-
-inline
-
- -

Definition at line 158 of file Rectangle.hpp.

- -

References SetSize().

- -
-
- -

◆ SetSize() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Rectangle& raylib::Rectangle::SetSize (float newWidth,
float newHeight 
)
-
-inline
-
- -

Definition at line 152 of file Rectangle.hpp.

- -

Referenced by SetSize().

+

Definition at line 31 of file Rectangle.hpp.

@@ -1384,7 +382,15 @@ Protected Member Functions
-

Definition at line 51 of file Rectangle.hpp.

+

Sets the width value for the object.

+
Parameters
+ + +
valueThe value of which to set width to.
+
+
+ +

Definition at line 30 of file Rectangle.hpp.

@@ -1412,7 +418,15 @@ Protected Member Functions
-

Definition at line 49 of file Rectangle.hpp.

+

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 28 of file Rectangle.hpp.

@@ -1440,41 +454,22 @@ Protected Member Functions
-

Definition at line 50 of file Rectangle.hpp.

+

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
-
- - -

◆ ToVector4()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector4 raylib::Rectangle::ToVector4 ()
-
-inline
-
- -

Definition at line 59 of file Rectangle.hpp.

+

Definition at line 29 of file Rectangle.hpp.

diff --git a/docs/classraylib_1_1_render_texture-members.html b/docs/classraylib_1_1_render_texture-members.html index 009c54d..10acb48 100644 --- a/docs/classraylib_1_1_render_texture-members.html +++ b/docs/classraylib_1_1_render_texture-members.html @@ -76,23 +76,22 @@ $(function() { - + - - - - - - - - - - - + + + + + + + + + +
BeginMode()raylib::RenderTextureinline
EndMode()raylib::RenderTextureinline
GetDepth() constraylib::RenderTextureinline
GetDepth() constraylib::RenderTextureinline
GetId() constraylib::RenderTextureinline
GetTexture() constraylib::RenderTextureinline
operator=(const ::RenderTexture &texture)raylib::RenderTextureinline
RenderTexture(const ::RenderTexture &renderTexture)raylib::RenderTextureinline
RenderTexture(unsigned int Id)raylib::RenderTextureinline
RenderTexture(int width, int height)raylib::RenderTextureinline
set(const ::RenderTexture &renderTexture)raylib::RenderTextureinlineprotected
SetDepth(::Texture2D value)raylib::RenderTextureinline
SetId(unsigned int value)raylib::RenderTextureinline
SetTexture(::Texture2D value)raylib::RenderTextureinline
Unload()raylib::RenderTextureinline
~RenderTexture()raylib::RenderTextureinline
GetTexture() constraylib::RenderTextureinline
operator=(const ::RenderTexture &texture) (defined in raylib::RenderTexture)raylib::RenderTextureinline
RenderTexture(const ::RenderTexture &renderTexture) (defined in raylib::RenderTexture)raylib::RenderTextureinline
RenderTexture(unsigned int Id) (defined in raylib::RenderTexture)raylib::RenderTextureinline
RenderTexture(int width, int height) (defined in raylib::RenderTexture)raylib::RenderTextureinline
SetDepth(::Texture2D value)raylib::RenderTextureinline
SetId(unsigned int value)raylib::RenderTextureinline
SetTexture(::Texture2D value)raylib::RenderTextureinline
Unload() (defined in raylib::RenderTexture)raylib::RenderTextureinline
~RenderTexture() (defined in raylib::RenderTexture)raylib::RenderTextureinline
diff --git a/docs/classraylib_1_1_render_texture.html b/docs/classraylib_1_1_render_texture.html index c843470..355783b 100644 --- a/docs/classraylib_1_1_render_texture.html +++ b/docs/classraylib_1_1_render_texture.html @@ -69,57 +69,66 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::RenderTexture Class Reference
+ +

RenderTexture type, for texture rendering. + More...

- + - + - + - - - - + + - - + + - - + + + + - - - + + + + - + + + - + + - + -

Public Member Functions

 RenderTexture (const ::RenderTexture &renderTexture)
+ RenderTexture (const ::RenderTexture &renderTexture)
 
 RenderTexture (int width, int height)
+ RenderTexture (int width, int height)
 
 RenderTexture (unsigned int Id)
+ RenderTexture (unsigned int Id)
 
 ~RenderTexture ()
 
RenderTexture & BeginMode ()
 Initializes render texture for drawing. More...
+RenderTexture & BeginMode ()
 Initializes render texture for drawing.
 
RenderTexture & EndMode ()
 Ends drawing to render texture. More...
+RenderTexture & EndMode ()
 Ends drawing to render texture.
 
inline ::Texture2D GetDepth () const
 
::Texture2D GetDepth () const
 Retrieves the depth value for the object. More...
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
inline ::Texture2D GetTexture () const
 
RenderTexture & operator= (const ::RenderTexture &texture)
::Texture2D GetTexture () const
 Retrieves the texture value for the object. More...
 
+RenderTexture & operator= (const ::RenderTexture &texture)
 
void SetDepth (::Texture2D value)
void SetDepth (::Texture2D value)
 Sets the depth value for the object. More...
 
void SetId (unsigned int value)
 Sets the id value for the object. More...
 
void SetTexture (::Texture2D value)
void SetTexture (::Texture2D value)
 Sets the texture value for the object. More...
 
void Unload ()
+void Unload ()
 
- - -

-Protected Member Functions

void set (const ::RenderTexture &renderTexture)
 

Detailed Description

-
-

Definition at line 32 of file RenderTexture.hpp.

-

Constructor & Destructor Documentation

- -

◆ RenderTexture() [1/3]

+

RenderTexture type, for texture rendering.

+ +

Definition at line 11 of file RenderTexture.hpp.

+

Member Function Documentation

+ +

◆ GetDepth()

@@ -128,193 +137,7 @@ Protected Member Functions - - - - - - -
raylib::RenderTexture::RenderTexture (const ::RenderTexture & renderTexture)
- - -inline - - -
- -

Definition at line 34 of file RenderTexture.hpp.

- -

References set().

- -
-
- -

◆ RenderTexture() [2/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::RenderTexture::RenderTexture (unsigned int Id)
-
-inline
-
- -

Definition at line 38 of file RenderTexture.hpp.

- -
-
- -

◆ RenderTexture() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::RenderTexture::RenderTexture (int width,
int height 
)
-
-inline
-
- -

Definition at line 42 of file RenderTexture.hpp.

- -

References set().

- -
-
- -

◆ ~RenderTexture()

- -
-
- - - - - -
- - - - - - - -
raylib::RenderTexture::~RenderTexture ()
-
-inline
-
- -

Definition at line 55 of file RenderTexture.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ BeginMode()

- -
-
- - - - - -
- - - - - - - -
RenderTexture& raylib::RenderTexture::BeginMode ()
-
-inline
-
- -

Initializes render texture for drawing.

- -

Definition at line 66 of file RenderTexture.hpp.

- -
-
- -

◆ EndMode()

- -
-
- - - - - -
- - - - - - - -
RenderTexture& raylib::RenderTexture::EndMode ()
-
-inline
-
- -

Ends drawing to render texture.

- -

Definition at line 74 of file RenderTexture.hpp.

- -
-
- -

◆ GetDepth()

- -
-
- - -
- - - + @@ -327,7 +150,10 @@ Protected Member Functions
inline ::Texture2D raylib::RenderTexture::GetDepth ::Texture2D raylib::RenderTexture::GetDepth ( ) const
-

Definition at line 48 of file RenderTexture.hpp.

+

Retrieves the depth value for the object.

+
Returns
The depth value of the object.
+ +

Definition at line 27 of file RenderTexture.hpp.

@@ -354,12 +180,15 @@ Protected Member Functions
-

Definition at line 46 of file RenderTexture.hpp.

+

Retrieves the id value for the object.

+
Returns
The id value of the object.
+ +

Definition at line 25 of file RenderTexture.hpp.

- -

◆ GetTexture()

+ +

◆ GetTexture()

@@ -368,7 +197,7 @@ Protected Member Functions - + @@ -381,67 +210,10 @@ Protected Member Functions
inline ::Texture2D raylib::RenderTexture::GetTexture ::Texture2D raylib::RenderTexture::GetTexture ( ) const
-

Definition at line 47 of file RenderTexture.hpp.

+

Retrieves the texture value for the object.

+
Returns
The texture value of the object.
-
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
RenderTexture& raylib::RenderTexture::operator= (const ::RenderTexture & texture)
-
-inline
-
- -

Definition at line 50 of file RenderTexture.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::RenderTexture::set (const ::RenderTexture & renderTexture)
-
-inlineprotected
-
- -

Definition at line 80 of file RenderTexture.hpp.

- -

Referenced by operator=(), and RenderTexture().

+

Definition at line 26 of file RenderTexture.hpp.

@@ -457,7 +229,7 @@ Protected Member Functions void raylib::RenderTexture::SetDepth ( - ::Texture2D  + ::Texture2D  value) @@ -469,7 +241,15 @@ Protected Member Functions
-

Definition at line 48 of file RenderTexture.hpp.

+

Sets the depth value for the object.

+
Parameters
+ + +
valueThe value of which to set depth to.
+
+
+ +

Definition at line 27 of file RenderTexture.hpp.

@@ -497,7 +277,15 @@ Protected Member Functions
-

Definition at line 46 of file RenderTexture.hpp.

+

Sets the id value for the object.

+
Parameters
+ + +
valueThe value of which to set id to.
+
+
+ +

Definition at line 25 of file RenderTexture.hpp.

@@ -513,7 +301,7 @@ Protected Member Functions void raylib::RenderTexture::SetTexture ( - ::Texture2D  + ::Texture2D  value) @@ -525,43 +313,22 @@ Protected Member Functions
-

Definition at line 47 of file RenderTexture.hpp.

+

Sets the texture value for the object.

+
Parameters
+ + +
valueThe value of which to set texture to.
+
+
-
- - -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::RenderTexture::Unload ()
-
-inline
-
- -

Definition at line 59 of file RenderTexture.hpp.

- -

Referenced by ~RenderTexture().

+

Definition at line 26 of file RenderTexture.hpp.

diff --git a/docs/classraylib_1_1_shader-members.html b/docs/classraylib_1_1_shader-members.html index aa7a18e..7df96bf 100644 --- a/docs/classraylib_1_1_shader-members.html +++ b/docs/classraylib_1_1_shader-members.html @@ -76,34 +76,33 @@ $(function() { - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + +
BeginMode()raylib::Shaderinline
EndMode()raylib::Shaderinline
GenTextureBRDF(int size) constraylib::Shaderinline
GenTextureCubemap(const ::Texture2D &panorama, int size, int format) constraylib::Shaderinline
GenTextureIrradiance(const ::Texture2D &panorama, int size) constraylib::Shaderinline
GenTexturePrefilter(const ::Texture2D &panorama, int size) constraylib::Shaderinline
GenTextureBRDF(int size) const (defined in raylib::Shader)raylib::Shaderinline
GenTextureCubemap(const ::Texture2D &panorama, int size, int format) const (defined in raylib::Shader)raylib::Shaderinline
GenTextureIrradiance(const ::Texture2D &panorama, int size) const (defined in raylib::Shader)raylib::Shaderinline
GenTexturePrefilter(const ::Texture2D &panorama, int size) const (defined in raylib::Shader)raylib::Shaderinline
GetId() constraylib::Shaderinline
GetLocation(const std::string &uniformName) constraylib::Shaderinline
GetLocationAttrib(const std::string &attribName) constraylib::Shaderinline
GetLocs() constraylib::Shaderinline
Load(const std::string &vsFileName, const std::string &fsFileName)raylib::Shaderinlinestatic
LoadCode(const std::string &vsCode, const std::string &fsCode)raylib::Shaderinlinestatic
operator=(const ::Shader &shader)raylib::Shaderinline
set(const ::Shader &shader)raylib::Shaderinlineprotected
SetId(unsigned int value)raylib::Shaderinline
SetLocs(int *value)raylib::Shaderinline
SetValue(int uniformLoc, const std::string &value, int uniformType)raylib::Shaderinline
SetValue(int uniformLoc, const std::string &value, int uniformType, int count)raylib::Shaderinline
SetValue(int uniformLoc, const ::Matrix &mat)raylib::Shaderinline
SetValue(int uniformLoc, const ::Texture2D &texture)raylib::Shaderinline
Shader(const ::Shader &shader)raylib::Shaderinline
Shader(unsigned int Id, int *Locs)raylib::Shaderinline
Shader()raylib::Shaderinline
Shader(const std::string &vsFileName, const std::string &fsFileName)raylib::Shaderinline
Unload()raylib::Shaderinline
~Shader()raylib::Shaderinline
operator=(const ::Shader &shader) (defined in raylib::Shader)raylib::Shaderinline
SetId(unsigned int value)raylib::Shaderinline
SetLocs(int *value)raylib::Shaderinline
SetValue(int uniformLoc, const std::string &value, int uniformType)raylib::Shaderinline
SetValue(int uniformLoc, const std::string &value, int uniformType, int count)raylib::Shaderinline
SetValue(int uniformLoc, const ::Matrix &mat)raylib::Shaderinline
SetValue(int uniformLoc, const ::Texture2D &texture)raylib::Shaderinline
Shader(const ::Shader &shader) (defined in raylib::Shader)raylib::Shaderinline
Shader(unsigned int Id, int *Locs) (defined in raylib::Shader)raylib::Shaderinline
Shader() (defined in raylib::Shader)raylib::Shaderinline
Shader(const std::string &vsFileName, const std::string &fsFileName) (defined in raylib::Shader)raylib::Shaderinline
Unload() (defined in raylib::Shader)raylib::Shaderinline
~Shader() (defined in raylib::Shader)raylib::Shaderinline
diff --git a/docs/classraylib_1_1_shader.html b/docs/classraylib_1_1_shader.html index 4065b61..87c8696 100644 --- a/docs/classraylib_1_1_shader.html +++ b/docs/classraylib_1_1_shader.html @@ -70,40 +70,48 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Shader Class Reference
+ +

Shader type (generic) + More...

- - - + - + - + - - - - + + - - + + - + - + - + - + + @@ -112,17 +120,21 @@ Public Member Functions + - + + + - + @@ -131,400 +143,26 @@ Public Member Functions - +

Public Member Functions

 Shader ()
 
 Shader (const ::Shader &shader)
+ Shader (const ::Shader &shader)
 
 Shader (const std::string &vsFileName, const std::string &fsFileName)
+ Shader (const std::string &vsFileName, const std::string &fsFileName)
 
 Shader (unsigned int Id, int *Locs)
+ Shader (unsigned int Id, int *Locs)
 
 ~Shader ()
 
Shader & BeginMode ()
 Begin custom shader drawing. More...
+Shader & BeginMode ()
 Begin custom shader drawing.
 
Shader & EndMode ()
 End custom shader drawing (use default shader). More...
+Shader & EndMode ()
 End custom shader drawing (use default shader).
 
::Texture2D GenTextureBRDF (int size) const
+::Texture2D GenTextureBRDF (int size) const
 
::TextureCubemap GenTextureCubemap (const ::Texture2D &panorama, int size, int format) const
+::TextureCubemap GenTextureCubemap (const ::Texture2D &panorama, int size, int format) const
 
::TextureCubemap GenTextureIrradiance (const ::Texture2D &panorama, int size) const
+::TextureCubemap GenTextureIrradiance (const ::Texture2D &panorama, int size) const
 
::TextureCubemap GenTexturePrefilter (const ::Texture2D &panorama, int size) const
+::TextureCubemap GenTexturePrefilter (const ::Texture2D &panorama, int size) const
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
int GetLocation (const std::string &uniformName) const
 Get shader uniform location. More...
 Get shader attribute location. More...
 
int * GetLocs () const
 Retrieves the locs value for the object. More...
 
Shader & operator= (const ::Shader &shader)
+Shader & operator= (const ::Shader &shader)
 
void SetId (unsigned int value)
 Sets the id value for the object. More...
 
void SetLocs (int *value)
 Sets the locs value for the object. More...
 
Shader & SetValue (int uniformLoc, const ::Matrix &mat)
 Set shader uniform value (matrix 4x4) More...
 
Shader & SetValue (int uniformLoc, const ::Texture2D &texture)
Shader & SetValue (int uniformLoc, const ::Texture2D &texture)
 Set shader uniform value for texture. More...
 
Shader & SetValue (int uniformLoc, const std::string &value, int uniformType)
Shader & SetValue (int uniformLoc, const std::string &value, int uniformType, int count)
 Set shader uniform value vector. More...
 
void Unload ()
+void Unload ()
 
- - + + - - + + -

Static Public Member Functions

::Shader Load (const std::string &vsFileName, const std::string &fsFileName)
 Load shader from files and bind default locations. More...
+::Shader Load (const std::string &vsFileName, const std::string &fsFileName)
 Load shader from files and bind default locations.
 
::Shader LoadCode (const std::string &vsCode, const std::string &fsCode)
 Load shader from code strings and bind default locations. More...
+::Shader LoadCode (const std::string &vsCode, const std::string &fsCode)
 Load shader from code strings and bind default locations.
 
- - -

-Protected Member Functions

void set (const ::Shader &shader)
 

Detailed Description

-
-

Definition at line 35 of file Shader.hpp.

-

Constructor & Destructor Documentation

- -

◆ Shader() [1/4]

+

Shader type (generic)

-
-
- - - - - -
- - - - - - - - -
raylib::Shader::Shader (const ::Shader & shader)
-
-inline
-
- -

Definition at line 37 of file Shader.hpp.

- -

References set().

- -
-
- -

◆ Shader() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Shader::Shader (unsigned int Id,
int * Locs 
)
-
-inline
-
- -

Definition at line 41 of file Shader.hpp.

- -
-
- -

◆ Shader() [3/4]

- -
-
- - - - - -
- - - - - - - -
raylib::Shader::Shader ()
-
-inline
-
- -

Definition at line 46 of file Shader.hpp.

- -

References set().

- -
-
- -

◆ Shader() [4/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Shader::Shader (const std::string & vsFileName,
const std::string & fsFileName 
)
-
-inline
-
- -

Definition at line 50 of file Shader.hpp.

- -

References set().

- -
-
- -

◆ ~Shader()

- -
-
- - - - - -
- - - - - - - -
raylib::Shader::~Shader ()
-
-inline
-
- -

Definition at line 76 of file Shader.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ BeginMode()

- -
-
- - - - - -
- - - - - - - -
Shader& raylib::Shader::BeginMode ()
-
-inline
-
- -

Begin custom shader drawing.

- -

Definition at line 87 of file Shader.hpp.

- -
-
- -

◆ EndMode()

- -
-
- - - - - -
- - - - - - - -
Shader& raylib::Shader::EndMode ()
-
-inline
-
- -

End custom shader drawing (use default shader).

- -

Definition at line 95 of file Shader.hpp.

- -
-
- -

◆ GenTextureBRDF()

- -
-
- - - - - -
- - - - - - - - -
::Texture2D raylib::Shader::GenTextureBRDF (int size) const
-
-inline
-
- -

Definition at line 166 of file Shader.hpp.

- -
-
- -

◆ GenTextureCubemap()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
::TextureCubemap raylib::Shader::GenTextureCubemap (const ::Texture2D & panorama,
int size,
int format 
) const
-
-inline
-
- -

Definition at line 154 of file Shader.hpp.

- -
-
- -

◆ GenTextureIrradiance()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
::TextureCubemap raylib::Shader::GenTextureIrradiance (const ::Texture2D & panorama,
int size 
) const
-
-inline
-
- -

Definition at line 158 of file Shader.hpp.

- -
-
- -

◆ GenTexturePrefilter()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
::TextureCubemap raylib::Shader::GenTexturePrefilter (const ::Texture2D & panorama,
int size 
) const
-
-inline
-
- -

Definition at line 162 of file Shader.hpp.

- -
-
+

Definition at line 14 of file Shader.hpp.

+

Member Function Documentation

◆ GetId()

@@ -548,7 +186,10 @@ Protected Member Functions
-

Definition at line 68 of file Shader.hpp.

+

Retrieves the id value for the object.

+
Returns
The id value of the object.
+ +

Definition at line 47 of file Shader.hpp.

@@ -577,8 +218,9 @@ Protected Member Functions

Get shader uniform location.

+
See also
GetShaderLocation()
-

Definition at line 103 of file Shader.hpp.

+

Definition at line 84 of file Shader.hpp.

@@ -607,8 +249,9 @@ Protected Member Functions

Get shader attribute location.

+
See also
GetShaderLocationAttrib()
-

Definition at line 110 of file Shader.hpp.

+

Definition at line 93 of file Shader.hpp.

@@ -635,147 +278,10 @@ Protected Member Functions
-

Definition at line 69 of file Shader.hpp.

+

Retrieves the locs value for the object.

+
Returns
The locs value of the object.
-
- - -

◆ Load()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
::Shader raylib::Shader::Load (const std::string & vsFileName,
const std::string & fsFileName 
)
-
-inlinestatic
-
- -

Load shader from files and bind default locations.

- -

Definition at line 57 of file Shader.hpp.

- -
-
- -

◆ LoadCode()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
::Shader raylib::Shader::LoadCode (const std::string & vsCode,
const std::string & fsCode 
)
-
-inlinestatic
-
- -

Load shader from code strings and bind default locations.

- -

Definition at line 64 of file Shader.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Shader& raylib::Shader::operator= (const ::Shader & shader)
-
-inline
-
- -

Definition at line 71 of file Shader.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Shader::set (const ::Shader & shader)
-
-inlineprotected
-
- -

Definition at line 171 of file Shader.hpp.

- -

Referenced by operator=(), and Shader().

+

Definition at line 48 of file Shader.hpp.

@@ -803,7 +309,15 @@ Protected Member Functions
-

Definition at line 68 of file Shader.hpp.

+

Sets the id value for the object.

+
Parameters
+ + +
valueThe value of which to set id to.
+
+
+ +

Definition at line 47 of file Shader.hpp.

@@ -831,7 +345,15 @@ Protected Member Functions
-

Definition at line 69 of file Shader.hpp.

+

Sets the locs value for the object.

+
Parameters
+ + +
valueThe value of which to set locs to.
+
+
+ +

Definition at line 48 of file Shader.hpp.

@@ -872,7 +394,7 @@ Protected Member Functions

Set shader uniform value (matrix 4x4)

See also
SetShaderValueMatrix()
-

Definition at line 139 of file Shader.hpp.

+

Definition at line 122 of file Shader.hpp.

@@ -894,7 +416,7 @@ Protected Member Functions - const ::Texture2D &  + const ::Texture2D &  texture  @@ -913,7 +435,7 @@ Protected Member Functions

Set shader uniform value for texture.

See also
SetShaderValueTexture()
-

Definition at line 149 of file Shader.hpp.

+

Definition at line 132 of file Shader.hpp.

@@ -960,7 +482,7 @@ Protected Member Functions

Set shader uniform value.

See also
SetShaderValue()
-

Definition at line 119 of file Shader.hpp.

+

Definition at line 102 of file Shader.hpp.

@@ -1013,43 +535,14 @@ Protected Member Functions

Set shader uniform value vector.

See also
SetShaderValueV()
-

Definition at line 129 of file Shader.hpp.

- - - - -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Shader::Unload ()
-
-inline
-
- -

Definition at line 80 of file Shader.hpp.

- -

Referenced by ~Shader().

+

Definition at line 112 of file Shader.hpp.

diff --git a/docs/classraylib_1_1_sound-members.html b/docs/classraylib_1_1_sound-members.html index a2f2d0a..18ceb03 100644 --- a/docs/classraylib_1_1_sound-members.html +++ b/docs/classraylib_1_1_sound-members.html @@ -75,30 +75,29 @@ $(function() {

This is the complete list of members for raylib::Sound, including all inherited members.

- + - + - - - - - - - - - - - - - + + + + + + + + + + + +
GetSampleCount() constraylib::Soundinline
GetStream() constraylib::Soundinline
GetStream() constraylib::Soundinline
IsPlaying() constraylib::Soundinline
operator=(const ::Sound &sound)raylib::Soundinline
operator=(const ::Sound &sound) (defined in raylib::Sound)raylib::Soundinline
Pause()raylib::Soundinline
Play()raylib::Soundinline
PlayMulti()raylib::Soundinline
Resume()raylib::Soundinline
set(const ::Sound &sound)raylib::Soundinlineprotected
SetPitch(float pitch)raylib::Soundinline
SetSampleCount(unsigned int value)raylib::Soundinline
SetStream(::AudioStream value)raylib::Soundinline
SetVolume(float volume)raylib::Soundinline
Sound(const ::Sound &vec)raylib::Soundinline
Sound(const std::string &fileName)raylib::Soundinline
Sound(const ::Wave &wave)raylib::Soundinline
Stop()raylib::Soundinline
StopMulti()raylib::Soundinline
Unload()raylib::Soundinline
Update(const void *data, int sampleCount)raylib::Soundinline
~Sound()raylib::Soundinline
SetPitch(float pitch)raylib::Soundinline
SetSampleCount(unsigned int value)raylib::Soundinline
SetStream(::AudioStream value)raylib::Soundinline
SetVolume(float volume)raylib::Soundinline
Sound(const ::Sound &vec) (defined in raylib::Sound)raylib::Soundinline
Sound(const std::string &fileName) (defined in raylib::Sound)raylib::Soundinline
Sound(const ::Wave &wave) (defined in raylib::Sound)raylib::Soundinline
Stop()raylib::Soundinline
StopMulti()raylib::Soundinline
Unload()raylib::Soundinline
Update(const void *data, int sampleCount)raylib::Soundinline
~Sound() (defined in raylib::Sound)raylib::Soundinline
diff --git a/docs/classraylib_1_1_sound.html b/docs/classraylib_1_1_sound.html index c46d5f1..86f2785 100644 --- a/docs/classraylib_1_1_sound.html +++ b/docs/classraylib_1_1_sound.html @@ -69,7 +69,6 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Sound Class Reference
@@ -81,188 +80,82 @@ $(function() { - + - + - + - - + - - - - + + + + + - + - - + + - - + + - - + + - - + + - - + + + + - - + + - - + + - - + + - - + + - - + + -

Public Member Functions

 Sound (const ::Sound &vec)
+ Sound (const ::Sound &vec)
 
 Sound (const ::Wave &wave)
+ Sound (const ::Wave &wave)
 
 Sound (const std::string &fileName)
+ Sound (const std::string &fileName)
 
 ~Sound ()
 
unsigned int GetSampleCount () const
 Retrieves the sampleCount value for the object. More...
 
inline ::AudioStream GetStream () const
 
bool IsPlaying () const
 Check if a sound is currently playing. More...
::AudioStream GetStream () const
 Retrieves the stream value for the object. More...
 
+bool IsPlaying () const
 Check if a sound is currently playing.
 
Sound & operator= (const ::Sound &sound)
+Sound & operator= (const ::Sound &sound)
 
Sound & Pause ()
 Pause a sound. More...
+Sound & Pause ()
 Pause a sound.
 
Sound & Play ()
 Play a sound. More...
+Sound & Play ()
 Play a sound.
 
Sound & PlayMulti ()
 Play a sound (using multichannel buffer pool) More...
+Sound & PlayMulti ()
 Play a sound (using multichannel buffer pool)
 
Sound & Resume ()
 Resume a paused sound. More...
+Sound & Resume ()
 Resume a paused sound.
 
Sound & SetPitch (float pitch)
 Set pitch for a sound (1.0 is base level) More...
+Sound & SetPitch (float pitch)
 Set pitch for a sound (1.0 is base level)
 
void SetSampleCount (unsigned int value)
 Sets the sampleCount value for the object. More...
 
void SetStream (::AudioStream value)
 Sets the stream value for the object. More...
 
Sound & SetVolume (float volume)
 Set volume for a sound (1.0 is max level) More...
+Sound & SetVolume (float volume)
 Set volume for a sound (1.0 is max level)
 
Sound & Stop ()
 Stop playing a sound. More...
+Sound & Stop ()
 Stop playing a sound.
 
Sound & StopMulti ()
 Stop any sound playing (using multichannel buffer pool) More...
+Sound & StopMulti ()
 Stop any sound playing (using multichannel buffer pool)
 
void Unload ()
 Unload sound. More...
+void Unload ()
 Unload sound.
 
Sound & Update (const void *data, int sampleCount)
 Update sound buffer with new data. More...
+Sound & Update (const void *data, int sampleCount)
 Update sound buffer with new data.
 
- - -

-Protected Member Functions

void set (const ::Sound &sound)
 

Detailed Description

Wave/Sound management functions.

- -

Definition at line 37 of file Sound.hpp.

-

Constructor & Destructor Documentation

- -

◆ Sound() [1/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::Sound::Sound (const ::Sound & vec)
-
-inline
-
- -

Definition at line 39 of file Sound.hpp.

- -

References set().

- -
-
- -

◆ Sound() [2/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::Sound::Sound (const std::string & fileName)
-
-inline
-
- -

Definition at line 43 of file Sound.hpp.

- -

References set().

- -
-
- -

◆ Sound() [3/3]

- -
-
- - - - - -
- - - - - - - - -
raylib::Sound::Sound (const ::Wave & wave)
-
-inline
-
- -

Definition at line 47 of file Sound.hpp.

- -

References set().

- -
-
- -

◆ ~Sound()

- -
-
- - - - - -
- - - - - - - -
raylib::Sound::~Sound ()
-
-inline
-
- -

Definition at line 51 of file Sound.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

+
raylib::Sound boom("boom.wav");
+
boom.Play();
+
+

Definition at line 18 of file Sound.hpp.

+

Member Function Documentation

◆ GetSampleCount()

@@ -286,12 +179,15 @@ Protected Member Functions
-

Definition at line 55 of file Sound.hpp.

+

Retrieves the sampleCount value for the object.

+
Returns
The sampleCount value of the object.
+ +

Definition at line 36 of file Sound.hpp.

- -

◆ GetStream()

+ +

◆ GetStream()

@@ -300,7 +196,7 @@ Protected Member Functions - + @@ -313,242 +209,10 @@ Protected Member Functions
inline ::AudioStream raylib::Sound::GetStream ::AudioStream raylib::Sound::GetStream ( ) const
-

Definition at line 56 of file Sound.hpp.

+

Retrieves the stream value for the object.

+
Returns
The stream value of the object.
-
-
- -

◆ IsPlaying()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Sound::IsPlaying () const
-
-inline
-
- -

Check if a sound is currently playing.

- -

Definition at line 129 of file Sound.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Sound& raylib::Sound::operator= (const ::Sound & sound)
-
-inline
-
- -

Definition at line 58 of file Sound.hpp.

- -

References set().

- -
-
- -

◆ Pause()

- -
-
- - - - - -
- - - - - - - -
Sound& raylib::Sound::Pause ()
-
-inline
-
- -

Pause a sound.

- -

Definition at line 97 of file Sound.hpp.

- -
-
- -

◆ Play()

- -
-
- - - - - -
- - - - - - - -
Sound& raylib::Sound::Play ()
-
-inline
-
- -

Play a sound.

- -

Definition at line 81 of file Sound.hpp.

- -
-
- -

◆ PlayMulti()

- -
-
- - - - - -
- - - - - - - -
Sound& raylib::Sound::PlayMulti ()
-
-inline
-
- -

Play a sound (using multichannel buffer pool)

- -

Definition at line 113 of file Sound.hpp.

- -
-
- -

◆ Resume()

- -
-
- - - - - -
- - - - - - - -
Sound& raylib::Sound::Resume ()
-
-inline
-
- -

Resume a paused sound.

- -

Definition at line 105 of file Sound.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Sound::set (const ::Sound & sound)
-
-inlineprotected
-
- -

Definition at line 150 of file Sound.hpp.

- -

Referenced by operator=(), and Sound().

- -
-
- -

◆ SetPitch()

- -
-
- - - - - -
- - - - - - - - -
Sound& raylib::Sound::SetPitch (float pitch)
-
-inline
-
- -

Set pitch for a sound (1.0 is base level)

- -

Definition at line 144 of file Sound.hpp.

+

Definition at line 37 of file Sound.hpp.

@@ -576,7 +240,15 @@ Protected Member Functions
-

Definition at line 55 of file Sound.hpp.

+

Sets the sampleCount value for the object.

+
Parameters
+ + +
valueThe value of which to set sampleCount to.
+
+
+ +

Definition at line 36 of file Sound.hpp.

@@ -604,173 +276,23 @@ Protected Member Functions
-

Definition at line 56 of file Sound.hpp.

+

Sets the stream value for the object.

+
Parameters
+ + +
valueThe value of which to set stream to.
+
+
-
- - -

◆ SetVolume()

- -
-
- - - - - -
- - - - - - - - -
Sound& raylib::Sound::SetVolume (float volume)
-
-inline
-
- -

Set volume for a sound (1.0 is max level)

- -

Definition at line 136 of file Sound.hpp.

- -
-
- -

◆ Stop()

- -
-
- - - - - -
- - - - - - - -
Sound& raylib::Sound::Stop ()
-
-inline
-
- -

Stop playing a sound.

- -

Definition at line 89 of file Sound.hpp.

- -
-
- -

◆ StopMulti()

- -
-
- - - - - -
- - - - - - - -
Sound& raylib::Sound::StopMulti ()
-
-inline
-
- -

Stop any sound playing (using multichannel buffer pool)

- -

Definition at line 121 of file Sound.hpp.

- -
-
- -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Sound::Unload ()
-
-inline
-
- -

Unload sound.

- -

Definition at line 74 of file Sound.hpp.

- -

Referenced by ~Sound().

- -
-
- -

◆ Update()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Sound& raylib::Sound::Update (const void * data,
int sampleCount 
)
-
-inline
-
- -

Update sound buffer with new data.

- -

Definition at line 66 of file Sound.hpp.

+

Definition at line 37 of file Sound.hpp.

+
raylib::Sound
Wave/Sound management functions.
Definition: Sound.hpp:18
diff --git a/docs/classraylib_1_1_texture-members.html b/docs/classraylib_1_1_texture-members.html index 26f6e76..66f81fc 100644 --- a/docs/classraylib_1_1_texture-members.html +++ b/docs/classraylib_1_1_texture-members.html @@ -76,14 +76,14 @@ $(function() { - - - - - - - - + + + + + + + + @@ -97,29 +97,28 @@ $(function() { - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
Draw()raylib::Textureinline
Draw(int posX, int posY, ::Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::Vector2 position, ::Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::Vector2 tiling, ::Vector2 offset, ::Rectangle quad, ::Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::Vector3 position, float width, float height, float length, ::Color color={255, 255, 255, 255})raylib::Textureinline
DrawTiled(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, float scale=1, Color tint={255, 255, 255, 255})raylib::Textureinline
Draw(::Vector2 position, ::Color tint={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
Draw(::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
Draw(::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
Draw(::Vector2 tiling, ::Vector2 offset, ::Rectangle quad, ::Color tint={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
Draw(::Vector3 position, float width, float height, float length, ::Color color={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
DrawTiled(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, float scale=1, Color tint={255, 255, 255, 255}) (defined in raylib::Texture)raylib::Textureinline
GenMipmaps()raylib::Textureinline
GetData() constraylib::Textureinline
GetFormat() constraylib::Textureinline
LoadFromImage(const ::Image &image)raylib::Textureinline
LoadTextureCubemap(const ::Image &image, int layoutType)raylib::Textureinline
operator raylib::Image()raylib::Textureinline
operator=(const ::Texture &texture)raylib::Textureinline
set(const ::Texture &texture)raylib::Textureinlineprotected
SetFilter(int filterMode)raylib::Textureinline
SetFormat(int value)raylib::Textureinline
SetHeight(int value)raylib::Textureinline
SetId(unsigned int value)raylib::Textureinline
SetMaterial(::Material *material, int mapType)raylib::Textureinline
SetMipmaps(int value)raylib::Textureinline
SetShapes(::Rectangle source)raylib::Textureinline
SetWidth(int value)raylib::Textureinline
SetWrap(int wrapMode)raylib::Textureinline
Texture(const ::Texture &texture)raylib::Textureinline
Texture()raylib::Textureinline
Texture(const ::Image &image)raylib::Textureinline
Texture(const std::string &fileName)raylib::Textureinline
Unload()raylib::Textureinline
Update(const void *pixels)raylib::Textureinline
UpdateRec(::Rectangle rec, const void *pixels)raylib::Textureinline
~Texture()raylib::Textureinline
operator=(const ::Texture &texture) (defined in raylib::Texture)raylib::Textureinline
SetFilter(int filterMode)raylib::Textureinline
SetFormat(int value)raylib::Textureinline
SetHeight(int value)raylib::Textureinline
SetId(unsigned int value)raylib::Textureinline
SetMaterial(::Material *material, int mapType)raylib::Textureinline
SetMipmaps(int value)raylib::Textureinline
SetShapes(::Rectangle source)raylib::Textureinline
SetWidth(int value)raylib::Textureinline
SetWrap(int wrapMode)raylib::Textureinline
Texture(const ::Texture &texture) (defined in raylib::Texture)raylib::Textureinline
Texture() (defined in raylib::Texture)raylib::Textureinline
Texture(const ::Image &image) (defined in raylib::Texture)raylib::Textureinline
Texture(const std::string &fileName)raylib::Textureinline
Unload()raylib::Textureinline
Update(const void *pixels)raylib::Textureinline
UpdateRec(::Rectangle rec, const void *pixels)raylib::Textureinline
~Texture() (defined in raylib::Texture)raylib::Textureinline
diff --git a/docs/classraylib_1_1_texture.html b/docs/classraylib_1_1_texture.html index 60b7c31..dbfba80 100644 --- a/docs/classraylib_1_1_texture.html +++ b/docs/classraylib_1_1_texture.html @@ -70,826 +70,161 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Texture Class Reference
+ +

Texture type. + More...

- - - + - + - - + + - - - - + + - + - + - + - + - + - + - + - - + + - + - - + + - - + + + + + + - - + + + - - + + - - + + - - + + - - + + - + - - + + + + + - - + + + - - + + + - - + + - - + + - - + + - - + +

Public Member Functions

 Texture ()
 
 Texture (const ::Image &image)
+ Texture (const ::Image &image)
 
 Texture (const ::Texture &texture)
+ Texture (const ::Texture &texture)
 
 Texture (const std::string &fileName)
 Load texture from file into GPU memory (VRAM) More...
+ Texture (const std::string &fileName)
 Load texture from file into GPU memory (VRAM)
 
 ~Texture ()
 
Texture & Draw ()
 Draws the texture at the top left corner of the screen. More...
+Texture & Draw ()
 Draws the texture at the top left corner of the screen.
 
Texture & Draw (::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})
+Texture & Draw (::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})
 
Texture & Draw (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})
+Texture & Draw (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255})
 
Texture & Draw (::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255})
+Texture & Draw (::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255})
 
Texture & Draw (::Vector2 position, ::Color tint={255, 255, 255, 255})
+Texture & Draw (::Vector2 position, ::Color tint={255, 255, 255, 255})
 
Texture & Draw (::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255})
+Texture & Draw (::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 
Texture & Draw (::Vector2 tiling, ::Vector2 offset, ::Rectangle quad, ::Color tint={255, 255, 255, 255})
+Texture & Draw (::Vector2 tiling, ::Vector2 offset, ::Rectangle quad, ::Color tint={255, 255, 255, 255})
 
Texture & Draw (::Vector3 position, float width, float height, float length, ::Color color={255, 255, 255, 255})
+Texture & Draw (::Vector3 position, float width, float height, float length, ::Color color={255, 255, 255, 255})
 
Texture & Draw (int posX, int posY, ::Color tint={255, 255, 255, 255})
 Draw a Texture2D. More...
+Texture & Draw (int posX, int posY, ::Color tint={255, 255, 255, 255})
 Draw a Texture2D.
 
Texture & DrawTiled (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, float scale=1, Color tint={255, 255, 255, 255})
+Texture & DrawTiled (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, float scale=1, Color tint={255, 255, 255, 255})
 
Texture & GenMipmaps ()
 Generate GPU mipmaps for a texture. More...
+Texture & GenMipmaps ()
 Generate GPU mipmaps for a texture.
 
inline ::Image GetData () const
 Get pixel data from GPU texture and return an Image. More...
+inline ::Image GetData () const
 Get pixel data from GPU texture and return an Image.
 
int GetFormat () const
 Retrieves the format value for the object. More...
 
int GetHeight () const
 Retrieves the height value for the object. More...
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
int GetMipmaps () const
 Retrieves the mipmaps value for the object. More...
 
inline ::Vector2 GetSize ()
 Retrieve the width and height of the texture. More...
+inline ::Vector2 GetSize ()
 Retrieve the width and height of the texture.
 
int GetWidth () const
 Retrieves the width value for the object. More...
 
void Load (const std::string &fileName)
 Load texture from file into GPU memory (VRAM) More...
+void Load (const std::string &fileName)
 Load texture from file into GPU memory (VRAM)
 
void LoadFromImage (const ::Image &image)
 Load texture from image data. More...
+void LoadFromImage (const ::Image &image)
 Load texture from image data.
 
void LoadTextureCubemap (const ::Image &image, int layoutType)
 Load cubemap from image, multiple image cubemap layouts supported. More...
+void LoadTextureCubemap (const ::Image &image, int layoutType)
 Load cubemap from image, multiple image cubemap layouts supported.
 
 operator raylib::Image ()
 Get pixel data from GPU texture and return an Image. More...
+ operator raylib::Image ()
 Get pixel data from GPU texture and return an Image.
 
Texture & operator= (const ::Texture &texture)
+Texture & operator= (const ::Texture &texture)
 
Texture & SetFilter (int filterMode)
 Set texture scaling filter mode. More...
+Texture & SetFilter (int filterMode)
 Set texture scaling filter mode.
 
void SetFormat (int value)
 Sets the format value for the object. More...
 
void SetHeight (int value)
 Sets the height value for the object. More...
 
void SetId (unsigned int value)
 Sets the id value for the object. More...
 
Texture & SetMaterial (::Material *material, int mapType)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) More...
+Texture & SetMaterial (::Material *material, int mapType)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
 
void SetMipmaps (int value)
 Sets the mipmaps value for the object. More...
 
Texture & SetShapes (::Rectangle source)
 Define default texture used to draw shapes. More...
+Texture & SetShapes (::Rectangle source)
 Define default texture used to draw shapes.
 
void SetWidth (int value)
 Sets the width value for the object. More...
 
Texture & SetWrap (int wrapMode)
 Set texture wrapping mode. More...
+Texture & SetWrap (int wrapMode)
 Set texture wrapping mode.
 
void Unload ()
 Unload texture from GPU memory (VRAM) More...
+void Unload ()
 Unload texture from GPU memory (VRAM)
 
Texture & Update (const void *pixels)
 Update GPU texture with new data. More...
+Texture & Update (const void *pixels)
 Update GPU texture with new data.
 
Texture & UpdateRec (::Rectangle rec, const void *pixels)
 Update GPU texture rectangle with new data. More...
+Texture & UpdateRec (::Rectangle rec, const void *pixels)
 Update GPU texture rectangle with new data.
 
- - + + -

Static Public Member Functions

static int GetPixelDataSize (int width, int height, int format)
 Get pixel data size in bytes for certain format. More...
+static int GetPixelDataSize (int width, int height, int format)
 Get pixel data size in bytes for certain format.
 
- - -

-Protected Member Functions

void set (const ::Texture &texture)
 

Detailed Description

-
-

Definition at line 36 of file Texture.hpp.

-

Constructor & Destructor Documentation

- -

◆ Texture() [1/4]

+

Texture type.

-
-
- - - - - -
- - - - - - - - -
raylib::Texture::Texture (const ::Texture & texture)
-
-inline
-
- -

Definition at line 38 of file Texture.hpp.

- -

References set().

- -
-
- -

◆ Texture() [2/4]

- -
-
- - - - - -
- - - - - - - -
raylib::Texture::Texture ()
-
-inline
-
- -

Definition at line 42 of file Texture.hpp.

- -

References set().

- -
-
- -

◆ Texture() [3/4]

- -
-
- - - - - -
- - - - - - - - -
raylib::Texture::Texture (const ::Image & image)
-
-inline
-
- -

Definition at line 46 of file Texture.hpp.

- -

References LoadFromImage().

- -
-
- -

◆ Texture() [4/4]

- -
-
- - - - - -
- - - - - - - - -
raylib::Texture::Texture (const std::string & fileName)
-
-inline
-
- -

Load texture from file into GPU memory (VRAM)

- -

Definition at line 53 of file Texture.hpp.

- -

References Load().

- -
-
- -

◆ ~Texture()

- -
-
- - - - - -
- - - - - - - -
raylib::Texture::~Texture ()
-
-inline
-
- -

Definition at line 57 of file Texture.hpp.

- -

References Unload().

- -
-
-

Member Function Documentation

- -

◆ Draw() [1/9]

- -
-
- - - - - -
- - - - - - - -
Texture& raylib::Texture::Draw ()
-
-inline
-
- -

Draws the texture at the top left corner of the screen.

- -

Definition at line 164 of file Texture.hpp.

- -
-
- -

◆ Draw() [2/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (::NPatchInfo nPatchInfo,
::Rectangle destRec,
::Vector2 origin = {0, 0},
float rotation = 0,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 205 of file Texture.hpp.

- -
-
- -

◆ Draw() [3/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (::Rectangle sourceRec,
::Rectangle destRec,
::Vector2 origin = {0, 0},
float rotation = 0,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 199 of file Texture.hpp.

- -
-
- -

◆ Draw() [4/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (::Rectangle sourceRec,
::Vector2 position = {0, 0},
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 187 of file Texture.hpp.

- -
-
- -

◆ Draw() [5/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (::Vector2 position,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 176 of file Texture.hpp.

- -
-
- -

◆ Draw() [6/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (::Vector2 position,
float rotation,
float scale = 1.0f,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 181 of file Texture.hpp.

- -
-
- -

◆ Draw() [7/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (::Vector2 tiling,
::Vector2 offset,
::Rectangle quad,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 193 of file Texture.hpp.

- -
-
- -

◆ Draw() [8/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (::Vector3 position,
float width,
float height,
float length,
::Color color = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 211 of file Texture.hpp.

- -
-
- -

◆ Draw() [9/9]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::Draw (int posX,
int posY,
::Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Draw a Texture2D.

- -

Definition at line 171 of file Texture.hpp.

- -
-
- -

◆ DrawTiled()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::DrawTiled (::Rectangle sourceRec,
::Rectangle destRec,
::Vector2 origin = {0, 0},
float rotation = 0,
float scale = 1,
Color tint = {255, 255, 255, 255} 
)
-
-inline
-
- -

Definition at line 217 of file Texture.hpp.

- -
-
- -

◆ GenMipmaps()

- -
-
- - - - - -
- - - - - - - -
Texture& raylib::Texture::GenMipmaps ()
-
-inline
-
- -

Generate GPU mipmaps for a texture.

- -

Definition at line 140 of file Texture.hpp.

- -
-
- -

◆ GetData()

- -
-
- - - - - -
- - - - - - - -
inline ::Image raylib::Texture::GetData () const
-
-inline
-
- -

Get pixel data from GPU texture and return an Image.

- -

Definition at line 126 of file Texture.hpp.

- -

Referenced by operator raylib::Image().

- -
-
+

Definition at line 15 of file Texture.hpp.

+

Member Function Documentation

◆ GetFormat()

@@ -913,7 +248,10 @@ Protected Member Functions
-

Definition at line 65 of file Texture.hpp.

+

Retrieves the format value for the object.

+
Returns
The format value of the object.
+ +

Definition at line 44 of file Texture.hpp.

@@ -940,7 +278,10 @@ Protected Member Functions
-

Definition at line 63 of file Texture.hpp.

+

Retrieves the height value for the object.

+
Returns
The height value of the object.
+ +

Definition at line 42 of file Texture.hpp.

@@ -967,7 +308,10 @@ Protected Member Functions
-

Definition at line 61 of file Texture.hpp.

+

Retrieves the id value for the object.

+
Returns
The id value of the object.
+ +

Definition at line 40 of file Texture.hpp.

@@ -994,82 +338,10 @@ Protected Member Functions
-

Definition at line 64 of file Texture.hpp.

+

Retrieves the mipmaps value for the object.

+
Returns
The mipmaps value of the object.
-
- - -

◆ GetPixelDataSize()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static int raylib::Texture::GetPixelDataSize (int width,
int height,
int format 
)
-
-inlinestatic
-
- -

Get pixel data size in bytes for certain format.

- -

Definition at line 234 of file Texture.hpp.

- -
-
- -

◆ GetSize()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Texture::GetSize ()
-
-inline
-
- -

Retrieve the width and height of the texture.

- -

Definition at line 75 of file Texture.hpp.

+

Definition at line 43 of file Texture.hpp.

@@ -1096,238 +368,10 @@ Protected Member Functions
-

Definition at line 62 of file Texture.hpp.

+

Retrieves the width value for the object.

+
Returns
The width value of the object.
-
- - -

◆ Load()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Texture::Load (const std::string & fileName)
-
-inline
-
- -

Load texture from file into GPU memory (VRAM)

- -

Definition at line 96 of file Texture.hpp.

- -

References set().

- -

Referenced by Texture().

- -
-
- -

◆ LoadFromImage()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Texture::LoadFromImage (const ::Image & image)
-
-inline
-
- -

Load texture from image data.

- -

Definition at line 82 of file Texture.hpp.

- -

References set().

- -

Referenced by Texture().

- -
-
- -

◆ LoadTextureCubemap()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void raylib::Texture::LoadTextureCubemap (const ::Image & image,
int layoutType 
)
-
-inline
-
- -

Load cubemap from image, multiple image cubemap layouts supported.

- -

Definition at line 89 of file Texture.hpp.

- -

References set().

- -
-
- -

◆ operator raylib::Image()

- -
-
- - - - - -
- - - - - - - -
raylib::Texture::operator raylib::Image ()
-
-inline
-
- -

Get pixel data from GPU texture and return an Image.

- -

Definition at line 133 of file Texture.hpp.

- -

References GetData().

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Texture& raylib::Texture::operator= (const ::Texture & texture)
-
-inline
-
- -

Definition at line 67 of file Texture.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Texture::set (const ::Texture & texture)
-
-inlineprotected
-
- -

Definition at line 247 of file Texture.hpp.

- -

Referenced by Load(), LoadFromImage(), LoadTextureCubemap(), operator=(), and Texture().

- -
-
- -

◆ SetFilter()

- -
-
- - - - - -
- - - - - - - - -
Texture& raylib::Texture::SetFilter (int filterMode)
-
-inline
-
- -

Set texture scaling filter mode.

- -

Definition at line 148 of file Texture.hpp.

+

Definition at line 41 of file Texture.hpp.

@@ -1355,7 +399,15 @@ Protected Member Functions
-

Definition at line 65 of file Texture.hpp.

+

Sets the format value for the object.

+
Parameters
+ + +
valueThe value of which to set format to.
+
+
+ +

Definition at line 44 of file Texture.hpp.

@@ -1383,7 +435,15 @@ Protected Member Functions
-

Definition at line 63 of file Texture.hpp.

+

Sets the height value for the object.

+
Parameters
+ + +
valueThe value of which to set height to.
+
+
+ +

Definition at line 42 of file Texture.hpp.

@@ -1411,47 +471,15 @@ Protected Member Functions
-

Definition at line 61 of file Texture.hpp.

+

Sets the id value for the object.

+
Parameters
+ + +
valueThe value of which to set id to.
+
+
-
- - -

◆ SetMaterial()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::SetMaterial (::Material * material,
int mapType 
)
-
-inline
-
- -

Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)

- -

Definition at line 226 of file Texture.hpp.

+

Definition at line 40 of file Texture.hpp.

@@ -1479,37 +507,15 @@ Protected Member Functions
-

Definition at line 64 of file Texture.hpp.

+

Sets the mipmaps value for the object.

+
Parameters
+ + +
valueThe value of which to set mipmaps to.
+
+
-
- - -

◆ SetShapes()

- -
-
- - - - - -
- - - - - - - - -
Texture& raylib::Texture::SetShapes (::Rectangle source)
-
-inline
-
- -

Define default texture used to draw shapes.

- -

Definition at line 241 of file Texture.hpp.

+

Definition at line 43 of file Texture.hpp.

@@ -1537,145 +543,22 @@ Protected Member Functions
-

Definition at line 62 of file Texture.hpp.

+

Sets the width value for the object.

+
Parameters
+ + +
valueThe value of which to set width to.
+
+
-
- - -

◆ SetWrap()

- -
-
- - - - - -
- - - - - - - - -
Texture& raylib::Texture::SetWrap (int wrapMode)
-
-inline
-
- -

Set texture wrapping mode.

- -

Definition at line 156 of file Texture.hpp.

- -
-
- -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Texture::Unload ()
-
-inline
-
- -

Unload texture from GPU memory (VRAM)

- -

Definition at line 103 of file Texture.hpp.

- -

Referenced by ~Texture().

- -
-
- -

◆ Update()

- -
-
- - - - - -
- - - - - - - - -
Texture& raylib::Texture::Update (const void * pixels)
-
-inline
-
- -

Update GPU texture with new data.

- -

Definition at line 110 of file Texture.hpp.

- -
-
- -

◆ UpdateRec()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Texture& raylib::Texture::UpdateRec (::Rectangle rec,
const void * pixels 
)
-
-inline
-
- -

Update GPU texture rectangle with new data.

- -

Definition at line 118 of file Texture.hpp.

+

Definition at line 41 of file Texture.hpp.

diff --git a/docs/classraylib_1_1_vector2-members.html b/docs/classraylib_1_1_vector2-members.html index e2d1049..a7ac672 100644 --- a/docs/classraylib_1_1_vector2-members.html +++ b/docs/classraylib_1_1_vector2-members.html @@ -74,7 +74,7 @@ $(function() {

This is the complete list of members for raylib::Vector2, including all inherited members.

- + @@ -83,57 +83,56 @@ $(function() { - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + +
Add(const ::Vector2 &vector2) constraylib::Vector2inline
Add(const ::Vector2 &vector2) const (defined in raylib::Vector2)raylib::Vector2inline
Angle(const ::Vector2 &vector2) constraylib::Vector2inline
CheckCollision(::Rectangle rec) constraylib::Vector2inline
CheckCollision(::Vector2 center, float radius) constraylib::Vector2inline
CheckCollisionCircle(float radius, ::Rectangle rec) constraylib::Vector2inline
CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) constraylib::Vector2inline
Distance(const ::Vector2 &vector2) constraylib::Vector2inline
Divide(const ::Vector2 &vector2) constraylib::Vector2inline
Divide(const float div)raylib::Vector2inline
Divide(const ::Vector2 &vector2) const (defined in raylib::Vector2)raylib::Vector2inline
Divide(const float div) (defined in raylib::Vector2)raylib::Vector2inline
DotProduct(const ::Vector2 &vector2) constraylib::Vector2inline
DrawCircle(float radius, ::Color color)raylib::Vector2inline
DrawLine(::Vector2 endPos, ::Color color)raylib::Vector2inline
DrawLine(::Vector2 endPos, float thick, ::Color color)raylib::Vector2inline
DrawLineBezier(::Vector2 endPos, float thick, ::Color color)raylib::Vector2inline
DrawPixel(::Color color)raylib::Vector2inline
DrawPoly(int sides, float radius, float rotation, ::Color color)raylib::Vector2inline
DrawRectangle(::Vector2 size, ::Color color)raylib::Vector2inline
DrawLine(::Vector2 endPos, ::Color color) (defined in raylib::Vector2)raylib::Vector2inline
DrawLine(::Vector2 endPos, float thick, ::Color color) (defined in raylib::Vector2)raylib::Vector2inline
DrawLineBezier(::Vector2 endPos, float thick, ::Color color) (defined in raylib::Vector2)raylib::Vector2inline
DrawPixel(::Color color) (defined in raylib::Vector2)raylib::Vector2inline
DrawPoly(int sides, float radius, float rotation, ::Color color) (defined in raylib::Vector2)raylib::Vector2inline
DrawRectangle(::Vector2 size, ::Color color) (defined in raylib::Vector2)raylib::Vector2inline
GetX() constraylib::Vector2inline
GetY() constraylib::Vector2inline
Length() constraylib::Vector2inline
LengthSqr() constraylib::Vector2inline
Lerp(const ::Vector2 &vector2, float amount) constraylib::Vector2inline
MoveTowards(const ::Vector2 &target, float maxDistance) constraylib::Vector2inline
Multiply(const ::Vector2 &vector2) constraylib::Vector2inline
Negate() constraylib::Vector2inline
Multiply(const ::Vector2 &vector2) const (defined in raylib::Vector2)raylib::Vector2inline
Negate() const (defined in raylib::Vector2)raylib::Vector2inline
Normalize() constraylib::Vector2inline
One()raylib::Vector2inlinestatic
operator*(const ::Vector2 &vector2)raylib::Vector2inline
operator*(const float scale)raylib::Vector2inline
operator*=(const ::Vector2 &vector2)raylib::Vector2inline
operator*=(const float scale)raylib::Vector2inline
operator+(const ::Vector2 &vector2)raylib::Vector2inline
operator+=(const ::Vector2 &vector2)raylib::Vector2inline
operator-(const ::Vector2 &vector2)raylib::Vector2inline
operator-()raylib::Vector2inline
operator-=(const ::Vector2 &vector2)raylib::Vector2inline
operator/(const ::Vector2 &vector2)raylib::Vector2inline
operator/(const float div)raylib::Vector2inline
operator/=(const ::Vector2 &vector2)raylib::Vector2inline
operator/=(const float div)raylib::Vector2inline
operator=(const ::Vector2 &vector2)raylib::Vector2inline
operator==(const ::Vector2 &other)raylib::Vector2inline
operator*(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator*(const float scale) (defined in raylib::Vector2)raylib::Vector2inline
operator*=(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator*=(const float scale) (defined in raylib::Vector2)raylib::Vector2inline
operator+(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator+=(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator-(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator-() (defined in raylib::Vector2)raylib::Vector2inline
operator-=(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator/(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator/(const float div) (defined in raylib::Vector2)raylib::Vector2inline
operator/=(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator/=(const float div) (defined in raylib::Vector2)raylib::Vector2inline
operator=(const ::Vector2 &vector2) (defined in raylib::Vector2)raylib::Vector2inline
operator==(const ::Vector2 &other) (defined in raylib::Vector2)raylib::Vector2inline
Reflect(const ::Vector2 &normal) constraylib::Vector2inline
Rotate(float degrees) constraylib::Vector2inline
Scale(const float scale) constraylib::Vector2inline
set(const ::Vector2 &vec)raylib::Vector2inlineprotected
SetX(float value)raylib::Vector2inline
SetY(float value)raylib::Vector2inline
Subtract(const ::Vector2 &vector2) constraylib::Vector2inline
Vector2(const ::Vector2 &vec)raylib::Vector2inline
Vector2(float x, float y)raylib::Vector2inline
Vector2(float x)raylib::Vector2inline
Vector2()raylib::Vector2inline
Zero()raylib::Vector2inlinestatic
Scale(const float scale) const (defined in raylib::Vector2)raylib::Vector2inline
SetX(float value)raylib::Vector2inline
SetY(float value)raylib::Vector2inline
Subtract(const ::Vector2 &vector2) const (defined in raylib::Vector2)raylib::Vector2inline
Vector2(const ::Vector2 &vec) (defined in raylib::Vector2)raylib::Vector2inline
Vector2(float x, float y) (defined in raylib::Vector2)raylib::Vector2inline
Vector2(float x) (defined in raylib::Vector2)raylib::Vector2inline
Vector2() (defined in raylib::Vector2)raylib::Vector2inline
Zero()raylib::Vector2inlinestatic
diff --git a/docs/classraylib_1_1_vector2.html b/docs/classraylib_1_1_vector2.html index aba9c93..686aa05 100644 --- a/docs/classraylib_1_1_vector2.html +++ b/docs/classraylib_1_1_vector2.html @@ -70,709 +70,206 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Vector2 Class Reference
+ +

Vector2 type. + More...

- - - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - + - + + + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + + + - +

Public Member Functions

 Vector2 ()
 
 Vector2 (const ::Vector2 &vec)
+ Vector2 (const ::Vector2 &vec)
 
 Vector2 (float x)
+ Vector2 (float x)
 
 Vector2 (float x, float y)
+ Vector2 (float x, float y)
 
Vector2 Add (const ::Vector2 &vector2) const
+Vector2 Add (const ::Vector2 &vector2) const
 
float Angle (const ::Vector2 &vector2) const
 Calculate angle from two vectors in X-axis. More...
+float Angle (const ::Vector2 &vector2) const
 Calculate angle from two vectors in X-axis.
 
bool CheckCollision (::Rectangle rec) const
 Check if point is inside rectangle. More...
+bool CheckCollision (::Rectangle rec) const
 Check if point is inside rectangle.
 
bool CheckCollision (::Vector2 center, float radius) const
 Check if point is inside circle. More...
+bool CheckCollision (::Vector2 center, float radius) const
 Check if point is inside circle.
 
bool CheckCollision (::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const
 Check if point is inside a triangle. More...
+bool CheckCollision (::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const
 Check if point is inside a triangle.
 
bool CheckCollisionCircle (float radius, ::Rectangle rec) const
 Check collision between circle and rectangle. More...
+bool CheckCollisionCircle (float radius, ::Rectangle rec) const
 Check collision between circle and rectangle.
 
bool CheckCollisionCircle (float radius1, ::Vector2 center2, float radius2) const
 Check collision between two circles. More...
+bool CheckCollisionCircle (float radius1, ::Vector2 center2, float radius2) const
 Check collision between two circles.
 
bool CheckCollisionLines (::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) const
 Check the collision between two lines defined by two points each, returns collision point by reference. More...
+bool CheckCollisionLines (::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) const
 Check the collision between two lines defined by two points each, returns collision point by reference.
 
float Distance (const ::Vector2 &vector2) const
 Calculate distance between two vectors. More...
+float Distance (const ::Vector2 &vector2) const
 Calculate distance between two vectors.
 
Vector2 Divide (const ::Vector2 &vector2) const
+Vector2 Divide (const ::Vector2 &vector2) const
 
Vector2 & Divide (const float div)
+Vector2 & Divide (const float div)
 
float DotProduct (const ::Vector2 &vector2) const
 Calculate two vectors dot product. More...
+float DotProduct (const ::Vector2 &vector2) const
 Calculate two vectors dot product.
 
Vector2 & DrawCircle (float radius, ::Color color)
 Draw line using quadratic bezier curves with a control point. More...
 
Vector2 & DrawLine (::Vector2 endPos, ::Color color)
+Vector2 & DrawLine (::Vector2 endPos, ::Color color)
 
Vector2 & DrawLine (::Vector2 endPos, float thick, ::Color color)
+Vector2 & DrawLine (::Vector2 endPos, float thick, ::Color color)
 
Vector2 & DrawLineBezier (::Vector2 endPos, float thick, ::Color color)
+Vector2 & DrawLineBezier (::Vector2 endPos, float thick, ::Color color)
 
Vector2 & DrawPixel (::Color color)
+Vector2 & DrawPixel (::Color color)
 
Vector2 & DrawPoly (int sides, float radius, float rotation, ::Color color)
+Vector2 & DrawPoly (int sides, float radius, float rotation, ::Color color)
 
Vector2 & DrawRectangle (::Vector2 size, ::Color color)
+Vector2 & DrawRectangle (::Vector2 size, ::Color color)
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
float Length () const
 Calculate vector length. More...
+float Length () const
 Calculate vector length.
 
float LengthSqr () const
 Calculate vector square length. More...
+float LengthSqr () const
 Calculate vector square length.
 
Vector2 Lerp (const ::Vector2 &vector2, float amount) const
 Calculate linear interpolation between two vectors. More...
+Vector2 Lerp (const ::Vector2 &vector2, float amount) const
 Calculate linear interpolation between two vectors.
 
Vector2 MoveTowards (const ::Vector2 &target, float maxDistance) const
 Move Vector towards target. More...
+Vector2 MoveTowards (const ::Vector2 &target, float maxDistance) const
 Move Vector towards target.
 
Vector2 Multiply (const ::Vector2 &vector2) const
+Vector2 Multiply (const ::Vector2 &vector2) const
 
Vector2 Negate () const
+Vector2 Negate () const
 
Vector2 Normalize () const
 Normalize provided vector. More...
+Vector2 Normalize () const
 Normalize provided vector.
 
Vector2 operator* (const ::Vector2 &vector2)
+Vector2 operator* (const ::Vector2 &vector2)
 
Vector2 operator* (const float scale)
+Vector2 operator* (const float scale)
 
Vector2 & operator*= (const ::Vector2 &vector2)
+Vector2 & operator*= (const ::Vector2 &vector2)
 
Vector2 & operator*= (const float scale)
+Vector2 & operator*= (const float scale)
 
Vector2 operator+ (const ::Vector2 &vector2)
+Vector2 operator+ (const ::Vector2 &vector2)
 
Vector2 & operator+= (const ::Vector2 &vector2)
+Vector2 & operator+= (const ::Vector2 &vector2)
 
Vector2 operator- ()
+Vector2 operator- ()
 
Vector2 operator- (const ::Vector2 &vector2)
+Vector2 operator- (const ::Vector2 &vector2)
 
Vector2 & operator-= (const ::Vector2 &vector2)
+Vector2 & operator-= (const ::Vector2 &vector2)
 
Vector2 operator/ (const ::Vector2 &vector2)
+Vector2 operator/ (const ::Vector2 &vector2)
 
Vector2 & operator/ (const float div)
+Vector2 & operator/ (const float div)
 
Vector2 & operator/= (const ::Vector2 &vector2)
+Vector2 & operator/= (const ::Vector2 &vector2)
 
Vector2 & operator/= (const float div)
+Vector2 & operator/= (const float div)
 
Vector2 & operator= (const ::Vector2 &vector2)
+Vector2 & operator= (const ::Vector2 &vector2)
 
bool operator== (const ::Vector2 &other)
+bool operator== (const ::Vector2 &other)
 
Vector2 Reflect (const ::Vector2 &normal) const
 Calculate reflected vector to normal. More...
+Vector2 Reflect (const ::Vector2 &normal) const
 Calculate reflected vector to normal.
 
Vector2 Rotate (float degrees) const
 Rotate Vector by float in Degrees. More...
+Vector2 Rotate (float degrees) const
 Rotate Vector by float in Degrees.
 
Vector2 Scale (const float scale) const
+Vector2 Scale (const float scale) const
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
Vector2 Subtract (const ::Vector2 &vector2) const
+Vector2 Subtract (const ::Vector2 &vector2) const
 
- - + + - - + + -

Static Public Member Functions

static Vector2 One ()
 Vector with components value 1.0f. More...
+static Vector2 One ()
 Vector with components value 1.0f.
 
static Vector2 Zero ()
 Vector with components value 0.0f. More...
+static Vector2 Zero ()
 Vector with components value 0.0f.
 
- - -

-Protected Member Functions

void set (const ::Vector2 &vec)
 

Detailed Description

-
-

Definition at line 37 of file Vector2.hpp.

-

Constructor & Destructor Documentation

- -

◆ Vector2() [1/4]

+

Vector2 type.

-
-
- - - - - -
- - - - - - - - -
raylib::Vector2::Vector2 (const ::Vector2 & vec)
-
-inline
-
- -

Definition at line 39 of file Vector2.hpp.

- -

References set().

- -
-
- -

◆ Vector2() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Vector2::Vector2 (float x,
float y 
)
-
-inline
-
- -

Definition at line 43 of file Vector2.hpp.

- -
-
- -

◆ Vector2() [3/4]

- -
-
- - - - - -
- - - - - - - - -
raylib::Vector2::Vector2 (float x)
-
-inline
-
- -

Definition at line 44 of file Vector2.hpp.

- -
-
- -

◆ Vector2() [4/4]

- -
-
- - - - - -
- - - - - - - -
raylib::Vector2::Vector2 ()
-
-inline
-
- -

Definition at line 45 of file Vector2.hpp.

- -
-
-

Member Function Documentation

- -

◆ Add()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::Add (const ::Vector2 & vector2) const
-
-inline
-
- -

Definition at line 61 of file Vector2.hpp.

- -
-
- -

◆ Angle()

- -
-
- - - - - -
- - - - - - - - -
float raylib::Vector2::Angle (const ::Vector2 & vector2) const
-
-inline
-
- -

Calculate angle from two vectors in X-axis.

- -

Definition at line 192 of file Vector2.hpp.

- -
-
- -

◆ CheckCollision() [1/3]

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Vector2::CheckCollision (::Rectangle rec) const
-
-inline
-
- -

Check if point is inside rectangle.

- -

Definition at line 315 of file Vector2.hpp.

- -
-
- -

◆ CheckCollision() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool raylib::Vector2::CheckCollision (::Vector2 center,
float radius 
) const
-
-inline
-
- -

Check if point is inside circle.

- -

Definition at line 322 of file Vector2.hpp.

- -
-
- -

◆ CheckCollision() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
bool raylib::Vector2::CheckCollision (::Vector2 p1,
::Vector2 p2,
::Vector2 p3 
) const
-
-inline
-
- -

Check if point is inside a triangle.

- -

Definition at line 329 of file Vector2.hpp.

- -
-
- -

◆ CheckCollisionCircle() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool raylib::Vector2::CheckCollisionCircle (float radius,
::Rectangle rec 
) const
-
-inline
-
- -

Check collision between circle and rectangle.

- -

Definition at line 308 of file Vector2.hpp.

- -
-
- -

◆ CheckCollisionCircle() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
bool raylib::Vector2::CheckCollisionCircle (float radius1,
::Vector2 center2,
float radius2 
) const
-
-inline
-
- -

Check collision between two circles.

- -

Definition at line 301 of file Vector2.hpp.

- -
-
- -

◆ CheckCollisionLines()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool raylib::Vector2::CheckCollisionLines (::Vector2 endPos1,
::Vector2 startPos2,
::Vector2 endPos2,
::Vector2 * collisionPoint 
) const
-
-inline
-
- -

Check the collision between two lines defined by two points each, returns collision point by reference.

- -

Definition at line 336 of file Vector2.hpp.

- -
-
- -

◆ Distance()

- -
-
- - - - - -
- - - - - - - - -
float raylib::Vector2::Distance (const ::Vector2 & vector2) const
-
-inline
-
- -

Calculate distance between two vectors.

- -

Definition at line 199 of file Vector2.hpp.

- -
-
- -

◆ Divide() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::Divide (const ::Vector2 & vector2) const
-
-inline
-
- -

Definition at line 101 of file Vector2.hpp.

- -
-
- -

◆ Divide() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::Divide (const float div)
-
-inline
-
- -

Definition at line 109 of file Vector2.hpp.

- -
-
- -

◆ DotProduct()

- -
-
- - - - - -
- - - - - - - - -
float raylib::Vector2::DotProduct (const ::Vector2 & vector2) const
-
-inline
-
- -

Calculate two vectors dot product.

- -

Definition at line 185 of file Vector2.hpp.

- -
-
+

Definition at line 16 of file Vector2.hpp.

+

Member Function Documentation

◆ DrawCircle()

@@ -810,249 +307,7 @@ Protected Member Functions

Draw line using quadratic bezier curves with a control point.

TODO(RobLoach): Add this one this commit makes it in: https://github.com/raysan5/raylib/commit/521ed1cef0c0dbc752cb79f70c21bb4fc3bf70d4 Draw a color-filled circle (Vector version)

-

Definition at line 283 of file Vector2.hpp.

- -
- - -

◆ DrawLine() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector2& raylib::Vector2::DrawLine (::Vector2 endPos,
::Color color 
)
-
-inline
-
- -

Definition at line 251 of file Vector2.hpp.

- -
-
- -

◆ DrawLine() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Vector2& raylib::Vector2::DrawLine (::Vector2 endPos,
float thick,
::Color color 
)
-
-inline
-
- -

Definition at line 256 of file Vector2.hpp.

- -
-
- -

◆ DrawLineBezier()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Vector2& raylib::Vector2::DrawLineBezier (::Vector2 endPos,
float thick,
::Color color 
)
-
-inline
-
- -

Definition at line 261 of file Vector2.hpp.

- -
-
- -

◆ DrawPixel()

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::DrawPixel (::Color color)
-
-inline
-
- -

Definition at line 246 of file Vector2.hpp.

- -
-
- -

◆ DrawPoly()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector2& raylib::Vector2::DrawPoly (int sides,
float radius,
float rotation,
::Color color 
)
-
-inline
-
- -

Definition at line 293 of file Vector2.hpp.

- -
-
- -

◆ DrawRectangle()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector2& raylib::Vector2::DrawRectangle (::Vector2 size,
::Color color 
)
-
-inline
-
- -

Definition at line 288 of file Vector2.hpp.

+

Definition at line 262 of file Vector2.hpp.

@@ -1079,7 +334,10 @@ Protected Member Functions
-

Definition at line 47 of file Vector2.hpp.

+

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 26 of file Vector2.hpp.

@@ -1106,807 +364,10 @@ Protected Member Functions
-

Definition at line 48 of file Vector2.hpp.

+

Retrieves the y value for the object.

+
Returns
The y value of the object.
-
- - -

◆ Length()

- -
-
- - - - - -
- - - - - - - -
float raylib::Vector2::Length () const
-
-inline
-
- -

Calculate vector length.

- -

Definition at line 164 of file Vector2.hpp.

- -
-
- -

◆ LengthSqr()

- -
-
- - - - - -
- - - - - - - -
float raylib::Vector2::LengthSqr () const
-
-inline
-
- -

Calculate vector square length.

- -

Definition at line 171 of file Vector2.hpp.

- -
-
- -

◆ Lerp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector2 raylib::Vector2::Lerp (const ::Vector2 & vector2,
float amount 
) const
-
-inline
-
- -

Calculate linear interpolation between two vectors.

- -

Definition at line 206 of file Vector2.hpp.

- -
-
- -

◆ MoveTowards()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector2 raylib::Vector2::MoveTowards (const ::Vector2 & target,
float maxDistance 
) const
-
-inline
-
- -

Move Vector towards target.

- -

Definition at line 227 of file Vector2.hpp.

- -
-
- -

◆ Multiply()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::Multiply (const ::Vector2 & vector2) const
-
-inline
-
- -

Definition at line 85 of file Vector2.hpp.

- -
-
- -

◆ Negate()

- -
-
- - - - - -
- - - - - - - -
Vector2 raylib::Vector2::Negate () const
-
-inline
-
- -

Definition at line 77 of file Vector2.hpp.

- -
-
- -

◆ Normalize()

- -
-
- - - - - -
- - - - - - - -
Vector2 raylib::Vector2::Normalize () const
-
-inline
-
- -

Normalize provided vector.

- -

Definition at line 178 of file Vector2.hpp.

- -
-
- -

◆ One()

- -
-
- - - - - -
- - - - - - - -
static Vector2 raylib::Vector2::One ()
-
-inlinestatic
-
- -

Vector with components value 1.0f.

- -

Definition at line 241 of file Vector2.hpp.

- -
-
- -

◆ operator*() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::operator* (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 89 of file Vector2.hpp.

- -
-
- -

◆ operator*() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::operator* (const float scale)
-
-inline
-
- -

Definition at line 97 of file Vector2.hpp.

- -
-
- -

◆ operator*=() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator*= (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 136 of file Vector2.hpp.

- -

References set().

- -
-
- -

◆ operator*=() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator*= (const float scale)
-
-inline
-
- -

Definition at line 142 of file Vector2.hpp.

- -

References set().

- -
-
- -

◆ operator+()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::operator+ (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 65 of file Vector2.hpp.

- -
-
- -

◆ operator+=()

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator+= (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 123 of file Vector2.hpp.

- -

References set().

- -
-
- -

◆ operator-() [1/2]

- -
-
- - - - - -
- - - - - - - -
Vector2 raylib::Vector2::operator- ()
-
-inline
-
- -

Definition at line 81 of file Vector2.hpp.

- -
-
- -

◆ operator-() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::operator- (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 73 of file Vector2.hpp.

- -
-
- -

◆ operator-=()

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator-= (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 129 of file Vector2.hpp.

- -

References set().

- -
-
- -

◆ operator/() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::operator/ (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 105 of file Vector2.hpp.

- -
-
- -

◆ operator/() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator/ (const float div)
-
-inline
-
- -

Definition at line 116 of file Vector2.hpp.

- -
-
- -

◆ operator/=() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator/= (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 148 of file Vector2.hpp.

- -

References set().

- -
-
- -

◆ operator/=() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator/= (const float div)
-
-inline
-
- -

Definition at line 154 of file Vector2.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Vector2& raylib::Vector2::operator= (const ::Vector2 & vector2)
-
-inline
-
- -

Definition at line 50 of file Vector2.hpp.

- -

References set().

- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Vector2::operator== (const ::Vector2 & other)
-
-inline
-
- -

Definition at line 55 of file Vector2.hpp.

- -
-
- -

◆ Reflect()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::Reflect (const ::Vector2 & normal) const
-
-inline
-
- -

Calculate reflected vector to normal.

- -

Definition at line 213 of file Vector2.hpp.

- -
-
- -

◆ Rotate()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::Rotate (float degrees) const
-
-inline
-
- -

Rotate Vector by float in Degrees.

- -

Definition at line 220 of file Vector2.hpp.

- -
-
- -

◆ Scale()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::Scale (const float scale) const
-
-inline
-
- -

Definition at line 93 of file Vector2.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Vector2::set (const ::Vector2 & vec)
-
-inlineprotected
-
- -

Definition at line 344 of file Vector2.hpp.

- -

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), operator=(), and Vector2().

+

Definition at line 27 of file Vector2.hpp.

@@ -1934,7 +395,15 @@ Protected Member Functions
-

Definition at line 47 of file Vector2.hpp.

+

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 26 of file Vector2.hpp.

@@ -1962,71 +431,22 @@ Protected Member Functions
-

Definition at line 48 of file Vector2.hpp.

+

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
-
- - -

◆ Subtract()

- -
-
- - - - - -
- - - - - - - - -
Vector2 raylib::Vector2::Subtract (const ::Vector2 & vector2) const
-
-inline
-
- -

Definition at line 69 of file Vector2.hpp.

- -
-
- -

◆ Zero()

- -
-
- - - - - -
- - - - - - - -
static Vector2 raylib::Vector2::Zero ()
-
-inlinestatic
-
- -

Vector with components value 0.0f.

- -

Definition at line 234 of file Vector2.hpp.

+

Definition at line 27 of file Vector2.hpp.

diff --git a/docs/classraylib_1_1_vector3-members.html b/docs/classraylib_1_1_vector3-members.html index 165e633..0ab5ec9 100644 --- a/docs/classraylib_1_1_vector3-members.html +++ b/docs/classraylib_1_1_vector3-members.html @@ -74,77 +74,76 @@ $(function() {

This is the complete list of members for raylib::Vector3, including all inherited members.

- - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Add(const ::Vector3 &vector3)raylib::Vector3inline
Barycenter(const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c)raylib::Vector3inline
Add(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Barycenter(const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c) (defined in raylib::Vector3)raylib::Vector3inline
CheckCollision(float radius1, const ::Vector3 &center2, float radius2)raylib::Vector3inline
CrossProduct(const ::Vector3 &vector3)raylib::Vector3inline
Distance(const ::Vector3 &vector3)raylib::Vector3inline
Divide(const ::Vector3 &vector3)raylib::Vector3inline
Divide(const float div)raylib::Vector3inline
DotProduct(const ::Vector3 &vector3)raylib::Vector3inline
DrawCircle3D(float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color)raylib::Vector3inline
DrawCube(float width, float height, float length, ::Color color)raylib::Vector3inline
DrawCube(const ::Vector3 &size, ::Color color)raylib::Vector3inline
DrawCubeTexture(const ::Texture2D &texture, float width, float height, float length, ::Color color)raylib::Vector3inline
DrawCubeWires(float width, float height, float length, ::Color color)raylib::Vector3inline
DrawCubeWires(const ::Vector3 &size, ::Color color)raylib::Vector3inline
DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, Color color)raylib::Vector3inline
DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, Color color)raylib::Vector3inline
DrawGizmo()raylib::Vector3inline
DrawLine3D(const ::Vector3 &endPos, ::Color color)raylib::Vector3inline
DrawPlane(const ::Vector2 &size, ::Color color)raylib::Vector3inline
DrawPoint3D(::Color color)raylib::Vector3inline
DrawSphere(float radius, ::Color color)raylib::Vector3inline
DrawSphere(float radius, int rings, int slices, ::Color color)raylib::Vector3inline
DrawSphereWires(float radius, int rings, int slices, ::Color color)raylib::Vector3inline
CrossProduct(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Distance(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Divide(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Divide(const float div) (defined in raylib::Vector3)raylib::Vector3inline
DotProduct(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
DrawCircle3D(float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawCube(float width, float height, float length, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawCube(const ::Vector3 &size, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawCubeTexture(const ::Texture2D &texture, float width, float height, float length, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawCubeWires(float width, float height, float length, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawCubeWires(const ::Vector3 &size, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawGizmo() (defined in raylib::Vector3)raylib::Vector3inline
DrawLine3D(const ::Vector3 &endPos, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawPlane(const ::Vector2 &size, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawPoint3D(::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawSphere(float radius, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawSphere(float radius, int rings, int slices, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
DrawSphereWires(float radius, int rings, int slices, ::Color color) (defined in raylib::Vector3)raylib::Vector3inline
GetX() constraylib::Vector3inline
GetY() constraylib::Vector3inline
GetZ() constraylib::Vector3inline
Length() constraylib::Vector3inline
Lerp(const ::Vector3 &vector3, const float amount)raylib::Vector3inline
Max(const ::Vector3 &vector3)raylib::Vector3inline
Min(const ::Vector3 &vector3)raylib::Vector3inline
Multiply(const ::Vector3 &vector3)raylib::Vector3inline
Negate()raylib::Vector3inline
Normalize()raylib::Vector3inline
One()raylib::Vector3inlinestatic
operator*(const ::Vector3 &vector3)raylib::Vector3inline
operator*(const float scale)raylib::Vector3inline
operator*=(const ::Vector3 &vector3)raylib::Vector3inline
operator*=(const float scale)raylib::Vector3inline
operator+(const ::Vector3 &vector3)raylib::Vector3inline
operator+=(const ::Vector3 &vector3)raylib::Vector3inline
operator-(const ::Vector3 &vector3)raylib::Vector3inline
operator-()raylib::Vector3inline
operator-=(const ::Vector3 &vector3)raylib::Vector3inline
operator/(const ::Vector3 &vector3)raylib::Vector3inline
operator/(const float div)raylib::Vector3inline
operator/=(const ::Vector3 &vector3)raylib::Vector3inline
operator/=(const float div)raylib::Vector3inline
operator=(const ::Vector3 &vector3)raylib::Vector3inline
operator==(const ::Vector3 &other)raylib::Vector3inline
OrthoNormalize(::Vector3 *vector3)raylib::Vector3inline
Perpendicular()raylib::Vector3inline
Reflect(const ::Vector3 &normal)raylib::Vector3inline
RotateByQuaternion(const ::Quaternion &quaternion)raylib::Vector3inline
Scale(const float scale)raylib::Vector3inline
set(const ::Vector3 &vec)raylib::Vector3inlineprotected
SetX(float value)raylib::Vector3inline
SetY(float value)raylib::Vector3inline
SetZ(float value)raylib::Vector3inline
Subtract(const ::Vector3 &vector3)raylib::Vector3inline
Transform(const ::Matrix &matrix)raylib::Vector3inline
Vector3(const ::Vector3 &vec)raylib::Vector3inline
Vector3(float x, float y, float z)raylib::Vector3inline
Vector3(float x, float y)raylib::Vector3inline
Vector3(float x)raylib::Vector3inline
Vector3()raylib::Vector3inline
Vector3(::Color color)raylib::Vector3inline
Zero()raylib::Vector3inlinestatic
Length() const (defined in raylib::Vector3)raylib::Vector3inline
Lerp(const ::Vector3 &vector3, const float amount) (defined in raylib::Vector3)raylib::Vector3inline
Max(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Min(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Multiply(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Negate() (defined in raylib::Vector3)raylib::Vector3inline
Normalize() (defined in raylib::Vector3)raylib::Vector3inline
One() (defined in raylib::Vector3)raylib::Vector3inlinestatic
operator*(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator*(const float scale) (defined in raylib::Vector3)raylib::Vector3inline
operator*=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator*=(const float scale) (defined in raylib::Vector3)raylib::Vector3inline
operator+(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator+=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator-(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator-() (defined in raylib::Vector3)raylib::Vector3inline
operator-=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator/(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator/(const float div) (defined in raylib::Vector3)raylib::Vector3inline
operator/=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator/=(const float div) (defined in raylib::Vector3)raylib::Vector3inline
operator=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator==(const ::Vector3 &other) (defined in raylib::Vector3)raylib::Vector3inline
OrthoNormalize(::Vector3 *vector3) (defined in raylib::Vector3)raylib::Vector3inline
Perpendicular() (defined in raylib::Vector3)raylib::Vector3inline
Reflect(const ::Vector3 &normal) (defined in raylib::Vector3)raylib::Vector3inline
RotateByQuaternion(const ::Quaternion &quaternion) (defined in raylib::Vector3)raylib::Vector3inline
Scale(const float scale) (defined in raylib::Vector3)raylib::Vector3inline
SetX(float value)raylib::Vector3inline
SetY(float value)raylib::Vector3inline
SetZ(float value)raylib::Vector3inline
Subtract(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
Transform(const ::Matrix &matrix) (defined in raylib::Vector3)raylib::Vector3inline
Vector3(const ::Vector3 &vec) (defined in raylib::Vector3)raylib::Vector3inline
Vector3(float x, float y, float z) (defined in raylib::Vector3)raylib::Vector3inline
Vector3(float x, float y) (defined in raylib::Vector3)raylib::Vector3inline
Vector3(float x) (defined in raylib::Vector3)raylib::Vector3inline
Vector3() (defined in raylib::Vector3)raylib::Vector3inline
Vector3(::Color color) (defined in raylib::Vector3)raylib::Vector3inline
Zero() (defined in raylib::Vector3)raylib::Vector3inlinestatic
diff --git a/docs/classraylib_1_1_vector3.html b/docs/classraylib_1_1_vector3.html index 8d84bf5..2711978 100644 --- a/docs/classraylib_1_1_vector3.html +++ b/docs/classraylib_1_1_vector3.html @@ -70,1282 +70,222 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Vector3 Class Reference
+ +

Vector3 type. + More...

- - - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - +

Public Member Functions

 Vector3 ()
 
 Vector3 (::Color color)
+ Vector3 (::Color color)
 
 Vector3 (const ::Vector3 &vec)
+ Vector3 (const ::Vector3 &vec)
 
 Vector3 (float x)
+ Vector3 (float x)
 
 Vector3 (float x, float y)
+ Vector3 (float x, float y)
 
 Vector3 (float x, float y, float z)
+ Vector3 (float x, float y, float z)
 
Vector3 Add (const ::Vector3 &vector3)
+Vector3 Add (const ::Vector3 &vector3)
 
Vector3 Barycenter (const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c)
+Vector3 Barycenter (const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c)
 
bool CheckCollision (float radius1, const ::Vector3 &center2, float radius2)
 Detect collision between two spheres. More...
+bool CheckCollision (float radius1, const ::Vector3 &center2, float radius2)
 Detect collision between two spheres.
 
Vector3 CrossProduct (const ::Vector3 &vector3)
+Vector3 CrossProduct (const ::Vector3 &vector3)
 
float Distance (const ::Vector3 &vector3)
+float Distance (const ::Vector3 &vector3)
 
Vector3 Divide (const ::Vector3 &vector3)
+Vector3 Divide (const ::Vector3 &vector3)
 
Vector3 & Divide (const float div)
+Vector3 & Divide (const float div)
 
float DotProduct (const ::Vector3 &vector3)
+float DotProduct (const ::Vector3 &vector3)
 
Vector3 & DrawCircle3D (float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color)
+Vector3 & DrawCircle3D (float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color)
 
Vector3 & DrawCube (const ::Vector3 &size, ::Color color)
+Vector3 & DrawCube (const ::Vector3 &size, ::Color color)
 
Vector3 & DrawCube (float width, float height, float length, ::Color color)
+Vector3 & DrawCube (float width, float height, float length, ::Color color)
 
Vector3 & DrawCubeTexture (const ::Texture2D &texture, float width, float height, float length, ::Color color)
+Vector3 & DrawCubeTexture (const ::Texture2D &texture, float width, float height, float length, ::Color color)
 
Vector3 & DrawCubeWires (const ::Vector3 &size, ::Color color)
+Vector3 & DrawCubeWires (const ::Vector3 &size, ::Color color)
 
Vector3 & DrawCubeWires (float width, float height, float length, ::Color color)
+Vector3 & DrawCubeWires (float width, float height, float length, ::Color color)
 
Vector3 & DrawCylinder (float radiusTop, float radiusBottom, float height, int slices, Color color)
+Vector3 & DrawCylinder (float radiusTop, float radiusBottom, float height, int slices, Color color)
 
Vector3 & DrawCylinderWires (float radiusTop, float radiusBottom, float height, int slices, Color color)
+Vector3 & DrawCylinderWires (float radiusTop, float radiusBottom, float height, int slices, Color color)
 
Vector3 & DrawGizmo ()
+Vector3 & DrawGizmo ()
 
Vector3 & DrawLine3D (const ::Vector3 &endPos, ::Color color)
+Vector3 & DrawLine3D (const ::Vector3 &endPos, ::Color color)
 
Vector3 & DrawPlane (const ::Vector2 &size, ::Color color)
+Vector3 & DrawPlane (const ::Vector2 &size, ::Color color)
 
Vector3 & DrawPoint3D (::Color color)
+Vector3 & DrawPoint3D (::Color color)
 
Vector3 & DrawSphere (float radius, ::Color color)
+Vector3 & DrawSphere (float radius, ::Color color)
 
Vector3 & DrawSphere (float radius, int rings, int slices, ::Color color)
+Vector3 & DrawSphere (float radius, int rings, int slices, ::Color color)
 
Vector3 & DrawSphereWires (float radius, int rings, int slices, ::Color color)
+Vector3 & DrawSphereWires (float radius, int rings, int slices, ::Color color)
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
float GetZ () const
 Retrieves the z value for the object. More...
 
float Length () const
+float Length () const
 
Vector3 Lerp (const ::Vector3 &vector3, const float amount)
+Vector3 Lerp (const ::Vector3 &vector3, const float amount)
 
Vector3 Max (const ::Vector3 &vector3)
+Vector3 Max (const ::Vector3 &vector3)
 
Vector3 Min (const ::Vector3 &vector3)
+Vector3 Min (const ::Vector3 &vector3)
 
Vector3 Multiply (const ::Vector3 &vector3)
+Vector3 Multiply (const ::Vector3 &vector3)
 
Vector3 Negate ()
+Vector3 Negate ()
 
Vector3 Normalize ()
+Vector3 Normalize ()
 
Vector3 operator* (const ::Vector3 &vector3)
+Vector3 operator* (const ::Vector3 &vector3)
 
Vector3 operator* (const float scale)
+Vector3 operator* (const float scale)
 
Vector3 & operator*= (const ::Vector3 &vector3)
+Vector3 & operator*= (const ::Vector3 &vector3)
 
Vector3 & operator*= (const float scale)
+Vector3 & operator*= (const float scale)
 
Vector3 operator+ (const ::Vector3 &vector3)
+Vector3 operator+ (const ::Vector3 &vector3)
 
Vector3 & operator+= (const ::Vector3 &vector3)
+Vector3 & operator+= (const ::Vector3 &vector3)
 
Vector3 operator- ()
+Vector3 operator- ()
 
Vector3 operator- (const ::Vector3 &vector3)
+Vector3 operator- (const ::Vector3 &vector3)
 
Vector3 & operator-= (const ::Vector3 &vector3)
+Vector3 & operator-= (const ::Vector3 &vector3)
 
Vector3 operator/ (const ::Vector3 &vector3)
+Vector3 operator/ (const ::Vector3 &vector3)
 
Vector3 operator/ (const float div)
+Vector3 operator/ (const float div)
 
Vector3 & operator/= (const ::Vector3 &vector3)
+Vector3 & operator/= (const ::Vector3 &vector3)
 
Vector3 & operator/= (const float div)
+Vector3 & operator/= (const float div)
 
Vector3 & operator= (const ::Vector3 &vector3)
+Vector3 & operator= (const ::Vector3 &vector3)
 
bool operator== (const ::Vector3 &other)
+bool operator== (const ::Vector3 &other)
 
void OrthoNormalize (::Vector3 *vector3)
+void OrthoNormalize (::Vector3 *vector3)
 
Vector3 Perpendicular ()
+Vector3 Perpendicular ()
 
Vector3 Reflect (const ::Vector3 &normal)
+Vector3 Reflect (const ::Vector3 &normal)
 
Vector3 RotateByQuaternion (const ::Quaternion &quaternion)
+Vector3 RotateByQuaternion (const ::Quaternion &quaternion)
 
Vector3 Scale (const float scale)
+Vector3 Scale (const float scale)
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
void SetZ (float value)
 Sets the z value for the object. More...
 
Vector3 Subtract (const ::Vector3 &vector3)
+Vector3 Subtract (const ::Vector3 &vector3)
 
Vector3 Transform (const ::Matrix &matrix)
+Vector3 Transform (const ::Matrix &matrix)
 
- + - + -

Static Public Member Functions

static Vector3 One ()
+static Vector3 One ()
 
static Vector3 Zero ()
+static Vector3 Zero ()
 
- - -

-Protected Member Functions

void set (const ::Vector3 &vec)
 

Detailed Description

-
-

Definition at line 37 of file Vector3.hpp.

-

Constructor & Destructor Documentation

- -

◆ Vector3() [1/6]

+

Vector3 type.

-
-
- - - - - -
- - - - - - - - -
raylib::Vector3::Vector3 (const ::Vector3 & vec)
-
-inline
-
- -

Definition at line 39 of file Vector3.hpp.

- -

References set().

- -
-
- -

◆ Vector3() [2/6]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Vector3::Vector3 (float x,
float y,
float z 
)
-
-inline
-
- -

Definition at line 43 of file Vector3.hpp.

- -
-
- -

◆ Vector3() [3/6]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Vector3::Vector3 (float x,
float y 
)
-
-inline
-
- -

Definition at line 44 of file Vector3.hpp.

- -
-
- -

◆ Vector3() [4/6]

- -
-
- - - - - -
- - - - - - - - -
raylib::Vector3::Vector3 (float x)
-
-inline
-
- -

Definition at line 45 of file Vector3.hpp.

- -
-
- -

◆ Vector3() [5/6]

- -
-
- - - - - -
- - - - - - - -
raylib::Vector3::Vector3 ()
-
-inline
-
- -

Definition at line 46 of file Vector3.hpp.

- -
-
- -

◆ Vector3() [6/6]

- -
-
- - - - - -
- - - - - - - - -
raylib::Vector3::Vector3 (::Color color)
-
-inline
-
- -

Definition at line 48 of file Vector3.hpp.

- -

References set().

- -
-
-

Member Function Documentation

- -

◆ Add()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Add (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 68 of file Vector3.hpp.

- -
-
- -

◆ Barycenter()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Vector3 raylib::Vector3::Barycenter (const ::Vector3 & a,
const ::Vector3 & b,
const ::Vector3 & c 
)
-
-inline
-
- -

Definition at line 221 of file Vector3.hpp.

- -
-
- -

◆ CheckCollision()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
bool raylib::Vector3::CheckCollision (float radius1,
const ::Vector3 & center2,
float radius2 
)
-
-inline
-
- -

Detect collision between two spheres.

- -

Definition at line 323 of file Vector3.hpp.

- -
-
- -

◆ CrossProduct()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::CrossProduct (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 189 of file Vector3.hpp.

- -
-
- -

◆ Distance()

- -
-
- - - - - -
- - - - - - - - -
float raylib::Vector3::Distance (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 181 of file Vector3.hpp.

- -
-
- -

◆ Divide() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Divide (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 108 of file Vector3.hpp.

- -

Referenced by operator/().

- -
-
- -

◆ Divide() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::Divide (const float div)
-
-inline
-
- -

Definition at line 116 of file Vector3.hpp.

- -
-
- -

◆ DotProduct()

- -
-
- - - - - -
- - - - - - - - -
float raylib::Vector3::DotProduct (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 177 of file Vector3.hpp.

- -
-
- -

◆ DrawCircle3D()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCircle3D (float radius,
const ::Vector3 & rotationAxis,
float rotationAngle,
Color color 
)
-
-inline
-
- -

Definition at line 244 of file Vector3.hpp.

- -
-
- -

◆ DrawCube() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCube (const ::Vector3 & size,
::Color color 
)
-
-inline
-
- -

Definition at line 258 of file Vector3.hpp.

- -
-
- -

◆ DrawCube() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCube (float width,
float height,
float length,
::Color color 
)
-
-inline
-
- -

Definition at line 253 of file Vector3.hpp.

- -
-
- -

◆ DrawCubeTexture()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCubeTexture (const ::Texture2D & texture,
float width,
float height,
float length,
::Color color 
)
-
-inline
-
- -

Definition at line 273 of file Vector3.hpp.

- -
-
- -

◆ DrawCubeWires() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCubeWires (const ::Vector3 & size,
::Color color 
)
-
-inline
-
- -

Definition at line 268 of file Vector3.hpp.

- -
-
- -

◆ DrawCubeWires() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCubeWires (float width,
float height,
float length,
::Color color 
)
-
-inline
-
- -

Definition at line 263 of file Vector3.hpp.

- -
-
- -

◆ DrawCylinder()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCylinder (float radiusTop,
float radiusBottom,
float height,
int slices,
Color color 
)
-
-inline
-
- -

Definition at line 298 of file Vector3.hpp.

- -
-
- -

◆ DrawCylinderWires()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawCylinderWires (float radiusTop,
float radiusBottom,
float height,
int slices,
Color color 
)
-
-inline
-
- -

Definition at line 304 of file Vector3.hpp.

- -
-
- -

◆ DrawGizmo()

- -
-
- - - - - -
- - - - - - - -
Vector3& raylib::Vector3::DrawGizmo ()
-
-inline
-
- -

Definition at line 315 of file Vector3.hpp.

- -
-
- -

◆ DrawLine3D()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawLine3D (const ::Vector3 & endPos,
::Color color 
)
-
-inline
-
- -

Definition at line 234 of file Vector3.hpp.

- -
-
- -

◆ DrawPlane()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawPlane (const ::Vector2 & size,
::Color color 
)
-
-inline
-
- -

Definition at line 310 of file Vector3.hpp.

- -
-
- -

◆ DrawPoint3D()

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::DrawPoint3D (::Color color)
-
-inline
-
- -

Definition at line 239 of file Vector3.hpp.

- -
-
- -

◆ DrawSphere() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawSphere (float radius,
::Color color 
)
-
-inline
-
- -

Definition at line 283 of file Vector3.hpp.

- -
-
- -

◆ DrawSphere() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawSphere (float radius,
int rings,
int slices,
::Color color 
)
-
-inline
-
- -

Definition at line 288 of file Vector3.hpp.

- -
-
- -

◆ DrawSphereWires()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vector3& raylib::Vector3::DrawSphereWires (float radius,
int rings,
int slices,
::Color color 
)
-
-inline
-
- -

Definition at line 293 of file Vector3.hpp.

- -
-
+

Definition at line 16 of file Vector3.hpp.

+

Member Function Documentation

◆ GetX()

@@ -1369,7 +309,10 @@ Protected Member Functions
-

Definition at line 52 of file Vector3.hpp.

+

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 31 of file Vector3.hpp.

@@ -1396,7 +339,10 @@ Protected Member Functions
-

Definition at line 53 of file Vector3.hpp.

+

Retrieves the y value for the object.

+
Returns
The y value of the object.
+ +

Definition at line 32 of file Vector3.hpp.

@@ -1423,837 +369,10 @@ Protected Member Functions
-

Definition at line 54 of file Vector3.hpp.

+

Retrieves the z value for the object.

+
Returns
The z value of the object.
-
- - -

◆ Length()

- -
-
- - - - - -
- - - - - - - -
float raylib::Vector3::Length () const
-
-inline
-
- -

Definition at line 169 of file Vector3.hpp.

- -
-
- -

◆ Lerp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector3 raylib::Vector3::Lerp (const ::Vector3 & vector3,
const float amount 
)
-
-inline
-
- -

Definition at line 185 of file Vector3.hpp.

- -
-
- -

◆ Max()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Max (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 217 of file Vector3.hpp.

- -
-
- -

◆ Min()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Min (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 213 of file Vector3.hpp.

- -
-
- -

◆ Multiply()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Multiply (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 92 of file Vector3.hpp.

- -
-
- -

◆ Negate()

- -
-
- - - - - -
- - - - - - - -
Vector3 raylib::Vector3::Negate ()
-
-inline
-
- -

Definition at line 84 of file Vector3.hpp.

- -
-
- -

◆ Normalize()

- -
-
- - - - - -
- - - - - - - -
Vector3 raylib::Vector3::Normalize ()
-
-inline
-
- -

Definition at line 173 of file Vector3.hpp.

- -
-
- -

◆ One()

- -
-
- - - - - -
- - - - - - - -
static Vector3 raylib::Vector3::One ()
-
-inlinestatic
-
- -

Definition at line 229 of file Vector3.hpp.

- -
-
- -

◆ operator*() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::operator* (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 96 of file Vector3.hpp.

- -
-
- -

◆ operator*() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::operator* (const float scale)
-
-inline
-
- -

Definition at line 104 of file Vector3.hpp.

- -
-
- -

◆ operator*=() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::operator*= (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 141 of file Vector3.hpp.

- -

References set().

- -
-
- -

◆ operator*=() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::operator*= (const float scale)
-
-inline
-
- -

Definition at line 147 of file Vector3.hpp.

- -

References set().

- -
-
- -

◆ operator+()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::operator+ (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 72 of file Vector3.hpp.

- -
-
- -

◆ operator+=()

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::operator+= (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 128 of file Vector3.hpp.

- -

References set().

- -
-
- -

◆ operator-() [1/2]

- -
-
- - - - - -
- - - - - - - -
Vector3 raylib::Vector3::operator- ()
-
-inline
-
- -

Definition at line 88 of file Vector3.hpp.

- -
-
- -

◆ operator-() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::operator- (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 80 of file Vector3.hpp.

- -
-
- -

◆ operator-=()

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::operator-= (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 134 of file Vector3.hpp.

- -

References set().

- -
-
- -

◆ operator/() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::operator/ (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 112 of file Vector3.hpp.

- -
-
- -

◆ operator/() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::operator/ (const float div)
-
-inline
-
- -

Definition at line 124 of file Vector3.hpp.

- -

References Divide().

- -
-
- -

◆ operator/=() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::operator/= (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 153 of file Vector3.hpp.

- -
-
- -

◆ operator/=() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::operator/= (const float div)
-
-inline
-
- -

Definition at line 161 of file Vector3.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Vector3& raylib::Vector3::operator= (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 56 of file Vector3.hpp.

- -

References set().

- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Vector3::operator== (const ::Vector3 & other)
-
-inline
-
- -

Definition at line 61 of file Vector3.hpp.

- -
-
- -

◆ OrthoNormalize()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Vector3::OrthoNormalize (::Vector3 * vector3)
-
-inline
-
- -

Definition at line 197 of file Vector3.hpp.

- -
-
- -

◆ Perpendicular()

- -
-
- - - - - -
- - - - - - - -
Vector3 raylib::Vector3::Perpendicular ()
-
-inline
-
- -

Definition at line 193 of file Vector3.hpp.

- -
-
- -

◆ Reflect()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Reflect (const ::Vector3 & normal)
-
-inline
-
- -

Definition at line 209 of file Vector3.hpp.

- -
-
- -

◆ RotateByQuaternion()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::RotateByQuaternion (const ::Quaternion & quaternion)
-
-inline
-
- -

Definition at line 205 of file Vector3.hpp.

- -
-
- -

◆ Scale()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Scale (const float scale)
-
-inline
-
- -

Definition at line 100 of file Vector3.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Vector3::set (const ::Vector3 & vec)
-
-inlineprotected
-
- -

Definition at line 328 of file Vector3.hpp.

- -

Referenced by operator*=(), operator+=(), operator-=(), operator=(), and Vector3().

+

Definition at line 33 of file Vector3.hpp.

@@ -2281,7 +400,15 @@ Protected Member Functions
-

Definition at line 52 of file Vector3.hpp.

+

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 31 of file Vector3.hpp.

@@ -2309,7 +436,15 @@ Protected Member Functions
-

Definition at line 53 of file Vector3.hpp.

+

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
+ +

Definition at line 32 of file Vector3.hpp.

@@ -2337,97 +472,22 @@ Protected Member Functions
-

Definition at line 54 of file Vector3.hpp.

+

Sets the z value for the object.

+
Parameters
+ + +
valueThe value of which to set z to.
+
+
-
- - -

◆ Subtract()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Subtract (const ::Vector3 & vector3)
-
-inline
-
- -

Definition at line 76 of file Vector3.hpp.

- -
-
- -

◆ Transform()

- -
-
- - - - - -
- - - - - - - - -
Vector3 raylib::Vector3::Transform (const ::Matrix & matrix)
-
-inline
-
- -

Definition at line 201 of file Vector3.hpp.

- -
-
- -

◆ Zero()

- -
-
- - - - - -
- - - - - - - -
static Vector3 raylib::Vector3::Zero ()
-
-inlinestatic
-
- -

Definition at line 225 of file Vector3.hpp.

+

Definition at line 33 of file Vector3.hpp.

diff --git a/docs/classraylib_1_1_vector4-members.html b/docs/classraylib_1_1_vector4-members.html index d1a1669..18ce74c 100644 --- a/docs/classraylib_1_1_vector4-members.html +++ b/docs/classraylib_1_1_vector4-members.html @@ -74,51 +74,50 @@ $(function() {

This is the complete list of members for raylib::Vector4, including all inherited members.

- - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ColorFromNormalized() constraylib::Vector4inline
FromAxisAngle(const ::Vector3 &axis, const float angle)raylib::Vector4inlinestatic
FromEuler(const float roll, const float pitch, const float yaw)raylib::Vector4inlinestatic
FromEuler(const ::Vector3 &vector3)raylib::Vector4inlinestatic
FromMatrix(const ::Matrix &matrix)raylib::Vector4inlinestatic
FromVector3ToVector3(const ::Vector3 &from, const ::Vector3 &to)raylib::Vector4inlinestatic
ColorFromNormalized() const (defined in raylib::Vector4)raylib::Vector4inline
FromAxisAngle(const ::Vector3 &axis, const float angle) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromEuler(const float roll, const float pitch, const float yaw) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromEuler(const ::Vector3 &vector3) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromMatrix(const ::Matrix &matrix) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromVector3ToVector3(const ::Vector3 &from, const ::Vector3 &to) (defined in raylib::Vector4)raylib::Vector4inlinestatic
GetW() constraylib::Vector4inline
GetX() constraylib::Vector4inline
GetY() constraylib::Vector4inline
GetZ() constraylib::Vector4inline
Identity()raylib::Vector4inlinestatic
Invert()raylib::Vector4inline
Length() constraylib::Vector4inline
Lerp(const ::Vector4 &vector4, float amount)raylib::Vector4inline
Multiply(const ::Vector4 &vector4)raylib::Vector4inline
Nlerp(const ::Vector4 &vector4, float amount)raylib::Vector4inline
Normalize()raylib::Vector4inline
operator Color()raylib::Vector4inline
operator*(const ::Vector4 &vector4)raylib::Vector4inline
operator::Rectangle() constraylib::Vector4inline
operator=(const ::Vector4 &vector4)raylib::Vector4inline
operator==(const ::Vector4 &other)raylib::Vector4inline
set(const ::Vector4 &vec4)raylib::Vector4inlineprotected
SetW(float value)raylib::Vector4inline
SetX(float value)raylib::Vector4inline
SetY(float value)raylib::Vector4inline
SetZ(float value)raylib::Vector4inline
Slerp(const ::Vector4 &vector4, float amount)raylib::Vector4inline
ToAxisAngle(::Vector3 *outAxis, float *outAngle)raylib::Vector4inline
ToAxisAngle()raylib::Vector4inline
ToEuler()raylib::Vector4inline
ToMatrix()raylib::Vector4inline
ToRectangle()raylib::Vector4inline
Transform(const ::Matrix &matrix)raylib::Vector4inline
Vector4(const ::Vector4 &vec)raylib::Vector4inline
Vector4(float x, float y, float z, float w)raylib::Vector4inline
Vector4(float x, float y, float z)raylib::Vector4inline
Vector4(float x, float y)raylib::Vector4inline
Vector4(float x)raylib::Vector4inline
Vector4()raylib::Vector4inline
Vector4(::Color color)raylib::Vector4inline
Identity() (defined in raylib::Vector4)raylib::Vector4inlinestatic
Invert() (defined in raylib::Vector4)raylib::Vector4inline
Length() const (defined in raylib::Vector4)raylib::Vector4inline
Lerp(const ::Vector4 &vector4, float amount) (defined in raylib::Vector4)raylib::Vector4inline
Multiply(const ::Vector4 &vector4) (defined in raylib::Vector4)raylib::Vector4inline
Nlerp(const ::Vector4 &vector4, float amount) (defined in raylib::Vector4)raylib::Vector4inline
Normalize() (defined in raylib::Vector4)raylib::Vector4inline
operator Color() (defined in raylib::Vector4)raylib::Vector4inline
operator*(const ::Vector4 &vector4) (defined in raylib::Vector4)raylib::Vector4inline
operator::Rectangle() const (defined in raylib::Vector4)raylib::Vector4inline
operator=(const ::Vector4 &vector4) (defined in raylib::Vector4)raylib::Vector4inline
operator==(const ::Vector4 &other) (defined in raylib::Vector4)raylib::Vector4inline
SetW(float value)raylib::Vector4inline
SetX(float value)raylib::Vector4inline
SetY(float value)raylib::Vector4inline
SetZ(float value)raylib::Vector4inline
Slerp(const ::Vector4 &vector4, float amount) (defined in raylib::Vector4)raylib::Vector4inline
ToAxisAngle(::Vector3 *outAxis, float *outAngle) (defined in raylib::Vector4)raylib::Vector4inline
ToAxisAngle() (defined in raylib::Vector4)raylib::Vector4inline
ToEuler() (defined in raylib::Vector4)raylib::Vector4inline
ToMatrix() (defined in raylib::Vector4)raylib::Vector4inline
ToRectangle() (defined in raylib::Vector4)raylib::Vector4inline
Transform(const ::Matrix &matrix) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(const ::Vector4 &vec) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x, float y, float z, float w) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x, float y, float z) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x, float y) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x) (defined in raylib::Vector4)raylib::Vector4inline
Vector4() (defined in raylib::Vector4)raylib::Vector4inline
Vector4(::Color color) (defined in raylib::Vector4)raylib::Vector4inline
diff --git a/docs/classraylib_1_1_vector4.html b/docs/classraylib_1_1_vector4.html index 2c4866b..b335199 100644 --- a/docs/classraylib_1_1_vector4.html +++ b/docs/classraylib_1_1_vector4.html @@ -70,561 +70,143 @@ $(function() {
Public Member Functions | Static Public Member Functions | -Protected Member Functions | List of all members
raylib::Vector4 Class Reference
+ +

Vector4 type. + More...

- - - + - + - + - + - + - + - + + + + + - + - + - + - + - + - + - + - + - + - + - + + + + + - + - + - + - + - + - + - +

Public Member Functions

 Vector4 ()
 
 Vector4 (::Color color)
+ Vector4 (::Color color)
 
 Vector4 (const ::Vector4 &vec)
+ Vector4 (const ::Vector4 &vec)
 
 Vector4 (float x)
+ Vector4 (float x)
 
 Vector4 (float x, float y)
+ Vector4 (float x, float y)
 
 Vector4 (float x, float y, float z)
+ Vector4 (float x, float y, float z)
 
 Vector4 (float x, float y, float z, float w)
+ Vector4 (float x, float y, float z, float w)
 
Color ColorFromNormalized () const
+Color ColorFromNormalized () const
 
float GetW () const
 Retrieves the w value for the object. More...
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
float GetZ () const
 Retrieves the z value for the object. More...
 
Vector4 Invert ()
+Vector4 Invert ()
 
float Length () const
+float Length () const
 
Vector4 Lerp (const ::Vector4 &vector4, float amount)
+Vector4 Lerp (const ::Vector4 &vector4, float amount)
 
Vector4 Multiply (const ::Vector4 &vector4)
+Vector4 Multiply (const ::Vector4 &vector4)
 
Vector4 Nlerp (const ::Vector4 &vector4, float amount)
+Vector4 Nlerp (const ::Vector4 &vector4, float amount)
 
Vector4 Normalize ()
+Vector4 Normalize ()
 
 operator Color ()
+ operator Color ()
 
Vector4 operator* (const ::Vector4 &vector4)
+Vector4 operator* (const ::Vector4 &vector4)
 
 operator::Rectangle () const
+ operator::Rectangle () const
 
Vector4 & operator= (const ::Vector4 &vector4)
+Vector4 & operator= (const ::Vector4 &vector4)
 
bool operator== (const ::Vector4 &other)
+bool operator== (const ::Vector4 &other)
 
void SetW (float value)
 Sets the w value for the object. More...
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
void SetZ (float value)
 Sets the z value for the object. More...
 
Vector4 Slerp (const ::Vector4 &vector4, float amount)
+Vector4 Slerp (const ::Vector4 &vector4, float amount)
 
std::pair< Vector3, float > ToAxisAngle ()
+std::pair< Vector3, float > ToAxisAngle ()
 
void ToAxisAngle (::Vector3 *outAxis, float *outAngle)
+void ToAxisAngle (::Vector3 *outAxis, float *outAngle)
 
Vector3 ToEuler ()
+Vector3 ToEuler ()
 
Matrix ToMatrix ()
+Matrix ToMatrix ()
 
inline ::Rectangle ToRectangle ()
+inline ::Rectangle ToRectangle ()
 
Vector4 Transform (const ::Matrix &matrix)
+Vector4 Transform (const ::Matrix &matrix)
 
- + - + - + - + - + - + -

Static Public Member Functions

static Vector4 FromAxisAngle (const ::Vector3 &axis, const float angle)
+static Vector4 FromAxisAngle (const ::Vector3 &axis, const float angle)
 
static Vector4 FromEuler (const ::Vector3 &vector3)
+static Vector4 FromEuler (const ::Vector3 &vector3)
 
static Vector4 FromEuler (const float roll, const float pitch, const float yaw)
+static Vector4 FromEuler (const float roll, const float pitch, const float yaw)
 
static Vector4 FromMatrix (const ::Matrix &matrix)
+static Vector4 FromMatrix (const ::Matrix &matrix)
 
static Vector4 FromVector3ToVector3 (const ::Vector3 &from, const ::Vector3 &to)
+static Vector4 FromVector3ToVector3 (const ::Vector3 &from, const ::Vector3 &to)
 
static Vector4 Identity ()
+static Vector4 Identity ()
 
- - -

-Protected Member Functions

void set (const ::Vector4 &vec4)
 

Detailed Description

-
-

Definition at line 38 of file Vector4.hpp.

-

Constructor & Destructor Documentation

- -

◆ Vector4() [1/7]

+

Vector4 type.

-
-
- - - - - -
- - - - - - - - -
raylib::Vector4::Vector4 (const ::Vector4 & vec)
-
-inline
-
- -

Definition at line 40 of file Vector4.hpp.

- -

References set().

- -
-
- -

◆ Vector4() [2/7]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Vector4::Vector4 (float x,
float y,
float z,
float w 
)
-
-inline
-
- -

Definition at line 44 of file Vector4.hpp.

- -
-
- -

◆ Vector4() [3/7]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Vector4::Vector4 (float x,
float y,
float z 
)
-
-inline
-
- -

Definition at line 45 of file Vector4.hpp.

- -
-
- -

◆ Vector4() [4/7]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::Vector4::Vector4 (float x,
float y 
)
-
-inline
-
- -

Definition at line 46 of file Vector4.hpp.

- -
-
- -

◆ Vector4() [5/7]

- -
-
- - - - - -
- - - - - - - - -
raylib::Vector4::Vector4 (float x)
-
-inline
-
- -

Definition at line 47 of file Vector4.hpp.

- -
-
- -

◆ Vector4() [6/7]

- -
-
- - - - - -
- - - - - - - -
raylib::Vector4::Vector4 ()
-
-inline
-
- -

Definition at line 48 of file Vector4.hpp.

- -
-
- -

◆ Vector4() [7/7]

- -
-
- - - - - -
- - - - - - - - -
raylib::Vector4::Vector4 (::Color color)
-
-inline
-
- -

Definition at line 50 of file Vector4.hpp.

- -

References set().

- -
-
-

Member Function Documentation

- -

◆ ColorFromNormalized()

- -
-
- - - - - -
- - - - - - - -
Color raylib::Vector4::ColorFromNormalized () const
-
-inline
-
- -

Definition at line 164 of file Vector4.hpp.

- -

Referenced by operator Color().

- -
-
- -

◆ FromAxisAngle()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static Vector4 raylib::Vector4::FromAxisAngle (const ::Vector3 & axis,
const float angle 
)
-
-inlinestatic
-
- -

Definition at line 147 of file Vector4.hpp.

- -
-
- -

◆ FromEuler() [1/2]

- -
-
- - - - - -
- - - - - - - - -
static Vector4 raylib::Vector4::FromEuler (const ::Vector3 & vector3)
-
-inlinestatic
-
- -

Definition at line 155 of file Vector4.hpp.

- -
-
- -

◆ FromEuler() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static Vector4 raylib::Vector4::FromEuler (const float roll,
const float pitch,
const float yaw 
)
-
-inlinestatic
-
- -

Definition at line 151 of file Vector4.hpp.

- -
-
- -

◆ FromMatrix()

- -
-
- - - - - -
- - - - - - - - -
static Vector4 raylib::Vector4::FromMatrix (const ::Matrix & matrix)
-
-inlinestatic
-
- -

Definition at line 143 of file Vector4.hpp.

- -
-
- -

◆ FromVector3ToVector3()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static Vector4 raylib::Vector4::FromVector3ToVector3 (const ::Vector3 & from,
const ::Vector3 & to 
)
-
-inlinestatic
-
- -

Definition at line 139 of file Vector4.hpp.

- -
-
+

Definition at line 17 of file Vector4.hpp.

+

Member Function Documentation

◆ GetW()

@@ -648,7 +230,10 @@ Protected Member Functions
-

Definition at line 57 of file Vector4.hpp.

+

Retrieves the w value for the object.

+
Returns
The w value of the object.
+ +

Definition at line 36 of file Vector4.hpp.

@@ -675,7 +260,10 @@ Protected Member Functions
-

Definition at line 54 of file Vector4.hpp.

+

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 33 of file Vector4.hpp.

@@ -702,7 +290,10 @@ Protected Member Functions
-

Definition at line 55 of file Vector4.hpp.

+

Retrieves the y value for the object.

+
Returns
The y value of the object.
+ +

Definition at line 34 of file Vector4.hpp.

@@ -729,391 +320,10 @@ Protected Member Functions
-

Definition at line 56 of file Vector4.hpp.

+

Retrieves the z value for the object.

+
Returns
The z value of the object.
-
- - -

◆ Identity()

- -
-
- - - - - -
- - - - - - - -
static Vector4 raylib::Vector4::Identity ()
-
-inlinestatic
-
- -

Definition at line 135 of file Vector4.hpp.

- -
-
- -

◆ Invert()

- -
-
- - - - - -
- - - - - - - -
Vector4 raylib::Vector4::Invert ()
-
-inline
-
- -

Definition at line 112 of file Vector4.hpp.

- -
-
- -

◆ Length()

- -
-
- - - - - -
- - - - - - - -
float raylib::Vector4::Length () const
-
-inline
-
- -

Definition at line 104 of file Vector4.hpp.

- -
-
- -

◆ Lerp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector4 raylib::Vector4::Lerp (const ::Vector4 & vector4,
float amount 
)
-
-inline
-
- -

Definition at line 88 of file Vector4.hpp.

- -
-
- -

◆ Multiply()

- -
-
- - - - - -
- - - - - - - - -
Vector4 raylib::Vector4::Multiply (const ::Vector4 & vector4)
-
-inline
-
- -

Definition at line 80 of file Vector4.hpp.

- -
-
- -

◆ Nlerp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector4 raylib::Vector4::Nlerp (const ::Vector4 & vector4,
float amount 
)
-
-inline
-
- -

Definition at line 92 of file Vector4.hpp.

- -
-
- -

◆ Normalize()

- -
-
- - - - - -
- - - - - - - -
Vector4 raylib::Vector4::Normalize ()
-
-inline
-
- -

Definition at line 108 of file Vector4.hpp.

- -
-
- -

◆ operator Color()

- -
-
- - - - - -
- - - - - - - -
raylib::Vector4::operator Color ()
-
-inline
-
- -

Definition at line 168 of file Vector4.hpp.

- -

References ColorFromNormalized().

- -
-
- -

◆ operator*()

- -
-
- - - - - -
- - - - - - - - -
Vector4 raylib::Vector4::operator* (const ::Vector4 & vector4)
-
-inline
-
- -

Definition at line 84 of file Vector4.hpp.

- -
-
- -

◆ operator::Rectangle()

- -
-
- - - - - -
- - - - - - - -
raylib::Vector4::operator::Rectangle () const
-
-inline
-
- -

Definition at line 75 of file Vector4.hpp.

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Vector4& raylib::Vector4::operator= (const ::Vector4 & vector4)
-
-inline
-
- -

Definition at line 59 of file Vector4.hpp.

- -

References set().

- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Vector4::operator== (const ::Vector4 & other)
-
-inline
-
- -

Definition at line 64 of file Vector4.hpp.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Vector4::set (const ::Vector4 & vec4)
-
-inlineprotected
-
- -

Definition at line 173 of file Vector4.hpp.

- -

Referenced by operator=(), and Vector4().

+

Definition at line 35 of file Vector4.hpp.

@@ -1141,7 +351,15 @@ Protected Member Functions
-

Definition at line 57 of file Vector4.hpp.

+

Sets the w value for the object.

+
Parameters
+ + +
valueThe value of which to set w to.
+
+
+ +

Definition at line 36 of file Vector4.hpp.

@@ -1169,7 +387,15 @@ Protected Member Functions
-

Definition at line 54 of file Vector4.hpp.

+

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 33 of file Vector4.hpp.

@@ -1197,7 +423,15 @@ Protected Member Functions
-

Definition at line 55 of file Vector4.hpp.

+

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
+ +

Definition at line 34 of file Vector4.hpp.

@@ -1225,226 +459,22 @@ Protected Member Functions
-

Definition at line 56 of file Vector4.hpp.

+

Sets the z value for the object.

+
Parameters
+ + +
valueThe value of which to set z to.
+
+
-
- - -

◆ Slerp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Vector4 raylib::Vector4::Slerp (const ::Vector4 & vector4,
float amount 
)
-
-inline
-
- -

Definition at line 96 of file Vector4.hpp.

- -
-
- -

◆ ToAxisAngle() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::pair<Vector3, float> raylib::Vector4::ToAxisAngle ()
-
-inline
-
- -

Definition at line 120 of file Vector4.hpp.

- -
-
- -

◆ ToAxisAngle() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void raylib::Vector4::ToAxisAngle (::Vector3 * outAxis,
float * outAngle 
)
-
-inline
-
- -

Definition at line 116 of file Vector4.hpp.

- -
-
- -

◆ ToEuler()

- -
-
- - - - - -
- - - - - - - -
Vector3 raylib::Vector4::ToEuler ()
-
-inline
-
- -

Definition at line 159 of file Vector4.hpp.

- -
-
- -

◆ ToMatrix()

- -
-
- - - - - -
- - - - - - - -
Matrix raylib::Vector4::ToMatrix ()
-
-inline
-
- -

Definition at line 100 of file Vector4.hpp.

- -
-
- -

◆ ToRectangle()

- -
-
- - - - - -
- - - - - - - -
inline ::Rectangle raylib::Vector4::ToRectangle ()
-
-inline
-
- -

Definition at line 71 of file Vector4.hpp.

- -
-
- -

◆ Transform()

- -
-
- - - - - -
- - - - - - - - -
Vector4 raylib::Vector4::Transform (const ::Matrix & matrix)
-
-inline
-
- -

Definition at line 131 of file Vector4.hpp.

+

Definition at line 35 of file Vector4.hpp.

diff --git a/docs/classraylib_1_1_vr_simulator-members.html b/docs/classraylib_1_1_vr_simulator-members.html index 16c9306..35d20dd 100644 --- a/docs/classraylib_1_1_vr_simulator-members.html +++ b/docs/classraylib_1_1_vr_simulator-members.html @@ -83,13 +83,13 @@ $(function() { Toggle()raylib::VrSimulatorinline Update(::Camera *camera)raylib::VrSimulatorinline Update(const ::Camera &camera)raylib::VrSimulatorinline - VrSimulator()raylib::VrSimulatorinline - VrSimulator(::VrDeviceInfo info, ::Shader distortion)raylib::VrSimulatorinline + VrSimulator() (defined in raylib::VrSimulator)raylib::VrSimulatorinline + VrSimulator(::VrDeviceInfo info, ::Shader distortion) (defined in raylib::VrSimulator)raylib::VrSimulatorinline ~VrSimulator()raylib::VrSimulatorinline diff --git a/docs/classraylib_1_1_vr_simulator.html b/docs/classraylib_1_1_vr_simulator.html index 9d51c46..394c917 100644 --- a/docs/classraylib_1_1_vr_simulator.html +++ b/docs/classraylib_1_1_vr_simulator.html @@ -74,433 +74,64 @@ $(function() {
raylib::VrSimulator Class Reference
+ +

VR control functions. + More...

- - - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +

Public Member Functions

 VrSimulator ()
 
 VrSimulator (::VrDeviceInfo info, ::Shader distortion)
+ VrSimulator (::VrDeviceInfo info, ::Shader distortion)
 
 ~VrSimulator ()
 Close VR simulator for current device. More...
+ ~VrSimulator ()
 Close VR simulator for current device.
 
VrSimulator & BeginDrawing ()
 Begin VR simulator stereo rendering. More...
+VrSimulator & BeginDrawing ()
 Begin VR simulator stereo rendering.
 
void Close ()
 Close VR simulator for current device. More...
+void Close ()
 Close VR simulator for current device.
 
VrSimulator & EndDrawing ()
 End VR simulator stereo rendering. More...
+VrSimulator & EndDrawing ()
 End VR simulator stereo rendering.
 
void Init ()
 Init VR simulator for selected device parameters. More...
+void Init ()
 Init VR simulator for selected device parameters.
 
bool IsReady () const
 Detect if VR simulator is ready. More...
+bool IsReady () const
 Detect if VR simulator is ready.
 
VrSimulator & Set (::VrDeviceInfo info, ::Shader distortion)
 Set stereo rendering configuration parameters. More...
+VrSimulator & Set (::VrDeviceInfo info, ::Shader distortion)
 Set stereo rendering configuration parameters.
 
VrSimulator & Toggle ()
 Enable/Disable VR experience. More...
+VrSimulator & Toggle ()
 Enable/Disable VR experience.
 
VrSimulator & Update (::Camera *camera)
 Update VR tracking (position and orientation) and camera. More...
+VrSimulator & Update (::Camera *camera)
 Update VR tracking (position and orientation) and camera.
 
VrSimulator & Update (const ::Camera &camera)
 Update VR tracking (position and orientation) and camera. More...
+VrSimulator & Update (const ::Camera &camera)
 Update VR tracking (position and orientation) and camera.
 

Detailed Description

-
-

Definition at line 32 of file VrSimulator.hpp.

-

Constructor & Destructor Documentation

- -

◆ VrSimulator() [1/2]

+

VR control functions.

-
-
- - - - - -
- - - - - - - -
raylib::VrSimulator::VrSimulator ()
-
-inline
-
- -

Definition at line 34 of file VrSimulator.hpp.

- -

References Init().

- -
-
- -

◆ VrSimulator() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
raylib::VrSimulator::VrSimulator (::VrDeviceInfo info,
::Shader distortion 
)
-
-inline
-
- -

Definition at line 38 of file VrSimulator.hpp.

- -

References Init(), and Set().

- -
-
- -

◆ ~VrSimulator()

- -
-
- - - - - -
- - - - - - - -
raylib::VrSimulator::~VrSimulator ()
-
-inline
-
- -

Close VR simulator for current device.

- -

Definition at line 53 of file VrSimulator.hpp.

- -

References Close().

- -
-
-

Member Function Documentation

- -

◆ BeginDrawing()

- -
-
- - - - - -
- - - - - - - -
VrSimulator& raylib::VrSimulator::BeginDrawing ()
-
-inline
-
- -

Begin VR simulator stereo rendering.

- -

Definition at line 100 of file VrSimulator.hpp.

- -
-
- -

◆ Close()

- -
-
- - - - - -
- - - - - - - -
void raylib::VrSimulator::Close ()
-
-inline
-
- -

Close VR simulator for current device.

- -

Definition at line 116 of file VrSimulator.hpp.

- -

Referenced by ~VrSimulator().

- -
-
- -

◆ EndDrawing()

- -
-
- - - - - -
- - - - - - - -
VrSimulator& raylib::VrSimulator::EndDrawing ()
-
-inline
-
- -

End VR simulator stereo rendering.

- -

Definition at line 108 of file VrSimulator.hpp.

- -
-
- -

◆ Init()

- -
-
- - - - - -
- - - - - - - -
void raylib::VrSimulator::Init ()
-
-inline
-
- -

Init VR simulator for selected device parameters.

- -

Definition at line 46 of file VrSimulator.hpp.

- -

Referenced by VrSimulator().

- -
-
- -

◆ IsReady()

- -
-
- - - - - -
- - - - - - - -
bool raylib::VrSimulator::IsReady () const
-
-inline
-
- -

Detect if VR simulator is ready.

- -

Definition at line 60 of file VrSimulator.hpp.

- -
-
- -

◆ Set()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
VrSimulator& raylib::VrSimulator::Set (::VrDeviceInfo info,
::Shader distortion 
)
-
-inline
-
- -

Set stereo rendering configuration parameters.

- -

Definition at line 84 of file VrSimulator.hpp.

- -

Referenced by VrSimulator().

- -
-
- -

◆ Toggle()

- -
-
- - - - - -
- - - - - - - -
VrSimulator& raylib::VrSimulator::Toggle ()
-
-inline
-
- -

Enable/Disable VR experience.

- -

Definition at line 92 of file VrSimulator.hpp.

- -
-
- -

◆ Update() [1/2]

- -
-
- - - - - -
- - - - - - - - -
VrSimulator& raylib::VrSimulator::Update (::Camera * camera)
-
-inline
-
- -

Update VR tracking (position and orientation) and camera.

- -

Definition at line 67 of file VrSimulator.hpp.

- -
-
- -

◆ Update() [2/2]

- -
-
- - - - - -
- - - - - - - - -
VrSimulator& raylib::VrSimulator::Update (const ::Camera & camera)
-
-inline
-
- -

Update VR tracking (position and orientation) and camera.

- -

Definition at line 75 of file VrSimulator.hpp.

- -
-
-
+

Definition at line 11 of file VrSimulator.hpp.

+
diff --git a/docs/classraylib_1_1_wave-members.html b/docs/classraylib_1_1_wave-members.html index 9d0ac60..6fcdcbb 100644 --- a/docs/classraylib_1_1_wave-members.html +++ b/docs/classraylib_1_1_wave-members.html @@ -88,24 +88,23 @@ $(function() { LoadSound()raylib::Waveinline operator Sound()raylib::Waveinline operator::Sound()raylib::Waveinline - operator=(const ::Wave &wave)raylib::Waveinline - set(const ::Wave &wave)raylib::Waveinlineprotected - SetChannels(unsigned int value)raylib::Waveinline - SetData(void *value)raylib::Waveinline - SetSampleCount(unsigned int value)raylib::Waveinline - SetSampleRate(unsigned int value)raylib::Waveinline - SetSampleSize(unsigned int value)raylib::Waveinline - Unload()raylib::Waveinline - UnloadSamples(float *samples)raylib::Waveinline - Wave(const ::Wave &wave)raylib::Waveinline - Wave(unsigned int SampleCount=0, unsigned int SampleRate=0, unsigned int SampleSize=0, unsigned int Channels=0)raylib::Waveinline - Wave(const std::string &fileName)raylib::Waveinline - Wave(const std::string &fileType, const unsigned char *fileData, int dataSize)raylib::Waveinline - ~Wave()raylib::Waveinline + operator=(const ::Wave &wave) (defined in raylib::Wave)raylib::Waveinline + SetChannels(unsigned int value)raylib::Waveinline + SetData(void *value)raylib::Waveinline + SetSampleCount(unsigned int value)raylib::Waveinline + SetSampleRate(unsigned int value)raylib::Waveinline + SetSampleSize(unsigned int value)raylib::Waveinline + Unload()raylib::Waveinline + UnloadSamples(float *samples)raylib::Waveinline + Wave(const ::Wave &wave) (defined in raylib::Wave)raylib::Waveinline + Wave(unsigned int SampleCount=0, unsigned int SampleRate=0, unsigned int SampleSize=0, unsigned int Channels=0) (defined in raylib::Wave)raylib::Waveinline + Wave(const std::string &fileName)raylib::Waveinline + Wave(const std::string &fileType, const unsigned char *fileData, int dataSize)raylib::Waveinline + ~Wave()raylib::Waveinline diff --git a/docs/classraylib_1_1_wave.html b/docs/classraylib_1_1_wave.html index ef0ed03..dcc0fdb 100644 --- a/docs/classraylib_1_1_wave.html +++ b/docs/classraylib_1_1_wave.html @@ -69,206 +69,119 @@ $(function() {
Public Member Functions | -Protected Member Functions | List of all members
raylib::Wave Class Reference
+ +

Wave type, defines audio wave data. + More...

- + - - + + - + - + + - - + + - - + + - - + + - - + + - - + + + + + + + - - + + - - + + - - + + - - + + - + + + + + + - - + + - - + + -

Public Member Functions

 Wave (const ::Wave &wave)
+ Wave (const ::Wave &wave)
 
 Wave (const std::string &fileName)
 Load wave data from file. More...
+ Wave (const std::string &fileName)
 Load wave data from file.
 
 Wave (const std::string &fileType, const unsigned char *fileData, int dataSize)
 Load wave from memory buffer, fileType refers to extension: i.e. More...
 
 Wave (unsigned int SampleCount=0, unsigned int SampleRate=0, unsigned int SampleSize=0, unsigned int Channels=0)
+ Wave (unsigned int SampleCount=0, unsigned int SampleRate=0, unsigned int SampleSize=0, unsigned int Channels=0)
 
 ~Wave ()
+ ~Wave ()
 Unload wave data.
 
inline ::Wave Copy ()
 Copy a wave to a new wave. More...
+inline ::Wave Copy ()
 Copy a wave to a new wave.
 
Wave & Crop (int initSample, int finalSample)
 Crop a wave to defined samples range. More...
+Wave & Crop (int initSample, int finalSample)
 Crop a wave to defined samples range.
 
bool Export (const std::string &fileName)
 Export wave data to file, returns true on success. More...
+bool Export (const std::string &fileName)
 Export wave data to file, returns true on success.
 
bool ExportAsCode (const std::string &fileName)
 Export wave sample data to code (.h), returns true on success. More...
+bool ExportAsCode (const std::string &fileName)
 Export wave sample data to code (.h), returns true on success.
 
Wave & Format (int SampleRate, int SampleSize, int Channels=2)
 Convert wave data to desired format. More...
+Wave & Format (int SampleRate, int SampleSize, int Channels=2)
 Convert wave data to desired format.
 
unsigned int GetChannels () const
 Retrieves the channels value for the object. More...
 
void * GetData () const
 Retrieves the data value for the object. More...
 
unsigned int GetSampleCount () const
 Retrieves the sampleCount value for the object. More...
 
unsigned int GetSampleRate () const
 Retrieves the sampleRate value for the object. More...
 
unsigned int GetSampleSize () const
 Retrieves the sampleSize value for the object. More...
 
float * LoadSamples ()
 Load samples data from wave as a floats array. More...
+float * LoadSamples ()
 Load samples data from wave as a floats array.
 
inline ::Sound LoadSound ()
 Load sound from wave data. More...
+inline ::Sound LoadSound ()
 Load sound from wave data.
 
 operator Sound ()
 Load sound from wave data. More...
+ operator Sound ()
 Load sound from wave data.
 
 operator::Sound ()
 Load sound from wave data. More...
+ operator::Sound ()
 Load sound from wave data.
 
Wave & operator= (const ::Wave &wave)
+Wave & operator= (const ::Wave &wave)
 
void SetChannels (unsigned int value)
 Sets the channels value for the object. More...
 
void SetData (void *value)
 Sets the data value for the object. More...
 
void SetSampleCount (unsigned int value)
 Sets the sampleCount value for the object. More...
 
void SetSampleRate (unsigned int value)
 Sets the sampleRate value for the object. More...
 
void SetSampleSize (unsigned int value)
 Sets the sampleSize value for the object. More...
 
void Unload ()
 Unload wave data. More...
+void Unload ()
 Unload wave data.
 
void UnloadSamples (float *samples)
 Unload samples data loaded with LoadWaveSamples() More...
+void UnloadSamples (float *samples)
 Unload samples data loaded with LoadWaveSamples()
 
- - -

-Protected Member Functions

void set (const ::Wave &wave)
 

Detailed Description

-
-

Definition at line 34 of file Wave.hpp.

+

Wave type, defines audio wave data.

+ +

Definition at line 13 of file Wave.hpp.

Constructor & Destructor Documentation

- -

◆ Wave() [1/4]

- -
-
- - - - - -
- - - - - - - - -
raylib::Wave::Wave (const ::Wave & wave)
-
-inline
-
- -

Definition at line 36 of file Wave.hpp.

- -

References set().

- -
-
- -

◆ Wave() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Wave::Wave (unsigned int SampleCount = 0,
unsigned int SampleRate = 0,
unsigned int SampleSize = 0,
unsigned int Channels = 0 
)
-
-inline
-
- -

Definition at line 40 of file Wave.hpp.

- -
-
- -

◆ Wave() [3/4]

- -
-
- - - - - -
- - - - - - - - -
raylib::Wave::Wave (const std::string & fileName)
-
-inline
-
- -

Load wave data from file.

- -

Definition at line 54 of file Wave.hpp.

- -

References set().

- -
-
-

◆ Wave() [4/4]

+

◆ Wave()

@@ -310,217 +223,11 @@ Protected Member Functions

Load wave from memory buffer, fileType refers to extension: i.e.

"wav"

-

Definition at line 61 of file Wave.hpp.

- -

References set().

- -
-
- -

◆ ~Wave()

- -
-
- - - - - -
- - - - - - - -
raylib::Wave::~Wave ()
-
-inline
-
- -

Definition at line 65 of file Wave.hpp.

- -

References Unload().

+

Definition at line 40 of file Wave.hpp.

Member Function Documentation

- -

◆ Copy()

- -
-
- - - - - -
- - - - - - - -
inline ::Wave raylib::Wave::Copy ()
-
-inline
-
- -

Copy a wave to a new wave.

- -

Definition at line 91 of file Wave.hpp.

- -
-
- -

◆ Crop()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Wave& raylib::Wave::Crop (int initSample,
int finalSample 
)
-
-inline
-
- -

Crop a wave to defined samples range.

- -

Definition at line 98 of file Wave.hpp.

- -
-
- -

◆ Export()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Wave::Export (const std::string & fileName)
-
-inline
-
- -

Export wave data to file, returns true on success.

- -

Definition at line 120 of file Wave.hpp.

- -
-
- -

◆ ExportAsCode()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Wave::ExportAsCode (const std::string & fileName)
-
-inline
-
- -

Export wave sample data to code (.h), returns true on success.

- -

Definition at line 128 of file Wave.hpp.

- -
-
- -

◆ Format()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Wave& raylib::Wave::Format (int SampleRate,
int SampleSize,
int Channels = 2 
)
-
-inline
-
- -

Convert wave data to desired format.

- -

Definition at line 83 of file Wave.hpp.

- -
-

◆ GetChannels()

@@ -544,7 +251,10 @@ Protected Member Functions
-

Definition at line 72 of file Wave.hpp.

+

Retrieves the channels value for the object.

+
Returns
The channels value of the object.
+ +

Definition at line 54 of file Wave.hpp.

@@ -571,7 +281,10 @@ Protected Member Functions
-

Definition at line 73 of file Wave.hpp.

+

Retrieves the data value for the object.

+
Returns
The data value of the object.
+ +

Definition at line 55 of file Wave.hpp.

@@ -598,7 +311,10 @@ Protected Member Functions
-

Definition at line 69 of file Wave.hpp.

+

Retrieves the sampleCount value for the object.

+
Returns
The sampleCount value of the object.
+ +

Definition at line 51 of file Wave.hpp.

@@ -625,7 +341,10 @@ Protected Member Functions
-

Definition at line 70 of file Wave.hpp.

+

Retrieves the sampleRate value for the object.

+
Returns
The sampleRate value of the object.
+ +

Definition at line 52 of file Wave.hpp.

@@ -652,189 +371,10 @@ Protected Member Functions
-

Definition at line 71 of file Wave.hpp.

+

Retrieves the sampleSize value for the object.

+
Returns
The sampleSize value of the object.
-
- - -

◆ LoadSamples()

- -
-
- - - - - -
- - - - - - - -
float* raylib::Wave::LoadSamples ()
-
-inline
-
- -

Load samples data from wave as a floats array.

- -

Definition at line 106 of file Wave.hpp.

- -
-
- -

◆ LoadSound()

- -
-
- - - - - -
- - - - - - - -
inline ::Sound raylib::Wave::LoadSound ()
-
-inline
-
- -

Load sound from wave data.

- -

Definition at line 146 of file Wave.hpp.

- -

Referenced by operator Sound(), and operator::Sound().

- -
-
- -

◆ operator Sound()

- -
-
- - - - - -
- - - - - - - -
raylib::Wave::operator Sound ()
-
-inline
-
- -

Load sound from wave data.

- -

Definition at line 160 of file Wave.hpp.

- -

References LoadSound().

- -
-
- -

◆ operator::Sound()

- -
-
- - - - - -
- - - - - - - -
raylib::Wave::operator::Sound ()
-
-inline
-
- -

Load sound from wave data.

- -

Definition at line 153 of file Wave.hpp.

- -

References LoadSound().

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Wave& raylib::Wave::operator= (const ::Wave & wave)
-
-inline
-
- -

Definition at line 75 of file Wave.hpp.

- -

References set().

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Wave::set (const ::Wave & wave)
-
-inlineprotected
-
- -

Definition at line 165 of file Wave.hpp.

- -

Referenced by operator=(), and Wave().

+

Definition at line 53 of file Wave.hpp.

@@ -862,7 +402,15 @@ Protected Member Functions
-

Definition at line 72 of file Wave.hpp.

+

Sets the channels value for the object.

+
Parameters
+ + +
valueThe value of which to set channels to.
+
+
+ +

Definition at line 54 of file Wave.hpp.

@@ -890,7 +438,15 @@ Protected Member Functions
-

Definition at line 73 of file Wave.hpp.

+

Sets the data value for the object.

+
Parameters
+ + +
valueThe value of which to set data to.
+
+
+ +

Definition at line 55 of file Wave.hpp.

@@ -918,7 +474,15 @@ Protected Member Functions
-

Definition at line 69 of file Wave.hpp.

+

Sets the sampleCount value for the object.

+
Parameters
+ + +
valueThe value of which to set sampleCount to.
+
+
+ +

Definition at line 51 of file Wave.hpp.

@@ -946,7 +510,15 @@ Protected Member Functions
-

Definition at line 70 of file Wave.hpp.

+

Sets the sampleRate value for the object.

+
Parameters
+ + +
valueThe value of which to set sampleRate to.
+
+
+ +

Definition at line 52 of file Wave.hpp.

@@ -974,75 +546,22 @@ Protected Member Functions
-

Definition at line 71 of file Wave.hpp.

+

Sets the sampleSize value for the object.

+
Parameters
+ + +
valueThe value of which to set sampleSize to.
+
+
-
- - -

◆ Unload()

- -
-
- - - - - -
- - - - - - - -
void raylib::Wave::Unload ()
-
-inline
-
- -

Unload wave data.

- -

Definition at line 136 of file Wave.hpp.

- -

Referenced by ~Wave().

- -
-
- -

◆ UnloadSamples()

- -
-
- - - - - -
- - - - - - - - -
void raylib::Wave::UnloadSamples (float * samples)
-
-inline
-
- -

Unload samples data loaded with LoadWaveSamples()

- -

Definition at line 113 of file Wave.hpp.

+

Definition at line 53 of file Wave.hpp.

diff --git a/docs/classraylib_1_1_window-members.html b/docs/classraylib_1_1_window-members.html index 2214446..ec591c0 100644 --- a/docs/classraylib_1_1_window-members.html +++ b/docs/classraylib_1_1_window-members.html @@ -87,7 +87,7 @@ $(function() { GetSize()raylib::Windowinline GetTime() constraylib::Windowinline GetWidth() constraylib::Windowinline - Init(int width=800, int height=450, const std::string &title="raylib")raylib::Windowinline + Init(int width=800, int height=450, const std::string &title="raylib") (defined in raylib::Window)raylib::Windowinline IsCursorOnScreen() constraylib::Windowinline IsFocused() constraylib::Windowinline IsFullscreen() constraylib::Windowinline @@ -118,7 +118,7 @@ $(function() { diff --git a/docs/classraylib_1_1_window.html b/docs/classraylib_1_1_window.html index c658513..95be4cb 100644 --- a/docs/classraylib_1_1_window.html +++ b/docs/classraylib_1_1_window.html @@ -81,1446 +81,181 @@ $(function() { - - + + - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +

Public Member Functions

 Window (int width=800, int height=450, const std::string &title="raylib", bool lateInit=false)
 Initialize window and OpenGL context. More...
+ Window (int width=800, int height=450, const std::string &title="raylib", bool lateInit=false)
 Initialize window and OpenGL context.
 
 ~Window ()
+ ~Window ()
 Close window and unload OpenGL context.
 
Window & BeginDrawing ()
 Setup canvas (framebuffer) to start drawing. More...
+Window & BeginDrawing ()
 Setup canvas (framebuffer) to start drawing.
 
Window & ClearState (unsigned int flag)
 Clear window configuration state flags. More...
+Window & ClearState (unsigned int flag)
 Clear window configuration state flags.
 
void Close ()
 Close window and unload OpenGL context. More...
+void Close ()
 Close window and unload OpenGL context.
 
Window & EndDrawing ()
 End canvas drawing and swap buffers (double buffering) More...
+Window & EndDrawing ()
 End canvas drawing and swap buffers (double buffering)
 
int GetFPS () const
 Returns current FPS. More...
+int GetFPS () const
 Returns current FPS.
 
float GetFrameTime () const
 Returns time in seconds for last frame drawn. More...
+float GetFrameTime () const
 Returns time in seconds for last frame drawn.
 
void * GetHandle () const
 Get native window handle. More...
+void * GetHandle () const
 Get native window handle.
 
int GetHeight () const
 Get current screen height. More...
+int GetHeight () const
 Get current screen height.
 
inline ::Vector2 GetPosition () const
 Get window position XY on monitor. More...
+inline ::Vector2 GetPosition () const
 Get window position XY on monitor.
 
inline ::Vector2 GetScaleDPI () const
 Get window scale DPI factor. More...
+inline ::Vector2 GetScaleDPI () const
 Get window scale DPI factor.
 
inline ::Vector2 GetSize ()
 Get the screen's width and height. More...
+inline ::Vector2 GetSize ()
 Get the screen's width and height.
 
double GetTime () const
 Returns elapsed time in seconds since InitWindow() More...
+double GetTime () const
 Returns elapsed time in seconds since InitWindow()
 
int GetWidth () const
 Get current screen width. More...
+int GetWidth () const
 Get current screen width.
 
void Init (int width=800, int height=450, const std::string &title="raylib")
+void Init (int width=800, int height=450, const std::string &title="raylib")
 
bool IsCursorOnScreen () const
 Check if cursor is on the current screen. More...
+bool IsCursorOnScreen () const
 Check if cursor is on the current screen.
 
bool IsFocused () const
 Check if window is currently focused. More...
+bool IsFocused () const
 Check if window is currently focused.
 
bool IsFullscreen () const
 Check if window is currently fullscreen. More...
+bool IsFullscreen () const
 Check if window is currently fullscreen.
 
bool IsHidden () const
 Check if window is currently hidden. More...
+bool IsHidden () const
 Check if window is currently hidden.
 
bool IsMaximized () const
 Check if window is currently minimized. More...
+bool IsMaximized () const
 Check if window is currently minimized.
 
bool IsMinimized () const
 Check if window is currently minimized. More...
+bool IsMinimized () const
 Check if window is currently minimized.
 
bool IsResized () const
 Check if window has been resized last frame. More...
+bool IsResized () const
 Check if window has been resized last frame.
 
bool IsState (unsigned int flag) const
 Check if one specific window flag is enabled. More...
+bool IsState (unsigned int flag) const
 Check if one specific window flag is enabled.
 
Window & Maximize ()
 Set window state: maximized, if resizable (only PLATFORM_DESKTOP) More...
+Window & Maximize ()
 Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
 
Window & Minimize ()
 Set window state: minimized, if resizable (only PLATFORM_DESKTOP) More...
+Window & Minimize ()
 Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
 
Window & Restore ()
 Set window state: not minimized/maximized (only PLATFORM_DESKTOP) More...
+Window & Restore ()
 Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
 
Window & SetFullscreen (bool fullscreen)
 Set whether or not the application should be fullscreen. More...
+Window & SetFullscreen (bool fullscreen)
 Set whether or not the application should be fullscreen.
 
Window & SetIcon (const ::Image &image)
 Set icon for window. More...
+Window & SetIcon (const ::Image &image)
 Set icon for window.
 
Window & SetMinSize (int width, int height)
 Set window minimum dimensions. More...
+Window & SetMinSize (int width, int height)
 Set window minimum dimensions.
 
Window & SetMonitor (int monitor)
 Set monitor for the current window. More...
+Window & SetMonitor (int monitor)
 Set monitor for the current window.
 
Window & SetPosition (const ::Vector2 &position)
 Set window position on screen. More...
+Window & SetPosition (const ::Vector2 &position)
 Set window position on screen.
 
Window & SetPosition (int x, int y)
 Set window position on screen. More...
+Window & SetPosition (int x, int y)
 Set window position on screen.
 
Window & SetSize (const ::Vector2 &size)
 Set window dimensions. More...
+Window & SetSize (const ::Vector2 &size)
 Set window dimensions.
 
Window & SetSize (int width, int height)
 Set window dimensions. More...
+Window & SetSize (int width, int height)
 Set window dimensions.
 
Window & SetState (unsigned int flag)
 Set window configuration state using flags. More...
+Window & SetState (unsigned int flag)
 Set window configuration state using flags.
 
Window & SetTargetFPS (int fps)
 Set target FPS (maximum) More...
+Window & SetTargetFPS (int fps)
 Set target FPS (maximum)
 
Window & SetTitle (const std::string &title)
 Set title for window. More...
+Window & SetTitle (const std::string &title)
 Set title for window.
 
bool ShouldClose () const
 Check if KEY_ESCAPE pressed or Close icon pressed. More...
+bool ShouldClose () const
 Check if KEY_ESCAPE pressed or Close icon pressed.
 
Window & ToggleFullscreen ()
 Toggle window state: fullscreen/windowed. More...
+Window & ToggleFullscreen ()
 Toggle window state: fullscreen/windowed.
 
- - + +

Static Public Member Functions

static bool IsReady ()
 Check if window has been initialized successfully. More...
+static bool IsReady ()
 Check if window has been initialized successfully.
 

Detailed Description

Window and Graphics Device Functions.

-
raylib::Window w(640, 480, "raylib-cpp");
-
while (!w.ShouldClose()) {
-
// Update
-
}
-
-

Definition at line 44 of file Window.hpp.

-

Constructor & Destructor Documentation

- -

◆ Window()

-
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
raylib::Window::Window (int width = 800,
int height = 450,
const std::string & title = "raylib",
bool lateInit = false 
)
-
-inline
-
- -

Initialize window and OpenGL context.

- -

Definition at line 49 of file Window.hpp.

- -

References Init().

- -
-
- -

◆ ~Window()

- -
-
- - - - - -
- - - - - - - -
raylib::Window::~Window ()
-
-inline
-
- -

Definition at line 56 of file Window.hpp.

- -

References Close().

- -
-
-

Member Function Documentation

- -

◆ BeginDrawing()

- -
-
- - - - - -
- - - - - - - -
Window& raylib::Window::BeginDrawing ()
-
-inline
-
- -

Setup canvas (framebuffer) to start drawing.

- -

Definition at line 285 of file Window.hpp.

- -
-
- -

◆ ClearState()

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::ClearState (unsigned int flag)
-
-inline
-
- -

Clear window configuration state flags.

- -

Definition at line 152 of file Window.hpp.

- -
-
- -

◆ Close()

- -
-
- - - - - -
- - - - - - - -
void raylib::Window::Close ()
-
-inline
-
- -

Close window and unload OpenGL context.

- -

Definition at line 74 of file Window.hpp.

- -

Referenced by ~Window().

- -
-
- -

◆ EndDrawing()

- -
-
- - - - - -
- - - - - - - -
Window& raylib::Window::EndDrawing ()
-
-inline
-
- -

End canvas drawing and swap buffers (double buffering)

- -

Definition at line 293 of file Window.hpp.

- -
-
- -

◆ GetFPS()

- -
-
- - - - - -
- - - - - - - -
int raylib::Window::GetFPS () const
-
-inline
-
- -

Returns current FPS.

- -

Definition at line 337 of file Window.hpp.

- -
-
- -

◆ GetFrameTime()

- -
-
- - - - - -
- - - - - - - -
float raylib::Window::GetFrameTime () const
-
-inline
-
- -

Returns time in seconds for last frame drawn.

- -

Definition at line 344 of file Window.hpp.

- -
-
- -

◆ GetHandle()

- -
-
- - - - - -
- - - - - - - -
void* raylib::Window::GetHandle () const
-
-inline
-
- -

Get native window handle.

- -

Definition at line 278 of file Window.hpp.

- -
-
- -

◆ GetHeight()

- -
-
- - - - - -
- - - - - - - -
int raylib::Window::GetHeight () const
-
-inline
-
- -

Get current screen height.

- -

Definition at line 308 of file Window.hpp.

- -

Referenced by GetSize().

- -
-
- -

◆ GetPosition()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Window::GetPosition () const
-
-inline
-
- -

Get window position XY on monitor.

- -

Definition at line 315 of file Window.hpp.

- -
-
- -

◆ GetScaleDPI()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Window::GetScaleDPI () const
-
-inline
-
- -

Get window scale DPI factor.

- -

Definition at line 322 of file Window.hpp.

- -
-
- -

◆ GetSize()

- -
-
- - - - - -
- - - - - - - -
inline ::Vector2 raylib::Window::GetSize ()
-
-inline
-
- -

Get the screen's width and height.

- -

Definition at line 271 of file Window.hpp.

- -

References GetHeight(), and GetWidth().

- -
-
- -

◆ GetTime()

- -
-
- - - - - -
- - - - - - - -
double raylib::Window::GetTime () const
-
-inline
-
- -

Returns elapsed time in seconds since InitWindow()

- -

Definition at line 351 of file Window.hpp.

- -
-
- -

◆ GetWidth()

- -
-
- - - - - -
- - - - - - - -
int raylib::Window::GetWidth () const
-
-inline
-
- -

Get current screen width.

- -

Definition at line 301 of file Window.hpp.

- -

Referenced by GetSize().

- -
-
- -

◆ Init()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void raylib::Window::Init (int width = 800,
int height = 450,
const std::string & title = "raylib" 
)
-
-inline
-
- -

Definition at line 60 of file Window.hpp.

- -

References raylib::InitWindow().

- -

Referenced by Window().

- -
-
- -

◆ IsCursorOnScreen()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::IsCursorOnScreen () const
-
-inline
-
- -

Check if cursor is on the current screen.

- -

Definition at line 81 of file Window.hpp.

- -
-
- -

◆ IsFocused()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::IsFocused () const
-
-inline
-
- -

Check if window is currently focused.

- -

Definition at line 123 of file Window.hpp.

- -
-
- -

◆ IsFullscreen()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::IsFullscreen () const
-
-inline
-
- -

Check if window is currently fullscreen.

- -

Definition at line 95 of file Window.hpp.

- -

Referenced by SetFullscreen().

- -
-
- -

◆ IsHidden()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::IsHidden () const
-
-inline
-
- -

Check if window is currently hidden.

- -

Definition at line 102 of file Window.hpp.

- -
-
- -

◆ IsMaximized()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::IsMaximized () const
-
-inline
-
- -

Check if window is currently minimized.

- -

Definition at line 116 of file Window.hpp.

- -
-
- -

◆ IsMinimized()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::IsMinimized () const
-
-inline
-
- -

Check if window is currently minimized.

- -

Definition at line 109 of file Window.hpp.

- -
-
- -

◆ IsReady()

- -
-
- - - - - -
- - - - - - - -
static bool raylib::Window::IsReady ()
-
-inlinestatic
-
- -

Check if window has been initialized successfully.

- -

Definition at line 88 of file Window.hpp.

- -
-
- -

◆ IsResized()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::IsResized () const
-
-inline
-
- -

Check if window has been resized last frame.

- -

Definition at line 130 of file Window.hpp.

- -
-
- -

◆ IsState()

- -
-
- - - - - -
- - - - - - - - -
bool raylib::Window::IsState (unsigned int flag) const
-
-inline
-
- -

Check if one specific window flag is enabled.

- -

Definition at line 137 of file Window.hpp.

- -
-
- -

◆ Maximize()

- -
-
- - - - - -
- - - - - - - -
Window& raylib::Window::Maximize ()
-
-inline
-
- -

Set window state: maximized, if resizable (only PLATFORM_DESKTOP)

- -

Definition at line 185 of file Window.hpp.

- -
-
- -

◆ Minimize()

- -
-
- - - - - -
- - - - - - - -
Window& raylib::Window::Minimize ()
-
-inline
-
- -

Set window state: minimized, if resizable (only PLATFORM_DESKTOP)

- -

Definition at line 193 of file Window.hpp.

- -
-
- -

◆ Restore()

- -
-
- - - - - -
- - - - - - - -
Window& raylib::Window::Restore ()
-
-inline
-
- -

Set window state: not minimized/maximized (only PLATFORM_DESKTOP)

- -

Definition at line 201 of file Window.hpp.

- -
-
- -

◆ SetFullscreen()

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetFullscreen (bool fullscreen)
-
-inline
-
- -

Set whether or not the application should be fullscreen.

- -

Definition at line 168 of file Window.hpp.

- -

References IsFullscreen(), and ToggleFullscreen().

- -
-
- -

◆ SetIcon()

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetIcon (const ::Image & image)
-
-inline
-
- -

Set icon for window.

- -

Definition at line 209 of file Window.hpp.

- -
-
- -

◆ SetMinSize()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Window& raylib::Window::SetMinSize (int width,
int height 
)
-
-inline
-
- -

Set window minimum dimensions.

- -

Definition at line 248 of file Window.hpp.

- -
-
- -

◆ SetMonitor()

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetMonitor (int monitor)
-
-inline
-
- -

Set monitor for the current window.

- -

Definition at line 240 of file Window.hpp.

- -
-
- -

◆ SetPosition() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetPosition (const ::Vector2 & position)
-
-inline
-
- -

Set window position on screen.

- -

Definition at line 233 of file Window.hpp.

- -

References SetPosition().

- -
-
- -

◆ SetPosition() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Window& raylib::Window::SetPosition (int x,
int y 
)
-
-inline
-
- -

Set window position on screen.

- -

Definition at line 225 of file Window.hpp.

- -

Referenced by SetPosition().

- -
-
- -

◆ SetSize() [1/2]

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetSize (const ::Vector2 & size)
-
-inline
-
- -

Set window dimensions.

- -

Definition at line 264 of file Window.hpp.

- -

References SetSize().

- -
-
- -

◆ SetSize() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
Window& raylib::Window::SetSize (int width,
int height 
)
-
-inline
-
- -

Set window dimensions.

- -

Definition at line 256 of file Window.hpp.

- -

Referenced by SetSize().

- -
-
- -

◆ SetState()

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetState (unsigned int flag)
-
-inline
-
- -

Set window configuration state using flags.

- -

Definition at line 144 of file Window.hpp.

- -
-
- -

◆ SetTargetFPS()

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetTargetFPS (int fps)
-
-inline
-
- -

Set target FPS (maximum)

- -

Definition at line 329 of file Window.hpp.

- -
-
- -

◆ SetTitle()

- -
-
- - - - - -
- - - - - - - - -
Window& raylib::Window::SetTitle (const std::string & title)
-
-inline
-
- -

Set title for window.

- -

Definition at line 217 of file Window.hpp.

- -

References raylib::SetWindowTitle().

- -
-
- -

◆ ShouldClose()

- -
-
- - - - - -
- - - - - - - -
bool raylib::Window::ShouldClose () const
-
-inline
-
- -

Check if KEY_ESCAPE pressed or Close icon pressed.

- -

Definition at line 67 of file Window.hpp.

- -
-
- -

◆ ToggleFullscreen()

- -
-
- - - - - -
- - - - - - - -
Window& raylib::Window::ToggleFullscreen ()
-
-inline
-
- -

Toggle window state: fullscreen/windowed.

- -

Definition at line 160 of file Window.hpp.

- -

Referenced by SetFullscreen().

- -
-
- -
raylib::Window
Window and Graphics Device Functions.
Definition: Window.hpp:44
+

Definition at line 12 of file Window.hpp.

+ diff --git a/docs/dir_d44c64559bbebec7f509842c48db8b23.html b/docs/dir_d44c64559bbebec7f509842c48db8b23.html index 16560aa..05fddfe 100644 --- a/docs/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/docs/dir_d44c64559bbebec7f509842c48db8b23.html @@ -71,84 +71,10 @@ $(function() {
include Directory Reference
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Files

file  AudioDevice.hpp [code]
 
file  AudioStream.hpp [code]
 
file  BoundingBox.hpp [code]
 
file  Camera2D.hpp [code]
 
file  Camera3D.hpp [code]
 
file  Color.hpp [code]
 
file  Font.hpp [code]
 
file  Functions.hpp [code]
 
file  Gamepad.hpp [code]
 
file  Image.hpp [code]
 
file  Material.hpp [code]
 
file  Matrix.hpp [code]
 
file  Mesh.hpp [code]
 
file  Model.hpp [code]
 
file  ModelAnimation.hpp [code]
 
file  Mouse.hpp [code]
 
file  Music.hpp [code]
 
file  Physics.hpp [code]
 
file  Ray.hpp [code]
 
file  RayHitInfo.hpp [code]
 
file  raylib-cpp-utils.hpp [code]
 
file  raylib-cpp.hpp [code]
 
file  raylib.hpp [code]
 
file  raymath.hpp [code]
 
file  Rectangle.hpp [code]
 
file  RenderTexture.hpp [code]
 
file  Shader.hpp [code]
 
file  Sound.hpp [code]
 
file  Texture.hpp [code]
 
file  Vector2.hpp [code]
 
file  Vector3.hpp [code]
 
file  Vector4.hpp [code]
 
file  VrSimulator.hpp [code]
 
file  Wave.hpp [code]
 
file  Window.hpp [code]
 
diff --git a/docs/functions.html b/docs/functions.html index 9685e91..46a939e 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -63,20 +63,9 @@ $(function() {
-
Here is a list of all class members with links to the classes they belong to:
+
Here is a list of all documented class members with links to the class documentation for each member:

- a -

diff --git a/docs/functions_b.html b/docs/functions_b.html index 149f653..24f7830 100644 --- a/docs/functions_b.html +++ b/docs/functions_b.html @@ -63,49 +63,30 @@ $(function() {
-
Here is a list of all class members with links to the classes they belong to:
+
Here is a list of all documented class members with links to the class documentation for each member:

- b -

diff --git a/docs/functions_c.html b/docs/functions_c.html index e8a0f81..fe0a731 100644 --- a/docs/functions_c.html +++ b/docs/functions_c.html @@ -63,23 +63,17 @@ $(function() {
-
Here is a list of all class members with links to the classes they belong to:
+
Here is a list of all documented class members with links to the class documentation for each member:

- c -

diff --git a/docs/functions_d.html b/docs/functions_d.html index f2fe979..022639c 100644 --- a/docs/functions_d.html +++ b/docs/functions_d.html @@ -63,45 +63,20 @@ $(function() {
-
Here is a list of all class members with links to the classes they belong to:
+
Here is a list of all documented class members with links to the class documentation for each member:

- d -

diff --git a/docs/functions_e.html b/docs/functions_e.html index 2ab8a0f..f7f8449 100644 --- a/docs/functions_e.html +++ b/docs/functions_e.html @@ -63,7 +63,7 @@ $(function() {
-
Here is a list of all class members with links to the classes they belong to:
+
Here is a list of all documented class members with links to the class documentation for each member:

- e -

diff --git a/docs/functions_f.html b/docs/functions_f.html index cc4b7b9..77eb88e 100644 --- a/docs/functions_f.html +++ b/docs/functions_f.html @@ -63,7 +63,7 @@ $(function() {
-
Here is a list of all class members with links to the classes they belong to:
+
Here is a list of all documented class members with links to the class documentation for each member:

- f -

diff --git a/docs/functions_func.html b/docs/functions_func.html index 7014ec8..3339a6e 100644 --- a/docs/functions_func.html +++ b/docs/functions_func.html @@ -66,17 +66,6 @@ $(function() {  

- a -

diff --git a/docs/functions_func_b.html b/docs/functions_func_b.html index 7cd4f6f..602aa64 100644 --- a/docs/functions_func_b.html +++ b/docs/functions_func_b.html @@ -66,46 +66,27 @@ $(function() {  

- b -

diff --git a/docs/functions_func_c.html b/docs/functions_func_c.html index 4dc1cfe..62b74cd 100644 --- a/docs/functions_func_c.html +++ b/docs/functions_func_c.html @@ -66,20 +66,14 @@ $(function() {  

- c -