コード例 #1
0
ファイル: rotation.c プロジェクト: yenng/RubikCubeSolver
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;
		}
}
コード例 #2
0
ファイル: Matrix.cpp プロジェクト: teitei-tk/Cocos2d-js-Test
void Matrix::rotate(const Vector3& axis, float angle, Matrix* dst) const
{
    Matrix r;
    createRotation(axis, angle, &r);
    multiply(*this, r, dst);
}
コード例 #3
0
ファイル: Matrix.cpp プロジェクト: teitei-tk/Cocos2d-js-Test
void Matrix::rotate(const Quaternion& q, Matrix* dst) const
{
    Matrix r;
    createRotation(q, &r);
    multiply(*this, r, dst);
}
コード例 #4
0
 // --------------------------------------------
 RotateHelper::RotateHelper( MEulerRotation rotation )
 :	rotation ( rotation )
 {
     createRotation ();
 }
コード例 #5
0
ファイル: Mat4.cpp プロジェクト: 1005491398/Threes
void Mat4::rotate(const Vec3& axis, float angle, Mat4* dst) const
{
    Mat4 r;
    createRotation(axis, angle, &r);
    multiply(*this, r, dst);
}
コード例 #6
0
 Rotation2D Rotation2D::rotate(double radians) const {
     return *this * createRotation(radians);
 }