Exemplo n.º 1
0
void fullRotation(Cube *cube, int rotation, int print){
  Rotate *rotate = createRotation(cube, rotation);
  faceSideRotation(cube, rotate);
  faceRotation(rotate->direction, rotate->face);
	if(print == 1)		
		switch(rotation){
			case U:
				printf("U	:UpFace Clockwise.\n");
				break;
			case Ui:
				printf("Ui	:UpFace Anti-Clockwise.\n");
				break;
			case L:
				printf("L	:LeftFace Clockwise.\n");
				break;
			case Li:
				printf("Li	:LeftFace Anti-Clockwise.\n");
				break;
			case F:
				printf("F	:FrontFace Clockwise.\n");
				break;
			case Fi:
				printf("Fi	:FrontFace Anti-Clockwise.\n");
				break;
			case R:
				printf("R	:RightFace Clockwise.\n");
				break;
			case Ri:
				printf("Ri	:RightFace Anti-Clockwise.\n");
				break;
			case D:
				printf("D	:DownFace Clockwise.\n");
				break;
			case Di:
				printf("Di	:DownFace Anti-Clockwise.\n");
				break;
			case B:
				printf("B	:BackFace Clockwise.\n");
				break;
			case Bi:
				printf("Bi	:BackFace Anti-Clockwise.\n");
				break;
		}
}
Exemplo n.º 2
0
void Matrix::rotate(const Vector3& axis, float angle, Matrix* dst) const
{
    Matrix r;
    createRotation(axis, angle, &r);
    multiply(*this, r, dst);
}
Exemplo n.º 3
0
void Matrix::rotate(const Quaternion& q, Matrix* dst) const
{
    Matrix r;
    createRotation(q, &r);
    multiply(*this, r, dst);
}
 // --------------------------------------------
 RotateHelper::RotateHelper( MEulerRotation rotation )
 :	rotation ( rotation )
 {
     createRotation ();
 }
Exemplo n.º 5
0
void Mat4::rotate(const Vec3& axis, float angle, Mat4* dst) const
{
    Mat4 r;
    createRotation(axis, angle, &r);
    multiply(*this, r, dst);
}
 Rotation2D Rotation2D::rotate(double radians) const {
     return *this * createRotation(radians);
 }