3DCoat Core API
The 3DCoat API documentation.
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
coat::Camera Class Reference

Static Public Member Functions

static void rotateToGradually (const vec3 &destination_dir)
 align the camera along the view
 
static vec3 getForward ()
 get the forward direction
 
static vec3 getUp ()
 get the camera up direction
 
static vec3 getRight ()
 get the camera right direction
 
static bool isOrtho ()
 return true if the camera is in the ortho mode
 
static void setOrtho (bool ortho)
 switch the camera to the ortho or perspective mode
 
static vec3 getPivot ()
 get the camera pivot position
 
static void setPivot (const vec3 &pivot)
 set the camera pivot position
 
static vec3 getPosition ()
 get the camera position
 
static vec3 getWorldToScreenSpace (const vec3 &world_pos)
 convert the world position to the screen position
 
static vec3 getScreenToWorldSpace (const vec3 &screen_pos)
 convert the screen position to the world position
 
static void setCamera (const vec3 &position, const vec3 &lookAt, float fovY, const vec3 &up=vec3::Zero)
 

Member Function Documentation

◆ getForward()

static vec3 coat::Camera::getForward ( )
static

get the forward direction

Returns
the direction

◆ getPivot()

static vec3 coat::Camera::getPivot ( )
static

get the camera pivot position

Returns
the position

◆ getPosition()

static vec3 coat::Camera::getPosition ( )
static

get the camera position

Returns
the camera position

◆ getRight()

static vec3 coat::Camera::getRight ( )
static

get the camera right direction

Returns
the direction

◆ getScreenToWorldSpace()

static vec3 coat::Camera::getScreenToWorldSpace ( const vec3 screen_pos)
static

convert the screen position to the world position

Parameters
screen_posthe screen position (pass z that you got using getWorldToScreenSpace)
Returns
the world position

◆ getUp()

static vec3 coat::Camera::getUp ( )
static

get the camera up direction

Returns
the direction

◆ getWorldToScreenSpace()

static vec3 coat::Camera::getWorldToScreenSpace ( const vec3 world_pos)
static

convert the world position to the screen position

Parameters
world_posthe world position
Returns
the screen position

◆ isOrtho()

static bool coat::Camera::isOrtho ( )
static

return true if the camera is in the ortho mode

Returns
the ortho mode state

◆ rotateToGradually()

static void coat::Camera::rotateToGradually ( const vec3 destination_dir)
static

align the camera along the view

Parameters
destination_dirthe view direction

◆ setCamera()

static void coat::Camera::setCamera ( const vec3 position,
const vec3 lookAt,
float  fovY,
const vec3 up = vec3::Zero 
)
static
Parameters
<br>
<br>
<br>
<br>
<br>

◆ setOrtho()

static void coat::Camera::setOrtho ( bool  ortho)
static

switch the camera to the ortho or perspective mode

Parameters
orthoset true if need ortho mode, false if need perspective mode

◆ setPivot()

static void coat::Camera::setPivot ( const vec3 pivot)
static

set the camera pivot position

Parameters
pivotthe pivot position

The documentation for this class was generated from the following file: