Sly Engine
TerrainCell Class Reference

#include <TerrainCell.h>

Collaboration diagram for TerrainCell:
Collaboration graph

Public Member Functions

 TerrainCell ()
 Default constructor. More...
 
 TerrainCell (const TerrainCell &)=delete
 Copy constructor. More...
 
 TerrainCell (TerrainCell &&)=delete
 Move constructor. More...
 
TerrainCelloperator= (const TerrainCell &)
 Assignment operator. More...
 
TerrainCelloperator= (TerrainCell &&)=delete
 Move assignment operator. More...
 
 ~TerrainCell ()=default
 Deconstructor. More...
 
 TerrainCell (int i, int j)
 Specialized constructor for passing the i and j coordinates. More...
 
CollisionVolumeAABBgetAABB ()
 Creates an AABB volume from the information stored and passes a reference. More...
 
void getIndex (int &outputI, int &outputJ)
 Gets the stored indices of i and j, outputs to arguments. More...
 
void SetIndex (int i, int j)
 Sets the indices of i and j. More...
 
void SetTerrain (TerrainObject *inputTerrain)
 Sets the terrain to be held within the object. More...
 
bool operator== (const TerrainCell &otherCell) const
 Equality operator for two cells. More...
 

Private Attributes

int i
 
int j
 
TerrainObjectterrain
 
CollisionVolumeAABB aabb
 

Constructor & Destructor Documentation

◆ TerrainCell() [1/4]

TerrainCell::TerrainCell ( )

Default constructor.

◆ TerrainCell() [2/4]

TerrainCell::TerrainCell ( const TerrainCell )
delete

Copy constructor.

◆ TerrainCell() [3/4]

TerrainCell::TerrainCell ( TerrainCell &&  )
delete

Move constructor.

◆ ~TerrainCell()

TerrainCell::~TerrainCell ( )
default

Deconstructor.

◆ TerrainCell() [4/4]

TerrainCell::TerrainCell ( int  i,
int  j 
)

Specialized constructor for passing the i and j coordinates.

Parameters
iZero-based index of the.
jAn int to process.

Member Function Documentation

◆ getAABB()

CollisionVolumeAABB & TerrainCell::getAABB ( )

Creates an AABB volume from the information stored and passes a reference.

Returns
An AABB
Here is the call graph for this function:

◆ getIndex()

void TerrainCell::getIndex ( int &  outputI,
int &  outputJ 
)

Gets the stored indices of i and j, outputs to arguments.

Parameters
[in,out]outputIThe output i.
[in,out]outputJThe output j.
Here is the caller graph for this function:

◆ operator=() [1/2]

TerrainCell & TerrainCell::operator= ( const TerrainCell otherCell)

Assignment operator.

◆ operator=() [2/2]

TerrainCell& TerrainCell::operator= ( TerrainCell &&  )
delete

Move assignment operator.

◆ operator==()

bool TerrainCell::operator== ( const TerrainCell otherCell) const

Equality operator for two cells.

Parameters
otherCellThe other cell.
Returns
True if the parameters are considered equivalent.

Primarily used within comparison checking of two iterators (whether or not the cells they hold are equivalent).

◆ SetIndex()

void TerrainCell::SetIndex ( int  i,
int  j 
)

Sets the indices of i and j.

Parameters
iZero-based index of the.
jAn int to process.
Here is the caller graph for this function:

◆ SetTerrain()

void TerrainCell::SetTerrain ( TerrainObject inputTerrain)

Sets the terrain to be held within the object.

Parameters
[in,out]inputTerrainIf non-null, the input terrain.
Here is the caller graph for this function:

Member Data Documentation

◆ aabb

CollisionVolumeAABB TerrainCell::aabb
private

◆ i

int TerrainCell::i
private

◆ j

int TerrainCell::j
private

◆ terrain

TerrainObject* TerrainCell::terrain
private

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