Isle
|
[AI] Represents a sphere in 3D space, used for bounding volume calculations and spatial queries. More...
#include <legosphere.h>
Public Member Functions | |
LegoSphere () | |
[AI] Default constructor initializing the sphere with zero radius. More... | |
LegoVertex & | GetCenter () |
[AI] Returns a reference to the center vertex of the sphere. More... | |
void | SetCenter (LegoVertex &p_center) |
[AI] Sets the center of the sphere to the specified vertex. More... | |
LegoFloat | GetRadius () |
[AI] Retrieves the current radius of the sphere. More... | |
void | SetRadius (LegoFloat p_radius) |
[AI] Sets the radius to the specified value. More... | |
LegoResult | Read (LegoStorage *p_storage) |
[AI] Reads the center and radius of the sphere from a binary storage source. More... | |
Protected Attributes | |
LegoVertex | m_center |
Center position of the sphere in 3D space. [AI]. More... | |
LegoFloat | m_radius |
Radius of the sphere. [AI]. More... | |
[AI] Represents a sphere in 3D space, used for bounding volume calculations and spatial queries.
[AI] The class contains a center vertex and a floating-point radius. This is commonly used in collision detection, bounding volume hierarchies, view frustum culling, and other 3D spatial operations to efficiently represent and test spherical areas.
Definition at line 13 of file legosphere.h.
|
inline |
[AI] Default constructor initializing the sphere with zero radius.
[AI] The center vertex is implicitly constructed, and the radius is set to 0.0f.
Definition at line 19 of file legosphere.h.
|
inline |
[AI] Returns a reference to the center vertex of the sphere.
Definition at line 25 of file legosphere.h.
|
inline |
[AI] Retrieves the current radius of the sphere.
Definition at line 37 of file legosphere.h.
LegoResult LegoSphere::Read | ( | LegoStorage * | p_storage | ) |
[AI] Reads the center and radius of the sphere from a binary storage source.
p_storage | The storage object to read from. [AI] |
[AI] This method first calls the center's Read method, then reads the raw binary value for radius.
Definition at line 9 of file legosphere.cpp.
|
inline |
[AI] Sets the center of the sphere to the specified vertex.
p_center | The new center position. [AI] |
Definition at line 31 of file legosphere.h.
|
inline |
[AI] Sets the radius to the specified value.
p_radius | The new radius. [AI] |
Definition at line 43 of file legosphere.h.
|
protected |
Center position of the sphere in 3D space. [AI].
Definition at line 54 of file legosphere.h.
|
protected |
Radius of the sphere. [AI].
Definition at line 55 of file legosphere.h.