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. Vector3? position,
  17. Vector3? position2,
  18. Vector3? positionShape,
  19. Quaternion? rotation,
  20. Quaternion? rotationShape,
  21. Vector3? axis1,
  22. Vector3? 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,

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

  Vector3? axis1,
  Vector3? axis2,

  this.motorSpeed,
  this.motorForce,
  this.springFrequency,
  this.dampingRatio,
  this.lowerMotorLimit,
  this.upperMotorLimit
}){
  this.position = position?.clone() ?? Vector3.zero();
  this.position2 = position2?.clone() ?? Vector3.zero();
  this.positionShape = positionShape?.clone() ?? Vector3.zero();
  this.rotation = rotation?.clone() ?? Quaternion(0,0,0,1);
  this.rotationShape = rotationShape?.clone() ?? Quaternion(0,0,0,1);

  this.axis1 = axis1?.clone() ?? Vector3.zero();
  this.axis2 = axis2?.clone() ?? Vector3.zero();

  this.shapeConfig = shapeConfig ?? ShapeConfig();

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