Verlet Intergration Soft Body
Loading...
Searching...
No Matches
PhysicsCSAlevlProject.Collider Class Referenceabstract

The Collider class is the base class for all types of colliders this is so that they can be stored in the same list and used for collision detection. More...

Inheritance diagram for PhysicsCSAlevlProject.Collider:
PhysicsCSAlevlProject.CircleCollider PhysicsCSAlevlProject.PolygonSeperatedAxisCollider PhysicsCSAlevlProject.RectangleCollider PhysicsCSAlevlProject.SeperatedAxisRectangleCollider

Public Member Functions

bool ContainsPoint (Vector2 point, out Vector2 closestPoint)
 Determines if the given point is contained within the collider and calculates the closest point on the collider to the given point. This method is used for collision detection and response, allowing the application to determine if a particle or object is colliding with the collider and to find the nearest point on the collider's surface for accurate physics interactions. The method returns true if the point is inside the collider, and false otherwise, while also providing the closest point on the collider as an output parameter. it outputs the same point if the point is outside the collider, which is used for calculating the collision response direction and magnitude based on how far the point is from the collider's surface.
Collider DeepCopy ()
 Creates a deep copy of the collider,.
virtual void Draw (SpriteBatch spriteBatch, PrimitiveBatch primitiveBatch)
 Draws the collider.

Properties

virtual Vector2 Position [get, set]
 the position of the collider

Detailed Description

The Collider class is the base class for all types of colliders this is so that they can be stored in the same list and used for collision detection.

Member Function Documentation

◆ ContainsPoint()

bool PhysicsCSAlevlProject.Collider.ContainsPoint ( Vector2 point,
out Vector2 closestPoint )
abstract

Determines if the given point is contained within the collider and calculates the closest point on the collider to the given point. This method is used for collision detection and response, allowing the application to determine if a particle or object is colliding with the collider and to find the nearest point on the collider's surface for accurate physics interactions. The method returns true if the point is inside the collider, and false otherwise, while also providing the closest point on the collider as an output parameter. it outputs the same point if the point is outside the collider, which is used for calculating the collision response direction and magnitude based on how far the point is from the collider's surface.

Parameters
point
closestPoint
Returns

◆ DeepCopy()

Collider PhysicsCSAlevlProject.Collider.DeepCopy ( )
abstract

Creates a deep copy of the collider,.

Returns

◆ Draw()

virtual void PhysicsCSAlevlProject.Collider.Draw ( SpriteBatch spriteBatch,
PrimitiveBatch primitiveBatch )
inlinevirtual

The documentation for this class was generated from the following file:
  • PhysicsCSAlevlProject/Objects.Colliders.cs