hx3d
1
2D/3D Simple Game Framework
|
Circle shaped collider. More...
#include <circle.hpp>
Public Member Functions | |
Circle (float radius, const Type colliderType=Type::Dynamic) | |
Create a circle. More... | |
virtual void | setOrientation (float angle) override |
Set the collider orientation. More... | |
virtual void | computeMass (float density) override |
Compute the collider mass. More... | |
![]() | |
Collider (const Shape shapeType, const Type colliderType=Type::Dynamic) | |
Create a collider. More... | |
void | useDefinition (const Definition &def) |
Apply a definition on the collider. More... | |
void | applyForce (const glm::vec2 &amount) |
Apply a force. More... | |
void | applyImpulse (const glm::vec2 &amount, const glm::vec2 &contact) |
Apply an impulse. More... | |
void | setDensity (float density) |
Set collider density. More... | |
Public Attributes | |
float | radius |
Radius. | |
![]() | |
glm::vec2 | position |
Position. | |
glm::vec2 | velocity |
Velocity. | |
glm::vec2 | force |
Force. | |
glm::vec2 | gravityForce |
Gravity force. | |
glm::vec2 | gravityScale |
Gravity scale. | |
float | angularVelocity |
Angular velocity. | |
float | torque |
Torque. | |
float | orientation |
Orientation. | |
bool | fixedRotation |
Fixed rotation ? | |
unsigned int | mask |
Mask. | |
unsigned int | category |
Category. | |
Type | type |
Type. | |
Shape | shape |
Shape. | |
Material | material |
Material. | |
Mass | massData |
Mass data. | |
Ptr< Attractor > | currentAttractor |
Current attractor. | |
ObjectMap | userData |
User data. | |
Additional Inherited Members | |
![]() |
Circle shaped collider.
Definition at line 37 of file circle.hpp.
hx3d::physics2d::colliders::Circle::Circle | ( | float | radius, |
const Type | colliderType = Type::Dynamic |
||
) |
Create a circle.
radius | Radius |
colliderType | Collider type |
Definition at line 9 of file circle.cpp.
|
overridevirtual |
Compute the collider mass.
density | Density |
Implements hx3d::physics2d::Collider.
Definition at line 19 of file circle.cpp.
|
overridevirtual |
Set the collider orientation.
angle | Angle in radians |
Implements hx3d::physics2d::Collider.
Definition at line 16 of file circle.cpp.