XNA4Primitives3DOrientation

XNA4Primitives3DOrientation
CreateFromYawPitchRoll – rotations in local coordinate system
CreateRotationX/Y/Z multiplication – rotations in world coordinate system

Matrix R1, R2, Rx, Ry, Rz;
Ry = Matrix.CreateRotationY(MathHelper.ToRadians(60.0));
Rx = Matrix.CreateRotationX(MathHelper.ToRadians(30.0));
Rz = Matrix.CreateRotationZ(MathHelper.ToRadians(45.0));
R1 = Ry * Rx * Rz;
R2 = Matrix.CreateFromYawPitchRoll(MathHelper.ToRadians(60.0),
      MathHelper.ToRadians(30.0),
      MathHelper.ToRadians(45));
R1 != R2
9169834143.zip

HW1

HW1 (Due by 3/29)3180217311.doc
void setCircle(float radius, int step)
{
     float x, y, theta;
     theta = (float) (2*M_PI/step);
     for (int i=0; i<step; i++) {
          x = radius * cos(theta * i);
          y = radius * sin(theta * i);
     }
}