C# Class FootballSimulation.PointMass

A 2-dimensional point mass approximation.
Inheritance: IPointMass
Afficher le fichier Open project: PurdueSIGAI/Soccer Class Usage Examples

Méthodes publiques

Méthode Description
PointMass ( float mass, float radius, float maxForce, float maxSpeed, Vector2 position, Vector2 velocity ) : System

Initializes a new instance of the PointMass class with the specified initial values for the position and velocity.

ToString ( ) : string

Returns a string representation of the point mass.

Private Methods

Méthode Description
GetFriction ( float frictionCoefficient ) : Vector2
Reset ( Vector2 position ) : void
ResolveCollision ( Vector2 normal ) : void
Simulate ( float time ) : void

Method Details

PointMass() public méthode

Initializes a new instance of the PointMass class with the specified initial values for the position and velocity.
public PointMass ( float mass, float radius, float maxForce, float maxSpeed, Vector2 position, Vector2 velocity ) : System
mass float The mass.
radius float The radius used for collision checking.
maxForce float The maximum force.
maxSpeed float The maximum speed.
position Vector2 The position.
velocity Vector2 The velocity.
Résultat System

ToString() public méthode

Returns a string representation of the point mass.
public ToString ( ) : string
Résultat string