3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.Camera Class Reference

Static Public Member Functions

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

Member Function Documentation

◆ getForward()

vec3 coat.Camera.getForward ( )
static

get the forward direction

Returns
the direction

◆ getPivot()

vec3 coat.Camera.getPivot ( )
static

get the camera pivot position

Returns
the position

◆ getPosition()

vec3 coat.Camera.getPosition ( )
static

get the camera position

Returns
the camera position

◆ getRight()

vec3 coat.Camera.getRight ( )
static

get the camera right direction

Returns
the direction

◆ getScreenToWorldSpace()

vec3 coat.Camera.getScreenToWorldSpace ( 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()

vec3 coat.Camera.getUp ( )
static

get the camera up direction

Returns
the direction

◆ getWorldToScreenSpace()

vec3 coat.Camera.getWorldToScreenSpace ( vec3 world_pos)
static

convert the world position to the screen position

Parameters
world_posthe world position
Returns
the screen position

◆ isOrtho()

bool coat.Camera.isOrtho ( )
static

return true if the camera is in the ortho mode

Returns
the ortho mode state

◆ rotateToGradually()

coat.Camera.rotateToGradually ( vec3 destination_dir)
static

align the camera along the view

Parameters
destination_dirthe view direction

◆ setCamera()

coat.Camera.setCamera ( vec3 position,
vec3 lookAt,
float fovY,
vec3 up = vec3.Zero )
static

◆ setOrtho()

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()

coat.Camera.setPivot ( vec3 pivot)
static

set the camera pivot position

Parameters
pivotthe pivot position

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