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

[AI] Represents a 3D model entry in a model database, including metadata and spatial transform info. More...

#include <modeldb.h>

Public Member Functions

void Free ()
 [AI] Frees dynamically allocated memory in the model (model name and presenter name). More...
 
MxResult Read (FILE *p_file)
 [AI] Loads a ModelDbModel from the current file pointer. More...
 

Public Attributes

char * m_modelName
 [AI] Name of the model, dynamically allocated. [AI] More...
 
MxU32 m_modelDataLength
 [AI] Length of the model's raw data in the file, in bytes. [AI] More...
 
MxU32 m_modelDataOffset
 [AI] File offset to the model's raw data. [AI] More...
 
char * m_presenterName
 [AI] Name of the presenter/handler class used for this model, dynamically allocated. [AI] More...
 
float m_location [3]
 [AI] World-space position of the model origin (as a 3D vector). [AI] More...
 
float m_direction [3]
 [AI] World-space direction vector (indicates model "forward" direction). [AI] More...
 
float m_up [3]
 [AI] World-space up vector (indicates model "up" orientation). [AI] More...
 
undefined m_unk0x34
 [AI] Unknown field, possibly additional flags or type (purpose currently unknown). [AI] More...
 

Detailed Description

[AI] Represents a 3D model entry in a model database, including metadata and spatial transform info.

[AI] Contains model name, presenter name, raw data info, and transformation (location, direction, up) for placement in the world.

Definition at line 132 of file modeldb.h.

Member Function Documentation

◆ Free()

void ModelDbModel::Free ( )

[AI] Frees dynamically allocated memory in the model (model name and presenter name).

[AI] Should be called before deleting or reusing this struct to avoid memory leaks.

Definition at line 11 of file modeldb.cpp.

◆ Read()

MxResult ModelDbModel::Read ( FILE *  p_file)

[AI] Loads a ModelDbModel from the current file pointer.

[AI] Reads string names, data offsets and lengths, and transformation vectors from the binary format.

Parameters
p_fileFile pointer from which to read the model entry. [AI]
Returns
SUCCESS if load is successful, FAILURE otherwise. [AI]

Definition at line 18 of file modeldb.cpp.

Member Data Documentation

◆ m_direction

float ModelDbModel::m_direction[3]

[AI] World-space direction vector (indicates model "forward" direction). [AI]

Definition at line 152 of file modeldb.h.

◆ m_location

float ModelDbModel::m_location[3]

[AI] World-space position of the model origin (as a 3D vector). [AI]

Definition at line 151 of file modeldb.h.

◆ m_modelDataLength

MxU32 ModelDbModel::m_modelDataLength

[AI] Length of the model's raw data in the file, in bytes. [AI]

Definition at line 148 of file modeldb.h.

◆ m_modelDataOffset

MxU32 ModelDbModel::m_modelDataOffset

[AI] File offset to the model's raw data. [AI]

Definition at line 149 of file modeldb.h.

◆ m_modelName

char* ModelDbModel::m_modelName

[AI] Name of the model, dynamically allocated. [AI]

Definition at line 147 of file modeldb.h.

◆ m_presenterName

char* ModelDbModel::m_presenterName

[AI] Name of the presenter/handler class used for this model, dynamically allocated. [AI]

Definition at line 150 of file modeldb.h.

◆ m_unk0x34

undefined ModelDbModel::m_unk0x34

[AI] Unknown field, possibly additional flags or type (purpose currently unknown). [AI]

Definition at line 154 of file modeldb.h.

◆ m_up

float ModelDbModel::m_up[3]

[AI] World-space up vector (indicates model "up" orientation). [AI]

Definition at line 153 of file modeldb.h.


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