RotationF

References
public struct RotationF
A set of 3D rotation angles.

Constructors

RotationF

#
public RotationF(float horizontal, float vertical)
Create a new set of rotation angles.
horizontal (float)
vertical (float)

RotationF

#
public RotationF(PointF from, PointF to)
Create a rotation from a set of mouse points.
from (PointF)
to (PointF)

Properties

Empty

#
public static RotationF Empty { get; }
Gets an empty rotation, which represents the topdown view.

Horizontal

#
public float Horizontal { get; }
Gets the horizontal rotation factor.

IsEmpty

#
public bool IsEmpty { get; }
Gets whether this rotation is empty.

IsValid

#
public bool IsValid { get; }
Gets whether this rotation is valid.

Standard

#
public static RotationF Standard { get; }
Gets a standard rotation with a decent 3d projection.

Unset

#
public static RotationF Unset { get; }
Gets an unset rotation.

Vertical

#
public float Vertical { get; }
Gets the vertical rotation factor.

Methods

ToTransform

#
public Transform ToTransform()
Create a Rhino transformation matrix based on this rotation.

ToTransform

#
public Transform ToTransform(Function angleMap, double perspective = 0)
Create a Rhino transformation matrix based on this rotation.
angleMap (Function)Angle mapping function.
perspective (double = 0)Perspective strength.

0.0 = no perspective.

0.15 = subtle perspective.

0.3 = weak perspective.

0.6 = medium perspective.

1.0 = full perspective.

ToTransform

#
public Transform ToTransform(Function angleMap, RectangleF frame, double diagonal, double perspective = 0)
Create a Rhino transformation matrix based on this rotation and a dilation/translation into a target frame.
angleMap (Function)Angle mapping function.
frame (RectangleF)Frame for object display.
diagonal (double)Length of object boundingbox diagonal.
perspective (double = 0)Perspective strength.

0.0 = no perspective.

0.15 = subtle perspective.

0.3 = weak perspective.

0.6 = medium perspective.

1.0 = full perspective.

ToTransform

#
public Transform ToTransform(int minimumAngle, int maximumAngle, double perspective = 0)
Create a Rhino transformation matrix based on this rotation.
minimumAngle (int)Lowest allowed angle in degrees (0=straight down, 90=horizontal, 180=straight up).
maximumAngle (int)Highest allowed angle in degrees (0=straight down, 90=horizontal, 180=straight up).
perspective (double = 0)Perspective strength.

0.0 = no perspective.

0.15 = subtle perspective.

0.3 = weak perspective.

0.6 = medium perspective.

1.0 = full perspective.

ToTransform

#
public Transform ToTransform(int minimumAngle, int maximumAngle, RectangleF frame, double diagonal, double perspective = 0)
Create a Rhino transformation matrix based on this rotation and a dilation/translation into a target frame.
minimumAngle (int)Lowest allowed angle in degrees (0=straight down, 90=horizontal, 180=straight up).
maximumAngle (int)Highest allowed angle in degrees (0=straight down, 90=horizontal, 180=straight up).
frame (RectangleF)Frame for object display.
diagonal (double)Length of object boundingbox diagonal.
perspective (double = 0)Perspective strength.

0.0 = no perspective.

0.15 = subtle perspective.

0.3 = weak perspective.

0.6 = medium perspective.

1.0 = full perspective.

Operators

OperationResultDescription
RotationF+RotationFRotationFAdd two rotations together.