Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Functions | |
b3d_renderEnable (strView, state) | |
Enable (Disable) the rendering. More... | |
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_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_viewSetWindowMode | ( | strView | , |
state | |||
) |
Set the window mode to the 3d window. The size is unchanged.
Prototype : fun [LIB3D_View I] I
LIB3D_View | : a 3d view object |
I | : a state : iLIB3D_WINDOWED or iLIB3D_FULLSCREEN |
b3d_viewDestroy | ( | strView | ) |
Destroy the 3D view. All associated buffer, sessions and viewport will be destroyed too.
Prototype : fun [LIB3D_View ] I
LIB3D_View | : a 3d view object |
b3d_viewGetViewportDefault | ( | strView | ) |
Return the first viewport (default) for this 3d view.
Prototype : fun [LIB3D_View] LIB3D_Viewport
LIB3D_View | : a 3d view object |
b3d_viewGetViewportAll | ( | strView | ) |
Return all viewports for this 3d view.
Prototype : fun [LIB3D_View] [LIB3D_Viewport r1]
LIB3D_View | : a 3d view object |
b3d_viewSetViewportDefault | ( | strView | , |
strViewport | |||
) |
Set the first viewport (default) for this 3d view.
Prototype : fun [LIB3D_View LIB3D_Viewport] I
LIB3D_View | : a 3d view object |
LIB3D_Viewport | : the viewport object defined as default |
b3d_viewSetCbDestroy | ( | strView | , |
cbfun | |||
) |
Set the callback when the 3D view destroying is asked.
This function is called before the destruction.
Prototype : fun [LIB3D_View fun [LIB3D_View] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View] I : the callback. |
b3d_viewSetCbEnd | ( | strView | , |
cbfun | |||
) |
Set the callback when the 3D view destroying is done.
This function is called after the destruction.
Prototype : fun [LIB3D_View fun [I] I] I
LIB3D_View | : a 3d view object |
fun | [I] I : the callback. The argument is the result of the destruction :
|
b3d_viewSetCbPreRenderFX | ( | strView | , |
cbfun | |||
) |
Set the callback to the pre rendering effects.
Prototype : fun [LIB3D_View fun [LIB3D_View] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View] I : the callback. |
b3d_viewSetCbPreRender | ( | strView | , |
cbfun | |||
) |
Set the callback to the pre rendering.
Prototype : fun [LIB3D_View fun [LIB3D_View] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View] I : the callback. |
b3d_viewSetCbPostRender | ( | strView | , |
cbfun | |||
) |
Set the callback to the post rendering.
Prototype : fun [LIB3D_View fun [LIB3D_View] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View] I : the callback. |
b3d_viewSetCbClick | ( | strView | , |
cbfun | |||
) |
Set the callback when the mouse is clicked (pressed) on the 3d view.
Prototype : fun [LIB3D_View fun [LIB3D_View I I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I I] I : the callback. The supplemental arguments are : the x, y coordinates and the button number. |
b3d_viewSetCbDbClick | ( | strView | , |
cbfun | |||
) |
Set the callback when the mouse is double clicked on the 3d view.
Prototype : fun [LIB3D_View fun [LIB3D_View I I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I I] I : the callback. The supplemental arguments are : the x, y coordinates and the button number. |
b3d_viewSetCbUnClick | ( | strView | , |
cbfun | |||
) |
Set the callback when the mouse is released (unclicked) on the 3d view.
Prototype : fun [LIB3D_View fun [LIB3D_View I I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I I] I : the callback. The supplemental arguments are : the x, y coordinates and the button number. |
b3d_viewSetCbWheel | ( | strView | , |
cbfun | |||
) |
Set the callback.
Prototype : fun [LIB3D_View fun [LIB3D_View I I I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I I I] I : the callback. The supplemental arguments are : the x, y coordinates, the direction and the mask (from the keyboard for example). |
b3d_viewSetCbMouseMove | ( | strView | , |
cbfun | |||
) |
Set the callback when the mouse moves on the 3d view.
Prototype : fun [LIB3D_View fun [LIB3D_View I I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I I] I : the callback. The supplemental arguments are : the x, y coordinates and the mask (from the keyboard for example). |
b3d_viewSetCbKeyDown | ( | strView | , |
cbfun | |||
) |
Set the callback when the a key is pressed from the keyboard.
Prototype : fun [LIB3D_View fun [LIB3D_View I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I] I : the callback. The supplemental arguments are : the a scancode which can be specific at the keyboard, and the ascii value. |
b3d_viewSetCbKeyUp | ( | strView | , |
cbfun | |||
) |
Set the callback when the a key is released from the keyboard.
Prototype : fun [LIB3D_View fun [LIB3D_View I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I] I : the callback. The supplemental argument is : the a scancode which can be specific at the keyboard. |
b3d_viewSetCbDropFile | ( | strView | , |
cbfun | |||
) |
Set the callback when a drop file event occurs on the 3d view.
Prototype : fun [LIB3D_View fun [LIB3D_View I I [P r1]] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I [P r1]] I : the callback. The supplemental arguments are : the x, y coordinates and the list of read-reference files |
b3d_viewSetCbChangeCamera | ( | strView | , |
cbfun | |||
) |
Set the callback when the default camera changes.
Prototype : fun [LIB3D_View fun [LIB3D_View LIB3D_Session SO3_OBJECT] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View LIB3D_Session SO3_OBJECT] I : the callback. The supplemental arguments are : the current 3d view, the current session and the new camera object |
b3d_viewSetCbResize | ( | strView | , |
cbfun | |||
) |
Set the callback when the 3d view is resized.
Prototype : fun [LIB3D_View fun [LIB3D_View I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I] I : the callback. The supplemental arguments are : the new width and height |
b3d_viewSetCbMove | ( | strView | , |
cbfun | |||
) |
Set the callback when the 3d view moves.
Prototype : fun [LIB3D_View fun [LIB3D_View I I] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View I I] I : the callback. The supplemental arguments are : the new x and y coordinates |
b3d_viewSetCbHasFocus | ( | strView | , |
cbfun | |||
) |
Set the callback when the 3d view has the focus.
Prototype : fun [LIB3D_View fun [LIB3D_View] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View] I : the callback |
b3d_viewSetCbLoseFocus | ( | strView | , |
cbfun | |||
) |
Set the callback when the 3d view loses the focus.
Prototype : fun [LIB3D_View fun [LIB3D_View] I] I
LIB3D_View | : a 3d view object |
fun | [LIB3D_View] I : the callback |
b3d_viewGetSessionFirst | ( | strView | ) |
Get the first session structure object.
Prototype : fun [LIB3D_View] LIB3D_Session
LIB3D_View | : a 3d view object |
b3d_renderEnable | ( | strView | , |
state | |||
) |
Enable (Disable) the rendering.
Prototype : fun [LIB3D_View I] I
LIB3D_View | : a 3d view object |
I | : 1 to enable, 0 to disable |
b3d_viewEnable | ( | strView | , |
state | |||
) |
Enable (Disable) a 3d view. if enabled, the 3d window is shown else it is hidden.
Prototype : fun [LIB3D_View I] I
LIB3D_View | : a 3d view object |
I | : 1 to enable, 0 to disable |
b3d_viewConvertSizePixel2Relative | ( | strView | , |
pxWidth | , | ||
pxHeight | |||
) |
Convert a pixel dimension to a relative dimension (from the size of 3d view).
Prototype : fun [LIB3D_View I I] [F F]
LIB3D_View | : a 3d view object |
I | : a width to convert (can be nil, in this case, it is ignored) |
I | : a height to convert (can be nil, in this case, it is ignored) |
b3d_viewSetViewportSizeFromFullViewSize | ( | strView | , |
strViewport | |||
) |
Resize a Viewport and the 2d buffer object from the current size of the 3d view (no fullscreen).
Prototype : fun [LIB3D_View LIB3D_Viewport] I
LIB3D_View | : a 3d view object |
LIB3D_Viewport | : a Viewport object |
b3d_viewSetSizeFixed | ( | strView | , |
state | |||
) |
Define if the 3d view is resizable or not.
Prototype : fun [LIB3D_View I] I
LIB3D_View | : a 3d view object |
I | : 0 if resizable, 1 if fixed |
b3d_viewGetSizeFixed | ( | strView | , |
state | |||
) |
Returns if the 3d view is resizable or not.
Prototype : fun [LIB3D_View] I
LIB3D_View | : a 3d view object |
b3d_viewSetSizeMinMax | ( | strView | , |
tSizeMin | , | ||
tSizeMax | |||
) |
Define the minimal and the maximal size of the 3d view.
Prototype : fun [LIB3D_View [I I] [I I]] I
LIB3D_View | : a 3d view object |
[I | I] : the minimal size, in pixels. Can be nil, in this case, this limit will be ignored. One of these two value can be nil. Example [640 nil], only the width is set. |
[I | I] : the maximal size, in pixels. Can be nil, in this case, this limit will be ignored. see remark in the minimal limits, above. |
b3d_viewGetSizeMinMax | ( | strView | ) |
Returns if the limits of the 3d view size, in pixels.
Prototype : fun [LIB3D_View] [[I I] [I I]]
LIB3D_View | : a 3d view object |
b3d_viewGetSize | ( | strView | ) |
Get the current size of the 3d window.
Prototype : fun [LIB3D_View] [I I]
LIB3D_View | : a 3d view object |
b3d_viewGetOldSize | ( | strView | ) |
Get the last known size of the 3d window (before the current size)
Prototype : fun [LIB3D_View] [I I]
LIB3D_View | : a 3d view object |
b3d_viewSetSize | ( | strView | , |
neww | , | ||
newh | |||
) |
Resize the 3d view.
Prototype : fun [LIB3D_View I I] I
LIB3D_View | : a 3d view object |
I | : the new width, in pixels. Nil if unchanged. |
I | : the new height, in pixels. Nil if unchanged. |
b3d_viewSetFocus | ( | strView | , |
state | |||
) |
Activate or desactivate the focus to the 3d window.
Prototype : fun [LIB3D_View I] I
LIB3D_View | : a 3d view object |
I | : 1 to activate, 0 to desactivate (and activate the mother window) |
b3d_viewGetPos | ( | strView | ) |
Get the current position of the 3d window (inside its mother)
Prototype : fun [LIB3D_View] [I I]
LIB3D_View | : a 3d view object |
b3d_viewSetPos | ( | strView | , |
newx | , | ||
newy | |||
) |
Set the position of the 3d window (inside its mother)
Prototype : fun [LIB3D_View I I] I
LIB3D_View | : a 3d view object |
I | : the new width. Can be nil if unchanged. |
I | : the new height. Can be nil if unchanged. |