Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Scol 3D Library - 3D basic API. More...
Functions | |
b3d_bufferDestroy (strView) | |
Destroy the buffer. More... | |
b3d_bufferGetObj (strView) | |
Get the SO3_BUFFER object from the 3d view object. More... | |
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 (cameras, name) | |
b3d_cameraGetFromName (strSession, name) | |
Get the the camera from its name. More... | |
b3d_cameragetidfromcamera (cameras, cam) | |
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_cbbufferpostrender (buffer, strView) | |
b3d_cbbufferprerender (buffer, strView) | |
b3d_gridShow (strSession, state) | |
Show / Hide a grid. More... | |
b3d_infoFullscreenModes () | |
Get fullscreen video modes supported by the host.Prototype: fun [] [S r1]. More... | |
b3d_infoLib () | |
Version's informations about this libraryPrototype: fun [] [S S S]. More... | |
b3d_infoMultiSamplingModes (flag) | |
Get multi sampling modes supported by the host.Prototype: fun [] [S r1]. More... | |
b3d_infoSys () | |
This is a conivence function. It returns several infos about the system. These infos are the same than provided by 'SO3GetGeneralInfo' function but they are formatted.Prototype: fun [] S. More... | |
b3d_init () | |
b3d_initbuffer (buffer, strView) | |
b3d_initError (logfilename, mask, hardlog) | |
Initialiaze the internal error 3d library. More... | |
b3d_initPhysics (strSession) | |
Initialiaze the 3D PhysicsPrototype: fun [LIB3D_Session] LIB3D_Physics. More... | |
b3d_initSession (strView, name, cbInit) | |
Initialiaze the 3D Session. A default camera "camera_init", a default group "_defaultResources" and an ambiant light are defined too. More... | |
b3d_initView (ch, winFather, cbInit, cbEnd) | |
Initialiaze the 3D View. More... | |
b3d_initwindow (win, strView) | |
b3d_lightAdd (strSession, name, type, father) | |
Create (add) a new light. More... | |
b3d_lightAmbiantGet (strSession) | |
Get the 3d ambiant light. More... | |
b3d_lightAmbiantSet (strSession, color) | |
Set the 3d ambiant light. More... | |
b3d_lightchecktype (type) | |
b3d_lightGetAttenuation (light) | |
Get the attenuation coefficients of a light. More... | |
b3d_lightGetColors (light) | |
Get the diffuse and specular colors of a light. More... | |
b3d_lightGetType (light) | |
Get the type of a light. More... | |
b3d_lightGetVisible (light) | |
Get the visibility of a light. More... | |
b3d_lightSetAttenuation (light, tuple) | |
Set the attenuation coefficients of a light. More... | |
b3d_lightSetColorDiffuse (light, color) | |
Set the diffuse color of a light. More... | |
b3d_lightSetColors (light, tuple) | |
Set the specular color of a light. More... | |
b3d_lightSetColorSpecular (light, color) | |
Set the specular color of a light. More... | |
b3d_lightSetType (light, type) | |
Set the type of a light. More... | |
b3d_lightSetVisible (light, state) | |
Set the visibility of a light. More... | |
b3d_misc_listCamerasRemove (l, cam) | |
b3d_misc_listIU0_removeElt (l, u0) | |
b3d_misc_listIU0GetEltFromU0 (l, u0) | |
b3d_objDestroy (obj) | |
Destroy any 3d object. More... | |
b3d_objGetFromName (strSession, name) | |
Get an 3d object from its name in a given session object. More... | |
b3d_objGetGlobalOrientation (obj) | |
Get the current global orientation of an 3d object. More... | |
b3d_objGetOrientation (obj) | |
Get the current orientation of an 3d object. More... | |
b3d_objGetPosition (obj) | |
Set the 3d object position. More... | |
b3d_objLink (obj, father) | |
Link an 3d object to another 3d object. More... | |
b3d_objSetGlobalOrientation (obj, angDeg) | |
Set the global orientation of an 3d object. More... | |
b3d_objSetOrientation (obj, angDeg) | |
Set the orientation of an 3d object. More... | |
b3d_objSetPosition (obj, posF) | |
Set the 3d object position. More... | |
b3d_objSetRotate (obj, rot, tuple, flag) | |
Rotate an 3d object. More... | |
b3d_objSetRotatePitch (obj, pitch, flag) | |
Set the pitch of an 3d object. More... | |
b3d_physicsDebug (strSession, state) | |
Show / Hide the debug physics lines. More... | |
b3d_physicsEnable (strSession, state) | |
Enable / Disable the physics world. More... | |
b3d_physicsGetArchi (strSession) | |
Get the platform architecture. More... | |
b3d_physicsGetFps (strSession) | |
Get the fps model. More... | |
b3d_physicsGetFriction (strSession) | |
Get the friction model. More... | |
b3d_physicsGetGravity (strSession) | |
Get the world gravity. More... | |
b3d_physicsGetSize (strSession) | |
Get the world size. More... | |
b3d_physicsGetSolver (strSession) | |
Get the solver model. More... | |
b3d_physicsInitBodies (strSession) | |
Set the current PRS as initial PRS to all bodies. More... | |
b3d_physicsIsDebug (strSession, state) | |
Return if the debug physics lines is shown / hidden. More... | |
b3d_physicsIsEnabled (strSession) | |
Return if the physics world is enabled / disabled. More... | |
b3d_physicsReset (strSession) | |
Reset the physics world and all bodies states. More... | |
b3d_physicsSetArchi (strSession, mode) | |
Set the platform architecture. More... | |
b3d_physicsSetDefault (strSession) | |
Set the physics with the default values. More... | |
b3d_physicsSetFps (strSession, value) | |
Set the fps model. More... | |
b3d_physicsSetFriction (strSession, mode) | |
Set the friction model. More... | |
b3d_physicsSetGravity (strSession, vector) | |
Set the world gravity. More... | |
b3d_physicsSetGravityEarth (strSession) | |
Set the world gravity as on Earth (x = 0, y = 9.81, z = 0). More... | |
b3d_physicsSetSize (strSession, vector) | |
Set the world size. More... | |
b3d_physicsSetSolver (strSession, mode) | |
Set the solver model. More... | |
b3d_renderEnable (strView, state) | |
Enable (Disable) the rendering. More... | |
b3d_resourcesGetGroupNameDefault (strSession) | |
Return the group name by default. It was created by this library when the 3d session is initialized. More... | |
b3d_resourcesloadp (pRsc, session, nErr) | |
b3d_resourcesLoadP (strSession, pRsc) | |
Load a list of resources in a session. More... | |
b3d_sessionCbAxisClick (strSession, cbfun) | |
Set the callback when an axis is clicked. More... | |
b3d_sessionCbAxisMove (strSession, cbfun) | |
Set the callback when an axis is moved. More... | |
b3d_sessionCbAxisUnClick (strSession, cbfun) | |
Set the callback when an axis is unclicked. More... | |
b3d_sessionCbPostRender (strSession, cbfun) | |
Set the callback to post-rendering. More... | |
b3d_sessionCBpostrender (scn, strSession, elapsedTime) | |
b3d_sessionCbPreRender (strSession, cbfun) | |
Set the callback to the pre redering. More... | |
b3d_sessionCBprerender (scn, strSession, elapsedTime) | |
b3d_sessionCBprerender2 (scn, strSession, elapsedTime) | |
b3d_sessionCbPreRenderEnd (strSession, cbfun) | |
Set the callback to the end of the pre-rendering. More... | |
b3d_sessionCBprerenderphysic (scn, strSession, elapsedTime) | |
b3d_sessionCbPreRenderPhysics (strSession, cbfun) | |
Set the callback to the physics pre-rendering. More... | |
b3d_sessionDestroy (strSession) | |
Destroys session object. More... | |
b3d_sessionGet (strSession) | |
Return the Scol session object from the library session object. More... | |
b3d_sessionGetView (strSession) | |
Return the 3D view object used by the 3D Session object. More... | |
b3d_sessiongridcreate (strSession) | |
b3d_sessiongriddestroy (strSession) | |
b3d_viewConvertSizePixel2Relative (strView, pxWidth, pxHeight) | |
Convert a pixel dimension to a relative dimension (from the size of 3d view). More... | |
b3d_viewDestroy (strView) | |
Destroy the 3D view. All associated buffer, sessions and viewport will be destroyed too. More... | |
b3d_viewEnable (strView, state) | |
Enable (Disable) a 3d view. if enabled, the 3d window is shown else it is hidden. More... | |
b3d_viewGetOldSize (strView) | |
Get the last known size of the 3d window (before the current size) More... | |
b3d_viewGetPos (strView) | |
Get the current position of the 3d window (inside its mother) More... | |
b3d_viewGetSessionFirst (strView) | |
Get the first session structure object. More... | |
b3d_viewGetSize (strView) | |
Get the current size of the 3d window. More... | |
b3d_viewGetSizeFixed (strView, state) | |
Returns if the 3d view is resizable or not. More... | |
b3d_viewGetSizeMinMax (strView) | |
Returns if the limits of the 3d view size, in pixels. More... | |
b3d_viewGetViewportAll (strView) | |
Return all viewports for this 3d view. More... | |
b3d_viewGetViewportDefault (strView) | |
Return the first viewport (default) for this 3d view. More... | |
b3d_viewportDestroy (strView, strViewport) | |
Destroy a 3d viewport. More... | |
b3d_viewportGet (strViewport) | |
Get the SO3_VIEWPORT obj from the 3d viewport. More... | |
b3d_viewportGetBgcolor (strViewport) | |
Return the background color to a given viewport object. More... | |
b3d_viewportGetCamera (strViewport) | |
Return the current camera to a given 3d viewport. More... | |
b3d_viewportGetClearBufferColorDepth (strViewport) | |
Get if the given viewport clear the color and the depth buffer or not. More... | |
b3d_viewportGetPolygonMode (strViewport, mode) | |
Get the polygon rendering mode for a given viewport. More... | |
b3d_viewportGetPosSize (strViewport) | |
Get the position and the size of a viewport object. More... | |
b3d_viewportGetShadow (strViewport) | |
Get if the shadow is enabled or disabled on a given viewport. More... | |
b3d_viewportGetSky (strViewport) | |
Get the skies visibility state on a given viewport. More... | |
b3d_viewportNew (strView, camera) | |
Create a new viewport with the default parameters. More... | |
b3d_viewportSetBgcolor (strViewport, color) | |
Set the background color to a given viewport object. More... | |
b3d_viewportSetCamera (strViewport, camera) | |
Set the camera to a given 3d viewport. More... | |
b3d_viewportSetClearBufferColorDepth (strViewport, stateColor, stateDepth) | |
Set if the given viewport clear the color and the depth buffer or not. More... | |
b3d_viewportSetPolygonMode (strViewport, mode) | |
Set the polygon rendering mode for a given viewport. More... | |
b3d_viewportSetPosSize (strViewport, x, y, width, height) | |
Move and resize a viewport object. Values are from the father object. More... | |
b3d_viewportSetShadow (strViewport, state) | |
Enable / Disable the shadows on a given viewport. More... | |
b3d_viewportSetSky (strViewport, state) | |
Set the skies visibility state on a given viewport. More... | |
b3d_viewSetCbChangeCamera (strView, cbfun) | |
Set the callback when the default camera changes. More... | |
b3d_viewSetCbClick (strView, cbfun) | |
Set the callback when the mouse is clicked (pressed) on the 3d view. More... | |
b3d_viewSetCbDbClick (strView, cbfun) | |
Set the callback when the mouse is double clicked on the 3d view. More... | |
b3d_viewSetCbDestroy (strView, cbfun) | |
Set the callback when the 3D view destroying is asked. More... | |
b3d_viewSetCbDropFile (strView, cbfun) | |
Set the callback when a drop file event occurs on the 3d view. More... | |
b3d_viewSetCbEnd (strView, cbfun) | |
Set the callback when the 3D view destroying is done. More... | |
b3d_viewSetCbHasFocus (strView, cbfun) | |
Set the callback when the 3d view has the focus. More... | |
b3d_viewSetCbKeyDown (strView, cbfun) | |
Set the callback when the a key is pressed from the keyboard. More... | |
b3d_viewSetCbKeyUp (strView, cbfun) | |
Set the callback when the a key is released from the keyboard. More... | |
b3d_viewSetCbLoseFocus (strView, cbfun) | |
Set the callback when the 3d view loses the focus. More... | |
b3d_viewSetCbMouseMove (strView, cbfun) | |
Set the callback when the mouse moves on the 3d view. More... | |
b3d_viewSetCbMove (strView, cbfun) | |
Set the callback when the 3d view moves. More... | |
b3d_viewSetCbPostRender (strView, cbfun) | |
Set the callback to the post rendering. More... | |
b3d_viewSetCbPreRender (strView, cbfun) | |
Set the callback to the pre rendering. More... | |
b3d_viewSetCbPreRenderFX (strView, cbfun) | |
Set the callback to the pre rendering effects. More... | |
b3d_viewSetCbResize (strView, cbfun) | |
Set the callback when the 3d view is resized. More... | |
b3d_viewSetCbUnClick (strView, cbfun) | |
Set the callback when the mouse is released (unclicked) on the 3d view. More... | |
b3d_viewSetCbWheel (strView, cbfun) | |
Set the callback. More... | |
b3d_viewSetFocus (strView, state) | |
Activate or desactivate the focus to the 3d window. More... | |
b3d_viewSetPos (strView, newx, newy) | |
Set the position of the 3d window (inside its mother) More... | |
b3d_viewSetSize (strView, neww, newh) | |
Resize the 3d view. More... | |
b3d_viewSetSizeFixed (strView, state) | |
Define if the 3d view is resizable or not. More... | |
b3d_viewSetSizeMinMax (strView, tSizeMin, tSizeMax) | |
Define the minimal and the maximal size of the 3d view. More... | |
b3d_viewSetViewportDefault (strView, strViewport) | |
Set the first viewport (default) for this 3d view. More... | |
b3d_viewSetViewportSizeFromFullViewSize (strView, strViewport) | |
Resize a Viewport and the 2d buffer object from the current size of the 3d view (no fullscreen). More... | |
b3d_viewSetWindowMode (strView, state) | |
Set the window mode to the 3d window. The size is unchanged. More... | |
b3d_winCBdestroy (win, strView) | |
b3d_winCBfocus (win, strView) | |
b3d_winCBfocuskilled (win, strView) | |
b3d_winCBmove (win, strView, newX, newY) | |
b3d_winCBsize (win, strView, newW, newH) | |
b3d_winGetMotherObj (strView) | |
Get the mother window from the 3d view. More... | |
b3d_winGetObj (strView) | |
Get the window from the 3d view. More... | |
b3d_winmotherCBsize (win, strView, newW, newH) | |
Scol 3D Library - 3D basic API.
b3d_resourcesLoadP | ( | strSession | , |
pRsc | |||
) |
Load a list of resources in a session.
Prototype : fun [LIB3D_Session [[S S I] r1]] I
LIB3D_Session | : a session object |
[[S | S I] r1]] : a list, for each item :
|
b3d_resourcesGetGroupNameDefault | ( | strSession | ) |
Return the group name by default. It was created by this library when the 3d session is initialized.
Prototype : fun [LIB3D_Session] S
LIB3D_Session | : a 3d session |