Base 3D Camera.
More...
#include <V3DCamera.h>
|
| V3DCamera (const sf::Vector3f &pos, float zNear=0.1f, float zFar=500.0f) |
|
glm::mat4 | Orientation () const |
|
void | LookAt (const sf::Vector3f &pos) |
|
glm::mat4 | ViewMatrix () const |
|
virtual glm::mat4 | ProjectionMatrix () const =0 |
|
glm::mat4 | PVMatrix () const |
|
sf::Vector3f | Forward () const |
| Camera's Forward Vector.
|
|
sf::Vector3f | Right () const |
| Camera's Right Vector.
|
|
sf::Vector3f | Up () const |
| Camera's Up Vector.
|
|
virtual bool | PointInView (sf::Vector3f p) |
|
virtual bool | SphereInView (sf::Vector3f p, float radius) |
|
virtual bool | BoxInView (sf::Vector3f p, sf::Vector3f min, sf::Vector3f max) |
|
|
sf::Vector3f | Position |
| The Camera Position.
|
|
sf::Vector3f | Rotation |
| The Camera Angle.
|
|
sf::FloatRect | Viewport |
| Render Viewport Area to apply a Renderscene.
|
|
|
enum | FrustumPlane : unsigned char {
PRIGHT,
PLEFT,
PTOP,
PBOTTOM,
PNEAR,
PFAR
} |
| Sides of a Frustum plane for box overlap.
|
|
|
void | normalizeAngles () |
| Normalize the rotation angles.
|
|
void | updatePlanes () |
| Updates the plane coordinates based on the view-projection transform.
|
|
float | pointPlaneDistance (const glm::vec4 &plane, const glm::vec3 &point) |
| Works out the distance between a point and plane based on dot-product.
|
|
|
float | fnear |
| Field Near value.
|
|
float | ffar |
| Field Far value.
|
|
glm::vec4 | planes [6] |
| The plane coordinates for all six size.
|
|
◆ V3DCamera()
V3DCamera::V3DCamera |
( |
const sf::Vector3f & |
pos, |
|
|
float |
zNear = 0.1f , |
|
|
float |
zFar = 500.0f |
|
) |
| |
- Parameters
-
pos | Initial Camera Position. |
zNear | The near z value for the projection matrix. |
zFar | The far z value for the projection matrix. |
◆ BoxInView()
virtual bool V3DCamera::BoxInView |
( |
sf::Vector3f |
p, |
|
|
sf::Vector3f |
min, |
|
|
sf::Vector3f |
max |
|
) |
| |
|
virtual |
- Parameters
-
p | Centre Position of Box. |
min | Lowest values in the box (possibly negative). |
max | Highest values in the box. |
- Returns
- True if box is in view.
◆ LookAt()
void V3DCamera::LookAt |
( |
const sf::Vector3f & |
pos | ) |
|
- Parameters
-
pos | The target position for the camera to look at. |
◆ Orientation()
glm::mat4 V3DCamera::Orientation |
( |
| ) |
const |
- Returns
- Calculated the rotation matrix.
◆ PointInView()
virtual bool V3DCamera::PointInView |
( |
sf::Vector3f |
p | ) |
|
|
virtual |
- Parameters
-
- Returns
- True if
◆ ProjectionMatrix()
virtual glm::mat4 V3DCamera::ProjectionMatrix |
( |
| ) |
const |
|
pure virtual |
◆ PVMatrix()
glm::mat4 V3DCamera::PVMatrix |
( |
| ) |
const |
- Returns
- The combined Projection View Matrix of the Camera. Combine with a model matrix to get the transform of the model in a scene.
◆ SphereInView()
virtual bool V3DCamera::SphereInView |
( |
sf::Vector3f |
p, |
|
|
float |
radius |
|
) |
| |
|
virtual |
- Parameters
-
p | Centre Position of Sphere. |
radius | Radius of Sphere. |
- Returns
- True if sphere is in view.
◆ ViewMatrix()
glm::mat4 V3DCamera::ViewMatrix |
( |
| ) |
const |
- Returns
- The calculated View Matrix of the Camera.
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/V3DCamera.h