C# Class FarseerPhysics.Controllers.BuoyancyController

Inheritance: Controller
Mostra file Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
AngularDragCoefficient float
Density float
LinearDragCoefficient float
Velocity Microsoft.Xna.Framework.Vector2

Public Methods

Method Description
BuoyancyController ( AABB container, float density, float linearDragCoefficient, float rotationalDragCoefficient, Vector2 gravity ) : System.Collections.Generic

Initializes a new instance of the BuoyancyController class.

Update ( float dt ) : void

Method Details

BuoyancyController() public method

Initializes a new instance of the BuoyancyController class.
public BuoyancyController ( AABB container, float density, float linearDragCoefficient, float rotationalDragCoefficient, Vector2 gravity ) : System.Collections.Generic
container FarseerPhysics.Collision.AABB Only bodies inside this AABB will be influenced by the controller
density float Density of the fluid
linearDragCoefficient float Linear drag coefficient of the fluid
rotationalDragCoefficient float Rotational drag coefficient of the fluid
gravity Microsoft.Xna.Framework.Vector2 The direction gravity acts. Buoyancy force will act in opposite direction of gravity.
return System.Collections.Generic

Update() public method

public Update ( float dt ) : void
dt float
return void

Property Details

AngularDragCoefficient public_oe property

Controls the rotational drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to simulate water-like fluids.
public float AngularDragCoefficient
return float

Density public_oe property

Density of the fluid. Higher values will make things more buoyant, lower values will cause things to sink.
public float Density
return float

LinearDragCoefficient public_oe property

Controls the linear drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to simulate water-like fluids.
public float LinearDragCoefficient
return float

Velocity public_oe property

Acts like waterflow. Defaults to 0,0.
public Vector2,Microsoft.Xna.Framework Velocity
return Microsoft.Xna.Framework.Vector2