Yaw, Pitch and Roll used for 3D rotations. See: http://en.wikipedia.org/wiki/Euler_angles
View code on GitHub
Namespace: DeltaEngine.DatatypesAssembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The EulerAngles type exposes the following members.
Constructors
Name | Description | |
---|---|---|
EulerAngles | Initializes a new instance of the EulerAngles class |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Overrides ValueType Equals(Object).) | |
Equals(EulerAngles) | ||
GetHashCode | (Overrides ValueType GetHashCode .) | |
ToString | (Overrides ValueType ToString .) |
Operators
Name | Description | |
---|---|---|
Equality | ||
Inequality |
Properties
Name | Description | |
---|---|---|
Pitch | ||
Roll | ||
Yaw |
Remarks
Examples
[Test] public void Create() { var euler = new EulerAngles(1, 2, 3); Assert.AreEqual(euler.Pitch, 1); Assert.AreEqual(euler.Yaw, 2); Assert.AreEqual(euler.Roll, 3); }
[Test] public void Equals() { var euler1 = new EulerAngles(1, 2, 3); var euler2 = new EulerAngles(3, 4, 5); Assert.AreNotEqual(euler1, euler2); Assert.AreEqual(euler1, new EulerAngles(1, 2, 3)); Assert.IsTrue(euler1 == new EulerAngles(1, 2, 3)); Assert.IsTrue(euler1 != euler2); Assert.IsTrue(euler1.Equals((object)new EulerAngles(1, 2, 3))); }
[Test] public void GetHashCodeViaDictionary() { var first = new EulerAngles(1, 2, 3); var second = new EulerAngles(3, 4, 5); var eulerAngles = new Dictionary<EulerAngles, int> { { first, 1 }, { second, 2 } }; Assert.IsTrue(eulerAngles.ContainsKey(first)); Assert.IsTrue(eulerAngles.ContainsKey(second)); Assert.IsFalse(eulerAngles.ContainsKey(new EulerAngles(5, 6, 7))); }
See Also