C# Class Jitter.Dynamics.SoftBody

Inheritance: IBroadphaseEntity
显示文件 Open project: tpb3d/TPB3D Class Usage Examples

Protected Properties

Property Type Description
triangleExpansion float

Public Methods

Method Description
AddForce ( Jitter.LinearMath.JVector force ) : void
AddPressureForces ( float timeStep ) : void
CalculateCenter ( ) : Jitter.LinearMath.JVector
DoSelfCollision ( CollisionDetectedHandler collision ) : void
Rotate ( Jitter.LinearMath.JMatrix orientation, Jitter.LinearMath.JVector center ) : void
SetSpringValues ( SpringType type, float bias, float softness ) : void
SetSpringValues ( float bias, float softness ) : void
SoftBody ( List indices, List vertices ) : System
SoftBody ( int sizeX, int sizeY, float scale ) : System

Creates a 2D-Cloth. Connects Nearest Neighbours (4x, called EdgeSprings) and adds additional shear/bend constraints (4xShear+4xBend).

Translate ( Jitter.LinearMath.JVector position ) : void
Update ( float timestep ) : void

Private Methods

Method Description
AddPointsAndSprings ( List indices, List vertices ) : void
GetEdges ( List indices ) : HashSet

Method Details

AddForce() public method

public AddForce ( Jitter.LinearMath.JVector force ) : void
force Jitter.LinearMath.JVector
return void

AddPressureForces() public method

public AddPressureForces ( float timeStep ) : void
timeStep float
return void

CalculateCenter() public method

public CalculateCenter ( ) : Jitter.LinearMath.JVector
return Jitter.LinearMath.JVector

DoSelfCollision() public method

public DoSelfCollision ( CollisionDetectedHandler collision ) : void
collision CollisionDetectedHandler
return void

Rotate() public method

public Rotate ( Jitter.LinearMath.JMatrix orientation, Jitter.LinearMath.JVector center ) : void
orientation Jitter.LinearMath.JMatrix
center Jitter.LinearMath.JVector
return void

SetSpringValues() public method

public SetSpringValues ( SpringType type, float bias, float softness ) : void
type SpringType
bias float
softness float
return void

SetSpringValues() public method

public SetSpringValues ( float bias, float softness ) : void
bias float
softness float
return void

SoftBody() public method

public SoftBody ( List indices, List vertices ) : System
indices List
vertices List
return System

SoftBody() public method

Creates a 2D-Cloth. Connects Nearest Neighbours (4x, called EdgeSprings) and adds additional shear/bend constraints (4xShear+4xBend).
public SoftBody ( int sizeX, int sizeY, float scale ) : System
sizeX int
sizeY int
scale float
return System

Translate() public method

public Translate ( Jitter.LinearMath.JVector position ) : void
position Jitter.LinearMath.JVector
return void

Update() public method

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

Property Details

triangleExpansion protected_oe property

protected float triangleExpansion
return float