[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 48)] [DebuggerDisplay("Pt({m_P.X},{m_P.Y},{m_P.Z}) Dir({m_V.X},{m_V.Y},{m_V.Z})")] [Serializable] public struct Ray3d : ISerializable, IEquatable<Ray3d>, IEpsilonComparable<Ray3d>
Represents an immutable ray in three dimensions, using position and direction.

Constructors

Ray3d

#Since v5.0
Initializes a new Ray3d instance.
public Ray3d(
position,
The position.
direction
The direction.
)

Properties

Direction

#Since v5.0
Gets the direction vector of this ray.
public Vector3d Direction { get; }

Position

#Since v5.0
Gets the starting position of this ray.
public Point3d Position { get; }

Methods

EpsilonEquals

#Since v5.4
Check that all values in other are within epsilon of the values in this
[ConstOperation] public bool EpsilonEquals(
other,
epsilon
)
EpsilonEquals

Equals

#
Determines whether the specified System.Object is a Ray3d and has the same values as the present ray.
[ConstOperation] public override bool Equals(
obj
The specified object.
)
true if obj is a Ray3d and has the same position and direction as this; otherwise false.
ValueType.Equals

Equals

#Since v5.0
Determines whether the specified Ray3d has the same value as the present ray.
[ConstOperation] public bool Equals(
ray
The specified ray.
)
true if ray has the same position and direction as this; otherwise false.

GetHashCode

#
Computes a hashing number that represents the current ray.
[ConstOperation] public override int GetHashCode()
A signed integer that represents both position and direction, but is not unique.

PointAt

#Since v5.0
Evaluates a point along the ray.
[ConstOperation] public Point3d PointAt(
t
The t parameter.
)
A point at (Direction*t + Position).
Explicit

ISerializable.GetObjectData

#
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] void ISerializable.GetObjectData()

Operators

OperationResultDescription
Ray3d==Ray3dboolDetermines whether two Ray3d have equal values.
Ray3d!=Ray3dboolDetermines whether two Ray3d have different values.