class
#include <esp/gfx/CubeMapCamera.h>
CubeMapCamera
Base classes
- class RenderCamera
Public static functions
-
static auto cubeMapCoordinate(unsigned int cubeSideIndex) -> Magnum::
GL:: CubeMapCoordinate -
static auto getCameraLocalTransform(Mn::GL::CubeMapCoordinate cubeSideIndex) -> Magnum::
Matrix4 - return the camera local transformation matrix when it is about to render a specific cube face.
Constructors, destructors, conversion operators
-
CubeMapCamera(scene::
SceneNode& node, esp::scene::SceneNodeSemanticDataIDX semanticDataIDX) explicit - Constructor.
-
CubeMapCamera(scene::
SceneNode& node, esp::scene::SceneNodeSemanticDataIDX semanticDataIDX, const vec3f& eye, const vec3f& target, const vec3f& up) explicit - Constructor.
-
CubeMapCamera(scene::
SceneNode& node, esp::scene::SceneNodeSemanticDataIDX semanticDataIDX, const Magnum:: Vector3& eye, const Magnum:: Vector3& target, const Magnum:: Vector3& up) explicit - Constructor.
- ~CubeMapCamera() defaulted override
Public functions
-
auto switchToFace(Magnum::
GL:: CubeMapCoordinate cubeSide) -> CubeMapCamera& - Move the camera towards a specified cube face.
- auto switchToFace(unsigned int cubeSideIndex) -> CubeMapCamera&
- Overload, move the camera towards a specified cube face.
- auto setProjectionMatrix(int width, int height, float znear, float zfar, float hfov) -> RenderCamera& deleted
- auto setProjectionMatrix(int width, float znear, float zfar) -> CubeMapCamera&
- Set the projection matrix.
- auto updateOriginalViewingMatrix() -> CubeMapCamera&
- Update the original viewing matrix. It MUST be called after each time the local transformation of camera node has been set.
- auto restoreTransformation() -> CubeMapCamera&
- restore the local transformation of the camera node using the stored original viewing matrix. It is useful, since switchToFace() will change the local transformations and user want to revert such changes.
Protected variables
Function documentation
esp:: gfx:: CubeMapCamera:: CubeMapCamera(scene:: SceneNode& node,
esp::scene::SceneNodeSemanticDataIDX semanticDataIDX) explicit
Constructor.
Parameters | |
---|---|
node | the scene node to which the camera is attached |
semanticDataIDX |
esp:: gfx:: CubeMapCamera:: CubeMapCamera(scene:: SceneNode& node,
esp::scene::SceneNodeSemanticDataIDX semanticDataIDX,
const vec3f& eye,
const vec3f& target,
const vec3f& up) explicit
Constructor.
Parameters | |
---|---|
node | the scene node to which the camera is attached |
semanticDataIDX | |
eye | the eye position (parent node space) |
target | the target position (parent node space) |
up | the up direction (parent node space) |
esp:: gfx:: CubeMapCamera:: CubeMapCamera(scene:: SceneNode& node,
esp::scene::SceneNodeSemanticDataIDX semanticDataIDX,
const Magnum:: Vector3& eye,
const Magnum:: Vector3& target,
const Magnum:: Vector3& up) explicit
Constructor.
Parameters | |
---|---|
node | the scene node to which the camera is attached |
semanticDataIDX | |
eye | the eye position (parent node space) |
target | the target position (parent node space) |
up | the up direction (parent node space) |
CubeMapCamera& esp:: gfx:: CubeMapCamera:: switchToFace(Magnum:: GL:: CubeMapCoordinate cubeSide)
Move the camera towards a specified cube face.
Parameters | |
---|---|
cubeSide | the cube map coordinate, see the following pictures NOTE: +Y is top CAREFUL! the local transformation of the camera node will be set after calling this function. |
Returns | Reference to self (for method chaining) |
+----+ | -Y | +----+----+----+----+ | -Z | -X | +Z | +X | +----+----+----+----+ | +Y | +----+
CubeMapCamera& esp:: gfx:: CubeMapCamera:: switchToFace(unsigned int cubeSideIndex)
Overload, move the camera towards a specified cube face.
Returns | Reference to self (for method chaining) |
---|
+----+ | -Y | +----+----+----+----+ | -Z | -X | +Z | +X | +----+----+----+----+ | +Y | +----+
RenderCamera& esp:: gfx:: CubeMapCamera:: setProjectionMatrix(int width,
int height,
float znear,
float zfar,
float hfov) deleted
Calling the the setProjectionMatrix from the base class is not allowed. Use the new one instead.
CubeMapCamera& esp:: gfx:: CubeMapCamera:: setProjectionMatrix(int width,
float znear,
float zfar)
Set the projection matrix.
Parameters | |
---|---|
width | the width of the square image plane |
znear | the far clipping plane |
zfar |
CubeMapCamera& esp:: gfx:: CubeMapCamera:: updateOriginalViewingMatrix()
Update the original viewing matrix. It MUST be called after each time the local transformation of camera node has been set.
Returns | Reference to self (for method chaining) |
---|
CubeMapCamera& esp:: gfx:: CubeMapCamera:: restoreTransformation()
restore the local transformation of the camera node using the stored original viewing matrix. It is useful, since switchToFace() will change the local transformations and user want to revert such changes.
Returns | Reference to self (for method chaining) |
---|