Project

General

Profile

OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
Loading...
Searching...
No Matches
OpenSpace3D 3D view API

Functions

 V3DgetDefaultViewport (viewstr)
 Get the default viewport of a 3d view structure.
 
 V3DgetObjectOrientationDeg (obj)
 Get an object euler rotation in degree.
 
 V3DsetObjectOrientationDeg (obj, ang)
 Set an object euler rotation in degree.
 
 V3DgetObjectGlobalOrientationDeg (obj)
 Get an object global euler rotation in degree.
 
 V3DsetObjectGlobalOrientationDeg (obj, ang)
 Set an object global euler rotation in degree.
 
 V3DgetSessionView (sessionstr)
 Get the V3Dview structure from a V3Dsession structure.
 
 V3DgetObjectByName (sessionstr, name)
 Get a 3d object by his name or camera type.
 
 V3DgetObjectTypeByName (name)
 Get a 3d object mode by it's name.
 
 V3DgetCameraByType (sessionstr, cam, type)
 Get a camera object by type, the camera or the navigation shell.
 
 V3DgetViewportByIndex (viewstr, idx)
 Get a viewport structure from it's index in 3d view.
 
 V3DgetViewportCamera (viewportstr)
 Get the current viewport camera.
 
 V3DgetViewportIndex (viewstr, viewport)
 Get a viewport index in a 3d view structure.
 
 V3DsetViewportColor (viewportstr, color)
 Set a viewport backgroung color.
 
 V3DgetViewportColor (viewportstr)
 Get a viewport backgroung color.
 
 V3DgetViewportSize (viewstr, viewportstr)
 Get a viewport size.
 
 V3DdelViewport (viewstr, viewportstr)
 Remove a viewport.
 
 V3DaddViewport (viewstr, x, y, w, h, backcolor)
 Add a viewport.
 
 V3DsetViewportPolygonMode (viewportstr, mode)
 Set a viewport polygon render mode.
 
 V3DgetViewportPolygonMode (viewportstr)
 Get a viewport polygon render mode.
 
 V3DsetViewport (viewstr, viewportstr, camera)
 Set a viewport camera and display it.
 
 V3DsetViewportPositionSize (viewportstr, x, y, w, h)
 Resize a viewport.
 
 V3DchangeCameraViewport (sessionstr, viewportstr, camera)
 Change a viewport camera.
 
 V3DregisterCompositor (viewportstr, compo, scheme)
 Add a compositor to a viewport.
 
 V3DunRegisterCompositor (viewportstr, compo)
 Remove a compositor from a viewport.
 
 V3DgetCompositorScheme (viewportstr, compo)
 Get the scheme name associated with a viewport compositor.
 
 V3DsetCamera (camera, fovlength, fovy, nclip, fclip)
 Set a camera settings.
 
 V3DgetDefaultCamera (sessionstr)
 Get the current default camera.
 
 V3DsetDefaultCamera (sessionstr, camera)
 Set the current default camera.
 
 V3DremoveDefaultCamera (sessionstr, camera)
 Remove the default camera.
 
 V3DdelCamera (sessionstr, camera)
 Remove a camera.
 
 V3DaddCamera (sessionstr, name)
 Add a camera.
 
 V3DaddParticleSystem (sessionstr, name, template)
 Add a particle system.
 
 V3DsetLight (light, type, dcolor, scolor, range, const, linear, quadr)
 Set a light parameters.
 
 V3DenableLight (light, state)
 Enable or Disable a light.
 
 V3DaddLight (sessionstr, name, father, type, dcolor, scolor, range, const, linear, quadr)
 Add a light.
 
 V3DaddResource (sessionstr, ressource, group, type)
 Add a resource to a scene.
 
 V3DaddMesh (sessionstr, file, name, idx, group, father)
 Add a mesh to a scene.
 
 V3DloadMesh (sessionstr, file, name, idx, group, father, cbfun)
 Add a mesh to a scene, the mesh is loaded in a background thread.
 
 V3DaddShell (sessionstr, name, idx, father, pos, ang)
 Add a shell node to a scene.
 
 V3DsetAmbientLight (sessionstr, color)
 Set the scene ambient color.
 
 V3DgetAmbientLight (sessionstr)
 Get the scene ambient color.
 
 V3DgetAnimationByName (sessionstr, name)
 Get an animation by it's name.
 
 V3DgetAnimationByAnim (sessionstr, anim)
 Get an animation structure from the SO3_ANIM object.
 
 V3DaddAnimation (sessionstr, obj, id, basename, name, length, speed, weight, state, loop, transmode, rotmode)
 Add an animation to the scene.
 
 V3DaddSequenceAnimation (sessionstr, id, basename, name, speed, weight, state, loop)
 Add a sequence animation to the scene.
 
 V3DgetNbAnimationTracks (animstr)
 Get the number of animation tracks.
 
 V3DgetNbAnimationTrackKeys (animstr, trackidx)
 Get the number of animation track keys.
 
 V3DaddSequenceAnimationTrack (animstr)
 Add a sequence animation track.
 
 V3DdelSequenceAnimationTrack (animstr, trackidx)
 Remove a sequence animation track.
 
 V3DmoveSequenceAnimationKey (animstr, trackidx, keyidx, newidx)
 Move a sequence animation track key.
 
 V3DgetSequenceAnimationKey (animstr, trackidx, keyidx)
 Get a sequence animation track key.
 
 V3DgetSequenceAnimationKeyInfos (animstr, trackidx, keyidx)
 Get a sequence animation track key infos.
 
 V3DsetSequenceAnimationKeyInfos (animstr, trackidx, keyidx, length, trans, decal)
 Set a sequence animation track key infos.
 
 V3DaddSequenceAnimationKey (animstr, trackidx, keyanimstr, length, transition, decal)
 Add a sequence animation track key.
 
 V3DdelSequenceAnimationKey (animstr, trackidx, keyidx)
 Remove a sequence animation track key.
 
 V3DaddMorphAnimation (sessionstr, anim, obj, id, basename, name, speed, weight, state, loop)
 Add a morph animation to the scene.
 
 V3DdelAnimation (sessionstr, animstr)
 Delete an animation.
 
 V3DaddAnimationKey (animstr, pos, quat, scale, ftime)
 Add an animation node key.
 
 V3DdelAnimationTrack (sessionstr, animstr, trackidx)
 Delete an animation track.
 
 V3DsetAnimationWeight (animstr, weight)
 Set an animation weight.
 
 V3DgetAnimationWeight (animstr)
 Get an animation weight.
 
 V3DsetAnimationState (animstr, state)
 Set an animation state.
 
 V3DsetAnimationLoop (animstr, loop)
 Set an animation loop.
 
 V3DsetAnimationSpeed (animstr, speed)
 Set an animation speed factor.
 
 V3DsetAnimationInterpolationMode (animstr, mode)
 Set an animation translation interpolation mode.
 
 V3DsetAnimationRotInterpolationMode (animstr, mode)
 Set an animation rotation interpolation mode.
 
 V3DgetAnimationState (animstr)
 Get an animation state.
 
 V3DgetAnimationLoop (animstr)
 Get an animation loop state.
 
 V3DgetAnimationSpeed (animstr)
 Get an animation speed factor.
 
 V3DgetAnimationType (animstr)
 Get an animation type.
 
 V3DsetAnimationPosition (animstr, pos)
 Set an animation position.
 
 V3DgetAnimationPosition (animstr)
 Get an animation position.
 
 V3DgetAnimationLength (animstr)
 Get an animation length.
 
 V3DgetAnimationEnable (animstr)
 Get an animation enable state.
 
 V3DresetAnimation (animstr)
 Reset an animation.
 
 V3DresetAnimations (sessionstr)
 Reset all scene animations.
 
 V3DpauseAnimation (animstr)
 Pause an animation.
 
 V3DplayAnimation (animstr)
 Play an animation.
 
 V3DplayAnimationFromPos (animstr, startpos)
 Play an animation from a position.
 
 V3DstopAnimation (animstr)
 Stop an animation.
 
 V3DenableAnimation (animstr, state)
 Set an animation enable state.
 
 V3DanimationSetSkipFrame (animstr, state)
 Set an animation skip frame state.
 
 V3DanimationGetSkipFrame (animstr)
 Get an animation skip frame state.
 
 V3DcrSession (viewstr, name)
 Create a 3d scene structure.
 
 V3DresetSession (sessionstr)
 Reset a 3d scene.
 
 V3DviewSetFocus (viewstr)
 Set the 3d view focus.
 
 V3DshowCursor (viewstr, state)
 Set the mouse cursor visibility state.
 
 V3DgetCursorVisible (viewstr)
 Get a 3d view the mouse cursor visibility state.
 
 V3DgetCursor (viewstr)
 Get a 3d view mouse cursor.
 
 V3DgetCursorTrans (viewstr)
 Get a 3d view last cursor translation.
 
 V3DgetCursorDirection (viewstr)
 Get a 3d view last cursor direction.
 
 V3DisClicked (viewstr)
 Get a 3d view last mouse click state.
 
 V3DisMoveClicked (viewstr)
 Get a 3d view last mouse move click state.
 
 V3DenableKeyboard (viewstr, mode)
 Set a 3d view keyboard state.
 
 V3DenableMouse (viewstr, mode)
 Set a 3d view mouse state.
 
 V3DsetCursor (viewstr, cursor)
 Change a 3d view mouse cursor.
 
 V3DdsView (viewstr)
 Destroy a 3d view.
 
 V3DgetViewPosSize (viewstr)
 Get a 3d view position and size.
 
 V3DgetViewPos (viewstr)
 Get a 3d view position.
 
 V3DgetViewSize (viewstr)
 Get a 3d view size.
 
 V3DgetFullScreenState (viewstr)
 Get a 3d view fullscreen state.
 
 V3DcenterMouseCursor (viewstr)
 Center the mouse cursor on a 3d view.
 
 V3DsetMousePosition (viewstr, x, y)
 Set the mouse cursor position on a 3d view.
 
 V3DgetVrPointerState (viewstr)
 

Detailed Description

OpenSpace3D 3D view API

Function Documentation

◆ V3DgetDefaultViewport()

V3DgetDefaultViewport ( viewstr  )

Get the default viewport of a 3d view structure.

Prototype: fun [V3Dview] V3Dviewport

Parameters
V3Dview: the 3d view structure
Returns
V3Dviewport : the viewport structure, nil if not set

◆ V3DgetObjectOrientationDeg()

V3DgetObjectOrientationDeg ( obj  )

Get an object euler rotation in degree.

Prototype: fun [SO3_OBJECT] [F F F]

Parameters
SO3_OBJECT: the 3d object
Returns
[F F F] : the euler rotation in degree

◆ V3DsetObjectOrientationDeg()

V3DsetObjectOrientationDeg ( obj  ,
ang   
)

Set an object euler rotation in degree.

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

Parameters
SO3_OBJECT: the 3d object
[FF F] : euler rotation in degree
Returns
[F F F] : the same rotation

◆ V3DgetObjectGlobalOrientationDeg()

V3DgetObjectGlobalOrientationDeg ( obj  )

Get an object global euler rotation in degree.

Prototype: fun [SO3_OBJECT] [F F F]

Parameters
SO3_OBJECT: the 3d object
Returns
[F F F] : the global euler rotation in degree

◆ V3DsetObjectGlobalOrientationDeg()

V3DsetObjectGlobalOrientationDeg ( obj  ,
ang   
)

Set an object global euler rotation in degree.

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

Parameters
SO3_OBJECT: the 3d object
[FF F] : global euler rotation in degree
Returns
[F F F] : the same rotation

◆ V3DgetSessionView()

V3DgetSessionView ( sessionstr  )

Get the V3Dview structure from a V3Dsession structure.

Prototype: fun [V3Dsession] V3Dview

Parameters
V3Dsession: the scene structure
Returns
V3Dview : the 3d view structure

◆ V3DgetObjectByName()

V3DgetObjectByName ( sessionstr  ,
name   
)

Get a 3d object by his name or camera type.

Prototype: fun [V3Dsession S] SO3_OBJECT

Parameters
V3Dsession: the scene structure
S: the object name
Returns
SO3_OBJECT : the object, nil if not found

◆ V3DgetObjectTypeByName()

V3DgetObjectTypeByName ( name  )

Get a 3d object mode by it's name.

Prototype: fun [S] SO3_OBJECT

Parameters
S: the object name
Returns
I : mode 1 if this is the default camera, 2 if this is the navigation shell, 0 if none

◆ V3DgetCameraByType()

V3DgetCameraByType ( sessionstr  ,
cam  ,
type   
)

Get a camera object by type, the camera or the navigation shell.

Prototype: fun [V3Dsession SO3_OBJECT I] SO3_OBJECT

Parameters
V3Dsession: the scene structure
SO3_OBJECT: the camera
I: the type, 1 the same camera, 2 the navigation shell
Returns
SO3_OBJECT : the object, nil if not found

◆ V3DgetViewportByIndex()

V3DgetViewportByIndex ( viewstr  ,
idx   
)

Get a viewport structure from it's index in 3d view.

Prototype: fun [V3Dview I] V3Dviewport

Parameters
V3Dview: the 3d view structure
I: the viewport index
Returns
V3Dviewport : the viewport structure, nil if not found

◆ V3DgetViewportCamera()

V3DgetViewportCamera ( viewportstr  )

Get the current viewport camera.

Prototype: fun [V3Dviewport] SO3_OBJECT

Parameters
V3Dviewport: the viewport structure
Returns
SO3_OBJECT : the camera, nil if not set

◆ V3DgetViewportIndex()

V3DgetViewportIndex ( viewstr  ,
viewport   
)

Get a viewport index in a 3d view structure.

Prototype: fun [V3Dview V3Dviewport] I

Parameters
V3Dview: the 3d view structure
V3Dviewport: the viewport structure
Returns
I : the viewport index

◆ V3DsetViewportColor()

V3DsetViewportColor ( viewportstr  ,
color   
)

Set a viewport backgroung color.

Prototype: fun [V3Dviewport I] I

Parameters
V3Dviewport: the viewport structure
I: the background color
Returns
0

◆ V3DgetViewportColor()

V3DgetViewportColor ( viewportstr  )

Get a viewport backgroung color.

Prototype: fun [V3Dviewport] I

Parameters
V3Dviewport: the viewport structure
Returns
I : the viewport background color

◆ V3DgetViewportSize()

V3DgetViewportSize ( viewstr  ,
viewportstr   
)

Get a viewport size.

Prototype: fun [V3Dview V3Dviewport] [I I I I]

Parameters
V3Dview: the view structure
V3Dviewport: the viewport structure
Returns
[I I I I] : the viewport position and size in pixel

◆ V3DdelViewport()

V3DdelViewport ( viewstr  ,
viewportstr   
)

Remove a viewport.

Prototype: fun [V3Dview V3Dviewport] I

Parameters
V3Dview: the 3d view structure
V3Dviewport: the viewport structure
Returns
0

◆ V3DaddViewport()

V3DaddViewport ( viewstr  ,
,
,
,
,
backcolor   
)

Add a viewport.

Prototype: fun [V3Dview F F F F I] V3Dviewport

Parameters
V3Dview: the 3d view structure
F: the X position between 0 and 1
F: the Y position between 0 and 1
F: the width between 0 and 1
F: the height between 0 and 1
I: the background color
Returns
V3Dviewport : the new viewport structure

◆ V3DsetViewportPolygonMode()

V3DsetViewportPolygonMode ( viewportstr  ,
mode   
)

Set a viewport polygon render mode.

Prototype: fun [V3Dviewport I] I

Parameters
V3Dviewport: the viewport structure
I: the render mode, SO3_POLY_POINTS, SO3_POLY_SOLID or SO3_POLY_WIREFRAME
Returns
0

◆ V3DgetViewportPolygonMode()

V3DgetViewportPolygonMode ( viewportstr  )

Get a viewport polygon render mode.

Prototype: fun [V3Dviewport I] I

Parameters
V3Dviewport: the viewport structure
Returns
I : the render mode, SO3_POLY_POINTS, SO3_POLY_SOLID or SO3_POLY_WIREFRAME

◆ V3DsetViewport()

V3DsetViewport ( viewstr  ,
viewportstr  ,
camera   
)

Set a viewport camera and display it.

Prototype: fun [V3Dview V3Dviewport SO3_OBJECT] I

Parameters
V3Dview: the 3d view structure
V3Dviewport: the viewport structure
SO3_OBJECT: the camera object
Returns
0

◆ V3DsetViewportPositionSize()

V3DsetViewportPositionSize ( viewportstr  ,
,
,
,
 
)

Resize a viewport.

Prototype: fun [V3Dviewport F F F F] I

Parameters
V3Dviewport: the viewport structure
F: the X position between 0 and 1
F: the Y position between 0 and 1
F: the width between 0 and 1
F: the height between 0 and 1
Returns
0

◆ V3DchangeCameraViewport()

V3DchangeCameraViewport ( sessionstr  ,
viewportstr  ,
camera   
)

Change a viewport camera.

Prototype: fun [V3Dsession V3Dviewport SO3_OBJECT] I

Parameters
V3Dsession: the 3d scene structure
V3Dviewport: the viewport structure
SO3_OBJECT: the camera object
Returns
0

◆ V3DregisterCompositor()

V3DregisterCompositor ( viewportstr  ,
compo  ,
scheme   
)

Add a compositor to a viewport.

Prototype: fun [V3Dviewport S S] I

Parameters
V3Dviewport: the viewport structure
S: the compositor name
S: the compositor scheme name
Returns
0

◆ V3DunRegisterCompositor()

V3DunRegisterCompositor ( viewportstr  ,
compo   
)

Remove a compositor from a viewport.

Prototype: fun [V3Dviewport S] I

Parameters
V3Dviewport: the viewport structure
S: the compositor name
Returns
0

◆ V3DgetCompositorScheme()

V3DgetCompositorScheme ( viewportstr  ,
compo   
)

Get the scheme name associated with a viewport compositor.

Prototype: fun [V3Dviewport S] S

Parameters
V3Dviewport: the viewport structure
S: the compositor name
Returns
S : the compositor scheme name

◆ V3DsetCamera()

V3DsetCamera ( camera  ,
fovlength  ,
fovy  ,
nclip  ,
fclip   
)

Set a camera settings.

Prototype: fun [SO3_OBJECT F F F F] SO3_OBJECT

Parameters
SO3_OBJECT: the camera object
F: FOV length
F: FOVy
F: near clip distance
F: far clip distance
Returns
SO3_OBJECT : the same camera

◆ V3DgetDefaultCamera()

V3DgetDefaultCamera ( sessionstr  )

Get the current default camera.

Prototype: fun [V3Dsession] SO3_OBJECT

Parameters
V3Dsession: the 3d scene structure
Returns
SO3_OBJECT : the camera

◆ V3DsetDefaultCamera()

V3DsetDefaultCamera ( sessionstr  ,
camera   
)

Set the current default camera.

Prototype: fun [V3Dsession SO3_OBJECT] I

Parameters
V3Dsession: the 3d scene structure
SO3_OBJECT: the new default camera
Returns
0

◆ V3DremoveDefaultCamera()

V3DremoveDefaultCamera ( sessionstr  ,
camera   
)

Remove the default camera.

Prototype: fun [V3Dsession SO3_OBJECT] I

Parameters
V3Dsession: the 3d scene structure
SO3_OBJECT: the default camera
Returns
0

◆ V3DdelCamera()

V3DdelCamera ( sessionstr  ,
camera   
)

Remove a camera.

Prototype: fun [V3Dsession SO3_OBJECT] I

Parameters
V3Dsession: the 3d scene structure
SO3_OBJECT: the camera
Returns
0

◆ V3DaddCamera()

V3DaddCamera ( sessionstr  ,
name   
)

Add a camera.

Prototype: fun [V3Dsession S] SO3_OBJECT

Parameters
V3Dsession: the 3d scene structure
S: the camera name (the name must be unique)
Returns
SO3_OBJECT : the new camera

◆ V3DaddParticleSystem()

V3DaddParticleSystem ( sessionstr  ,
name  ,
template   
)

Add a particle system.

Prototype: fun [V3Dsession S S] SO3_OBJECT

Parameters
V3Dsession: the 3d scene structure
S: the particle system name (the name must be unique)
S: the particle template name
Returns
SO3_OBJECT : the new particle system

◆ V3DsetLight()

V3DsetLight ( light  ,
type  ,
dcolor  ,
scolor  ,
range  ,
const  ,
linear  ,
quadr   
)

Set a light parameters.

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

Parameters
SO3_OBJECT: the light object
I: the light type SO3_POINT_LIGHT, SO3_DIRECTIONAL_LIGHT, SO3_SPOT_LIGHT or SO3_RECT_LIGHT
I: diffuse color
I: specular color
F: light range
F: constant attenuation
F: linear attenuation
F: quadratic attenuation
Returns
SO3_OBJECT : the same light object

◆ V3DenableLight()

V3DenableLight ( light  ,
state   
)

Enable or Disable a light.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: the light object
I: 1 to enable the light, 0 to disable
Returns
0

◆ V3DaddLight()

V3DaddLight ( sessionstr  ,
name  ,
father  ,
type  ,
dcolor  ,
scolor  ,
range  ,
const  ,
linear  ,
quadr   
)

Add a light.

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

Parameters
V3Dsession: the 3d scene structure
S: the light name (must be unique)
SO3_OBJECT: the parent node
I: the light type SO3_POINT_LIGHT, SO3_DIRECTIONAL_LIGHT, SO3_SPOT_LIGHT or SO3_RECT_LIGHT
I: diffuse color
I: specular color
F: light range
F: constant attenuation
F: linear attenuation
F: quadratic attenuation
Returns
SO3_OBJECT : the new light object

◆ V3DaddResource()

V3DaddResource ( sessionstr  ,
ressource  ,
group  ,
type   
)

Add a resource to a scene.

Prototype: fun [V3Dsession S S I] I

Parameters
V3Dsession: the 3d scene structure
S: the resource path
S: the resource group name
I: the resource type SO3_RESOURCE_MESH, SO3_RESOURCE_MATERIAL, SO3_RESOURCE_TEXTURE, SO3_RESOURCE_SKELETON, SO3_RESOURCE_GPUPROGRAM, SO3_RESOURCE_HIGHLEVELGPUPROGRAM or SO3_RESOURCE_PARTICLE_SYSTEM
Returns
0

◆ V3DaddMesh()

V3DaddMesh ( sessionstr  ,
file  ,
name  ,
idx  ,
group  ,
father   
)

Add a mesh to a scene.

Prototype: fun [V3Dsession S S I S SO3_OBJECT] SO3_OBJECT

Parameters
V3Dsession: the 3d scene structure
S: the mesh path
S: the mesh name
I: the mesh index (must be unique)
S: the resource group name
SO3_OBJECT: the parent node
Returns
SO3_OBJECT : the new mesh

◆ V3DloadMesh()

V3DloadMesh ( sessionstr  ,
file  ,
name  ,
idx  ,
group  ,
father  ,
cbfun   
)

Add a mesh to a scene, the mesh is loaded in a background thread.

Prototype: fun [V3Dsession S S I S SO3_OBJECT fun [V3Dsession SO3_OBJECT] I] SO3_OBJECT

Parameters
V3Dsession: the 3d scene structure
S: the mesh path
S: the mesh name
I: the mesh index (must be unique)
S: the resource group name
SO3_OBJECT: the parent node
fun[V3Dsession SO3_OBJECT] I : loaded callback
Returns
SO3_OBJECT : the new mesh

◆ V3DaddShell()

V3DaddShell ( sessionstr  ,
name  ,
idx  ,
father  ,
pos  ,
ang   
)

Add a shell node to a scene.

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

Parameters
V3Dsession: the 3d scene structure
S: the shell name
I: the shell index (must be unique)
SO3_OBJECT: the parent node, this can be nil
[FF F] : the shell position, this can be nil
[FF F F] : the shell orientation (quaternion), this can be nil
Returns
SO3_OBJECT : the new shell node

◆ V3DsetAmbientLight()

V3DsetAmbientLight ( sessionstr  ,
color   
)

Set the scene ambient color.

Prototype: fun [V3Dsession I] I

Parameters
V3Dsession: the 3d scene structure
I: the new ambient color
Returns
0

◆ V3DgetAmbientLight()

V3DgetAmbientLight ( sessionstr  )

Get the scene ambient color.

Prototype: fun [V3Dsession] I

Parameters
V3Dsession: the 3d scene structure
Returns
I : the scene ambient color

◆ V3DgetAnimationByName()

V3DgetAnimationByName ( sessionstr  ,
name   
)

Get an animation by it's name.

Prototype: fun [V3Dsession S] V3Danim

Parameters
V3Dsession: the 3d scene structure
S: the animation name
Returns
V3Danim : the animation, nil if not found

◆ V3DgetAnimationByAnim()

V3DgetAnimationByAnim ( sessionstr  ,
anim   
)

Get an animation structure from the SO3_ANIM object.

Prototype: fun [V3Dsession SO3_ANIM] V3Danim

Parameters
V3Dsession: the 3d scene structure
SO3_ANIM: SO3 animation object
Returns
V3Danim : the animation, nil if not found

◆ V3DaddAnimation()

V3DaddAnimation ( sessionstr  ,
obj  ,
id  ,
basename  ,
name  ,
length  ,
speed  ,
weight  ,
state  ,
loop  ,
transmode  ,
rotmode   
)

Add an animation to the scene.

Prototype: fun [V3Dsession SO3_OBJECT I S S F F F I I I I] V3Danim

Parameters
V3Dsession: the 3d scene structure
SO3_OBJECT: the object containing the animation
I: index (must be unique)
S: base name
S: name
F: length
F: speed
F: weight
I: initial state
I: 1 for loop mode, 0 otherwise
I: translation interpolation mode SO3_IM_LINEAR or SO3_IM_SPLINE
I: rotation interpolation mode SO3_RIM_LINEAR or SO3_RIM_SPHERICAL
Returns
V3Danim : the animation

◆ V3DaddSequenceAnimation()

V3DaddSequenceAnimation ( sessionstr  ,
id  ,
basename  ,
name  ,
speed  ,
weight  ,
state  ,
loop   
)

Add a sequence animation to the scene.

Prototype: fun [V3Dsession I S S F F I I] V3Danim

Parameters
V3Dsession: the 3d scene structure
I: index (must be unique)
S: base name
S: name
F: speed
F: weight
I: initial state
I: 1 for loop mode, 0 otherwise
Returns
V3Danim : the animation

◆ V3DgetNbAnimationTracks()

V3DgetNbAnimationTracks ( animstr  )

Get the number of animation tracks.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
I : the number of tracks

◆ V3DgetNbAnimationTrackKeys()

V3DgetNbAnimationTrackKeys ( animstr  ,
trackidx   
)

Get the number of animation track keys.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: index of the animation track
Returns
I : the number of track keys

◆ V3DaddSequenceAnimationTrack()

V3DaddSequenceAnimationTrack ( animstr  )

Add a sequence animation track.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
I : return the track index

◆ V3DdelSequenceAnimationTrack()

V3DdelSequenceAnimationTrack ( animstr  ,
trackidx   
)

Remove a sequence animation track.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: index of the animation track
Returns
0

◆ V3DmoveSequenceAnimationKey()

V3DmoveSequenceAnimationKey ( animstr  ,
trackidx  ,
keyidx  ,
newidx   
)

Move a sequence animation track key.

Prototype: fun [V3Danim I I I] I

Parameters
V3Danim: the animation structure
I: index of the animation track
I: index of key
I: new index of key
Returns
0

◆ V3DgetSequenceAnimationKey()

V3DgetSequenceAnimationKey ( animstr  ,
trackidx  ,
keyidx   
)

Get a sequence animation track key.

Prototype: fun [V3Danim I I] V3Danim

Parameters
V3Danim: the animation structure
I: index of the animation track
I: index of key
Returns
V3Danim : the animation used as a sequence animation key

◆ V3DgetSequenceAnimationKeyInfos()

V3DgetSequenceAnimationKeyInfos ( animstr  ,
trackidx  ,
keyidx   
)

Get a sequence animation track key infos.

Prototype: fun [V3Danim I I] [V3Danim F F F F]

Parameters
V3Danim: the animation structure
I: index of the animation track
I: index of key
Returns
[V3Danim F F F F] : the animation used as a sequence animation key, the key position, the key length, the key transition time and the key offset

◆ V3DsetSequenceAnimationKeyInfos()

V3DsetSequenceAnimationKeyInfos ( animstr  ,
trackidx  ,
keyidx  ,
length  ,
trans  ,
decal   
)

Set a sequence animation track key infos.

Prototype: fun [V3Danim I I F F F] I

Parameters
V3Danim: the animation structure
I: index of the animation track
I: index of key
F: length
F: transition time in second
F: offset in second
Returns
0

◆ V3DaddSequenceAnimationKey()

V3DaddSequenceAnimationKey ( animstr  ,
trackidx  ,
keyanimstr  ,
length  ,
transition  ,
decal   
)

Add a sequence animation track key.

Prototype: fun [V3Danim I V3Danim F F F] I

Parameters
V3Danim: the animation structure
I: index of the animation track
V3Danim: the animation structure to use as a key
F: length
F: transition time in second
F: offset in second
Returns
I : the key index

◆ V3DdelSequenceAnimationKey()

V3DdelSequenceAnimationKey ( animstr  ,
trackidx  ,
keyidx   
)

Remove a sequence animation track key.

Prototype: fun [V3Danim I I] I

Parameters
V3Danim: the animation structure
I: index of the animation track
I: index of key
Returns
0

◆ V3DaddMorphAnimation()

V3DaddMorphAnimation ( sessionstr  ,
anim  ,
obj  ,
id  ,
basename  ,
name  ,
speed  ,
weight  ,
state  ,
loop   
)

Add a morph animation to the scene.

Prototype: fun [V3Dsession SO3_ANIM SO3_OBJECT I S S F F I I] V3Danim

Parameters
V3Dsession: the 3d scene structure
SO3_ANIM: the SO3 animation object
SO3_OBJECT: the 3d object
I: index (must be unique)
S: base name
S: name
F: speed
F: weight
I: initial state
I: 1 for loop mode, 0 otherwise
Returns
V3Danim : the animation

◆ V3DdelAnimation()

V3DdelAnimation ( sessionstr  ,
animstr   
)

Delete an animation.

Prototype: fun [V3Dsession V3Danim] I

Parameters
V3Dsession: the 3d scene structure
V3Danim: the animation structure to delete
Returns
0

◆ V3DaddAnimationKey()

V3DaddAnimationKey ( animstr  ,
pos  ,
quat  ,
scale  ,
ftime   
)

Add an animation node key.

Prototype: fun [V3Danim [F F F] [F F F F] [F F F] F] I

Parameters
V3Danim: the animation structure
[FF F] : position vector
[FF F F] : orientation quaternion
[FF F] : scale vector
F: key time position
Returns
0

◆ V3DdelAnimationTrack()

V3DdelAnimationTrack ( sessionstr  ,
animstr  ,
trackidx   
)

Delete an animation track.

Prototype: fun [V3Dsession V3Danim I] I

Parameters
V3Dsession: the 3d scene structure
V3Danim: the animation structure
I: track index to delete
Returns
0

◆ V3DsetAnimationWeight()

V3DsetAnimationWeight ( animstr  ,
weight   
)

Set an animation weight.

Prototype: fun [V3Danim F] I

Parameters
V3Danim: the animation structure
F: animation weight
Returns
0

◆ V3DgetAnimationWeight()

V3DgetAnimationWeight ( animstr  )

Get an animation weight.

Prototype: fun [V3Danim] F

Parameters
V3Danim: the animation structure
Returns
F : animation weight

◆ V3DsetAnimationState()

V3DsetAnimationState ( animstr  ,
state   
)

Set an animation state.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: state
Returns
I : the new state

◆ V3DsetAnimationLoop()

V3DsetAnimationLoop ( animstr  ,
loop   
)

Set an animation loop.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: loop state
Returns
0

◆ V3DsetAnimationSpeed()

V3DsetAnimationSpeed ( animstr  ,
speed   
)

Set an animation speed factor.

Prototype: fun [V3Danim F] I

Parameters
V3Danim: the animation structure
F: speed factor
Returns
0

◆ V3DsetAnimationInterpolationMode()

V3DsetAnimationInterpolationMode ( animstr  ,
mode   
)

Set an animation translation interpolation mode.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: interpolation mode, SO3_IM_LINEAR or SO3_IM_SPLINE
Returns
0

◆ V3DsetAnimationRotInterpolationMode()

V3DsetAnimationRotInterpolationMode ( animstr  ,
mode   
)

Set an animation rotation interpolation mode.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: interpolation mode, SO3_RIM_LINEAR or SO3_RIM_SPHERICAL
Returns
0

◆ V3DgetAnimationState()

V3DgetAnimationState ( animstr  )

Get an animation state.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
I : the current animation state

◆ V3DgetAnimationLoop()

V3DgetAnimationLoop ( animstr  )

Get an animation loop state.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
I : the current loop state

◆ V3DgetAnimationSpeed()

V3DgetAnimationSpeed ( animstr  )

Get an animation speed factor.

Prototype: fun [V3Danim] F

Parameters
V3Danim: the animation structure
Returns
F : the current speed factor

◆ V3DgetAnimationType()

V3DgetAnimationType ( animstr  )

Get an animation type.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
I : the animation type, SO3_SCENENODE_ANIM, SO3_SKELETAL_ANIM, SO3_VERTEX_ANIM, SO3_POSE_ANIM, SO3_SEQUENCE_ANIM

◆ V3DsetAnimationPosition()

V3DsetAnimationPosition ( animstr  ,
pos   
)

Set an animation position.

Prototype: fun [V3Danim F] I

Parameters
V3Danim: the animation structure
F: time position
Returns
0

◆ V3DgetAnimationPosition()

V3DgetAnimationPosition ( animstr  )

Get an animation position.

Prototype: fun [V3Danim] F

Parameters
V3Danim: the animation structure
Returns
F : time position

◆ V3DgetAnimationLength()

V3DgetAnimationLength ( animstr  )

Get an animation length.

Prototype: fun [V3Danim] F

Parameters
V3Danim: the animation structure
Returns
F : animation length

◆ V3DgetAnimationEnable()

V3DgetAnimationEnable ( animstr  )

Get an animation enable state.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
I : animation enable state

◆ V3DresetAnimation()

V3DresetAnimation ( animstr  )

Reset an animation.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
0

◆ V3DresetAnimations()

V3DresetAnimations ( sessionstr  )

Reset all scene animations.

Prototype: fun [V3Dsession] I

Parameters
V3Dsession: the 3d scene structure
Returns
0

◆ V3DpauseAnimation()

V3DpauseAnimation ( animstr  )

Pause an animation.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
0

◆ V3DplayAnimation()

V3DplayAnimation ( animstr  )

Play an animation.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
0

◆ V3DplayAnimationFromPos()

V3DplayAnimationFromPos ( animstr  ,
startpos   
)

Play an animation from a position.

Prototype: fun [V3Danim F] I

Parameters
V3Danim: the animation structure
F: the start time position
Returns
0

◆ V3DstopAnimation()

V3DstopAnimation ( animstr  )

Stop an animation.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
0

◆ V3DenableAnimation()

V3DenableAnimation ( animstr  ,
state   
)

Set an animation enable state.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: the enable state
Returns
0

◆ V3DanimationSetSkipFrame()

V3DanimationSetSkipFrame ( animstr  ,
state   
)

Set an animation skip frame state.

Prototype: fun [V3Danim I] I

Parameters
V3Danim: the animation structure
I: the skip frame state
Returns
0

◆ V3DanimationGetSkipFrame()

V3DanimationGetSkipFrame ( animstr  )

Get an animation skip frame state.

Prototype: fun [V3Danim] I

Parameters
V3Danim: the animation structure
Returns
I : the skip frame state

◆ V3DcrSession()

V3DcrSession ( viewstr  ,
name   
)

Create a 3d scene structure.

Prototype: fun [V3Dview, S] V3Dsession

Parameters
V3Dview: the 3d view structure
S: the scene name (must be unique)
Returns
V3Dsession : the new 3d scene structure

◆ V3DresetSession()

V3DresetSession ( sessionstr  )

Reset a 3d scene.

Prototype: fun [V3Dsession] I

Parameters
V3Dsession: the 3d scene structure
Returns
0

◆ V3DviewSetFocus()

V3DviewSetFocus ( viewstr  )

Set the 3d view focus.

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
0

◆ V3DshowCursor()

V3DshowCursor ( viewstr  ,
state   
)

Set the mouse cursor visibility state.

Prototype: fun [V3Dview I] I

Parameters
V3Dview: the 3d view structure
I: 1 to show the cursor, 0 to hide
Returns
0

◆ V3DgetCursorVisible()

V3DgetCursorVisible ( viewstr  )

Get a 3d view the mouse cursor visibility state.

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
I : the cursor visibility state

◆ V3DgetCursor()

V3DgetCursor ( viewstr  )

Get a 3d view mouse cursor.

Prototype: fun [V3Dview] ObjCursor

Parameters
V3Dview: the 3d view structure
Returns
ObjCursor : the current 3d view mouse cursor

◆ V3DgetCursorTrans()

V3DgetCursorTrans ( viewstr  )

Get a 3d view last cursor translation.

Prototype: fun [V3Dview] [I I]

Parameters
V3Dview: the 3d view structure
Returns
[I I] : x, y cursor translation

◆ V3DgetCursorDirection()

V3DgetCursorDirection ( viewstr  )

Get a 3d view last cursor direction.

Prototype: fun [V3Dview] [I I]

Parameters
V3Dview: the 3d view structure
Returns
[I I] : x, y cursor direction

◆ V3DisClicked()

V3DisClicked ( viewstr  )

Get a 3d view last mouse click state.

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
I : 1 if the 3d view is clicked

◆ V3DisMoveClicked()

V3DisMoveClicked ( viewstr  )

Get a 3d view last mouse move click state.

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
I : 1 if the 3d view is clicked while cursor moving

◆ V3DenableKeyboard()

V3DenableKeyboard ( viewstr  ,
mode   
)

Set a 3d view keyboard state.

Prototype: fun [V3Dview I] I

Parameters
V3Dview: the 3d view structure
I: 1 to enable the keyboard, 0 to disable
Returns
0

◆ V3DenableMouse()

V3DenableMouse ( viewstr  ,
mode   
)

Set a 3d view mouse state.

Prototype: fun [V3Dview I] I

Parameters
V3Dview: the 3d view structure
I: 1 to enable the mouse, 0 to disable
Returns
0

◆ V3DsetCursor()

V3DsetCursor ( viewstr  ,
cursor   
)

Change a 3d view mouse cursor.

Prototype: fun [V3Dview ObjCursor] I

Parameters
V3Dview: the 3d view structure
ObjCursor: the cursor
Returns
0

◆ V3DdsView()

V3DdsView ( viewstr  )

Destroy a 3d view.

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
0

◆ V3DgetViewPosSize()

V3DgetViewPosSize ( viewstr  )

Get a 3d view position and size.

Prototype: fun [V3Dview] [I I I I]

Parameters
V3Dview: the 3d view structure
Returns
[I I I I] : the 3d view x, y, width and height

◆ V3DgetViewPos()

V3DgetViewPos ( viewstr  )

Get a 3d view position.

Prototype: fun [V3Dview] [I I]

Parameters
V3Dview: the 3d view structure
Returns
[I I] : the 3d view x, y

◆ V3DgetViewSize()

V3DgetViewSize ( viewstr  )

Get a 3d view size.

Prototype: fun [V3Dview] [I I]

Parameters
V3Dview: the 3d view structure
Returns
[I I] : the 3d view width and height

◆ V3DgetFullScreenState()

V3DgetFullScreenState ( viewstr  )

Get a 3d view fullscreen state.

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
I : 1 if fullscreen, 0 otherwise

◆ V3DcenterMouseCursor()

V3DcenterMouseCursor ( viewstr  )

Center the mouse cursor on a 3d view.

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
0

◆ V3DsetMousePosition()

V3DsetMousePosition ( viewstr  ,
,
 
)

Set the mouse cursor position on a 3d view.

Prototype: fun [V3Dview I I] I

Parameters
V3Dview: the 3d view structure
I: X position
I: Y position
Returns
0

◆ V3DgetVrPointerState()

V3DgetVrPointerState ( viewstr  )

Show or Hide the 3d view infos

Prototype: fun [V3Dview I] I

Parameters
V3Dview: the 3d view structure
I: 1 to show, 0 to hide
Returns
0

Set a 3D view to window mode

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
0

Set a 3D view to fullscreen

Prototype: fun [V3Dview I I] I

Parameters
V3Dview: the 3d view structure
I: width
I: height
Returns
0

Switch a 3D view fullscreen state

Prototype: fun [V3Dview I I] I

Parameters
V3Dview: the 3d view structure
I: width
I: height
Returns
0

Switch a 3D view VR mode state

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
the Vr mode state

Set a 3D view VR mode state

Prototype: fun [V3Dview I] I

Parameters
V3Dview: the 3d view structure
I: the new state
Returns
the Vr mode state

Get a 3D view VR mode state

Prototype: fun [V3Dview] I

Parameters
V3Dview: the 3d view structure
Returns
the Vr mode state

Send the callback on camera teleport

Prototype: fun [V3Dview SO3ObjectI] I

Parameters
V3Dview: the 3d view structure
SO3Object: the camera
Returns
0

Create a 3d view

Prototype: fun [Chn ObjWin I I I I fun [V3Dview] I fun [V3Dview] I I] V3Dview

Parameters
Chn: the scol channel
ObjWin: the parent scol window
I: X position
I: Y position
I: width
I: height
fun[V3Dview] I : init callback
fun[V3Dview] I : destroy callback
I: 1 to create a default scene, 0 otherwise
Returns
V3Dview : the new 3d view structure