oimo_physics

Pub Version analysis License: BSD

A Flutter plugin designed for three_dart and three_dart_jsm to allow users to add a simple physics engine to their 3D project.

This is a dart conversion of oimo.js, originally created by Saharan @saharan.

Usage

This project is a basic physics engine for three_dart. This package includes RigidBodies, and Joints.

Getting started

To get started add oimo_physics, three_dart, and three_dart_jsm to your pubspec.yaml file.

The Oimo World is the main scene that has all of the objects that will be manipulated to the scene. To get started add the oimo world then all of the objects in it.

If there is no shapes or type in the ObjectConfigure class it will not work. If you need a RigidBody use shapes. If you need a Joint use type.

  world = OIMO.World(OIMO.WorldConfigure(isStat:true, scale:100.0));

  OIMO.ShapeConfig config = OIMO.ShapeConfig(
    friction: 0.4,
    belongsTo: 1,
  );

  world!.add(OIMO.ObjectConfigure(
    shapes: [OIMO.Shapes.box],
    size:[400, 40, 400], 
    position:[0,-20,0], 
    shapeConfig:config
  ));
  
  bodys.add(world!.add(OIMO.ObjectConfigure(
    shapes:[OIMO.Shapes.sphere], 
    size:[w*0.5,w*0.5,w*0.5], 
    position:[x,y,z], 
    move:true, 
    shapeConfig:config,
    name: 'sphere'
  )) as OIMO.RigidBody);

Example

Find the example app here.

Contributing

Contributions are welcome. In case of any problems look at existing issues, if you cannot find anything related to your problem then open an issue. Create an issue before opening a pull request for non trivial fixes. In case of trivial fixes open a pull request directly.

Additional Information

This plugin is only for performing basic physics. While this can be used as a standalone project it does not render scenes.

Libraries

collision/broadphase/basic_proxy
collision/broadphase/broad_phase
collision/broadphase/brute_force_broad_phase
collision/broadphase/dbvt/dbvt_broad_phase
collision/broadphase/dbvt/dbvt_main
collision/broadphase/dbvt/dbvt_node
collision/broadphase/dbvt/dbvt_proxy
collision/broadphase/pair_broad_phase
collision/broadphase/proxy_broad_phase
collision/broadphase/sap/sap_axis
collision/broadphase/sap/sap_broad_phase
collision/broadphase/sap/sap_element
collision/broadphase/sap/sap_proxy
collision/narrowphase/box_box_collision_detector
collision/narrowphase/box_cylinder_collision_detector
collision/narrowphase/box_plane_collision_detector
collision/narrowphase/collision_detector
collision/narrowphase/cylinder_cylinder_collision_detector
collision/narrowphase/ray_collision_detector
collision/narrowphase/sphere_box_collision_detector
collision/narrowphase/sphere_cylinder_collision_detector
collision/narrowphase/sphere_plane_collision_detector
collision/narrowphase/sphere_sphere_collision_detector
collision/narrowphase/tetra_tetra_collision_detector
constraint/constraint_main
constraint/contact/contact_constraint
constraint/contact/contact_main
constraint/contact/contact_manifold
constraint/contact/contact_point_data_buffer
constraint/contact/impulse_buffer
constraint/contact/manifold_point
constraint/joint/ball_and_socket_joint
constraint/joint/base/angular_constraint
constraint/joint/base/linear_constraint
constraint/joint/base/rotational3_constraint
constraint/joint/base/rotational_constraint
constraint/joint/base/translational3_constraint
constraint/joint/base/translational_constraint
constraint/joint/distance_joint
constraint/joint/hinge_joint
constraint/joint/joint_config
constraint/joint/joint_main
constraint/joint/limit_motor
constraint/joint/prismatic_joint
constraint/joint/slider_joint
constraint/joint/wheel_joint
core/core_main
core/rigid_body
core/utils_core
core/world_core
math/aabb
math/mat33
math/math
math/quat
math/vec3
oimo_physics
shape/box_shape
shape/cylinder_shape
shape/mass_info
shape/particle_shape
shape/plane_shape
shape/shape_config
shape/shape_main
shape/sphere_shape
shape/tetra_shape