Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
Loading...
Searching...
No Matches
SCameraExternal Class Reference

Allow edition of the external camera parameters of a SImage. More...

Public Member Functions

Object GetDirection ()
 Get the camera direction. More...
 
Object GetOrientation ()
 Get the camera orientation. More...
 
Object GetOrientationQuaternion ()
 Get the quaternion w + xi + yj + zk representing the camera orientation . More...
 
Object GetPosition ()
 Get the camera position. More...
 
 SCameraExternal ()
 Default constructor. More...
 
 SCameraExternal (SCameraExternal other)
 Construct a SCameraExternal by copying the SCameraExternal other. More...
 
 SetOrientation (number angX, number angY, number angZ)
 Set the camera orientation from rotation angles. More...
 
 SetOrientationQuaternion (number w, number x, number y, number z)
 Set the camera orientation from the quaternion w + xi + yj + zk. More...
 
 SetPosition (SPoint position)
 Set the camera position. More...
 
string toString ()
 Get the type of the variable. More...
 

Static Public Member Functions

static Object FromFile (string fileName)
 Import a .excam file and create a new SCameraExternal from file. More...
 
static SCameraExternal New ()
 Default constructor. More...
 
static SCameraExternal New (SCameraExternal other)
 Construct a SCameraExternal by copying the SCameraExternal other. More...
 
static string toString ()
 Get the type of the class. More...
 

Detailed Description

Allow edition of the external camera parameters of a SImage.

See also
SImage, SCameraInternal

Constructor & Destructor Documentation

◆ SCameraExternal() [1/2]

SCameraExternal::SCameraExternal ( )

Default constructor.

◆ SCameraExternal() [2/2]

SCameraExternal::SCameraExternal ( SCameraExternal  other)

Construct a SCameraExternal by copying the SCameraExternal other.

Parameters
other(SCameraExternal) The other SCameraExternal to copy

Member Function Documentation

◆ FromFile()

static Object SCameraExternal::FromFile ( string  fileName)
static

Import a .excam file and create a new SCameraExternal from file.

Warning
When you write a '\' in string you need to double it '\\' or use '/' instead. Pay especially attention to this when writing file paths in your scripts.
var path = 'C:/Point.asc'; // valid syntax
var path = 'C:\\Point.asc'; // valid syntax
var path = 'C:\Point.asc'; // invalid syntax
Parameters
fileName(string) The path and name of the .excam file to import
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred
ret.CameraExternal(SCameraExternal) The camera external parameters.

◆ GetDirection()

Object SCameraExternal::GetDirection ( )

Get the camera direction.

Return values
ret.Vector(SVector) The camera direction SVector.

◆ GetOrientation()

Object SCameraExternal::GetOrientation ( )

Get the camera orientation.

Return values
ret.RotX(number) The rotation angle around the X axis in the Euler convention in degree
ret.RotY(number) The rotation angle around the Y axis in the Euler convention in degree
ret.RotZ(number) The rotation angle around the Z axis in the Euler convention in degree

◆ GetOrientationQuaternion()

Object SCameraExternal::GetOrientationQuaternion ( )

Get the quaternion w + xi + yj + zk representing the camera orientation .

Return values
ret.QuatW(number) The coefficient w of the quaternion w + xi + yj + zk.
ret.QuatX(number) The coefficient x of the quaternion w + xi + yj + zk.
ret.QuatY(number) The coefficient y of the quaternion w + xi + yj + zk.
ret.QuatZ(number) The coefficient z of the quaternion w + xi + yj + zk.

◆ GetPosition()

Object SCameraExternal::GetPosition ( )

Get the camera position.

Return values
ret.Point(SPoint) The camera position

◆ New() [1/2]

static SCameraExternal SCameraExternal::New ( )
static

Default constructor.

Returns
(SCameraExternal) The new SCameraExternal.

◆ New() [2/2]

static SCameraExternal SCameraExternal::New ( SCameraExternal  other)
static

Construct a SCameraExternal by copying the SCameraExternal other.

Parameters
other(SCameraExternal) The other SCameraExternal to copy
Returns
(SCameraExternal) The new SCameraExternal.

◆ SetOrientation()

SCameraExternal::SetOrientation ( number  angX,
number  angY,
number  angZ 
)

Set the camera orientation from rotation angles.

Parameters
angX(number) The rotation angle around the X axis in the Euler convention in degree
angY(number) The rotation angle around the Y axis in the Euler convention in degree
angZ(number) The rotation angle around the Z axis in the Euler convention in degree

◆ SetOrientationQuaternion()

SCameraExternal::SetOrientationQuaternion ( number  w,
number  x,
number  y,
number  z 
)

Set the camera orientation from the quaternion w + xi + yj + zk.

Note
The function normalizes the quaternion before setting the orientation.
Parameters
w(number) The coefficient w of the quaternion w + xi + yj + zk.
x(number) The coefficient x of the quaternion w + xi + yj + zk.
y(number) The coefficient y of the quaternion w + xi + yj + zk.
z(number) The coefficient z of the quaternion w + xi + yj + zk.

◆ SetPosition()

SCameraExternal::SetPosition ( SPoint  position)

Set the camera position.

Parameters
position(SPoint) The new camera position to set.

◆ toString() [1/2]

string SCameraExternal::toString ( )

Get the type of the variable.

Returns
(string) The type name

◆ toString() [2/2]

static string SCameraExternal::toString ( )
static

Get the type of the class.

Returns
(string) The type name