Isle
|
[AI] Represents a 3D vertex with floating point coordinates. More...
#include <legovertex.h>
Public Member Functions | |
LegoVertex () | |
[AI] Constructs a LegoVertex at the origin (0, 0, 0). More... | |
LegoFloat | GetCoordinate (LegoU32 p_i) |
[AI] Gets the value of one of the xyz coordinates by index (0=x, 1=y, 2=z). More... | |
void | SetCoordinate (LegoU32 p_i, LegoFloat p_coordinate) |
[AI] Sets the value of one of the xyz coordinates by index (0=x, 1=y, 2=z). More... | |
LegoFloat | GetX () |
[AI] Gets the X coordinate. More... | |
void | SetX (LegoFloat p_x) |
[AI] Sets the X coordinate. More... | |
LegoFloat | GetY () |
[AI] Gets the Y coordinate. More... | |
void | SetY (LegoFloat p_y) |
[AI] Sets the Y coordinate. More... | |
LegoFloat | GetZ () |
[AI] Gets the Z coordinate. More... | |
void | SetZ (LegoFloat p_z) |
[AI] Sets the Z coordinate. More... | |
LegoBool | IsOrigin () |
[AI] Checks whether the vertex is located at the origin (0,0,0). More... | |
LegoResult | Read (LegoStorage *p_storage) |
[AI] Reads the coordinates from a storage object (usually a file/buffer). More... | |
LegoFloat & | operator[] (int i) |
[AI] Provides direct access to a coordinate by index (read/write). More... | |
LegoFloat | operator[] (int i) const |
[AI] Provides direct access to a coordinate by index (read-only). More... | |
Protected Attributes | |
LegoFloat | m_coordinates [3] |
[AI] The x, y, and z coordinates of the vertex. [AI] More... | |
[AI] Represents a 3D vertex with floating point coordinates.
Used to store 3D position information in the LEGO Island engine.
[AI] This class encapsulates a 3D point or vector with three coordinates (x, y, z), and provides accessor, mutator, and serialization methods. It can be used to represent geometry positions or transform points.
Definition at line 11 of file legovertex.h.
LegoVertex::LegoVertex | ( | ) |
[AI] Constructs a LegoVertex at the origin (0, 0, 0).
Definition at line 9 of file legovertex.cpp.
[AI] Gets the value of one of the xyz coordinates by index (0=x, 1=y, 2=z).
p_i | Index of the coordinate (0, 1, or 2). [AI] |
Definition at line 19 of file legovertex.h.
|
inline |
[AI] Gets the X coordinate.
Definition at line 27 of file legovertex.h.
|
inline |
[AI] Gets the Y coordinate.
Definition at line 34 of file legovertex.h.
|
inline |
[AI] Gets the Z coordinate.
Definition at line 41 of file legovertex.h.
|
inline |
[AI] Checks whether the vertex is located at the origin (0,0,0).
[AI] Returns true if all coordinates are zero. Used to verify default or reset state.
Definition at line 50 of file legovertex.h.
|
inline |
[AI] Provides direct access to a coordinate by index (read/write).
i | Index of the coordinate (0 for X, 1 for Y, 2 for Z). [AI] |
Definition at line 61 of file legovertex.h.
|
inline |
[AI] Provides direct access to a coordinate by index (read-only).
i | Index of the coordinate (0 for X, 1 for Y, 2 for Z). [AI] |
Definition at line 66 of file legovertex.h.
LegoResult LegoVertex::Read | ( | LegoStorage * | p_storage | ) |
[AI] Reads the coordinates from a storage object (usually a file/buffer).
p_storage | Pointer to a LegoStorage for reading the coordinates. [AI] |
[AI] Reads 3 floats in order (X, Y, Z) from the storage stream.
Definition at line 17 of file legovertex.cpp.
[AI] Sets the value of one of the xyz coordinates by index (0=x, 1=y, 2=z).
p_i | Index of the coordinate (0, 1, or 2). [AI] |
p_coordinate | The new value for the coordinate. [AI] |
Definition at line 24 of file legovertex.h.
|
inline |
[AI] Sets the X coordinate.
p_x | The X value. [AI] |
Definition at line 31 of file legovertex.h.
|
inline |
[AI] Sets the Y coordinate.
p_y | The Y value. [AI] |
Definition at line 38 of file legovertex.h.
|
inline |
[AI] Sets the Z coordinate.
p_z | The Z value. [AI] |
Definition at line 45 of file legovertex.h.
|
protected |
[AI] The x, y, and z coordinates of the vertex. [AI]
Definition at line 70 of file legovertex.h.