Isle
Loading...
Searching...
No Matches
LegoNamedPlane Struct Reference

[AI] Represents a named 3D plane with orientation and position, used to describe places or camera targets in LEGO Island's world. More...

#include <legonamedplane.h>

Collaboration diagram for LegoNamedPlane:

Public Member Functions

 LegoNamedPlane ()
 [AI] Default constructor that initializes an unnamed plane. More...
 
const char * GetName () const
 [AI] Default destructor (implementation likely trivial). More...
 
const Mx3DPointFloatGetPosition ()
 [AI] Get the 3D position of this plane in world coordinates. More...
 
const Mx3DPointFloatGetDirection ()
 [AI] Get the normalized direction (forward) vector of the plane. More...
 
const Mx3DPointFloatGetUp ()
 [AI] Get the normalized "up" vector of the plane, defining its orientation. More...
 
void SetName (const char *p_name)
 [AI] Set the name identifier for this plane. More...
 
void SetPosition (const Mx3DPointFloat &p_position)
 [AI] Set the 3D position of the plane. More...
 
void SetDirection (const Mx3DPointFloat &p_direction)
 [AI] Set the direction (forward) vector of the plane. More...
 
void SetUp (const Mx3DPointFloat &p_up)
 [AI] Set the "up" vector of the plane. More...
 
MxBool IsPresent ()
 [AI] Determines whether the plane instance is valid (present) based on its name. More...
 
void Reset ()
 [AI] Reset the plane to "not present" by clearing its name. More...
 
MxResult Serialize (LegoStorage *p_storage)
 [AI] Serialize or deserialize the plane data to or from a LegoStorage object. More...
 

Public Attributes

MxString m_name
 [AI] Name identifier for this plane (used for lookups and scripting). More...
 
Mx3DPointFloat m_position
 [AI] 3D position of the plane in world space. More...
 
Mx3DPointFloat m_direction
 [AI] Direction (forward/facing) vector for the plane orientation. More...
 
Mx3DPointFloat m_up
 [AI] "Up" vector for the plane, defines its local up direction. More...
 

Detailed Description

[AI] Represents a named 3D plane with orientation and position, used to describe places or camera targets in LEGO Island's world.

This structure encapsulates a plane in 3D space by providing a name, a position, a direction vector (the facing/forward vector), and an up vector to fully specify its orientation. It's serializable to and from LegoStorage, making it suitable for game state save/load and scripting purposes. [AI]

Definition at line 19 of file legonamedplane.h.

Constructor & Destructor Documentation

◆ LegoNamedPlane()

LegoNamedPlane::LegoNamedPlane ( )
inline

[AI] Default constructor that initializes an unnamed plane.

[AI]

Definition at line 23 of file legonamedplane.h.

Member Function Documentation

◆ GetDirection()

const Mx3DPointFloat & LegoNamedPlane::GetDirection ( )
inline

[AI] Get the normalized direction (forward) vector of the plane.

[AI]

Returns
Reference to Mx3DPointFloat containing the direction. [AI]

Definition at line 50 of file legonamedplane.h.

◆ GetName()

const char * LegoNamedPlane::GetName ( ) const
inline

[AI] Default destructor (implementation likely trivial).

[AI]

[AI] Retrieve the name identifier for this plane. [AI]

Returns
Pointer to the character array holding the name. [AI]

Definition at line 38 of file legonamedplane.h.

◆ GetPosition()

const Mx3DPointFloat & LegoNamedPlane::GetPosition ( )
inline

[AI] Get the 3D position of this plane in world coordinates.

[AI]

Returns
Reference to Mx3DPointFloat containing position. [AI]

Definition at line 44 of file legonamedplane.h.

◆ GetUp()

const Mx3DPointFloat & LegoNamedPlane::GetUp ( )
inline

[AI] Get the normalized "up" vector of the plane, defining its orientation.

[AI]

Returns
Reference to Mx3DPointFloat containing the up vector. [AI]

Definition at line 56 of file legonamedplane.h.

◆ IsPresent()

MxBool LegoNamedPlane::IsPresent ( )
inline

[AI] Determines whether the plane instance is valid (present) based on its name.

A plane is present if its name is not empty. [AI]

Returns
True if the plane has a non-empty name, false otherwise. [AI]

Definition at line 89 of file legonamedplane.h.

◆ Reset()

void LegoNamedPlane::Reset ( )
inline

[AI] Reset the plane to "not present" by clearing its name.

[AI]

Definition at line 94 of file legonamedplane.h.

◆ Serialize()

MxResult LegoNamedPlane::Serialize ( LegoStorage p_storage)
inline

[AI] Serialize or deserialize the plane data to or from a LegoStorage object.

If the storage is in write mode, writes the members (name, position, direction, up). In read mode, reads in the same order. Used for saving/loading state and scripting. [AI]

Parameters
p_storagePointer to the LegoStorage for serialization. [AI]
Returns
SUCCESS on successful read/write. [AI]

Definition at line 105 of file legonamedplane.h.

◆ SetDirection()

void LegoNamedPlane::SetDirection ( const Mx3DPointFloat p_direction)
inline

[AI] Set the direction (forward) vector of the plane.

[AI]

Parameters
p_directionReference to the new direction vector. [AI]

Definition at line 74 of file legonamedplane.h.

◆ SetName()

void LegoNamedPlane::SetName ( const char *  p_name)
inline

[AI] Set the name identifier for this plane.

[AI]

Parameters
p_nameNull-terminated string for the new name. [AI]

Definition at line 62 of file legonamedplane.h.

◆ SetPosition()

void LegoNamedPlane::SetPosition ( const Mx3DPointFloat p_position)
inline

[AI] Set the 3D position of the plane.

[AI]

Parameters
p_positionReference to the new position value. [AI]

Definition at line 68 of file legonamedplane.h.

◆ SetUp()

void LegoNamedPlane::SetUp ( const Mx3DPointFloat p_up)
inline

[AI] Set the "up" vector of the plane.

[AI]

Parameters
p_upReference to the new up vector. [AI]

Definition at line 80 of file legonamedplane.h.

Member Data Documentation

◆ m_direction

Mx3DPointFloat LegoNamedPlane::m_direction

[AI] Direction (forward/facing) vector for the plane orientation.

[AI]

Definition at line 136 of file legonamedplane.h.

◆ m_name

MxString LegoNamedPlane::m_name

[AI] Name identifier for this plane (used for lookups and scripting).

[AI]

Definition at line 126 of file legonamedplane.h.

◆ m_position

Mx3DPointFloat LegoNamedPlane::m_position

[AI] 3D position of the plane in world space.

[AI]

Definition at line 131 of file legonamedplane.h.

◆ m_up

Mx3DPointFloat LegoNamedPlane::m_up

[AI] "Up" vector for the plane, defines its local up direction.

[AI]

Definition at line 141 of file legonamedplane.h.


The documentation for this struct was generated from the following file: