Green Rock Engine 0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
GREngine.Core.Physics2D.CircleCollider Class Reference
Inheritance diagram for GREngine.Core.Physics2D.CircleCollider:
Inheritance graph
[legend]
Collaboration diagram for GREngine.Core.Physics2D.CircleCollider:
Collaboration graph
[legend]

Public Member Functions

 CircleCollider (float radius)
 
 CircleCollider (float radius, bool debugged)
 
 CircleCollider (float radius, string collisionLayer, bool debugged=false)
 
 CircleCollider (float radius, Vector2 offset, string collisionLayer, bool debugged=false)
 
 CircleCollider (float radius, Vector2 offset, bool debugged=false)
 
override void DrawDebug ()
 Define how to draw the verlet object for debugging (eg, draw the collider outline)
 
override void SolveCollision (PolygonCollider other, Vector2 velocity)
 Circle Colliding potentially with another circle.
 
override void SolveCollision (CircleCollider obj2, Vector2 velocity)
 
void ResolveCollision (CircleCollider other, Vector2 collisionVector)
 
override bool PointInsideCollider (PointF point)
 
float GetRadius ()
 
override void CalculateAABB ()
 
- Public Member Functions inherited from GREngine.Core.Physics2D.Collider
delegate void TriggerEvent (Collider collidedWith)
 
delegate void CollisionEvent (Collider collidedWith)
 
 Collider (Vector2 offset, string layer, bool debug)
 
 Collider (string layer, bool debug)
 
 Collider (bool debug)
 
 Collider (Vector2 offset, bool debug)
 
void updatePosition (float dt)
 
void SetVelocity (Vector2 externalVelocity)
 
void accelerate (Vector2 acc)
 
Vector2 GetOldPosition ()
 
Vector2 GetLocalNodePosition ()
 Gets local position from the node as a Vector2 This method is used for velocity.
 
Vector2 GetGlobalColliderPosition ()
 Gets global position from the node as a Vector2 This method is used for collision detection.
 
void SetNodePosition (Vector2 position)
 Sets the position of the Node.
 
Vector2 GetOffset ()
 
void SetOffset (Vector2 offset)
 
float GetRotation ()
 
void SetRotation (float r)
 
AABB GetAABB ()
 
void SetStatic (bool b)
 
bool IsStatic ()
 
void SetTrigger (bool b)
 
bool IsTrigger ()
 
void SetLayer (string layer)
 
string GetLayer ()
 
bool IsAABBOverlapping ()
 
void SetAABBOverlapping (bool b)
 
void SetAllowedCollisionLayers (List< string > layers)
 Pass in a list of layers with which this collider should be able to collide with.
 
List< string > GetAllowedCollisionLayers ()
 
void SolveCollisions (List< Collider > others)
 
void SolveCollision (Collider other, Vector2 velocity)
 
void SolveCollision (PolygonCollider other, Vector2 velocity)
 
void SolveCollision (CircleCollider other, Vector2 velocity)
 
bool PointInsideCollider (PointF point)
 
void CalculateAABB ()
 Each subclass will have its own method of calculating its AABB.
 
- Public Member Functions inherited from GREngine.Core.System.Behaviour
override void SetEnabled (bool state)
 
int CompareTo (Behaviour? other)
 
- Public Member Functions inherited from GREngine.Core.System.AbstractGameObject
delegate void EnabledChanged (bool state)
 
bool HasTag (string tag)
 

Additional Inherited Members

- Protected Member Functions inherited from GREngine.Core.Physics2D.Collider
override void OnAwake ()
 
override void OnStart ()
 
override void OnDestroy ()
 
override void OnUpdate (GameTime gameTime)
 
void SetAABB (AABB aabb)
 
void FireCorrectEvent (Vector2 collisionVector, Collider other)
 
void FireTriggerEnter (Vector2 collisionVector, Collider other)
 
void FireCollisionEnter (Vector2 collisionVector, Collider other)
 
- Protected Member Functions inherited from GREngine.Core.System.Behaviour
virtual void OnFixedUpdate (GameTime gameTime)
 
- Protected Attributes inherited from GREngine.Core.Physics2D.Collider
ICollisionSystem collisionSystem
 
- Protected Attributes inherited from GREngine.Core.System.Behaviour
readonly uint InstanceID
 
- Protected Attributes inherited from GREngine.Core.System.AbstractGameObject
readonly HashSet< string > Tags = new()
 
- Properties inherited from GREngine.Core.Physics2D.Collider
bool Debug = false [get, set]
 
float VelocityDampingMultiplier = 1 [get, set]
 
Vector2 Velocity [get, set]
 
- Properties inherited from GREngine.Core.System.Behaviour
Game Game [get, set]
 
NodeNode [get, set]
 
- Properties inherited from GREngine.Core.System.AbstractGameObject
bool Enabled = true [get]
 
string Name = "Generic Object" [get, protected set]
 
- Events inherited from GREngine.Core.Physics2D.Collider
TriggerEvent? OnTriggerEnter
 
CollisionEvent? OnCollisionEnter
 
- Events inherited from GREngine.Core.System.AbstractGameObject
EnabledChanged? EnabledChangedEvent
 

Member Function Documentation

◆ DrawDebug()

override void GREngine.Core.Physics2D.CircleCollider.DrawDebug ( )
inlinevirtual

Define how to draw the verlet object for debugging (eg, draw the collider outline)

Reimplemented from GREngine.Core.Physics2D.Collider.

◆ SolveCollision()

override void GREngine.Core.Physics2D.CircleCollider.SolveCollision ( PolygonCollider  other,
Vector2  velocity 
)
inline

Circle Colliding potentially with another circle.

Parameters
obj2

The documentation for this class was generated from the following file: