#include <SphereCollider.hpp>
|
| | SphereCollider ()=default |
| | Default constructor (radius 0.5).
|
| | SphereCollider (float r) |
| | Construct with radius.
|
| | SphereCollider (float r, const glm::vec3 &localOffset) |
| | Construct with radius and offset.
|
| float | GetDiameter () const |
| | Get diameter of the sphere.
|
| void | SetDiameter (float diameter) |
| | Set diameter directly (converts to radius).
|
| bool | IsValid () const |
| | Check if collider is valid.
|
|
| float | radius = 0.5f |
| | Radius of the sphere in world units.
|
| glm::vec3 | offset {0.0f, 0.0f, 0.0f} |
| | Local offset from entity transform (center of sphere).
|
◆ SphereCollider() [1/3]
| Physics::Component::SphereCollider::SphereCollider |
( |
| ) |
|
|
default |
Default constructor (radius 0.5).
◆ SphereCollider() [2/3]
| Physics::Component::SphereCollider::SphereCollider |
( |
float | r | ) |
|
|
inlineexplicit |
Construct with radius.
- Parameters
-
◆ SphereCollider() [3/3]
| Physics::Component::SphereCollider::SphereCollider |
( |
float | r, |
|
|
const glm::vec3 & | localOffset ) |
|
inline |
Construct with radius and offset.
- Parameters
-
| r | Sphere radius |
| localOffset | Local position offset from entity center |
◆ AtOffset()
| SphereCollider Physics::Component::SphereCollider::AtOffset |
( |
float | r, |
|
|
const glm::vec3 & | localOffset ) |
|
inlinestatic |
Create a sphere at an offset (useful for compound shapes).
- Parameters
-
| r | Radius |
| localOffset | Position offset from entity center |
- Returns
- SphereCollider
◆ Ball()
Create a sphere for a ball/projectile.
- Parameters
-
- Returns
- SphereCollider
◆ GetDiameter()
| float Physics::Component::SphereCollider::GetDiameter |
( |
| ) |
const |
|
inlinenodiscard |
Get diameter of the sphere.
- Returns
- Diameter (2 * radius)
◆ IsValid()
| bool Physics::Component::SphereCollider::IsValid |
( |
| ) |
const |
|
inlinenodiscard |
Check if collider is valid.
- Returns
- true if radius > 0
◆ SetDiameter()
| void Physics::Component::SphereCollider::SetDiameter |
( |
float | diameter | ) |
|
|
inline |
Set diameter directly (converts to radius).
- Parameters
-
| diameter | Full diameter of sphere |
◆ Unit()
Create a unit sphere (radius 1.0).
- Returns
- SphereCollider with radius 1.0
◆ offset
| glm::vec3 Physics::Component::SphereCollider::offset {0.0f, 0.0f, 0.0f} |
Local offset from entity transform (center of sphere).
◆ radius
| float Physics::Component::SphereCollider::radius = 0.5f |
The documentation for this struct was generated from the following file: