# Khaotic Engine Reborn: ModelListClass Class Reference

Loading...
Searching...
No Matches
ModelListClass Class Reference

## Public Member Functions

| ModelListClass (const ModelListClass &)
void | Initialize (int)
void | Shutdown ()
int | GetModelCount ()
void | GetData (int, float &, float &, float &)

## Detailed Description

Definition at line 15 of file Modellistclass.h.

## Constructor & Destructor Documentation

## ModelListClass() [1/2]

ModelListClass::ModelListClass | ( |  | ) |

Definition at line 4 of file Modellistclass.cpp.

{
m_ModelInfoList = 0;
}

## ModelListClass() [2/2]

ModelListClass::ModelListClass | ( | const ModelListClass & | other | ) |

Definition at line 10 of file Modellistclass.cpp.

{
}

## ~ModelListClass()

ModelListClass::~ModelListClass | ( |  | ) |

Definition at line 15 of file Modellistclass.cpp.

{
}

## Member Function Documentation

## GetData()

void ModelListClass::GetData | ( | int | index,
|  | float & | positionX,
|  | float & | positionY,
|  | float & | positionZ )

Definition at line 63 of file Modellistclass.cpp.

{
positionX = m_ModelInfoList[index].positionX;
positionY = m_ModelInfoList[index].positionY;
positionZ = m_ModelInfoList[index].positionZ;
return;
}

## GetModelCount()

int ModelListClass::GetModelCount | ( |  | ) |

Definition at line 58 of file Modellistclass.cpp.

{
return m_modelCount;
}

## Initialize()

void ModelListClass::Initialize | ( | int | numModels | ) |

Definition at line 20 of file Modellistclass.cpp.

{
int i;
// Store the number of models.
m_modelCount = numModels;
// Create a list array of the model information.
m_ModelInfoList = new ModelInfoType[m_modelCount];
// Seed the random generator with the current time.
srand((unsigned int)time(NULL));
// Go through all the models and randomly generate the position.
for (i = 0; i < m_modelCount; i++)
{
// Generate a random position in front of the viewer for the mode.
m_ModelInfoList[i].positionX = (((float)rand() - (float)rand()) / RAND_MAX) * 10.0f;
m_ModelInfoList[i].positionY = (((float)rand() - (float)rand()) / RAND_MAX) * 10.0f;
m_ModelInfoList[i].positionZ = ((((float)rand() - (float)rand()) / RAND_MAX) * 10.0f) + 5.0f;
}
return;
}

## Shutdown()

void ModelListClass::Shutdown | ( |  | ) |

Definition at line 46 of file Modellistclass.cpp.

{
// Release the model information list.
if (m_ModelInfoList)
{
delete[] m_ModelInfoList;
m_ModelInfoList = 0;
}
return;
}

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

- enginecustom/src/inc/system/Modellistclass.h
- enginecustom/src/src/system/Modellistclass.cpp