wiki:geomob

Geometry object interface (geomob)

Geomob interface can be used to manipulate the geometry of models. Geomob interface defines the following methods:

type name parameters description
method get_rot returns object's orientation quaternion
method set_pos double3 pos - world position set object's world position in ECEF coordinates
method set_rot quat rot - quaternion orientation set object's orientation quaternion
method get_joint name get joint id by name
method get_mesh_id name get mesh id by name
method rotate_joint_orig joint - joint id
float angle - rotation angle in radians
float3 vec - rotation axis
rotate bone along the axis (from the default orientation)
method rotate_joint joint - joint id
float angle - rotation angle in radians
float3 vec - rotation axis
rotate bone along the axis (incremental)
method move_joint_orig joint - joint id
float3 vec - direction to move in
move the bone (from the default position)
method move_joint joint - joint id
float3 vec - direction to move in
move the bone (incremental)
method set_mesh_visible name - mesh name
bool show - show(true) or hide(false)
show or hide meshes by name
method set_mesh_visible_id id - mesh id
bool show - show(true) or hide(false)
show or hide meshes by id
method get_joint_local_pos joint - joint id returns the model-space position of given joint as float3
method get_pos_offset float3 offset - model space offset returns world-space offset of model-space offset
method get_scale returns model-space scale
method set_scale float3 scale - model space scaling coefficient sets model-space scale

Note that in order to be able to use the model joints these must be selected in the importer, optionally giving them another name to be used in scripting. Joints that aren't selected during import aren't accessible by the script.
Meshes are always imported and always addressed by their model names.

Used in aircraft, vehicle

Last modified 5 years ago Last modified on May 10, 2014, 9:37:41 AM