Coords

getSceneCoordSystem() → {string}

Get the coordinate system of the current scene.
Returns:
Scene's coordinate system.
Type
string

transformCoordsSpace(coords, spaceFrom, spaceTo, noSignChangeopt) → {v3d.Vector3|v3d.Euler}

Transform the given coordinates from one space to another. Can be used with both v3d.Vector3 or v3d.Euler.
Parameters:
Name Type Attributes Default Description
coords v3d.Vector3 | v3d.Euler Coordinates to transform.
spaceFrom string Space to transform from.
spaceTo string Space to transform into.
noSignChange boolean <optional>
false Don't change a component's sign in case of the Z->(-Y), Y->(-Z) transformations. "true" is relevant for vectors containing values that shouldn't change the sign (e.g. scale, dimension, etc...).
Returns:
Transformed coordinates.
Type
v3d.Vector3 | v3d.Euler

transformCoordsV3dToBlender(coords, noSignChangeopt) → {v3d.Vector3|v3d.Euler}

Transform the given coordinates from Verge3D's to Blender/Max's coordinate system. Can be used with both v3d.Vector3 or v3d.Euler.
Parameters:
Name Type Attributes Default Description
coords v3d.Vector3 | v3d.Euler Coordinates to transform.
noSignChange boolean <optional>
false Don't change a component's sign in case of the Y->(-Z) transformation. "true" is relevant for vectors containing values that shouldn't change the sign (e.g. scale, dimension, etc...).
Returns:
Transformed coordinates.
Type
v3d.Vector3 | v3d.Euler

transformEulerV3dToBlenderShortest(euler, dest) → {v3d.Euler}

Transform the given euler rotation from Verge3D's to Blender/Max's coordinate system while also choosing the shortest rotation to resemble Blender's behavior: 1) Convert from intrinsic rotation (v3d) to extrinsic XYZ (Blender/Maxdefault order) via reversion: XYZ -> ZYX. 2) Swizzle ZYX->YZX. 3) Choose the shortest rotation.
Parameters:
Name Type Description
euler v3d.Euler Euler rotation in Verge3D's coordinate system.
dest v3d.Euler Destination euler vector.
Returns:
Destination vector filled with the transformed coordinates.
Type
v3d.Euler