Isle
Loading...
Searching...
No Matches
legosphere.h
Go to the documentation of this file.
1#ifndef __LEGOSPHERE_H
2#define __LEGOSPHERE_H
3
4#include "legovertex.h"
5
6// SIZE 0x10
7
14public:
19 LegoSphere() { m_radius = 0.0F; }
20
26
31 void SetCenter(LegoVertex& p_center) { m_center = p_center; }
32
38
43 void SetRadius(LegoFloat p_radius) { m_radius = p_radius; }
44
51 LegoResult Read(LegoStorage* p_storage);
52
53protected:
56};
57
58#endif // __LEGOSPHERE_H
[AI] Represents a sphere in 3D space, used for bounding volume calculations and spatial queries.
Definition: legosphere.h:13
LegoSphere()
[AI] Default constructor initializing the sphere with zero radius.
Definition: legosphere.h:19
LegoFloat m_radius
Radius of the sphere. [AI].
Definition: legosphere.h:55
LegoFloat GetRadius()
[AI] Retrieves the current radius of the sphere.
Definition: legosphere.h:37
void SetCenter(LegoVertex &p_center)
[AI] Sets the center of the sphere to the specified vertex.
Definition: legosphere.h:31
LegoVertex & GetCenter()
[AI] Returns a reference to the center vertex of the sphere.
Definition: legosphere.h:25
void SetRadius(LegoFloat p_radius)
[AI] Sets the radius to the specified value.
Definition: legosphere.h:43
LegoResult Read(LegoStorage *p_storage)
[AI] Reads the center and radius of the sphere from a binary storage source.
Definition: legosphere.cpp:9
LegoVertex m_center
Center position of the sphere in 3D space. [AI].
Definition: legosphere.h:54
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
[AI] Represents a 3D vertex with floating point coordinates.
Definition: legovertex.h:11
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
Definition: legotypes.h:101
float LegoFloat
[AI] Floating point type used throughout LEGO Island.
Definition: legotypes.h:77