Allow edition of the external camera parameters of a SImage.
More...
Allow edition of the external camera parameters of a SImage.
- See also
- SImage, SCameraInternal
◆ SCameraExternal() [1/2]
SCameraExternal::SCameraExternal |
( |
| ) |
|
◆ SCameraExternal() [2/2]
◆ 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
-
◆ 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]
◆ New() [2/2]
◆ 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