The CircleCollider class represents a circular collider with a specified radius and position.
More...
|
|
| 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.
|
| 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,.
|
|
|
float | Radius |
| | the radius of the circle collider
|
|
|
Rectangle | BroadPhase [get] |
| | the rectangle used for the broad phase of collision detection, which is a simple bounding box that encompasses the circle collider.
|
|
virtual Vector2 | Position [get, set] |
| | the position of the collider
|
The CircleCollider class represents a circular collider with a specified radius and position.
◆ Draw()
| override void PhysicsCSAlevlProject.CircleCollider.Draw |
( |
SpriteBatch | spriteBatch, |
|
|
PrimitiveBatch | primitiveBatch ) |
|
inlinevirtual |
The documentation for this class was generated from the following file:
- PhysicsCSAlevlProject/Objects.Colliders.cs