graphene.ray

Module for [Ray] class

class Ray

Types 1

A ray emitted from an origin in a given direction.

The contents of the [graphene.ray.Ray] structure are private, and should not be modified directly.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
Ray self()Returns `this`, for use in `with` statements.
graphene.ray.Ray alloc()Allocates a new #graphenerayt structure.
bool equal(graphene.ray.Ray b)Checks whether the two given #graphenerayt are equal.
void getClosestPointToPoint(graphene.point3_d.Point3D p, out graphene.point3_d.Point3D res)Computes the point on the given #graphenerayt that is closest to the given point `p`.
void getDirection(out graphene.vec3.Vec3 direction)Retrieves the direction of the given #graphenerayt.
float getDistanceToPlane(graphene.plane.Plane p)Computes the distance of the origin of the given #graphenerayt from the given plane.
float getDistanceToPoint(graphene.point3_d.Point3D p)Computes the distance of the closest approach between the given #graphenerayt `r` and the point `p`.
void getOrigin(out graphene.point3_d.Point3D origin)Retrieves the origin of the given #graphenerayt.
void getPositionAt(float t, out graphene.point3_d.Point3D position)Retrieves the coordinates of a point at the distance `t` along the given #graphenerayt.
graphene.ray.Ray init_(graphene.point3_d.Point3D origin, graphene.vec3.Vec3 direction = null)Initializes the given #graphenerayt using the given origin and direction values.
graphene.ray.Ray initFromRay(graphene.ray.Ray src)Initializes the given #graphenerayt using the origin and direction values of another #graphenerayt.
graphene.ray.Ray initFromVec3(graphene.vec3.Vec3 origin = null, graphene.vec3.Vec3 direction = null)Initializes the given #graphenerayt using the given vectors.
graphene.types.RayIntersectionKind intersectBox(graphene.box.Box b, out float tOut)Intersects the given #graphenerayt `r` with the given #grapheneboxt `b`.
graphene.types.RayIntersectionKind intersectSphere(graphene.sphere.Sphere s, out float tOut)Intersects the given #graphenerayt `r` with the given #graphenespheret `s`.
graphene.types.RayIntersectionKind intersectTriangle(graphene.triangle.Triangle t, out float tOut)Intersects the given #graphenerayt `r` with the given #graphenetrianglet `t`.
bool intersectsBox(graphene.box.Box b)Checks whether the given #graphenerayt `r` intersects the given #grapheneboxt `b`.
bool intersectsSphere(graphene.sphere.Sphere s)Checks if the given #graphenerayt `r` intersects the given #graphenespheret `s`.
bool intersectsTriangle(graphene.triangle.Triangle t)Checks whether the given #graphenerayt `r` intersects the given #graphenetrianglet b.
Constructors
this()Create a `ray.Ray` boxed type.
this(void * ptr, Flag!"Take" take)