3D Model Viewer
3D Model Viewer from Group 3
Model Class Reference

A model class used to load, store and save .MOD files. More...

#include <Model.h>

Public Member Functions

 Model ()
 
 ~Model ()
 
 Model (const Model &ModelCopy)
 
const Modeloperator= (const Model &ModelCopy)
 
bool LoadModelFile (const string fileName)
 
void SaveModelFile ()
 
void CalculateCentre ()
 
uint16_t GetNumOfVertices ()
 
uint16_t GetNumOfCells ()
 
uint16_t GetNumOfMaterials ()
 
uint16_t GetCellTypeCount (uint16_t cellType)
 
Vector3D GetModelCentre ()
 

Detailed Description

A model class used to load, store and save .MOD files.

Constructor & Destructor Documentation

◆ Model() [1/2]

Model::Model ( )

Blank Model constructor with no parameters

◆ ~Model()

Model::~Model ( )

Model destructor

◆ Model() [2/2]

Model::Model ( const Model ModelCopy)

Copy constructor

Parameters
(Model)Model object

Member Function Documentation

◆ CalculateCentre()

void Model::CalculateCentre ( )

Unfinished function to calculate the centre of the model and return its coordinates.

◆ GetCellTypeCount()

uint16_t Model::GetCellTypeCount ( uint16_t  cellType)

Returns the number of cells of the inputted type

Parameters
(uint16_t)cellType Type that wants to be counted (0 - Tetrahedron, 1 - Hexahedron, 2 - Pyramid)
Returns
(uint16_t) Cell count of either Tetrahedron, Hexahedron or Pyramid

◆ GetModelCentre()

Vector3D Model::GetModelCentre ( )

Unfinished function that will return the centre of the model

Returns
Model centre coordinates

◆ GetNumOfCells()

uint16_t Model::GetNumOfCells ( )

Returns the number of Cells in the Model.

Returns
(uint16_t) Number of vertices

◆ GetNumOfMaterials()

uint16_t Model::GetNumOfMaterials ( )

Returns the number of Materials in the Model.

Returns
(uint16_t) Number of materials

◆ GetNumOfVertices()

uint16_t Model::GetNumOfVertices ( )

Returns the number of Verticies in the Model.

◆ LoadModelFile()

bool Model::LoadModelFile ( const string  fileName)

Loads a model from a .mod file and stores it in the object.

Parameters
(string)fileName The full path of the file being opened
Returns
Returns 0 for pass and 1 for error

◆ operator=()

const Model & Model::operator= ( const Model ModelCopy)

Copy operator Assign the contents of one Model object to another.

Syntax: a = b;

Parameters
(Model)Model to be copied
Returns
(Model) Model to be copied to

◆ SaveModelFile()

void Model::SaveModelFile ( )

Unfinished function to save the Object and its data to a .mod file.


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