public void Serialize(ref AngleSingle value) { if (Mode == SerializerMode.Write) { Writer.Write(value.Radians); } else { value.Radians = Reader.ReadSingle(); } }
public void Serialize(ref AngleSingle value) { if (Mode == SerializerMode.Write) { Writer.Write(value.Radians); } else { value.Radians = Reader.ReadSingle(); } }
public DXCamera() { Position = new Vector3(0.0f, 0.0f, -10.0f); LookAt = new Vector3(0.0f, 0.0f, 0.0f); FieldOfView = new AngleSingle((float)22.5, AngleType.Degree); NearBound = 1.0f; FarBound = 100.0f; UpDir = new Vector3(0.0f, 1.0f, 0.0f); Aspect = 4.0f / 3.0f; _angles = Vector3.Zero; UpdateViewMatrix(); UpdateProjectionMatrix(); }
public static Vector2 AngleToVector(AngleSingle pAngleSingle) { return new Vector2((float)System.Math.Cos(pAngleSingle.Radians), (float)System.Math.Sin(pAngleSingle.Radians)); }