Project

General

Profile

SO3Engine
Camera

Functions

int SO3CameraCreate (mmachine m)
 main include More...
 
int SO3CameraLookAt (mmachine m)
 SO3CameraLookAt : Set a "look at" on the camera. More...
 
int SO3CameraGetDirection (mmachine m)
 SO3CameraGetDirection : Get the direction of a camera. More...
 
int SO3CameraGetDerivedDirection (mmachine m)
 SO3CameraGetDerivedDirection : Get the derivated direction of a camera. More...
 
int SO3CameraGetDerivedUp (mmachine m)
 SO3CameraGetDerivedUp : Gets the derived up vector of the camera, including any rotation inherited from a node attachment and reflection matrix. More...
 
int SO3CameraGetTriangleCount (mmachine m)
 SO3CameraGetTriangleCount : get the number of triangles rendered in last update. More...
 
int SO3CameraGetBatchCount (mmachine m)
 SO3CameraGetBatchCount : get the number of batch rendered in last update. More...
 
int SO3CameraSetViewport (mmachine m)
 SO3CameraSetViewport : Attach a camera to a viewport. More...
 
int SO3CameraSetFocalLength (mmachine m)
 SO3CameraSetFocalLength : defines focal length of a camera. More...
 
int SO3CameraGetFocalLength (mmachine m)
 SO3CameraGetFocalLength : Get the focal length of a camera. More...
 
int SO3CameraSetFOVy (mmachine m)
 SO3CameraSetFOVy : defines FOVy of a camera. More...
 
int SO3CameraSetAspectRatio (mmachine m)
 SO3CameraSetAspectRatio : defines the aspect ratio of a camera. More...
 
int SO3CameraGetAspectRatio (mmachine m)
 SO3CameraGetAspectRatio : get the aspect ratio of a camera. More...
 
int SO3CameraSetAutoAspectRatio (mmachine m)
 SO3CameraSetAutoAspectRatio : set a camera aspect ratio to automatic. More...
 
int SO3CameraSetFrustumOffset (mmachine m)
 SO3CameraSetFrustumOffset : defines the frustrum offset of a camera. More...
 
int SO3CameraGetFrustumOffset (mmachine m)
 SO3CameraGetFrustumOffset : get the frustrum offset of a camera. More...
 
int SO3CameraGetFOVy (mmachine m)
 SO3CameraGetFOVy : Get the FOVy of a camera. More...
 
int SO3CameraSetPolygonMode (mmachine m)
 SO3CameraSetPolygonMode : Set the polygon Mode for a given camera. More...
 
int SO3CameraGetPolygonMode (mmachine m)
 SO3CameraGetPolygonMode : Get the Polygon mode of a camera. More...
 
int SO3CameraSetProjectionType (mmachine m)
 SO3CameraSetProjectionType : Sets the type of projection to use (orthographic or perspective). Default is perspective. More...
 
int SO3CameraGetProjectionType (mmachine m)
 SO3CameraGetProjectionType : Get the camera projection type. More...
 
int SO3CameraSetOrthoWindow (mmachine m)
 SO3CameraSetOrthoWindow : Sets the orthographic window settings, for use with orthographic rendering only. More...
 
int SO3CameraGetOrthoWindow (mmachine m)
 SO3CameraGetOrthoWindow : Gets the orthographic window settings, for use with orthographic rendering only. More...
 
int SO3CameraSetNearClipDistance (mmachine m)
 SO3CameraSetNearClipDistance : defines near clip distance of a camera. More...
 
int SO3CameraGetNearClipDistance (mmachine m)
 SO3CameraGetNearClipDistance : Get the near clip distance of a camera. More...
 
int SO3CameraSetFarClipDistance (mmachine m)
 SO3CameraSetFarClipDistance : defines far clip distance of a camera. More...
 
int SO3CameraGetFarClipDistance (mmachine m)
 SO3CameraGetFarClipDistance : Get the far clip distance of a camera. More...
 
int SO3CameraGetViewport (mmachine m)
 SO3CameraGetViewport : Get the current viewport attached to a camera. More...
 
int SO3CameraGetNumRenderedFaces (mmachine m)
 SO3CameraGetNumRenderedFaces : Get the numbered of rendered faces for a camera. More...
 
int SO3CameraSetProjectionMatrix (mmachine m)
 SO3CameraSetProjectionMatrix : Set the camera projection matrix. More...
 

Detailed Description

Scol functions definition

Function Documentation

◆ SO3CameraCreate()

int SO3CameraCreate ( mmachine  m)

main include

SO3CameraCreate : Create a new camera

Prototype: fun [SO3_SCENE S] SO3_OBJECT

Parameters
SO3_SCENE: current scene
S: given name for the new camera
Returns
SO3_OBJECT : Created camera if success , NIL otherwise

Definition at line 56 of file SCOLCamera.cpp.

◆ SO3CameraGetAspectRatio()

int SO3CameraGetAspectRatio ( mmachine  m)

SO3CameraGetAspectRatio : get the aspect ratio of a camera.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current camera
Returns
F : ratio if success , NIL otherwise

Definition at line 631 of file SCOLCamera.cpp.

◆ SO3CameraGetBatchCount()

int SO3CameraGetBatchCount ( mmachine  m)

SO3CameraGetBatchCount : get the number of batch rendered in last update.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current camera
Returns
I : number of batch if success , NIL otherwise

Definition at line 361 of file SCOLCamera.cpp.

◆ SO3CameraGetDerivedDirection()

int SO3CameraGetDerivedDirection ( mmachine  m)

SO3CameraGetDerivedDirection : Get the derivated direction of a camera.

Prototype: fun [SO3_OBJECT] [F F F]

Parameters
SO3_OBJECT: current camera
Returns
[F F F] : Derivated direction vector if success , NIL otherwise

Definition at line 215 of file SCOLCamera.cpp.

◆ SO3CameraGetDerivedUp()

int SO3CameraGetDerivedUp ( mmachine  m)

SO3CameraGetDerivedUp : Gets the derived up vector of the camera, including any rotation inherited from a node attachment and reflection matrix.

Prototype: fun [SO3_OBJECT] [F F F]

Parameters
SO3_OBJECT: current camera
Returns
[F F F] : Derivated up vector if success , NIL otherwise

Definition at line 268 of file SCOLCamera.cpp.

◆ SO3CameraGetDirection()

int SO3CameraGetDirection ( mmachine  m)

SO3CameraGetDirection : Get the direction of a camera.

Prototype: fun [SO3_OBJECT] [F F F]

Parameters
SO3_OBJECT: current camera
Returns
(F F F] : Direction vector if success , NIL otherwise

Definition at line 161 of file SCOLCamera.cpp.

◆ SO3CameraGetFarClipDistance()

int SO3CameraGetFarClipDistance ( mmachine  m)

SO3CameraGetFarClipDistance : Get the far clip distance of a camera.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current camera
Returns
F : Far clip distance if success , NIL otherwise

Definition at line 1314 of file SCOLCamera.cpp.

◆ SO3CameraGetFocalLength()

int SO3CameraGetFocalLength ( mmachine  m)

SO3CameraGetFocalLength : Get the focal length of a camera.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current camera
Returns
F : focal length if success , NIL otherwise

Definition at line 506 of file SCOLCamera.cpp.

◆ SO3CameraGetFOVy()

int SO3CameraGetFOVy ( mmachine  m)

SO3CameraGetFOVy : Get the FOVy of a camera.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current camera
Returns
F : FOVy if success , NIL otherwise

Definition at line 821 of file SCOLCamera.cpp.

◆ SO3CameraGetFrustumOffset()

int SO3CameraGetFrustumOffset ( mmachine  m)

SO3CameraGetFrustumOffset : get the frustrum offset of a camera.

Prototype: fun [SO3_OBJECT] [F F]

Parameters
SO3_OBJECT: current camera
Returns
[F F] : x and y offset if success , NIL otherwise

Definition at line 770 of file SCOLCamera.cpp.

◆ SO3CameraGetNearClipDistance()

int SO3CameraGetNearClipDistance ( mmachine  m)

SO3CameraGetNearClipDistance : Get the near clip distance of a camera.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current camera
Returns
F : Near clip distance if success , NIL otherwise

Definition at line 1228 of file SCOLCamera.cpp.

◆ SO3CameraGetNumRenderedFaces()

int SO3CameraGetNumRenderedFaces ( mmachine  m)

SO3CameraGetNumRenderedFaces : Get the numbered of rendered faces for a camera.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current camera
Returns
I : numbered of rendered faces if success , NIL otherwise

Definition at line 1408 of file SCOLCamera.cpp.

◆ SO3CameraGetOrthoWindow()

int SO3CameraGetOrthoWindow ( mmachine  m)

SO3CameraGetOrthoWindow : Gets the orthographic window settings, for use with orthographic rendering only.

Prototype: fun [SO3_OBJECT] [F F]

Parameters
SO3_OBJECT: current camera
Returns
[F F]: Width and height of the orthographic window, in world unit, if success , NIL otherwise

Definition at line 1125 of file SCOLCamera.cpp.

◆ SO3CameraGetPolygonMode()

int SO3CameraGetPolygonMode ( mmachine  m)

SO3CameraGetPolygonMode : Get the Polygon mode of a camera.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current camera
Returns
I : Polygon Mode if success , NIL otherwise

For polygon mode, values are :

  • SO3_POLY_POINTS
  • SO3_POLY_SOLID
  • SO3_POLY_WIREFRAME

Definition at line 923 of file SCOLCamera.cpp.

◆ SO3CameraGetProjectionType()

int SO3CameraGetProjectionType ( mmachine  m)

SO3CameraGetProjectionType : Get the camera projection type.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current camera
Returns
I : Projection type if success , NIL otherwise

For projection type, values are :

  • SO3_PROJECTION_PERSPECTIVE
  • SO3_PROJECTION_ORTHOGRAPHIC

Definition at line 1030 of file SCOLCamera.cpp.

◆ SO3CameraGetTriangleCount()

int SO3CameraGetTriangleCount ( mmachine  m)

SO3CameraGetTriangleCount : get the number of triangles rendered in last update.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current camera
Returns
I : number of triangles if success , NIL otherwise

Definition at line 321 of file SCOLCamera.cpp.

◆ SO3CameraGetViewport()

int SO3CameraGetViewport ( mmachine  m)

SO3CameraGetViewport : Get the current viewport attached to a camera.

Prototype: fun [SO3_OBJECT] SO3_VIEWPORT

Parameters
SO3_OBJECT: current camera
Returns
SO3_VIEWPORT : Attached viewport if success , NIL otherwise

Definition at line 1356 of file SCOLCamera.cpp.

◆ SO3CameraLookAt()

int SO3CameraLookAt ( mmachine  m)

SO3CameraLookAt : Set a "look at" on the camera.

Prototype: fun [SO3_OBJECT [F F F]] I

Parameters
SO3_OBJECT: current camera
[FF F] : The "look at" vector
Returns
I : 1 if success , NIL otherwise

Definition at line 105 of file SCOLCamera.cpp.

◆ SO3CameraSetAspectRatio()

int SO3CameraSetAspectRatio ( mmachine  m)

SO3CameraSetAspectRatio : defines the aspect ratio of a camera.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current camera
F: ratio
Returns
I : 1 if success , NIL otherwise

Definition at line 590 of file SCOLCamera.cpp.

◆ SO3CameraSetAutoAspectRatio()

int SO3CameraSetAutoAspectRatio ( mmachine  m)

SO3CameraSetAutoAspectRatio : set a camera aspect ratio to automatic.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current camera
I: state
Returns
I : 1 if success , NIL otherwise

Definition at line 671 of file SCOLCamera.cpp.

◆ SO3CameraSetFarClipDistance()

int SO3CameraSetFarClipDistance ( mmachine  m)

SO3CameraSetFarClipDistance : defines far clip distance of a camera.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current camera
F: Far clip distance
Returns
I : 1 if success , NIL otherwise

Definition at line 1271 of file SCOLCamera.cpp.

◆ SO3CameraSetFocalLength()

int SO3CameraSetFocalLength ( mmachine  m)

SO3CameraSetFocalLength : defines focal length of a camera.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current camera
F: focal length
Returns
I : 1 if success , NIL otherwise

Definition at line 457 of file SCOLCamera.cpp.

◆ SO3CameraSetFOVy()

int SO3CameraSetFOVy ( mmachine  m)

SO3CameraSetFOVy : defines FOVy of a camera.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current camera
F: given FOVy
Returns
I : 1 if success , NIL otherwise

Definition at line 548 of file SCOLCamera.cpp.

◆ SO3CameraSetFrustumOffset()

int SO3CameraSetFrustumOffset ( mmachine  m)

SO3CameraSetFrustumOffset : defines the frustrum offset of a camera.

Prototype: fun [SO3_OBJECT F F] I

Parameters
SO3_OBJECT: current camera
F: X offset
F: Y offset
Returns
I : 1 if success , NIL otherwise

Definition at line 720 of file SCOLCamera.cpp.

◆ SO3CameraSetNearClipDistance()

int SO3CameraSetNearClipDistance ( mmachine  m)

SO3CameraSetNearClipDistance : defines near clip distance of a camera.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current camera
F: Near clip distance
Returns
I : 1 if success , NIL otherwise

Definition at line 1178 of file SCOLCamera.cpp.

◆ SO3CameraSetOrthoWindow()

int SO3CameraSetOrthoWindow ( mmachine  m)

SO3CameraSetOrthoWindow : Sets the orthographic window settings, for use with orthographic rendering only.

Prototype: fun [SO3_OBJECT F F] I

Parameters
SO3_OBJECT: current camera
F: width in world unit
F: height in world unit
Returns
I : 1 if success , NIL otherwise

Definition at line 1080 of file SCOLCamera.cpp.

◆ SO3CameraSetPolygonMode()

int SO3CameraSetPolygonMode ( mmachine  m)

SO3CameraSetPolygonMode : Set the polygon Mode for a given camera.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current camera
I: Polygon Mode

For polygon mode, values are :

  • SO3_POLY_POINTS
  • SO3_POLY_SOLID
  • SO3_POLY_WIREFRAME
Returns
I : 1 if success , NIL otherwise

Definition at line 868 of file SCOLCamera.cpp.

◆ SO3CameraSetProjectionMatrix()

int SO3CameraSetProjectionMatrix ( mmachine  m)

SO3CameraSetProjectionMatrix : Set the camera projection matrix.

Prototype: fun [SO3_OBJECT [[F F F F] [F F F F] [F F F F] [F F F F]]] I

Parameters
SO3_OBJECT: current camera
[[FF F F] [F F F F] [F F F F] [F F F F]] : projection matrix
Returns
I : 1 if success, NIL otherwise

Definition at line 1452 of file SCOLCamera.cpp.

◆ SO3CameraSetProjectionType()

int SO3CameraSetProjectionType ( mmachine  m)

SO3CameraSetProjectionType : Sets the type of projection to use (orthographic or perspective). Default is perspective.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current camera
I: Projection Type Mode

For polygon mode, values are :

  • SO3_PROJECTION_ORTHOGRAPHIC
  • SO3_PROJECTION_PERSPECTIVE
Returns
I : 1 if success , NIL otherwise

Definition at line 978 of file SCOLCamera.cpp.

◆ SO3CameraSetViewport()

int SO3CameraSetViewport ( mmachine  m)

SO3CameraSetViewport : Attach a camera to a viewport.

Prototype: fun [SO3_VIEWPORT SO3_OBJECT] I

Parameters
SO3_VIEWPORT: current viewport
SO3_OBJECT: current camera
Returns
1 : 1 if success , NIL otherwise

Definition at line 402 of file SCOLCamera.cpp.