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

Cell class used to store shapes as an vector array of Vector3Ds. More...

#include <Cell.h>

Public Member Functions

 Cell ()
 
 Cell (uint8_t No_Vertices, Vector3D *vectors, float)
 
 ~Cell ()
 
 Cell (const Cell &)
 
const Celloperator= (const Cell &)
 
Vector3D Get_VecPtrs (int)
 
void Set_VecPtrs (int, Vector3D)
 
char Get_Number_Of_Vertices ()
 
void Set_density (float)
 
float COG_Of_Cell ()
 
float Volume_Of_Cell ()
 
float Weight_Of_Cell ()
 

Detailed Description

Cell class used to store shapes as an vector array of Vector3Ds.

Constructor & Destructor Documentation

◆ Cell() [1/3]

Cell::Cell ( )

Blank Cell constructor with no parameters

◆ Cell() [2/3]

Cell::Cell ( uint8_t  No_Vertices,
Vector3D vectors,
float  Density_Value 
)

Constructor with parameters

Parameters
(uint8_t)Vertice count
(Vector3D)array of vector objects
(float)Density value

◆ ~Cell()

Cell::~Cell ( )

Cell Destructor

◆ Cell() [3/3]

Cell::Cell ( const Cell Cell_object)

Copy Constructor

Parameters
(Cell)Cell object

Member Function Documentation

◆ COG_Of_Cell()

float Cell::COG_Of_Cell ( )

Unfinished function that returns the centre of gravity of the Cell

Returns
(float) centre of gravity

◆ Get_Number_Of_Vertices()

char Cell::Get_Number_Of_Vertices ( )

Returns the number of vertices

Returns
(char) Number of vertices

◆ Get_VecPtrs()

Vector3D Cell::Get_VecPtrs ( int  index)

Returns a Vector3D at a certain position in the Cell array

Parameters
(int)Position of Vector3D in the Cell array
Returns
(Vector3D) The Vector3D that is returned

◆ operator=()

const Cell & Cell::operator= ( const Cell Cell_object)

Copy operator Assign the contects of one cell to another

Syntax: a = b;

Parameters
(Cell)Cell to be copied
Returns
(Cell) Cell to be copied to

◆ Set_density()

void Cell::Set_density ( float  density_value)

Sets the density of the Cell

Parameters
(float)density value

◆ Set_VecPtrs()

void Cell::Set_VecPtrs ( int  index,
Vector3D  Vector_Object 
)

Assigns a Vector3D at a defined place in the Vector3D array in the Cell

Parameters
(int)Array position of the Vector3D
(Vector3D)The Vector3D object that is going to be inserted into the array

◆ Volume_Of_Cell()

float Cell::Volume_Of_Cell ( )

Unfinished function that returns the volume of the Cell

Returns
(float) volume

◆ Weight_Of_Cell()

float Cell::Weight_Of_Cell ( )

Unfinished function that returns the weight of the Cell

Returns
(float) weight

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