Class Ray
- Namespace
- Graphene
- Assembly
- Graphene-1.0.dll
public sealed class Ray : BoxedRecord, GTypeProvider, InstanceFactory, IEquatable<Ray>, IDisposable
- Inheritance
-
Ray
- Implements
- Inherited Members
Constructors
Ray()
public Ray()
Ray(RayOwnedHandle)
public Ray(RayOwnedHandle handle)
Parameters
handleRayOwnedHandle
Properties
Handle
public RayOwnedHandle Handle { get; }
Property Value
Methods
Alloc()
[Version("1.4")]
public static Ray Alloc()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equal(Ray)
[Version("1.4")]
public bool Equal(Ray b)
Parameters
bRay
Returns
Equals(Ray?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Ray? other)
Parameters
otherRayAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Free()
[Version("1.4")]
public void Free()
GetDistanceToPlane(Plane)
[Version("1.4")]
public float GetDistanceToPlane(Plane p)
Parameters
pPlane
Returns
GetDistanceToPoint(Point3D)
[Version("1.4")]
public float GetDistanceToPoint(Point3D p)
Parameters
pPoint3D
Returns
GetGType()
public static Type GetGType()
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Init(Point3D?, Vec3?)
[Version("1.4")]
public Ray Init(Point3D? origin, Vec3? direction)
Parameters
Returns
InitFromRay(Ray)
[Version("1.4")]
public Ray InitFromRay(Ray src)
Parameters
srcRay
Returns
InitFromVec3(Vec3?, Vec3?)
[Version("1.4")]
public Ray InitFromVec3(Vec3? origin, Vec3? direction)
Parameters
Returns
IntersectBox(Box, out float)
[Version("1.10")]
public RayIntersectionKind IntersectBox(Box b, out float tOut)
Parameters
Returns
IntersectSphere(Sphere, out float)
[Version("1.10")]
public RayIntersectionKind IntersectSphere(Sphere s, out float tOut)
Parameters
Returns
IntersectTriangle(Triangle, out float)
[Version("1.10")]
public RayIntersectionKind IntersectTriangle(Triangle t, out float tOut)
Parameters
Returns
IntersectsBox(Box)
[Version("1.10")]
public bool IntersectsBox(Box b)
Parameters
bBox
Returns
IntersectsSphere(Sphere)
[Version("1.10")]
public bool IntersectsSphere(Sphere s)
Parameters
sSphere
Returns
IntersectsTriangle(Triangle)
[Version("1.10")]
public bool IntersectsTriangle(Triangle t)
Parameters
tTriangle