ObjectConfigure constructor

ObjectConfigure({
  1. JointType type = JointType.none,
  2. List<Shape> shapes = const [],
  3. bool move = false,
  4. bool kinematic = false,
  5. bool neverSleep = false,
  6. bool sleep = false,
  7. ShapeConfig? shapeConfig,
  8. String? name,
  9. bool massPos = false,
  10. bool massRot = false,
  11. bool allowCollision = false,
  12. double? max,
  13. double? min,
  14. RigidBody? body1,
  15. RigidBody? body2,
  16. Vec3? position,
  17. Vec3? position2,
  18. Vec3? positionShape,
  19. Quat? rotation,
  20. Quat? rotationShape,
  21. Vec3? axis1,
  22. Vec3? axis2,
  23. double? motorSpeed,
  24. double? motorForce,
  25. int? springFrequency,
  26. double? dampingRatio,
  27. double? lowerMotorLimit,
  28. double? upperMotorLimit,
})

Implementation

ObjectConfigure({
  this.type = JointType.none,
  this.shapes = const [],
  this.move = false,
  this.kinematic = false,
  this.neverSleep = false,
  this.sleep = false,
  ShapeConfig? shapeConfig,
  this.name,

  this.massPos = false,
  this.massRot = false,
  this.allowCollision = false,

  double? max,
  double? min,

  this.body1,
  this.body2,

  Vec3? position,
  Vec3? position2,
  Vec3? positionShape,
  Quat? rotation,
  Quat? rotationShape,
  //this.size = const [0,0,0],

  Vec3? axis1,
  Vec3? axis2,

  this.motorSpeed,
  this.motorForce,
  this.springFrequency,
  this.dampingRatio,
  this.lowerMotorLimit,
  this.upperMotorLimit
}){
  this.position = position?.clone() ?? Vec3();
  this.position2 = position2?.clone() ?? Vec3();
  this.positionShape = positionShape?.clone() ?? Vec3();
  this.rotation = rotation?.clone() ?? Quat();
  this.rotationShape = rotationShape?.clone() ?? Quat();

  this.axis1 = axis1?.clone() ?? Vec3();
  this.axis2 = axis2?.clone() ?? Vec3();

  this.shapeConfig = shapeConfig ?? ShapeConfig();

  this.max = max ?? (JointType.distance == type?0:10);
  this.min = min ?? (JointType.distance == type?0:57.29578);
}