Rise
The Vieneo Province
Loading...
Searching...
No Matches
buildings Class Reference

#include <buildings.h>

Collaboration diagram for buildings:
[legend]

Public Member Functions

 buildings (Viewscreen *ptr)
 ~buildings ()
void OnDestroyDevice ()
HRESULT Building (short t, short s)
void Sort ()
void CollectTerrainObstacles (std::vector< TerrainAwareness::Obstacle > &result) const
void RemoveBuildZone (size_t ordinal)
void RenderRts (Rendering::RenderDevice *pd3dDevice, float lightFromStreet) const
void RenderCurbs (Rendering::RenderDevice *pd3dDevice, float lightFromStreet) const
void RenderRocks (Rendering::RenderDevice *pd3dDevice) const
bool CheckCollision (short buildZoneOrdinal, RiseMath::Vector3 position, RiseMath::Vector3 velocity, float bound, float ElapsedTime, RiseMath::Vector3 *cross) const
void DamageLandingLightContacts (const RiseMath::Vector3 &velocity, float seconds) const
float CheckRtsBumpMap (VECTOR2SHORT rts, VECTOR2SHORT bump, short u, short v)
void Render (Rendering::RenderDevice *pd3dDevice, double *fTime, bool drawTransparancy) const
void RenderLights (Rendering::RenderDevice *pd3dDevice, const double *fTime) const
void BuildCurbs (VECTOR2SHORT rts)
void BuildRocks ()

Static Public Member Functions

static bool CheckLayout (unsigned i, LOCALGRID2 localgrid2)

Public Attributes

bool g_bRoad = false

Private Member Functions

float determinant (float A[8][8], int n) const
void adjoint (float A[8][8], float adj[8][8]) const
void inverse (float A[8][8], float inverse[8][8]) const
void getCofactor (float A[8][8], float temp[8][8], int p, int q, int n) const
void BuildCurb (VECTOR2SHORT rts, short rtsu, short rtsv)
void BuildRock (short rtsu, short rtsv)

Static Private Member Functions

static void PushRocksOffRoad (unsigned char roads, unsigned char zone, float *leftToRight, float *topToBottom)
static void PushRocksOffRunway (short gridu, short gridv, unsigned char zone, float *leftToRight, float *topToBottom)

Private Attributes

Viewscreen * viewscreen
Logger * logger
std::vector< BUILDZONE > buildzones
Rendering::RunwayLights11 runwayLightBatch
std::vector< Rendering::RunwayLightInstance11 > runwayLightInstances
std::vector< size_t > sortme
Rendering::RenderBuffer * curbVB [lclC][lclC] = {}
Rendering::RenderBuffer * rockVB [lclC][lclC] = {}
short curbTexture [lclC][lclC] = {}
RiseMath::Vector3 curbTerpos = {}
RiseMath::Vector3 rockTerpos = {}
UINT curbPrims [lclC][lclC] = {}
UINT rockPrims [lclC][lclC] = {}
GeometryBounds curbBounds [lclC][lclC]
GeometryBounds rockBounds [lclC][lclC]
RiseVertex2Vertex * rockVertexBuffer = nullptr
unsigned short rockComponents = 0
s_mesh_component * rockComponentArray = nullptr
unsigned char oldZone = 0

Detailed Description

Definition at line 59 of file buildings.h.

Constructor & Destructor Documentation

◆ buildings()

buildings::buildings ( Viewscreen * ptr)

Definition at line 20 of file buildings.cpp.

Here is the call graph for this function:

◆ ~buildings()

buildings::~buildings ( )

Definition at line 142 of file buildings.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ adjoint()

void buildings::adjoint ( float A[8][8],
float adj[8][8] ) const
private

Definition at line 214 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildCurb()

void buildings::BuildCurb ( VECTOR2SHORT rts,
short rtsu,
short rtsv )
private

Definition at line 2602 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildCurbs()

void buildings::BuildCurbs ( VECTOR2SHORT rts)

Definition at line 2555 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Building()

HRESULT buildings::Building ( short t,
short s )
Todo
should be a simpler way ... for example 0-1 x and 0-1 y ... if x+y>1 then we know we have crossed the line!

Definition at line 281 of file buildings.cpp.

Here is the caller graph for this function:

◆ BuildRock()

void buildings::BuildRock ( short rtsu,
short rtsv )
private

Definition at line 2969 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildRocks()

void buildings::BuildRocks ( )

Definition at line 2580 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckCollision()

bool buildings::CheckCollision ( short buildZoneOrdinal,
RiseMath::Vector3 position,
RiseMath::Vector3 velocity,
float bound,
float ElapsedTime,
RiseMath::Vector3 * cross ) const

Definition at line 1997 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckLayout()

bool buildings::CheckLayout ( unsigned i,
LOCALGRID2 localgrid2 )
static

Definition at line 171 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckRtsBumpMap()

float buildings::CheckRtsBumpMap ( VECTOR2SHORT rts,
VECTOR2SHORT bump,
short u,
short v )

Definition at line 1773 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CollectTerrainObstacles()

void buildings::CollectTerrainObstacles ( std::vector< TerrainAwareness::Obstacle > & result) const

Definition at line 3242 of file buildings.cpp.

Here is the caller graph for this function:

◆ DamageLandingLightContacts()

void buildings::DamageLandingLightContacts ( const RiseMath::Vector3 & velocity,
float seconds ) const

Definition at line 1930 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ determinant()

float buildings::determinant ( float A[8][8],
int n ) const
private

Definition at line 188 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCofactor()

void buildings::getCofactor ( float A[8][8],
float temp[8][8],
int p,
int q,
int n ) const
private

Definition at line 254 of file buildings.cpp.

Here is the caller graph for this function:

◆ inverse()

void buildings::inverse ( float A[8][8],
float inverse[8][8] ) const
private

Definition at line 237 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnDestroyDevice()

void buildings::OnDestroyDevice ( )

Definition at line 155 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PushRocksOffRoad()

void buildings::PushRocksOffRoad ( unsigned char roads,
unsigned char zone,
float * leftToRight,
float * topToBottom )
staticprivate

Definition at line 2936 of file buildings.cpp.

Here is the caller graph for this function:

◆ PushRocksOffRunway()

void buildings::PushRocksOffRunway ( short gridu,
short gridv,
unsigned char zone,
float * leftToRight,
float * topToBottom )
staticprivate

Definition at line 2897 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveBuildZone()

void buildings::RemoveBuildZone ( size_t ordinal)

Definition at line 1508 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Render()

void buildings::Render ( Rendering::RenderDevice * pd3dDevice,
double * fTime,
bool drawTransparancy ) const

@warn so this won't work because the distance is to the center of the build zone not the individual components

Definition at line 2081 of file buildings.cpp.

Here is the caller graph for this function:

◆ RenderCurbs()

void buildings::RenderCurbs ( Rendering::RenderDevice * pd3dDevice,
float lightFromStreet ) const

Definition at line 1658 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RenderLights()

void buildings::RenderLights ( Rendering::RenderDevice * pd3dDevice,
const double * fTime ) const

Definition at line 2382 of file buildings.cpp.

Here is the caller graph for this function:

◆ RenderRocks()

void buildings::RenderRocks ( Rendering::RenderDevice * pd3dDevice) const

Definition at line 1725 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RenderRts()

void buildings::RenderRts ( Rendering::RenderDevice * pd3dDevice,
float lightFromStreet ) const

Definition at line 1563 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sort()

void buildings::Sort ( )

Definition at line 1470 of file buildings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ buildzones

std::vector<BUILDZONE> buildings::buildzones
private

Definition at line 87 of file buildings.h.

◆ curbBounds

GeometryBounds buildings::curbBounds[lclC][lclC]
private

Definition at line 98 of file buildings.h.

◆ curbPrims

UINT buildings::curbPrims[lclC][lclC] = {}
private

Definition at line 96 of file buildings.h.

◆ curbTerpos

RiseMath::Vector3 buildings::curbTerpos = {}
private

Definition at line 94 of file buildings.h.

◆ curbTexture

short buildings::curbTexture[lclC][lclC] = {}
private

Definition at line 93 of file buildings.h.

◆ curbVB

Rendering::RenderBuffer* buildings::curbVB[lclC][lclC] = {}
private

Definition at line 91 of file buildings.h.

◆ g_bRoad

bool buildings::g_bRoad = false

Definition at line 62 of file buildings.h.

◆ logger

Logger* buildings::logger
private

Definition at line 85 of file buildings.h.

◆ oldZone

unsigned char buildings::oldZone = 0
private

Definition at line 102 of file buildings.h.

◆ rockBounds

GeometryBounds buildings::rockBounds[lclC][lclC]
private

Definition at line 98 of file buildings.h.

◆ rockComponentArray

s_mesh_component* buildings::rockComponentArray = nullptr
private

Definition at line 101 of file buildings.h.

◆ rockComponents

unsigned short buildings::rockComponents = 0
private

Definition at line 100 of file buildings.h.

◆ rockPrims

UINT buildings::rockPrims[lclC][lclC] = {}
private

Definition at line 97 of file buildings.h.

◆ rockTerpos

RiseMath::Vector3 buildings::rockTerpos = {}
private

Definition at line 95 of file buildings.h.

◆ rockVB

Rendering::RenderBuffer* buildings::rockVB[lclC][lclC] = {}
private

Definition at line 92 of file buildings.h.

◆ rockVertexBuffer

RiseVertex2Vertex* buildings::rockVertexBuffer = nullptr
private

Definition at line 99 of file buildings.h.

◆ runwayLightBatch

Rendering::RunwayLights11 buildings::runwayLightBatch
mutableprivate

Definition at line 88 of file buildings.h.

◆ runwayLightInstances

std::vector<Rendering::RunwayLightInstance11> buildings::runwayLightInstances
mutableprivate

Definition at line 89 of file buildings.h.

◆ sortme

std::vector<size_t> buildings::sortme
private

Definition at line 90 of file buildings.h.

◆ viewscreen

Viewscreen* buildings::viewscreen
private

Definition at line 84 of file buildings.h.


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