Namespace: position

syngen.position

Maintains the coordinates, orientation, and velocities of the observer. The observer is a physical object that has volume and can be applied lateral and angular forces. Its position affects the relative positioning of props and can be used to influence other systems.

Source:

Methods

(static) export() → {Object}

Returns the inner state. The inverse of import().

Source:
Listens to Events:
Returns:
Type
Object

(static) getAngularVelocity() → {syngen.utility.quaternion}

Returns the angular velocity.

Source:
Returns:
Type
syngen.utility.quaternion

(static) getAngularVelocityEuler() → {syngen.utility.euler}

Returns the angular velocity. Beware that this is less performant than using quaternions and can result in gimbal lock.

Source:
Returns:
Type
syngen.utility.euler

(static) getEuler() → {syngen.utility.euler}

Returns the orientation. Beware that this is less performant than using quaternions and can result in gimbal lock.

Source:
Returns:
Type
syngen.utility.euler

(static) getQuaternion() → {syngen.utility.quaternion}

Returns the oriantation.

Source:
Returns:
Type
syngen.utility.quaternion

(static) getVector() → {syngen.utility.vector3d}

Returns the coordinates.

Source:
Returns:
Type
syngen.utility.vector3d

(static) getVelocity() → {syngen.utility.vector3d}

Returns the velocity.

Source:
Returns:
Type
syngen.utility.vector3d

(static) import(optionsopt)

Sets the inner state. The inverse of export().

Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
quaternion syngen.utility.quaternion <optional>
x Number <optional>
0
y Number <optional>
0
z Number <optional>
0
Source:
Listens to Events:

(static) rect() → {Object}

Returns the rectangular prism surrounding the observer.

Source:
Returns:
Type
Object

(static) reset()

Resets all attributes to zero.

Source:
Listens to Events:

(static) setAngularVelocity(optionsopt)

Sets the angular velocity.

Parameters:
Name Type Attributes Description
options syngen.utility.quaternion <optional>
Source:

(static) setAngularVelocityEuler()

Sets the angular velocity. Beware that this is less performant than using quaternions and can result in gimbal lock.

Parameters:
Type Description
syngen.utility.euler
Source:

(static) setEuler(optionsopt)

Sets the orientation. Beware that this is less performant than using quaternions and can result in gimbal lock.

Parameters:
Name Type Attributes Description
options syngen.utility.euler <optional>
Source:

(static) setQuaternion(optionsopt)

Sets the orientation

Parameters:
Name Type Attributes Description
options syngen.utility.quaternion <optional>
Source:

(static) setVector(optionsopt)

Sets the coordinates.

Parameters:
Name Type Attributes Description
options syngen.utility.vector3d <optional>
Source:

(static) setVelocity(optionsopt)

Sets the velocity.

Parameters:
Name Type Attributes Description
options syngen.utility.vector3d <optional>
Source:

(static) update()

Applies physics to the inner state.

Source:
Listens to Events: