![]() |
Jypeli 4
The simple game programming library
|
This is the Physical Body that collides in the engine. Lisää...
Julkiset jäsenfunktiot | |
| Body (PhysicsState state, IShape shape, Scalar mass, Coefficients coefficients, Lifespan lifetime) | |
| Creates a new Body Instance. | |
| Body (PhysicsState state, IShape shape, MassInfo massInfo, Coefficients coefficients, Lifespan lifetime) | |
| Creates a new Body Instance. | |
| void | ApplyProxy () |
| This applys the proxy. This will cause all other bodies in the proxy list to have their velocity set to this body’s. With the appropriate transformations applied. | |
| void | UpdatePosition (TimeStep step) |
| void | UpdatePosition (TimeStep step, ALVector2D extraVelocity) |
| void | UpdatePosition (TimeStep step, ref ALVector2D extraVelocity) |
| void | UpdateVelocity (TimeStep step) |
| void | ApplyPosition () |
| Updates all the values caluclated from the State.Position. Re-calculates the Matrices property the re-calculates the Rectangle property from that. | |
| void | ClearForces () |
| Sets Acceleration and ForceAccumulator to Zero. | |
| void | ApplyForce (Vector2D force) |
| Applys a Force. | |
| void | ApplyForce (ref Vector2D force) |
| Applys a Force. | |
| void | ApplyForce (Vector2D force, Vector2D position) |
| Applys a Force. | |
| void | ApplyForce (ref Vector2D force, ref Vector2D position) |
| Applys a Force. | |
| void | ApplyTorque (Scalar torque) |
| Applys Torque. | |
| void | ApplyImpulse (Vector2D impulse) |
| Applys Impulse. | |
| void | ApplyImpulse (ref Vector2D impulse) |
| Applys Impulse. | |
| void | ApplyImpulse (Vector2D impulse, Vector2D position) |
| Applys Impulse. | |
| void | ApplyImpulse (ref Vector2D impulse, ref Vector2D position) |
| Applys Impulse. | |
| Body | Duplicate () |
| object | Clone () |
Staattiset julkiset jäsenfunktiot | |
| static bool | CanCollide (Body body1, Body body2) |
Ominaisuudet | |
| Dictionary< string, object > | Tags [get] |
| bool | IsFrozen [get, set] |
| BoundingRectangle | Rectangle [get] |
| This is the Baunding rectangle It is calculated on the call to apply matrix. | |
| Matrices | Matrices [get] |
| The Matrices that are tranfroming this bodies Shape. | |
| Scalar | LinearDamping [get, set] |
| Gets and Sets The value represents how much Linear velocity is kept each time step. This Dampens the Body's Linear velocity a little per time step. Valid values are zero exclusive to one inclusive. | |
| Scalar | AngularDamping [get, set] |
| Gets and Sets The value represents how much Angular velocity is kept each time step. This Dampens the Body's Angular velocity a little per time step. Valid values are zero exclusive to one inclusive. | |
| IEnumerable< BodyProxy > | Proxies [get] |
| These are bodies that are mirrors of this body. It's useful for bodies that are being teleported. | |
| int | ProxiesCount [get] |
| The number of proxies that this body has. | |
| int | ID [get, set] |
| Unique ID of a PhysicsEntity in the PhysicsEngine Assigned on being Added. | |
| PhysicsEngine | Engine [get] |
| Gets The PhysicsEngine the object is currently in. Null if it is in none. | |
| PhysicsState | State [get] |
| Gets The current State of the object IE Velocity. | |
| IShape | Shape [get, set] |
| Gets and Sets the Shape of the Body. If setting the shape to a shape another body has it will duplicate the shape. | |
| MassInfo | Mass [get, set] |
| Gets The MassInfo of the body. | |
| Ignorer | CollisionIgnorer [get, set] |
| Gets and Sets the Ignore object that decides what collisons to ignore. | |
| Ignorer | EventIgnorer [get, set] |
| Gets and Sets the Ignore object that decides what collison events to ignore. | |
| Coefficients | Coefficients [get, set] |
| Gets and Sets the Coefficients for the class. | |
| Lifespan | Lifetime [get, set] |
| Gets and Sets the LifeTime of the object. The object will be removed from the engine when it is Expired. | |
| object | Tag [get, set] |
| Gets and Sets a User defined object. | |
| object | SolverTag [get, set] |
| Gets a Solver Defined object. | |
| object | DetectorTag [get, set] |
| Gets a Detector Defined object. | |
| ReadOnlyCollection< Joint > | Joints [get] |
| Gets the Joints attached to this body. | |
| bool | IgnoresGravity [get, set] |
| Gets and Sets if the Body will ignore Gravity. | |
| bool | IgnoresPhysicsLogics [get, set] |
| Gets and Sets if the Body will Ignore all Physics Logics. | |
| bool | IgnoresCollisionResponse [get, set] |
| Gets and Sets if the Object will ignore the collison Responce but still generate the Collision event. | |
| bool | IgnoreVertexes [get, set] |
| Gets and Sets if this body's shape's Vertexes will be used in collision detection. | |
| bool | IsPending [get] |
| Gets if it has been added the the Engine's PendingQueue, but not yet added to the engine. | |
| bool | IsAdded [get] |
| Gets if the object has been added to the engine. | |
| bool | IsCollidable [get, set] |
| gets and sets if the body will have any collision detection ran on it. | |
| bool | IsEventable [get, set] |
| Gets and Sets if other objects will have their collided event raised when colliding with this body. | |
| bool | IsBroadPhaseOnly [get, set] |
| Gets and Sets if the Body will trigger the Collided event at the broadphase level. | |
| Scalar | KineticEnergy [get] |
| Gets the Total Kinetic Energy of the Body. | |
| Matrix2x3 | Transformation [get, set] |
| Gets and Sets the Matrix2x3 that transforms the Shape belonging to the Body. | |
| bool | IsTransformed [get] |
Tapahtumat | |
| EventHandler | LifetimeChanged |
| Raised when the Lifetime property has been Changed. | |
| EventHandler | ShapeChanged |
| Raised when the Shape of the Body has been Changed. | |
| EventHandler | Pending |
| Raised when the object is Added to the engine but is not yet part of the update process. | |
| EventHandler | Added |
| Raised when the object is added to a Physics Engine. | |
| EventHandler< RemovedEventArgs > | Removed |
| Raised when the object is Removed from a Physics Engine. | |
| EventHandler | PositionChanged |
| Raised when the Position has been Changed. Raised by either the Solver or a call to ApplyMatrix. | |
| EventHandler< UpdatedEventArgs > | Updated |
| Raised when the Body has been updated to a change in time. | |
| EventHandler< CollisionEventArgs > | Collided |
| Raised when the Body collides with another. | |
| EventHandler< CollisionEventArgs > | Colliding |
| Raised constantly when the Body is colliding with another. | |
| EventHandler< BodyJointEventArgs > | JointAdded |
| Raised when a joint is added that affects this body. | |
| EventHandler< BodyJointEventArgs > | JointRemoved |
| Raised when a joint is removed that affects this body. | |
This is the Physical Body that collides in the engine.
| Body | ( | PhysicsState | state, |
| IShape | shape, | ||
| Scalar | mass, | ||
| Coefficients | coefficients, | ||
| Lifespan | lifetime | ||
| ) | [inline] |
| Body | ( | PhysicsState | state, |
| IShape | shape, | ||
| MassInfo | massInfo, | ||
| Coefficients | coefficients, | ||
| Lifespan | lifetime | ||
| ) | [inline] |
| void ApplyForce | ( | Vector2D | force | ) | [inline] |
Applys a Force.
| force | The direction and magnitude of the force |
| void ApplyForce | ( | ref Vector2D | force | ) | [inline] |
Applys a Force.
| force | The direction and magnitude of the force |
Applys a Force.
| force | The direction and magnitude of the force |
| position | The Location where the force will be applied (Offset: Body Rotation: World) |
Applys a Force.
| force | The direction and magnitude of the force |
| position | The Location where the force will be applied (Offset: Body Rotation: World) |
Applys Impulse.
| impulse | The direction and magnitude of the impulse. |
| position | The Location where the impulse will be applied (Offset: Body Rotation: World) |
Applys Impulse.
| impulse | The direction and magnitude of the impulse. |
| position | The Location where the impulse will be applied (Offset: Body Rotation: World) |
| void ApplyImpulse | ( | Vector2D | impulse | ) | [inline] |
Applys Impulse.
| impulse | The direction and magnitude of the impulse |
| void ApplyImpulse | ( | ref Vector2D | impulse | ) | [inline] |
Applys Impulse.
| impulse | The direction and magnitude of the impulse. |
| void ApplyPosition | ( | ) | [inline] |
Updates all the values caluclated from the State.Position. Re-calculates the Matrices property the re-calculates the Rectangle property from that.
| void ApplyProxy | ( | ) | [inline] |
This applys the proxy. This will cause all other bodies in the proxy list to have their velocity set to this body’s. With the appropriate transformations applied.
| void ApplyTorque | ( | Scalar | torque | ) | [inline] |
Applys Torque.
| torque | The direction and magnitude of the torque |
| void ClearForces | ( | ) | [inline] |
Sets Acceleration and ForceAccumulator to Zero.
Scalar AngularDamping [get, set] |
Gets and Sets The value represents how much Angular velocity is kept each time step. This Dampens the Body's Angular velocity a little per time step. Valid values are zero exclusive to one inclusive.
Coefficients Coefficients [get, set] |
Gets and Sets the Coefficients for the class.
Ignorer CollisionIgnorer [get, set] |
Gets and Sets the Ignore object that decides what collisons to ignore.
object DetectorTag [get, set] |
Gets a Detector Defined object.
PhysicsEngine Engine [get] |
Gets The PhysicsEngine the object is currently in. Null if it is in none.
Toteuttaa luokan IPhysicsEntity.
Ignorer EventIgnorer [get, set] |
Gets and Sets the Ignore object that decides what collison events to ignore.
int ID [get, set] |
Unique ID of a PhysicsEntity in the PhysicsEngine Assigned on being Added.
bool IgnoresCollisionResponse [get, set] |
Gets and Sets if the Object will ignore the collison Responce but still generate the Collision event.
bool IgnoresGravity [get, set] |
Gets and Sets if the Body will ignore Gravity.
bool IgnoresPhysicsLogics [get, set] |
Gets and Sets if the Body will Ignore all Physics Logics.
bool IgnoreVertexes [get, set] |
Gets and Sets if this body's shape's Vertexes will be used in collision detection.
bool IsAdded [get] |
Gets if the object has been added to the engine.
Toteuttaa luokan IPendable.
bool IsBroadPhaseOnly [get, set] |
Gets and Sets if the Body will trigger the Collided event at the broadphase level.
bool IsCollidable [get, set] |
gets and sets if the body will have any collision detection ran on it.
bool IsEventable [get, set] |
Gets and Sets if other objects will have their collided event raised when colliding with this body.
bool IsPending [get] |
Gets if it has been added the the Engine's PendingQueue, but not yet added to the engine.
Toteuttaa luokan IPendable.
Scalar KineticEnergy [get] |
Gets the Total Kinetic Energy of the Body.
Lifespan Lifetime [get, set] |
Gets and Sets the LifeTime of the object. The object will be removed from the engine when it is Expired.
Toteuttaa luokan IPendable.
Scalar LinearDamping [get, set] |
Gets and Sets The value represents how much Linear velocity is kept each time step. This Dampens the Body's Linear velocity a little per time step. Valid values are zero exclusive to one inclusive.
IEnumerable<BodyProxy> Proxies [get] |
These are bodies that are mirrors of this body. It's useful for bodies that are being teleported.
int ProxiesCount [get] |
The number of proxies that this body has.
BoundingRectangle Rectangle [get] |
This is the Baunding rectangle It is calculated on the call to apply matrix.
IShape Shape [get, set] |
Gets and Sets the Shape of the Body. If setting the shape to a shape another body has it will duplicate the shape.
object SolverTag [get, set] |
Gets a Solver Defined object.
PhysicsState State [get] |
Gets The current State of the object IE Velocity.
object Tag [get, set] |
Gets and Sets a User defined object.
Toteuttaa luokan IPendable.
Matrix2x3 Transformation [get, set] |
Gets and Sets the Matrix2x3 that transforms the Shape belonging to the Body.
| EventHandler Added |
Raised when the object is added to a Physics Engine.
Toteuttaa luokan IPendable.
| EventHandler<CollisionEventArgs> Collided |
Raised when the Body collides with another.
| EventHandler<CollisionEventArgs> Colliding |
Raised constantly when the Body is colliding with another.
| EventHandler<BodyJointEventArgs> JointAdded |
Raised when a joint is added that affects this body.
| EventHandler<BodyJointEventArgs> JointRemoved |
Raised when a joint is removed that affects this body.
| EventHandler LifetimeChanged |
Raised when the Lifetime property has been Changed.
Toteuttaa luokan IPendable.
| EventHandler Pending |
Raised when the object is Added to the engine but is not yet part of the update process.
Toteuttaa luokan IPendable.
| EventHandler PositionChanged |
Raised when the Position has been Changed. Raised by either the Solver or a call to ApplyMatrix.
| EventHandler<RemovedEventArgs> Removed |
Raised when the object is Removed from a Physics Engine.
Toteuttaa luokan IPendable.
| EventHandler ShapeChanged |
Raised when the Shape of the Body has been Changed.
| EventHandler<UpdatedEventArgs> Updated |
Raised when the Body has been updated to a change in time.
1.7.4