Class VerletIntegrator
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Provides a verlet integrator.
public sealed class VerletIntegrator
- Inheritance
-
VerletIntegrator
- Inherited Members
Remarks
http://en.wikipedia.org/wiki/Verlet_integration http://www.gamasutra.com/resource_guide/20030121/jacobson_01.shtml http://code.google.com/p/verlet/ http://www.gamedev.net/reference/articles/article2200.asp
Constructors
VerletIntegrator()
Initializes a new instance of the VerletIntegrator class.
public VerletIntegrator()
Properties
Accelerations
Gets or sets the accelerations.
public Vector3D[] Accelerations { get; }
Property Value
- Vector3D[]
The accelerations.
Constraints
Gets or sets the constraints.
public List<Constraint> Constraints { get; }
Property Value
- List<Constraint>
The constraints.
Damping
Gets or sets the damping.
public double Damping { get; set; }
Property Value
- double
The damping.
InverseMass
Gets or sets the inverse mass.
public double[] InverseMass { get; }
Property Value
- double[]
The inverse mass.
Iterations
Gets or sets the iterations.
public int Iterations { get; set; }
Property Value
- int
The iterations.
Positions
Gets or sets the positions.
public Point3D[] Positions { get; }
Property Value
- Point3D[]
The positions.
Positions0
Gets or sets the positions0.
public Point3D[] Positions0 { get; }
Property Value
- Point3D[]
The positions0.
Methods
AddConstraint(int, int, double)
Adds the constraint.
public void AddConstraint(int A, int B, double relax)
Parameters
AddFloor(double)
Adds the floor.
public void AddFloor(double friction)
Parameters
frictiondoubleThe friction.
AddSphere(Point3D, double)
Adds the sphere.
public void AddSphere(Point3D center, double radius)
Parameters
ApplyGravity(Vector3D)
Applies the gravity.
public void ApplyGravity(Vector3D gravity)
Parameters
gravityVector3DThe gravity.
CreateConstraintsByMesh(MeshGeometry3D, double)
Creates the constraints by mesh.
public void CreateConstraintsByMesh(MeshGeometry3D mesh, double relax)
Parameters
meshMeshGeometry3DThe mesh.
relaxdoubleThe relax.
FixPosition(int)
Fixes the specified position.
public void FixPosition(int i)
Parameters
iintThe i.
Init(MeshGeometry3D)
Inits the specified mesh.
public void Init(MeshGeometry3D mesh)
Parameters
meshMeshGeometry3DThe mesh.
Resize(int)
Resizes the arrays.
public void Resize(int n)
Parameters
nintThe n.
SetForce(int, Vector3D)
Sets the force.
public void SetForce(int index, Vector3D force)
Parameters
SetInverseMass(double)
Sets the inverse mass.
public void SetInverseMass(double invmass)
Parameters
invmassdoubleThe invmass.
TimeStep(double)
Times the step.
public void TimeStep(double dt)
Parameters
dtdoubleThe dt.
TransferPositions(MeshGeometry3D)
Transfers the positions.
public void TransferPositions(MeshGeometry3D mesh)
Parameters
meshMeshGeometry3DThe mesh.