 |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
25 #ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
26 #define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
28 #include "./raylib.hpp"
29 #include "./Vector3.hpp"
30 #include "./raylib-cpp-utils.hpp"
36 float fovyValue = 0,
int typeValue = 0) {
37 position = positionValue;
46 GETTERSETTER(::
Vector3, Position, position)
49 GETTERSETTER(
float, Fovy, fovy)
50 GETTERSETTER(
int, Type, type)
75 return ::GetCameraMatrix(*
this);
82 ::SetCameraMode(*
this, mode);
90 ::SetCameraAltControl(altKey);
98 ::SetCameraSmoothZoomControl(szKey);
106 int upKey,
int downKey) {
107 ::SetCameraMoveControls(frontKey, backKey, rightKey, leftKey, upKey, downKey);
115 ::UpdateCamera(
this);
131 return ::GetMouseRay(mousePosition, *
this);
138 return ::GetWorldToScreen(position, *
this);
142 ::
Color tint = WHITE) {
148 float size, ::
Color tint = WHITE) {
149 ::DrawBillboardRec(*
this, texture, sourceRec, center, size, tint);
154 inline void set(const ::Camera3D& camera) {
155 position = camera.position;
156 target = camera.target;
163 position = camera.position;
164 target = camera.target;
174 #endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
Provides all the classes associated with raylib-cpp.
Ray GetMouseRay(::Vector2 mousePosition) const
Returns a ray trace from mouse position.
Camera3D & SetMode(int mode)
Set camera mode (multiple camera modes available)
Camera3D & DrawBillboard(::Texture2D texture, ::Vector3 center, float size, ::Color tint=WHITE)
Matrix GetMatrix() const
Get transform matrix for camera.
Camera3D & DrawBillboard(::Texture2D texture, ::Rectangle sourceRec, ::Vector3 center, float size, ::Color tint=WHITE)
Ray type (useful for raycast)
Camera3D & UpdateVrTracking()
Update VR tracking (position and orientation) and camera.
Camera3D & Update()
Update camera position for selected mode.
Camera3D & SetMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
Set camera move controls (1st person and 3rd person cameras)
Camera3D & SetAltControl(int altKey)
Set camera alt key to combine with mouse movement (free camera)
Camera3D(::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue, float fovyValue=0, int typeValue=0)
Camera3D & operator=(const Camera3D &camera)
void set(const ::Camera3D &camera)
Camera3D & SetSmoothZoomControl(int szKey)
Set camera smooth zoom key to combine with mouse (free camera)
void set(const Camera3D &camera)
Vector2 GetWorldToScreen(::Vector3 position) const
Returns the screen space position for a 3d world space position.