![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
Camera type, defines a camera position/orientation in 3d space. More...
#include <Camera3D.hpp>
Public Member Functions | |
| Camera3D (::Vector3 position, ::Vector3 target=::Vector3{0.0f, 0.0f, -1.0f}, ::Vector3 up=::Vector3{0.0f, 1.0f, 0.0f}, float fovy=45.0f, int projection=CAMERA_PERSPECTIVE) | |
| Create a new Camera3D. More... | |
| Camera3D (const ::Camera3D &camera) | |
| Camera3D & | BeginMode () |
| Initializes 3D mode with custom camera (3D) More... | |
| void | DrawBillboard (const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, ::Vector2 size, ::Color tint={255, 255, 255, 255}) const |
| Draw a billboard texture defined by source. More... | |
| void | DrawBillboard (const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255}) const |
| Draw a billboard texture. More... | |
| Camera3D & | EndMode () |
| Ends 3D mode and returns to default 2D orthographic mode. More... | |
| float | GetFovy () const |
| Retrieves the fovy value for the object. More... | |
| Matrix | GetMatrix () const |
| Get camera transform matrix (view matrix) More... | |
| Ray | GetMouseRay (::Vector2 mousePosition) const |
| Returns a ray trace from mouse position. More... | |
| ::Vector3 | GetPosition () const |
| Retrieves the position value for the object. More... | |
| int | GetProjection () const |
| Retrieves the projection value for the object. More... | |
| Ray | GetScreenToWorldRay (::Vector2 position, int width, int height) |
| Get a ray trace from screen position (i.e mouse) in a viewport. More... | |
| ::Vector3 | GetTarget () const |
| Retrieves the target value for the object. 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. More... | |
| Camera3D & | operator= (const ::Camera3D &camera) |
| void | SetFovy (float value) |
| Sets the fovy value for the object. More... | |
| void | SetPosition (::Vector3 value) |
| Sets the position value for the object. More... | |
| void | SetProjection (int value) |
| Sets the projection value for the object. More... | |
| void | SetTarget (::Vector3 value) |
| Sets the target value for the object. More... | |
| void | SetUp (::Vector3 value) |
| Sets the up value for the object. More... | |
| Camera3D & | Update (::Vector3 movement, ::Vector3 rotation, float zoom=1.0f) |
| Update camera movement/rotation. More... | |
| Camera3D & | Update (int mode) |
| Update camera position for selected mode. More... | |
Protected Member Functions | |
| void | set (const ::Camera3D &camera) |
Camera type, defines a camera position/orientation in 3d space.
Definition at line 16 of file Camera3D.hpp.
|
inline |
Definition at line 18 of file Camera3D.hpp.
|
inline |
Create a new Camera3D.
| position | Camera position |
| target | Camera target it looks-at |
| up | Camera up vector (rotation over its axis) |
| fovy | Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic |
| projection | Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC |
Definition at line 30 of file Camera3D.hpp.
|
inline |
Definition at line 38 of file Camera3D.hpp.
|
inline |
Initializes 3D mode with custom camera (3D)
Definition at line 54 of file Camera3D.hpp.
|
inline |
Draw a billboard texture defined by source.
Definition at line 117 of file Camera3D.hpp.
|
inline |
Draw a billboard texture.
Definition at line 110 of file Camera3D.hpp.
|
inline |
Ends 3D mode and returns to default 2D orthographic mode.
Definition at line 62 of file Camera3D.hpp.
|
inline |
Retrieves the fovy value for the object.
Definition at line 43 of file Camera3D.hpp.
|
inline |
Get camera transform matrix (view matrix)
Definition at line 70 of file Camera3D.hpp.
|
inline |
Returns a ray trace from mouse position.
Definition at line 92 of file Camera3D.hpp.
|
inline |
Retrieves the position value for the object.
Definition at line 40 of file Camera3D.hpp.
|
inline |
Retrieves the projection value for the object.
Definition at line 44 of file Camera3D.hpp.
|
inline |
Get a ray trace from screen position (i.e mouse) in a viewport.
Definition at line 102 of file Camera3D.hpp.
|
inline |
Retrieves the target value for the object.
Definition at line 41 of file Camera3D.hpp.
|
inline |
Retrieves the up value for the object.
Definition at line 42 of file Camera3D.hpp.
|
inline |
Returns the screen space position for a 3d world space position.
Definition at line 97 of file Camera3D.hpp.
|
inline |
Definition at line 46 of file Camera3D.hpp.
|
inlineprotected |
Definition at line 126 of file Camera3D.hpp.
|
inline |
Sets the fovy value for the object.
| value | The value of which to set fovy to. |
Definition at line 43 of file Camera3D.hpp.
|
inline |
Sets the position value for the object.
| value | The value of which to set position to. |
Definition at line 40 of file Camera3D.hpp.
|
inline |
Sets the projection value for the object.
| value | The value of which to set projection to. |
Definition at line 44 of file Camera3D.hpp.
|
inline |
Sets the target value for the object.
| value | The value of which to set target to. |
Definition at line 41 of file Camera3D.hpp.
|
inline |
Sets the up value for the object.
| value | The value of which to set up to. |
Definition at line 42 of file Camera3D.hpp.
|
inline |
Update camera movement/rotation.
Definition at line 84 of file Camera3D.hpp.
|
inline |
Update camera position for selected mode.
Definition at line 75 of file Camera3D.hpp.