Verlet Intergration Soft Body
Loading...
Searching...
No Matches
PhysicsCSAlevlProject.CircleCollider Class Reference

The CircleCollider class represents a circular collider with a specified radius and position. More...

Inheritance diagram for PhysicsCSAlevlProject.CircleCollider:
PhysicsCSAlevlProject.Collider

Public Member Functions

 CircleCollider (Vector2 center, float radius)
override Collider DeepCopy ()
override bool ContainsPoint (Vector2 point, out Vector2 closestPoint)
override void Draw (SpriteBatch spriteBatch, PrimitiveBatch primitiveBatch)
 Draws the collider.
Public Member Functions inherited from PhysicsCSAlevlProject.Collider
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,.

Public Attributes

float Radius
 the radius of the circle collider

Properties

Rectangle BroadPhase [get]
 the rectangle used for the broad phase of collision detection, which is a simple bounding box that encompasses the circle collider.
Properties inherited from PhysicsCSAlevlProject.Collider
virtual Vector2 Position [get, set]
 the position of the collider

Detailed Description

The CircleCollider class represents a circular collider with a specified radius and position.

Member Function Documentation

◆ Draw()

override void PhysicsCSAlevlProject.CircleCollider.Draw ( SpriteBatch spriteBatch,
PrimitiveBatch primitiveBatch )
inlinevirtual

Draws the collider.

Parameters
spriteBatch
primitiveBatch

Reimplemented from PhysicsCSAlevlProject.Collider.


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