Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Functions | |
b3d_gridShow (strSession, state) | |
Show / Hide a grid. | |
b3d_sessionCbAxisClick (strSession, cbfun) | |
Set the callback when an axis is clicked. | |
b3d_sessionCbAxisMove (strSession, cbfun) | |
Set the callback when an axis is moved. | |
b3d_sessionCbAxisUnClick (strSession, cbfun) | |
Set the callback when an axis is unclicked. | |
b3d_sessionCbPostRender (strSession, cbfun) | |
Set the callback to post-rendering. | |
b3d_sessionCbPreRender (strSession, cbfun) | |
Set the callback to the pre redering. | |
b3d_sessionCbPreRenderEnd (strSession, cbfun) | |
Set the callback to the end of the pre-rendering. | |
b3d_sessionCbPreRenderPhysics (strSession, cbfun) | |
Set the callback to the physics pre-rendering. | |
b3d_sessionDestroy (strSession) | |
Destroys session object. | |
b3d_sessionGet (strSession) | |
Return the Scol session object from the library session object. | |
b3d_sessionGetView (strSession) | |
Return the 3D view object used by the 3D Session object. |
Detailed Description
To create a 3d session, go to 'init' section.
- See Also
- b3d_initSession
Function Documentation
b3d_sessionGet | ( | strSession | ) |
Return the Scol session object from the library session object.
Prototype : fun [LIB3D_Session] SO3_SCENE
- Parameters
-
LIB3D_Session : a basic 3d session object
- Returns
- SO3_SCENE : the Scol session object
- Examples:
- 3d_test/test_3d.pkg_.
b3d_sessionDestroy | ( | strSession | ) |
Destroys session object.
Prototype : fun [LIB3D_Session] I
- Parameters
-
LIB3D_Session : a basic 3d session object
- Returns
- I : 0 if success, 1 if error
b3d_sessionCbAxisClick | ( | strSession | , |
cbfun | |||
) |
Set the callback when an axis is clicked.
Prototype : fun [LIB3D_Session fun [LIB3D_Session SO3_OBJECT I I I I] I] I
- Parameters
-
LIB3D_Session : a basic 3d session object fun [LIB3D_Session SO3_OBJECT I I I I] I : the supplemental arguments are : the axis father object, the axis (iLIB3D_AXIS_X, iLIB3D_AXIS_Y or iLIB3D_AXIS_Z), the x, y coordinates and the button number.
- Returns
- I : 0 if success, nil 1 if error
b3d_sessionCbAxisUnClick | ( | strSession | , |
cbfun | |||
) |
Set the callback when an axis is unclicked.
Prototype : fun [LIB3D_Session fun [LIB3D_Session SO3_OBJECT I I I I] I] I
- Parameters
-
LIB3D_Session : a basic 3d session object fun [LIB3D_Session SO3_OBJECT I I I I] I : the supplemental arguments are : the axis father object, the axis (iLIB3D_AXIS_X, iLIB3D_AXIS_Y or iLIB3D_AXIS_Z), the x, y coordinates and the button number.
- Returns
- I : 0 if success, nil 1 if error
b3d_sessionCbAxisMove | ( | strSession | , |
cbfun | |||
) |
Set the callback when an axis is moved.
Prototype : fun [LIB3D_Session fun [LIB3D_Session SO3_OBJECT I I I I] I] I
- Parameters
-
LIB3D_Session : a basic 3d session object fun [LIB3D_Session SO3_OBJECT I I I I F] I : the supplemental arguments are : the axis father object, the axis (iLIB3D_AXIS_X, iLIB3D_AXIS_Y or iLIB3D_AXIS_Z), the x, y coordinates, the button number, the scale coefficient.
- Returns
- I : 0 if success, nil 1 if error
b3d_sessionCbPreRender | ( | strSession | , |
cbfun | |||
) |
Set the callback to the pre redering.
Prototype : fun [LIB3D_Session fun [LIB3D_Session I] I] I
- Parameters
-
LIB3D_Session : a basic 3d session object fun [LIB3D_Session I] I : the supplemental argument is : the elapsed time from the last render
- Returns
- I : 0 if success, nil 1 if error
b3d_sessionCbPreRenderEnd | ( | strSession | , |
cbfun | |||
) |
Set the callback to the end of the pre-rendering.
Prototype : fun [LIB3D_Session fun [LIB3D_Session I] I] I
- Parameters
-
LIB3D_Session : a basic 3d session object fun [LIB3D_Session I] I : the supplemental argument is : the elapsed time from the last render
- Returns
- I : 0 if success, nil 1 if error
b3d_sessionCbPreRenderPhysics | ( | strSession | , |
cbfun | |||
) |
Set the callback to the physics pre-rendering.
Prototype : fun [LIB3D_Session fun [LIB3D_Session I] I] I
- Parameters
-
LIB3D_Session : a basic 3d session object fun [LIB3D_Session I] I : the supplemental argument is : the elapsed time from the last render
- Returns
- I : 0 if success, nil 1 if error
b3d_sessionCbPostRender | ( | strSession | , |
cbfun | |||
) |
Set the callback to post-rendering.
Prototype : fun [LIB3D_Session fun [LIB3D_Session I] I] I
- Parameters
-
LIB3D_Session : a basic 3d session object fun [LIB3D_Session I] I : the supplemental argument is : the elapsed time from the last render
- Returns
- I : 0 if success, nil 1 if error
b3d_sessionGetView | ( | strSession | ) |
Return the 3D view object used by the 3D Session object.
Prototype : fun [LIB3D_Session] LIB3D_View
- Parameters
-
LIB3D_Session : a basic 3d session object
- Returns
- LIB3D_View : the 3d view if success, nil if error
b3d_gridShow | ( | strSession | , |
state | |||
) |
Show / Hide a grid.
Prototype : fun [LIB3D_Session I] I
- Parameters
-
LIB3D_Session : a basic 3d session object I : state : show (1) or hide (0)
- Returns
- I : 0 if success, a positive value if error :
- 1 : 3d session is nil
- 2 : the grid is already shown (state = show)
- 3 : unable to create the grid correctly (state = show)
- 4 : unable to destroy the grid (state = hide)
- 5 : nothing to do (typically, state = hide and the grid is already hidden)
- Examples:
- 3d_test/test_3d.pkg_.
Generated on Sat Jan 31 2015 19:15:43 for Scol standard library package by 1.8.1.2