Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Functions | |
b3d_cameraAdd (strSession, name, flag) | |
Add a camera in a given session. More... | |
b3d_cameraDestroy (strSession, cam) | |
Destroy a camera. More... | |
b3d_cameraGetFromId (strSession, id) | |
Get the camera object from a camera id. More... | |
b3d_cameraGetFromInit (strSession) | |
Get the the camera which it created during the 3d session initialization. More... | |
b3d_cameraGetFromName (strSession, name) | |
Get the the camera from its name. More... | |
b3d_cameraGetIdFromCamera (strSession, cam) | |
Get the name from a camera id. More... | |
b3d_cameraGetNameFromId (strSession, id) | |
Get the name from a camera id. More... | |
b3d_cameraGetOrthographicWindow (camera) | |
Get the orthographic window settings, for use with orthographic rendering only. More... | |
b3d_cameraGetParams (camera) | |
Return the camera parameters. More... | |
b3d_cameraGetProjection (camera) | |
Get the current mode of projection to use with this camera. More... | |
b3d_cameraRestoreLast (strSession) | |
Restore the last used camera before the current camera. More... | |
b3d_cameraSetDefault (strSession, cam) | |
Set a camera as the default camera. More... | |
b3d_cameraSetOrthographicWindow (camera, width, height) | |
Sets the orthographic window settings, for use with orthographic rendering only. More... | |
b3d_cameraSetOrthographicWindowFromScale (camera, scale) | |
Sets the orthographic window settings, for use with orthographic rendering only. More... | |
b3d_cameraSetParams (camera, focalLength, fovy, near, far) | |
Set the camera parameters. More... | |
b3d_cameraSetParamsFromId (strSession, id, focalLength, fovy, near, far) | |
Set the camera parameters. More... | |
b3d_cameraSetProjection (camera, mode) | |
Set the mode of projection to use with this camera. More... | |
b3d_cameraSetProjectionFromId (strSession, id, mode) | |
Set the mode of projection to use with this camera. More... | |
b3d_cameraAdd | ( | strSession | , |
name | , | ||
flag | |||
) |
Add a camera in a given session.
Prototype : fun [LIB3D_Session S I] [SO3_OBJECT I]
LIB3D_Session | : a session object |
S | : a name for the new camera |
I | : define if this camera is (or becomes) the default camera or not. Possible values are : iLIB3S_ISDEFAULT or nil |
b3d_cameraGetNameFromId | ( | strSession | , |
id | |||
) |
Get the name from a camera id.
Prototype : fun [LIB3D_Session I] S
LIB3D_Session | : a session object |
I | : a camera id |
b3d_cameraGetFromId | ( | strSession | , |
id | |||
) |
Get the camera object from a camera id.
Prototype : fun [LIB3D_Session I] SO3_OBJECT
LIB3D_Session | : a session object |
I | : a camera id |
b3d_cameraGetIdFromCamera | ( | strSession | , |
cam | |||
) |
Get the name from a camera id.
Prototype : fun [LIB3D_Session SO3_OBJECT] I
LIB3D_Session | : a session object |
SO3_OBJECT | : a camera object |
b3d_cameraGetFromName | ( | strSession | , |
name | |||
) |
Get the the camera from its name.
Prototype : fun [LIB3D_Session S] SO3_OBJECT
LIB3D_Session | : a session object |
S | : a name |
b3d_cameraGetFromInit | ( | strSession | ) |
Get the the camera which it created during the 3d session initialization.
Prototype : fun [LIB3D_Session] SO3_OBJECT
LIB3D_Session | : a session object |
b3d_cameraRestoreLast | ( | strSession | ) |
Restore the last used camera before the current camera.
The current camera is not destroyed : it is stored to be the next last camera, if any. This is similar as an undo/redo.
Prototype : fun [LIB3D_Session SO3_OBJECT] I
LIB3D_Session | : a session object |
SO3_OBJECT | : a camera object |
b3d_cameraSetDefault | ( | strSession | , |
cam | |||
) |
Set a camera as the default camera.
Prototype : fun [LIB3D_Session SO3_OBJECT] I
LIB3D_Session | : a session object |
SO3_OBJECT | : a camera object |
b3d_cameraDestroy | ( | strSession | , |
cam | |||
) |
Destroy a camera.
If the camera is destroyed, the last default camera is set to default camera. If no previous camera has been set, the first camera found will be set.
Prototype : fun [LIB3D_Session SO3_OBJECT] I
LIB3D_Session | : a session object |
SO3_OBJECT | : a camera object |
b3d_cameraSetParams | ( | camera | , |
focalLength | , | ||
fovy | , | ||
near | , | ||
far | |||
) |
Set the camera parameters.
Prototype : fun [SO3_OBJECT F F F F] I
SO3_OBJECT | : a camera object. |
F | : the focal length. If nil, this parameter is unchanged. |
F | : the FOVy. If nil, this parameter is unchanged. |
F | : the near clip distance. If nil, this parameter is unchanged. |
F | : the far clip distance. If nil, this parameter is unchanged. |
b3d_cameraGetParams | ( | camera | ) |
Return the camera parameters.
Prototype : fun [SO3_OBJECT] [F F F F]
SO3_OBJECT | : a camera object. |
b3d_cameraSetParamsFromId | ( | strSession | , |
id | , | ||
focalLength | , | ||
fovy | , | ||
near | , | ||
far | |||
) |
Set the camera parameters.
Prototype : fun [I F F F F] I
I | : a camera id. |
F | : the focal length. If nil, this parameter is unchanged. |
F | : the FOVy. If nil, this parameter is unchanged. |
F | : the near clip distance. If nil, this parameter is unchanged. |
F | : the far clip distance. If nil, this parameter is unchanged. |
b3d_cameraSetProjection | ( | camera | , |
mode | |||
) |
Set the mode of projection to use with this camera.
Prototype : fun [SO3_OBJECT I] I
SO3_OBJECT | : a camera object. |
I | : the choosen mode : SO3_PROJECTION_PERSPECTIVE or SO3_PROJECTION_ORTHOGRAPHIC. SO3_PROJECTION_PERSPECTIVE is the default mode. If another value is given, the camera will set to this default mode. |
b3d_cameraSetProjectionFromId | ( | strSession | , |
id | , | ||
mode | |||
) |
Set the mode of projection to use with this camera.
Prototype : fun [SO3_OBJECT I] I
SO3_OBJECT | : a camera object. |
I | : the choosen mode : SO3_PROJECTION_PERSPECTIVE or SO3_PROJECTION_ORTHOGRAPHIC. SO3_PROJECTION_PERSPECTIVE is the default mode. If another value is given, the camera will set to this default mode. |
b3d_cameraGetProjection | ( | camera | ) |
Get the current mode of projection to use with this camera.
Prototype : fun [SO3_OBJECT] I
SO3_OBJECT | : a camera object. |
b3d_cameraSetOrthographicWindow | ( | camera | , |
width | , | ||
height | |||
) |
Sets the orthographic window settings, for use with orthographic rendering only.
Prototype : fun [SO3_OBJECT F F] I
SO3_OBJECT | : a camera object. |
F | : the width in world unit. |
F | : the height in world unit. |
b3d_cameraSetOrthographicWindowFromScale | ( | camera | , |
scale | |||
) |
Sets the orthographic window settings, for use with orthographic rendering only.
Prototype : fun [SO3_OBJECT F] I
SO3_OBJECT | : a camera object. |
F | : a scale ratio. |
b3d_cameraGetOrthographicWindow | ( | camera | ) |
Get the orthographic window settings, for use with orthographic rendering only.
Prototype : fun [SO3_OBJECT] [F F]
SO3_OBJECT | : a camera object. |