C# Class Nez.Verlet.Particle

Exibir arquivo Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
collidesWithColliders bool
lastPosition Microsoft.Xna.Framework.Vector2
mass float
position Microsoft.Xna.Framework.Vector2
radius float

Public Methods

Method Description
Particle ( Vector2 position ) : Microsoft.Xna.Framework
Particle ( float x, float y ) : Microsoft.Xna.Framework
applyForce ( Vector2 force ) : void

applies a force taking mass into account to the Particle

pin ( ) : Particle

pins the Particle to its current position

pinTo ( Vector2 position ) : Particle

pins the particle to the specified position

unpin ( ) : Particle

unpins the particle setting it free like the wind

Method Details

Particle() public method

public Particle ( Vector2 position ) : Microsoft.Xna.Framework
position Microsoft.Xna.Framework.Vector2
return Microsoft.Xna.Framework

Particle() public method

public Particle ( float x, float y ) : Microsoft.Xna.Framework
x float
y float
return Microsoft.Xna.Framework

applyForce() public method

applies a force taking mass into account to the Particle
public applyForce ( Vector2 force ) : void
force Microsoft.Xna.Framework.Vector2 Force.
return void

pin() public method

pins the Particle to its current position
public pin ( ) : Particle
return Particle

pinTo() public method

pins the particle to the specified position
public pinTo ( Vector2 position ) : Particle
position Microsoft.Xna.Framework.Vector2 Position.
return Particle

unpin() public method

unpins the particle setting it free like the wind
public unpin ( ) : Particle
return Particle

Property Details

collidesWithColliders public_oe property

if true, the Particle will collide with standard Nez Colliders
public bool collidesWithColliders
return bool

lastPosition public_oe property

the position of the Particle prior to its latest move
public Vector2,Microsoft.Xna.Framework lastPosition
return Microsoft.Xna.Framework.Vector2

mass public_oe property

the mass of the Particle. Taken into account for all forces and constraints
public float mass
return float

position public_oe property

the current position of the Particle
public Vector2,Microsoft.Xna.Framework position
return Microsoft.Xna.Framework.Vector2

radius public_oe property

the radius of the Particle
public float radius
return float