Isle
|
[AI] Represents the rendering attributes and state of a LEGO mesh, including color, transparency, shading mode, texture, and material. More...
#include <legomesh.h>
Public Types | |
enum | { e_flat , e_gouraud , e_wireframe } |
[AI] Shading mode enumeration for mesh rendering. More... | |
Public Member Functions | |
LegoMesh () | |
virtual | ~LegoMesh () |
LegoColor | GetColor () |
[AI] Returns the mesh's primary color. More... | |
void | SetColor (LegoColor p_color) |
[AI] Sets the mesh's primary color. More... | |
LegoFloat | GetAlpha () |
[AI] Gets the mesh's transparency alpha value. More... | |
LegoU8 | GetShading () |
[AI] Gets the shading mode of the mesh. More... | |
void | SetShading (LegoU8 p_shading) |
[AI] Sets the shading mode. More... | |
LegoU8 | GetUnknown0x0d () |
[AI] Returns the value of an unknown flag or property at offset 0x0d. More... | |
const LegoChar * | GetTextureName () |
[AI] Returns the texture resource name associated with the mesh. More... | |
const LegoChar * | GetMaterialName () |
[AI] Returns the material resource name for the mesh. More... | |
LegoBool | GetUnknown0x21 () |
[AI] Returns the value of an unknown boolean at offset 0x21. More... | |
LegoResult | Read (LegoStorage *p_storage) |
[AI] Reads mesh properties (color, alpha, shading, flags, names) from the given storage stream. More... | |
Protected Attributes | |
LegoColor | m_color |
[AI] The main (diffuse) color of the mesh. More... | |
LegoFloat | m_alpha |
[AI] Mesh transparency (0=transparent, 1=opaque). More... | |
LegoU8 | m_shading |
[AI] Shading mode (see enum above). More... | |
LegoU8 | m_unk0x0d |
[AI] Unknown property/flag at offset 0x0d. More... | |
LegoMeshUnkComponent * | m_unk0x10 |
[AI] Unknown pointer; owned; deleted in destructor. [AI] More... | |
undefined4 | m_unk0x14 |
[AI] Unknown 4-byte field; unused. [AI] More... | |
LegoChar * | m_textureName |
[AI] Name of texture resource, null if none; string is lowercase. More... | |
LegoChar * | m_materialName |
[AI] Name of material resource, null if none; string is lowercase. More... | |
undefined | m_unk0x20 |
[AI] Single unused/padding byte. More... | |
LegoBool | m_unk0x21 |
[AI] Unknown boolean property; function unknown. More... | |
[AI] Represents the rendering attributes and state of a LEGO mesh, including color, transparency, shading mode, texture, and material.
[AI] This class encapsulates information about a mesh's appearance — its color, alpha (transparency), shading mode (flat/gouraud/wireframe), and optionally a texture and material name. It supports serialization/deserialization via the Read() method (reading all mesh color and material properties from a LegoStorage).
Definition at line 51 of file legomesh.h.
anonymous enum |
[AI] Shading mode enumeration for mesh rendering.
[AI] Used to select the shading method: flat, Gouraud interpolated, or wireframe rendering for the mesh.
Enumerator | |
---|---|
e_flat | [AI] Use flat shading (per-polygon color). |
e_gouraud | [AI] Use gouraud shading (interpolated vertex colors). |
e_wireframe | [AI] Use wireframe rendering. |
Definition at line 57 of file legomesh.h.
LegoMesh::LegoMesh | ( | ) |
Definition at line 9 of file legomesh.cpp.
|
virtual |
Definition at line 23 of file legomesh.cpp.
|
inline |
[AI] Gets the mesh's transparency alpha value.
[AI] 0.0 = fully transparent, 1.0 = fully opaque.
Definition at line 81 of file legomesh.h.
|
inline |
[AI] Returns the mesh's primary color.
Definition at line 69 of file legomesh.h.
|
inline |
[AI] Returns the material resource name for the mesh.
[AI] Material name is a null-terminated lowercase string, or nullptr if no material. [AI]
Definition at line 111 of file legomesh.h.
|
inline |
[AI] Gets the shading mode of the mesh.
[AI] Value corresponds to the shading enum (e_flat, e_gouraud, e_wireframe).
Definition at line 87 of file legomesh.h.
|
inline |
[AI] Returns the texture resource name associated with the mesh.
[AI] Texture name is a null-terminated lowercase string, or nullptr if no texture. [AI]
Definition at line 105 of file legomesh.h.
|
inline |
[AI] Returns the value of an unknown flag or property at offset 0x0d.
[AI] Purpose of this property is currently unidentified. [AI]
Definition at line 99 of file legomesh.h.
|
inline |
[AI] Returns the value of an unknown boolean at offset 0x21.
[AI] This boolean is initialized to FALSE but its function is unknown. [AI]
Definition at line 117 of file legomesh.h.
LegoResult LegoMesh::Read | ( | LegoStorage * | p_storage | ) |
[AI] Reads mesh properties (color, alpha, shading, flags, names) from the given storage stream.
[AI] This method deserializes the mesh data, loading color, alpha, shading, unknown properties, texture and material names, from a LegoStorage. [AI]
p_storage | Storage source to read from. [AI] |
Definition at line 39 of file legomesh.cpp.
|
inline |
[AI] Sets the mesh's primary color.
p_color | New color value. [AI] |
Definition at line 75 of file legomesh.h.
|
inline |
[AI] Sets the shading mode.
p_shading | New shading mode (should be one of the enum values). [AI] |
Definition at line 93 of file legomesh.h.
|
protected |
[AI] Mesh transparency (0=transparent, 1=opaque).
Definition at line 131 of file legomesh.h.
|
protected |
[AI] The main (diffuse) color of the mesh.
Definition at line 130 of file legomesh.h.
|
protected |
[AI] Name of material resource, null if none; string is lowercase.
Definition at line 137 of file legomesh.h.
|
protected |
[AI] Shading mode (see enum above).
Definition at line 132 of file legomesh.h.
|
protected |
[AI] Name of texture resource, null if none; string is lowercase.
Definition at line 136 of file legomesh.h.
|
protected |
[AI] Unknown property/flag at offset 0x0d.
Definition at line 133 of file legomesh.h.
|
protected |
[AI] Unknown pointer; owned; deleted in destructor. [AI]
Definition at line 134 of file legomesh.h.
|
protected |
[AI] Unknown 4-byte field; unused. [AI]
Definition at line 135 of file legomesh.h.
|
protected |
[AI] Single unused/padding byte.
Definition at line 138 of file legomesh.h.
|
protected |
[AI] Unknown boolean property; function unknown.
Definition at line 139 of file legomesh.h.