TrueSync
IBody2D.cs
1 namespace TrueSync {
2 
6  public interface IBody2D : IBody {
7 
11  TSVector2 TSPosition {
12  get; set;
13  }
14 
19  get; set;
20  }
21 
26  get; set;
27  }
28 
33  get; set;
34  }
35 
39  TSVector2 TSLinearVelocity {
40  get; set;
41  }
42 
47  get; set;
48  }
49 
54  get; set;
55  }
56 
61  get; set;
62  }
63 
67  void TSApplyForce(TSVector2 force);
68 
72  void TSApplyForce(TSVector2 force, TSVector2 position);
73 
77  void TSApplyImpulse(TSVector2 force);
78 
82  void TSApplyImpulse(TSVector2 force, TSVector2 position);
83 
87  void TSApplyTorque(TSVector2 force);
88 
89  }
90 
91 }
FP TSAngularVelocity
Set/get body's angular velocity. (radians/s).
Definition: IBody2D.cs:46
FP TSAngularDamping
Set/get body's angular damping (0 to 1).
Definition: IBody2D.cs:60
void TSApplyTorque(TSVector2 force)
Applies a torque force to the body.
FP TSLinearDamping
Set/get body's linear damping (0 to 1).
Definition: IBody2D.cs:53
bool TSAffectedByGravity
If true the body is affected by gravity.
Definition: IBody2D.cs:25
Represents an interface to 2D bodies.
Definition: IBody2D.cs:6
TSVector2 TSPosition
Set/get body's position.
Definition: IBody2D.cs:11
bool TSIsKinematic
If true the body is managed as kinematic.
Definition: IBody2D.cs:32
TSVector2 TSLinearVelocity
Set/get body's linear velocity.
Definition: IBody2D.cs:39
void TSApplyForce(TSVector2 force)
Applies a force to the body's center.
Represents a common interface to 2D and 3D bodies.
Definition: IBody.cs:6
FP TSOrientation
Set/get body's orientation.
Definition: IBody2D.cs:18
void TSApplyImpulse(TSVector2 force)
Applies a impulse to the body's center.