Ejemplo n.º 1
0
void cCamera::Init(int w,int h,float s)
{
	//Init with standard OGL values:
	Position = cVector3D(0.0f,0.0f, 0.0f);
	ViewDir  = cVector3D(0.0f,0.0f,-1.0f);
	ViewDirChanged = false;
	//Only to be sure:
	RotatedX = RotatedY = RotatedZ = 0.0f;
	//Screen
	width = w;
	height = h;
	//Step length
	SetSpeed(s);
}
Ejemplo n.º 2
0
void cCamera::Init(int cx,int cy,float s)
{
	//Init with standard OGL values:
	Position = cVector3D(0.0,40.0,0.0);
	ViewDir  = cVector3D(0.0,0.0,-1.0);
	ViewDirChanged = false;
	//Only to be sure:
	RotatedX = RotatedY = RotatedZ = 0.0;
	//Screen
	middleX = cx;
	middleY = cy;
	//Step length
	speed = s;


	jumping = false;
}
Ejemplo n.º 3
0
void cCamera::GetRotated(cVector3D *rot)
{
	*rot = cVector3D(RotatedX,RotatedY,RotatedZ);
}