Module: MSPhysics::Settings

Defined in:
RubyExtension/MSPhysics/settings.rb

Overview

Since:

  • 1.0.0

Class Method Summary collapse

Class Method Details

.aabb_visible=(state) ⇒ Object

Show/hide bodies' axes aligned bounding box (AABB).

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.aabb_visible?Boolean

Determine whether bodies' axes aligned bonding box (AABB) is visible.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.animate_scenes_delayNumeric

Get the time to wait before starting to animate scenes.

Returns:

  • (Numeric)

    Time in seconds.

Since:

  • 1.0.0

.animate_scenes_delay=(value) ⇒ Object

Set the time to wait before starting to animate scenes.

Parameters:

  • value (Numeric)

    Time in seconds.

Since:

  • 1.0.0

.animate_scenes_reversed=(state) ⇒ Object

Reverse/normalize the animation of scenes.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.animate_scenes_reversed?Boolean

Determine whether the animation of scenes is reversed.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.animate_scenes_stateFixnum

Get the state of scenes animation.

Returns:

  • (Fixnum)

    State:

    • 0 - off/stop

    • 1 - one way

    • 2 - repeat forth and back

    • 3 - loop around

Since:

  • 1.0.0

.animate_scenes_state=(state) ⇒ Object

Set the state of scenes animation.

Parameters:

  • state (Fixnum)

    State:

    • 0 - off/stop

    • 1 - one way

    • 2 - repeat forth and back

    • 3 - loop around

Since:

  • 1.0.0

.axes_visible=(state) ⇒ Object

Show/hide bodies' centre of mass axes.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.axes_visible?Boolean

Determine whether bodies' centre of mass axes are visible.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.bodies_visible=(state) ⇒ Object

Show/hide all bodies.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.bodies_visible?Boolean

Determine whether bodies are visible.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.collision_wireframe_visible=(state) ⇒ Object

Show/hide bodies' collision wireframe.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.collision_wireframe_visible?Boolean

Determine whether bodies' collision wireframe is visible.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.contact_forces_visible=(state) ⇒ Object

Show/hide bodies' contact forces.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.contact_forces_visible?Boolean

Determine whether bodies contact forces are visible.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.contact_points_visible=(state) ⇒ Object

Show/hide bodies' contact points.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.contact_points_visible?Boolean

Determine whether bodies' contact points are visible.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.continuous_collision_check_enabled=(state) ⇒ Object

Enable/disable continuous collision check.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.continuous_collision_check_enabled?Boolean

Determine whether continuous collision check is enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.full_screen_mode_enabled=(state) ⇒ Object

Enable/disable fullscreen mode.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.full_screen_mode_enabled?Boolean

Determine whether fullscreen mode is enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.game_mode_enabled=(state) ⇒ Object

Enable/disable game mode.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.game_mode_enabled?Boolean

Determine whether game mode is enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.gravityNumeric

Get simulation gravitational acceleration along Z-axis, in meters per second per second (m/s/s).

Returns:

  • (Numeric)

Since:

  • 1.0.0

.gravity=(acceleration) ⇒ Object

Set simulation gravitational acceleration along Z-axis, in meters per second per second (m/s/s).

Parameters:

  • acceleration (Numeric)

Since:

  • 1.0.0

.hide_joint_layer_enabled=(state) ⇒ Object

Enable/disable the hide-joint-layer option.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.hide_joint_layer_enabled?Boolean

Determine whether the hide-joint-layer option is enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.ignore_hidden_instances=(state) ⇒ Object

Enable/disable fancy operation.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.ignore_hidden_instances?Boolean

Determine whether hidden instances are ignored.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.joint_algorithmFixnum

Get joint solver model.

Returns:

  • (Fixnum)

    0 - Accurate; 1 - Don't Use; 2 - Fast.

Since:

  • 1.0.0

.joint_algorithm=(model) ⇒ Object

Note:

Changing this property won't have an effect until simulation is restarted.

Set joint solver model.

Parameters:

  • model (Fixnum)

    Joint solver model:

    • 0 - Accurate: Slow but robust

    • 1 - Don't Use

    • 2 - Fast: Fast but flexible

Since:

  • 1.0.0

.key_nav_atimeNumeric

Get the time to accelerate, in seconds, from zero to the desired velocity or omega.

Returns:

  • (Numeric)

Since:

  • 1.0.0

.key_nav_atime=(value) ⇒ Object

Set the time to accelerate, in seconds, from zero to the desired velocity or omega.

Parameters:

  • value (Numeric)

Since:

  • 1.0.0

.key_nav_omegaNumeric

Get the maximum omega of keyboard camera navigation in rad/s.

Returns:

  • (Numeric)

Since:

  • 1.0.0

.key_nav_omega=(value) ⇒ Object

Set the maximum omega of keyboard camera navigation in rad/s.

Parameters:

  • value (Numeric)

Since:

  • 1.0.0

.key_nav_stateFixnum

Get the state of keyboard navigation.

Returns:

  • (Fixnum)

    State:

    • 0 - off/stop

    • 1 - normal

    • 2 - upright

Since:

  • 1.0.0

.key_nav_state=(state) ⇒ Object

Set the state of keyboard navigation.

Parameters:

  • state (Fixnum)

    State:

    • 0 - off/stop

    • 1 - normal

    • 2 - upright

Since:

  • 1.0.0

.key_nav_velocityNumeric

Get the maximum velocity of keyboard camera navigation in m/s.

Returns:

  • (Numeric)

Since:

  • 1.0.0

.key_nav_velocity=(value) ⇒ Object

Set the maximum velocity of keyboard camera navigation in m/s.

Parameters:

  • value (Numeric)

Since:

  • 1.0.0

.keyboard_navigation_enabled=(state) ⇒ Object

Enable/disable the navigation of camera with keyboard.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.keyboard_navigation_enabled?Boolean

Determine whether the navigation of camera with keyboard is enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.load_optionsObject

Load settings from registry

Since:

  • 1.0.0

.material_thicknessNumeric

Get simulation material thickness in meters.

Returns:

  • (Numeric)

    A value between 0 and 1/32.

Since:

  • 1.0.0

.material_thickness=(thickness) ⇒ Object

Set simulation material thickness in meters.

Parameters:

  • thickness (Numeric)

    A value between 0 and 1/32.

Since:

  • 1.0.0

.save_optionsObject

Save settings to registry

Since:

  • 1.0.0

.solver_modelFixnum

Get simulation solver model.

Returns:

  • (Fixnum)

    Number of passes, a value between 1 and 256.

Since:

  • 1.0.0

.solver_model=(model) ⇒ Object

Set simulation solver model.

Parameters:

  • model (Fixnum)

    Number of passes, a value between 1 and 256.

Since:

  • 1.0.0

.undo_on_end_enabled=(state) ⇒ Object

Enable/disable the undo-on-end option.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

.undo_on_end_enabled?Boolean

Determine whether the undo-on-end option is enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

.update_rateFixnum

Get simulation update rate, the number of times to update newton world per frame.

Returns:

  • (Fixnum)

    A value between 1 and 100.

Since:

  • 1.0.0

.update_rate=(rate) ⇒ Object

Set simulation update rate, the number of times to update newton world per frame.

Parameters:

  • rate (Fixnum)

    A value between 1 and 100.

Since:

  • 1.0.0

.update_timestepNumeric

Get simulation update timestep in seconds.

Returns:

  • (Numeric)

    A value between 1/1200 and 1/30.

Since:

  • 1.0.0

.update_timestep=(timestep) ⇒ Object

Set simulation update timestep in seconds.

Parameters:

  • timestep (Numeric)

    A value between 1/1200 and 1/30.

Since:

  • 1.0.0

.world_scaleNumeric

Get world scale.

Returns:

  • (Numeric)

    A value between 0.1 and 100.

Since:

  • 1.0.0

.world_scale=(scale) ⇒ Object

Note:

Changing this property won't have an effect until simulation is restarted.

Set world scale.

Parameters:

  • scale (Numeric)

    A value between 0.1 and 100.

Since:

  • 1.0.0