FormIt Plugin API  v23.0.0 (2023.0.0)
FormIt.Cameras API

Description

Functions

json FormIt.Cameras.GetCameraData ()
 
json FormIt.Cameras.GetCameraWorldForward ()
 Get the vector of GetCameraWorldForward. More...
 
json FormIt.Cameras.GetCameraWorldPosition ()
 Get the position of the camera. More...
 
json FormIt.Cameras.GetCameraWorldUp ()
 Get the vector of GetCameraWorldUp. More...
 
json FormIt.Cameras.SetCameraData (cameraData)
 Set the parameters that define the current camera. More...
 
json FormIt.Cameras.AlignWithFace (facePath, withTransition)
 Set the camera to look straight at the given face and zoom to fit it. More...
 
json FormIt.Cameras.GetViewportSize ()
 Get the camera width and height Parameters: Out: width and height of the current viewport. More...
 
json FormIt.Cameras.SetViewportSize (x, y)
 Set the parameters that define the current camera. More...
 
json FormIt.Cameras.SetProjectionType (projectionType)
 Set the camera to perspective. More...
 
json FormIt.Cameras.GetProjectionType ()
 Get the camera to perspective. More...
 
json FormIt.Cameras.SetPositionAndOrientation (aEye, aLook, aUp)
 Set the camera position and orientation. More...
 
json FormIt.Cameras.SetWorldForward (forward)
 Set the camera direction. More...
 
json FormIt.Cameras.SetFieldOfView (fieldOfView)
 Set the camera field of view (for perspective). More...
 

Function Documentation

json FormIt.Cameras.AlignWithFace ( facePath  ,
withTransition   
)

Set the camera to look straight at the given face and zoom to fit it.

Parameters
[in]facePathface to align camera with
[in]withTransitionif true, camera trasition is animated
Returns
sucess
json FormIt.Cameras.GetCameraData ( )
json FormIt.Cameras.GetCameraWorldForward ( )

Get the vector of GetCameraWorldForward.

Returns
WSM.Vector3d
json FormIt.Cameras.GetCameraWorldPosition ( )

Get the position of the camera.

Returns
WSM.Point3d
json FormIt.Cameras.GetCameraWorldUp ( )

Get the vector of GetCameraWorldUp.

Returns
WSM.Vector3d
json FormIt.Cameras.GetProjectionType ( )

Get the camera to perspective.

Parameters: In: Out: projectionType

Returns
{...}
json FormIt.Cameras.GetViewportSize ( )

Get the camera width and height Parameters: Out: width and height of the current viewport.

Returns
{ { "width" , to_json(width) }, { "height" , to_json(height) } };
json FormIt.Cameras.SetCameraData ( cameraData  )

Set the parameters that define the current camera.

See GetCameraData for getting FormIt.CameraData.

Parameters
[in]cameraDataFormIt.CameraData
Returns
sucess
json FormIt.Cameras.SetFieldOfView ( fieldOfView  )

Set the camera field of view (for perspective).

Parameters: In: double fieldOfView Out:

Parameters
[in]fieldOfViewdouble
Returns
JSON_UNDEFINED, i.e. {}
json FormIt.Cameras.SetPositionAndOrientation ( aEye  ,
aLook  ,
aUp   
)

Set the camera position and orientation.

Position is aEye. The view direction is defined by the vector from aEye to aLook. aUp is the up vector and should not contain any "roll", unless the camera points along the z direction (top or bottom view). It is actually ok to pass in (0,0,1) as the up vector for all cases, except when the view direction is pointing in the z direction. Parameters: In: WSM.Point3d aEye In: WSM.Point3d aLook In: WSM.Point3d aUp Out: bool true/false for success

Parameters
[in]aEyeWSM.Point3d
[in]aLookWSM.Point3d
[in]aUpWSM.Vector3d
Returns
{...}
json FormIt.Cameras.SetProjectionType ( projectionType  )

Set the camera to perspective.

Parameters: In: projectionType Out:

Parameters
[in]projectionTypeFormIt.CameraProjectionType
Returns
JSON_UNDEFINED, i.e. {}
json FormIt.Cameras.SetViewportSize ( ,
 
)

Set the parameters that define the current camera.

Parameters: In: x, y Out: bSuccess

Parameters
[in]xint
[in]yint
Returns
JSON_UNDEFINED, i.e. {}
json FormIt.Cameras.SetWorldForward ( forward  )

Set the camera direction.

Parameters: In: WSM.Vector3d forward Out:

Parameters
[in]forwardWSM.Vector3d
Returns
JSON_UNDEFINED, i.e. {}