Ejemplo n.º 1
0
void ControlRoom::InitGameObjects()
{	
	
	addCollisionGameObject(Vector3D(-40, GetGroundLevel()+350, 750), Vector3D(), Vector3D(60,300,50), Vector3D(0.2,0.3,0.3), Vector3D(), mLadder, GetTexture()->getTextureID(taRustyWall), 1, 1, mIndexLadder);
	addCollisionGameObject(Vector3D(-40, GetGroundLevel()+65, 750), Vector3D(), Vector3D(60,300,50), Vector3D(0.2,0.3,0.3), Vector3D(), mLadder, GetTexture()->getTextureID(taRustyWall), 1, 1, mIndexLadder);
	addCollisionGameObject(Vector3D(-100, GetGroundLevel()+5, -700), Vector3D(), Vector3D(300,300,200), Vector3D(0.2,0.2,0.2), Vector3D(), mConsole,  GetTexture()->getTextureID(taConsole), 1, 1, mIndexConsole);
		
	InitWalls();
	InitFloor();
}
Ejemplo n.º 2
0
void ControlRoom::InitFloor()
{
	int test = 0;
	addCollisionGameObject(Vector3D(-400, GetGroundLevel(), -600), Vector3D(), Vector3D(800, 0, 1200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilefloor), 2, 2, test); //floor
	addCollisionGameObject(Vector3D(-200, GetGroundLevel(), -800), Vector3D(), Vector3D(400, 0, 200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilefloor), 1, 0.5, test);
	//addCollisionGameObject(Vector3D(-200, GetGroundLevel(), 600), Vector3D(), Vector3D(400, 0, 200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilefloor), 1, 1, test);
	//position, movement, size, size, scale, rotation, model, texure

	//FLOOR			x,		y = 0,	z,		positive size
	//RIGHTWALL		x = 0,	y,		z,		0, +ve, +ve
	//LEFTWALL		x = 0,	y,		z,		0, +ve, -ve
	//FARWALL		x,		y = 0,		z,	+ve, +ve, 0
	//CLOSEWALL		x,		y = 0,		z,	-ve, +ve, 0
}
Ejemplo n.º 3
0
void ControlRoom::InitWalls()
{
	int test = 0;
	int height = 700;

	addCollisionGameObject(Vector3D(400, GetGroundLevel(), -600), Vector3D(), Vector3D(0, height, 1200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 2, 1, test); //rightwall
	addCollisionGameObject(Vector3D(-400, GetGroundLevel(), 600), Vector3D(), Vector3D(0, height, -1200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 2, 1, test); //leftwall

	addCollisionGameObject(Vector3D(-400, GetGroundLevel(), -600), Vector3D(), Vector3D(200, height, 0), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 0.5, 1, test); //topwall
	addCollisionGameObject(Vector3D(200, GetGroundLevel(), -600), Vector3D(), Vector3D(200, height, 0), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 0.5, 1, test); 
	addCollisionGameObject(Vector3D(-200, GetGroundLevel(), -800), Vector3D(), Vector3D(400, height, 0), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 1, 1, test);
	addCollisionGameObject(Vector3D(200, GetGroundLevel(), -800), Vector3D(), Vector3D(0, height, 200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 0.5, 1, test);
	addCollisionGameObject(Vector3D(-200, GetGroundLevel(), -600), Vector3D(), Vector3D(0, height, -200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 0.5, 1, test);

	addCollisionGameObject(Vector3D(400, GetGroundLevel(), 600), Vector3D(), Vector3D(-200, height, 0), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 1, 1, test); //bottomwall
	addCollisionGameObject(Vector3D(-200, GetGroundLevel(), 600), Vector3D(), Vector3D(-200, height, 0), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 1, 1, test);
	addCollisionGameObject(Vector3D(200, GetGroundLevel(), 800), Vector3D(), Vector3D(-400, height, 0), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 1, 1, test);
	addCollisionGameObject(Vector3D(200, GetGroundLevel(), 600), Vector3D(), Vector3D(0, height, 200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 2, 1, test);
	addCollisionGameObject(Vector3D(-200, GetGroundLevel(), 800), Vector3D(), Vector3D(0, height, -200), Vector3D(), Vector3D(), -1, GetTexture()->getTextureID(taTilewall), 2, 1, test);

}
Ejemplo n.º 4
0
// Return TRUE if the specified position in 3-space is under the terrain
BOOL TViewPoint::UnderGround( Tpoint *position )
{
    return ( position->z >= GetGroundLevel( position->x, position->y ) );
}