Jypeli 10
The simple game programming library
IPhysicsBody.cs
Siirry tämän tiedoston dokumentaatioon.
1using System.Collections.Generic;
2using System.Numerics;
3
4namespace Jypeli.Physics
5{
9 public interface IPhysicsBody
10 {
11#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
13
14 Vector Size { get; set; }
15 Shape Shape { get; set; }
16 List<List<Vector2>> Vertices { get; }
17
18 double Mass { get; set; }
19 double MassInv { get; set; }
20 double MomentOfInertia { get; set; }
21
22 double Restitution { get; set; }
23 double StaticFriction { get; set; }
24 double KineticFriction { get; set; }
25
26 Vector Position { get; set; }
27 Vector Velocity { get; set; }
28 Vector Acceleration { get; set; }
29
30 double Angle { get; set; }
31 double AngularVelocity { get; set; }
32 double AngularAcceleration { get; set; }
33
34 double LinearDamping { get; set; }
35 double AngularDamping { get; set; }
36
37 bool IgnoresCollisionResponse { get; set; }
38 bool IgnoresGravity { get; set; }
39 bool IgnoresPhysicsLogics { get; set; }
40 bool CanRotate { get; set; }
41
42 void MakeStatic();
43 void MakeOneWay();
44 void MakeOneWay(Vector direction);
45
46 void ApplyForce( Vector force );
47 void ApplyImpulse( Vector impulse );
48 void ApplyTorque( double torque );
49
50 void Stop();
51 void StopAxial( Vector axis );
53
55
56 event CollisionHandler<IPhysicsBody, IPhysicsBody> Collided;
57 event AdvancedCollisionHandler<IPhysicsBody, IPhysicsBody> Colliding;
59 void Update(Time time);
60#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
61 }
62}
Base class for Collision Ignorers to impliment.
Definition: Ignorer.cs:40
Kuvio.
Definition: Shapes.cs:47
Yhteinen rajapinta kaikille fysiikkaolioille.
Rajapinta fysiikkamoottorin tietämää fysiikkakappaletta varten.
Definition: IPhysicsBody.cs:10
void ApplyTorque(double torque)
AdvancedCollisionHandler< IPhysicsBody, IPhysicsBody > Colliding
Definition: IPhysicsBody.cs:57
void ApplyForce(Vector force)
List< List< Vector2 > > Vertices
Definition: IPhysicsBody.cs:16
void ApplyImpulse(Vector impulse)
void StopAxial(Vector axis)
void SetCollisionIgnorer(Ignorer ignorer)
CollisionHandler< IPhysicsBody, IPhysicsBody > Collided
Definition: IPhysicsBody.cs:56
void MakeOneWay(Vector direction)
Suuntakulma (rajoitettu -180 ja 180 asteen välille) asteina ja radiaaneina. Tietoja kulmasta: http://...
Definition: Angle.cs:40
Sisältää tiedon ajasta, joka on kulunut pelin alusta ja viime päivityksestä.
Definition: Time.cs:14
2D-vektori.
Definition: Vector.cs:67