Verlet point.  
 More...
Verlet point. 
Definition at line 10 of file VerletPoint.cs.
◆ VerletPoint() [1/2]
  
  | 
        
          | VerletPhysics.VerletPoint.VerletPoint | ( |  | ) |  |  | inline | 
 
Create an uninitialized verlet point. 
Definition at line 45 of file VerletPoint.cs.
 
 
◆ VerletPoint() [2/2]
  
  | 
        
          | VerletPhysics.VerletPoint.VerletPoint | ( | VerletWorld | world | ) |  |  | inline | 
 
Create a verlet point. 
- Parameters
- 
  
  
Definition at line 51 of file VerletPoint.cs.
   54             Modulate = Colors.LightBlue;
 
   56             links = 
new List<VerletLink>();
 
float Radius
Circle radius.
 
 
 
◆ AddLink()
  
  | 
        
          | void VerletPhysics.VerletPoint.AddLink | ( | VerletLink | link | ) |  |  | inline | 
 
Associate verlet link with current point. 
- Parameters
- 
  
  
Definition at line 82 of file VerletPoint.cs.
 
 
◆ ApplyForce()
  
  | 
        
          | void VerletPhysics.VerletPoint.ApplyForce | ( | Vector2 | force | ) |  |  | inline | 
 
Apply force on point. 
- Parameters
- 
  
  
Definition at line 73 of file VerletPoint.cs.
Vector2 Acceleration
Current acceleration
 
 
 
◆ Constraint()
  
  | 
        
          | void VerletPhysics.VerletPoint.Constraint | ( | Vector2 | worldSize | ) |  |  | inline | 
 
Apply constraints on point. 
- Parameters
- 
  
  
Definition at line 115 of file VerletPoint.cs.
  117             foreach (VerletLink link 
in links)
 
  122             ConstraintPositionInSize(worldSize);
 
 
 
 
◆ MoveToPosition()
  
  | 
        
          | void VerletPhysics.VerletPoint.MoveToPosition | ( | Vector2 | position | ) |  |  | inline | 
 
Move point to position. 
- Parameters
- 
  
  
Definition at line 63 of file VerletPoint.cs.
   65             GlobalPosition = position;
 
   66             prevPosition = GlobalPosition;
 
 
 
 
◆ PinToCurrentPosition()
  
  | 
        
          | void VerletPhysics.VerletPoint.PinToCurrentPosition | ( |  | ) |  |  | inline | 
 
Pin point to its current position. 
Definition at line 129 of file VerletPoint.cs.
  132             pinPosition = GlobalPosition;
 
 
 
 
◆ PinToPosition()
  
  | 
        
          | void VerletPhysics.VerletPoint.PinToPosition | ( | Vector2 | position | ) |  |  | inline | 
 
Pin point to a target position. 
- Parameters
- 
  
  
Definition at line 139 of file VerletPoint.cs.
  142             pinPosition = position;
 
 
 
 
◆ RemoveLink()
  
  | 
        
          | void VerletPhysics.VerletPoint.RemoveLink | ( | VerletLink | link | ) |  |  | inline | 
 
Deassociate verlet link from current point. 
- Parameters
- 
  
  
Definition at line 91 of file VerletPoint.cs.
 
 
◆ Unpin()
  
  | 
        
          | void VerletPhysics.VerletPoint.Unpin | ( |  | ) |  |  | inline | 
 
 
◆ UpdateMovement()
  
  | 
        
          | void VerletPhysics.VerletPoint.UpdateMovement | ( | float | delta | ) |  |  | inline | 
 
Update movement using current forces and gravity. 
- Parameters
- 
  
  
Definition at line 100 of file VerletPoint.cs.
  102             var velocity = ComputeVelocity() * 
Friction;
 
  103             var nextPosition = GlobalPosition + velocity + (
Acceleration * delta);
 
  105             prevPosition = GlobalPosition;
 
  106             GlobalPosition = nextPosition;
 
float Friction
Friction coefficient
 
 
 
◆ Acceleration
      
        
          | Vector2 VerletPhysics.VerletPoint.Acceleration | 
      
 
 
◆ Bounce
      
        
          | float VerletPhysics.VerletPoint.Bounce = 0.9f | 
      
 
 
◆ Friction
      
        
          | float VerletPhysics.VerletPoint.Friction = 0.99f | 
      
 
 
◆ GravityScale
      
        
          | float VerletPhysics.VerletPoint.GravityScale = 1 | 
      
 
 
◆ Mass
      
        
          | float VerletPhysics.VerletPoint.Mass = 1 | 
      
 
 
◆ Touched
  
  | 
        
          | bool VerletPhysics.VerletPoint.Touched |  | get | 
 
 
The documentation for this class was generated from the following file: