Position Class

Represents a vector in three-dimensional Euclidean space.

C#
public sealed class Position
Inheritance
Position

Remarks

The objects of this class are immutable.

Constructors

Position(float, float, float)

Initializes a new instance of the Position class.

Properties

Origin

Gets the origin (zero vector).

XUnit

Gets the unit vector along the X axis.

YUnit

Gets the unit vector along the Y axis.

ZUnit

Gets the unit vector along the Z axis.

X

Gets the X component of the position.

Y

Gets the Y component of the position.

Z

Gets the Z component of the position.

Methods

Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

Constructors Detail

Position(float, float, float)

Initializes a new instance of the Position class.

C#
public Position(float x, float y, float z)

Parameters

x
float

The X component of the position.

y
float

The Y component of the position.

z
float

The Z component of the position.

Properties Detail

Origin

Gets the origin (zero vector).

C#
public static Position Origin { get; }

Property Value

XUnit

Gets the unit vector along the X axis.

C#
public static Position XUnit { get; }

Property Value

YUnit

Gets the unit vector along the Y axis.

C#
public static Position YUnit { get; }

Property Value

ZUnit

Gets the unit vector along the Z axis.

C#
public static Position ZUnit { get; }

Property Value

X

Gets the X component of the position.

C#
public float X { get; }

Property Value

Y

Gets the Y component of the position.

C#
public float Y { get; }

Property Value

Z

Gets the Z component of the position.

C#
public float Z { get; }

Property Value