Esempio n. 1
0
void MoveShell(YsShell &sh,YsVec3 &mov)
{
	YsMatrix4x4 mat,trn,viw,iViw;

	sh.GetMatrix(mat);

	viw=eyeAtt.GetMatrix();
	iViw=viw;
	iViw.Invert();

	trn.Initialize();
	trn.Translate(mov);

	mat=viw*trn*iViw*mat;

	sh.SetMatrix(mat);
}
Esempio n. 2
0
void RotateShell(YsShell &sh,double pitch,double yaw)
{
	YsMatrix4x4 mat,rot,viw,iViw;

	sh.GetMatrix(mat);

	viw=eyeAtt.GetMatrix();
	iViw=viw;
	iViw.Invert();

	rot.Initialize();
	rot.RotateZY(pitch);
	rot.RotateXZ(yaw);

	mat=viw*rot*iViw*mat;

	sh.SetMatrix(mat);
}