DC/RTS Documentation  v1.62
A Unity3D System Incorporating the Functionality of a Dungeon Crawler or Real Time Strategy System
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
GridGenerator.GridSquare Class Reference

Represents a 3D GridSquare within the xz-plane. More...

Public Member Functions

 GridSquare (GridGenerator parent, int r, int c, float slope, int[] quad, Vector3 LL, Vector3 LR, Vector3 UL, Vector3 UR)
 Generates a GridSquare. More...
 
void calculateAdjacentSquares ()
 Calculates the Adjacent Squares to this GridSquare. More...
 
GridSquareQuadrant getQuadrant ()
 Retrieves the Quadrant this GridSquare lies in. More...
 
Vector3 getGridSquareLowerLeft ()
 Retrieves the Lower Left vector of this GridSquare. More...
 
Vector3 getGridSquareLowerRight ()
 Retrieves the Lower Right vector of this GridSquare. More...
 
Vector3 getGridSquareUpperLeft ()
 Retrieves the Upper Left vector of this GridSquare. More...
 
Vector3 getGridSquareUpperRight ()
 Retrieves the Upper Right vector of this GridSquare. More...
 
Vector3 getGridSquareCentralOrigin ()
 Retrieves the Center vector of this GridSquare. More...
 
float getSlopeValue ()
 Retrieves this GridSquare's Sloped Value. More...
 
void setFMovementCost (int val)
 Sets this GridSquare's F Score. More...
 
void setGMovementCost (int val)
 Sets this GridSquare's G Score. More...
 
void setHMovementCost (int val)
 Sets this GridSquare's Heuristic value. More...
 
int getFMovementCost ()
 Retrieves this GridSquare's F Score (F = G + H). More...
 
int getGMovementCost ()
 Retrieves this GridSquare's G Score (Squares between this square and the initial square). More...
 
int getHMovementCost ()
 Retrieves this GridSquare's Heuristic value. More...
 
int getRow ()
 Retrieves the Row Value of this GridSquare. More...
 
int getColumn ()
 Retrieves the Column Value of this GridSquare. More...
 
List< GridSquaregetAdjacentSquares ()
 Retrieves this GridSquare's Adjacent GridSquares. More...
 

Properties

GridSquare ParentObject [get, set]
 Allows retrieval and setting of the ParentSquare of this GridSquare. More...
 
bool isOnOpenList [get, set]
 Allows retrieval and setting of whether this GridSquare lies on a OpenList. More...
 
bool isOnCloseList [get, set]
 Allows retrieval and setting of whether this GridSquare lies on a CloseList. More...
 

Detailed Description

Represents a 3D GridSquare within the xz-plane.

xz-plane
upperLeft ---- w ---- upperRight
          |   /     |   /
         d|  /      |d /
          | h       | h
          |/        |/
lowerLeft ---- w ---- lowerRight

Each GridSquare is Attached to a GridSquareQuadrant.

Constructor & Destructor Documentation

GridGenerator.GridSquare.GridSquare ( GridGenerator  parent,
int  r,
int  c,
float  slope,
int[]  quad,
Vector3  LL,
Vector3  LR,
Vector3  UL,
Vector3  UR 
)

Generates a GridSquare.

Parameters
parentParent GridGenerator
rThe Row of this GridSquare
cThe Column of this GridSquare
slopeThe Slope of this GridSquare
quadThe Two Element integer array for the Quadrant coordinates this GridSquare lies in
LLThis GridSquare's LowerLeft corner
LRThis GridSquare's LowerRight corner
ULThis GridSquare's UpperLeft corner
URThis GridSquare's UpperRight corner

Member Function Documentation

void GridGenerator.GridSquare.calculateAdjacentSquares ( )

Calculates the Adjacent Squares to this GridSquare.

List<GridSquare> GridGenerator.GridSquare.getAdjacentSquares ( )

Retrieves this GridSquare's Adjacent GridSquares.

Returns
List of Adjacent GridSquares
int GridGenerator.GridSquare.getColumn ( )

Retrieves the Column Value of this GridSquare.

Returns
Column Value
int GridGenerator.GridSquare.getFMovementCost ( )

Retrieves this GridSquare's F Score (F = G + H).

Returns
F Score Value
int GridGenerator.GridSquare.getGMovementCost ( )

Retrieves this GridSquare's G Score (Squares between this square and the initial square).

Returns
G Score Value
Vector3 GridGenerator.GridSquare.getGridSquareCentralOrigin ( )

Retrieves the Center vector of this GridSquare.

Vector3 GridGenerator.GridSquare.getGridSquareLowerLeft ( )

Retrieves the Lower Left vector of this GridSquare.

Vector3 GridGenerator.GridSquare.getGridSquareLowerRight ( )

Retrieves the Lower Right vector of this GridSquare.

Vector3 GridGenerator.GridSquare.getGridSquareUpperLeft ( )

Retrieves the Upper Left vector of this GridSquare.

Vector3 GridGenerator.GridSquare.getGridSquareUpperRight ( )

Retrieves the Upper Right vector of this GridSquare.

int GridGenerator.GridSquare.getHMovementCost ( )

Retrieves this GridSquare's Heuristic value.

Returns
Heuristic Value
GridSquareQuadrant GridGenerator.GridSquare.getQuadrant ( )

Retrieves the Quadrant this GridSquare lies in.

int GridGenerator.GridSquare.getRow ( )

Retrieves the Row Value of this GridSquare.

Returns
Row Value
float GridGenerator.GridSquare.getSlopeValue ( )

Retrieves this GridSquare's Sloped Value.

void GridGenerator.GridSquare.setFMovementCost ( int  val)

Sets this GridSquare's F Score.

(F = G + H).

void GridGenerator.GridSquare.setGMovementCost ( int  val)

Sets this GridSquare's G Score.

void GridGenerator.GridSquare.setHMovementCost ( int  val)

Sets this GridSquare's Heuristic value.

Property Documentation

bool GridGenerator.GridSquare.isOnCloseList
getset

Allows retrieval and setting of whether this GridSquare lies on a CloseList.

bool GridGenerator.GridSquare.isOnOpenList
getset

Allows retrieval and setting of whether this GridSquare lies on a OpenList.

GridSquare GridGenerator.GridSquare.ParentObject
getset

Allows retrieval and setting of the ParentSquare of this GridSquare.


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