Ray

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.

Members

Functions

equal
bool equal(graphene.ray.Ray b)

Checks whether the two given #graphene_ray_t are equal.

getClosestPointToPoint
void getClosestPointToPoint(graphene.point3_d.Point3D p, graphene.point3_d.Point3D res)

Computes the point on the given #graphene_ray_t that is closest to the given point p.

getDirection
void getDirection(graphene.vec3.Vec3 direction)

Retrieves the direction of the given #graphene_ray_t.

getDistanceToPlane
float getDistanceToPlane(graphene.plane.Plane p)

Computes the distance of the origin of the given #graphene_ray_t from the given plane.

getDistanceToPoint
float getDistanceToPoint(graphene.point3_d.Point3D p)

Computes the distance of the closest approach between the given #graphene_ray_t r and the point p.

getOrigin
void getOrigin(graphene.point3_d.Point3D origin)

Retrieves the origin of the given #graphene_ray_t.

getPositionAt
void getPositionAt(float t, graphene.point3_d.Point3D position)

Retrieves the coordinates of a point at the distance t along the given #graphene_ray_t.

initFromRay
graphene.ray.Ray initFromRay(graphene.ray.Ray src)

Initializes the given #graphene_ray_t using the origin and direction values of another #graphene_ray_t.

initFromVec3
graphene.ray.Ray initFromVec3(graphene.vec3.Vec3 origin, graphene.vec3.Vec3 direction)

Initializes the given #graphene_ray_t using the given vectors.

init_
graphene.ray.Ray init_(graphene.point3_d.Point3D origin, graphene.vec3.Vec3 direction)

Initializes the given #graphene_ray_t using the given origin and direction values.

intersectBox
graphene.types.RayIntersectionKind intersectBox(graphene.box.Box b, float tOut)

Intersects the given #graphene_ray_t r with the given #graphene_box_t b.

intersectSphere
graphene.types.RayIntersectionKind intersectSphere(graphene.sphere.Sphere s, float tOut)

Intersects the given #graphene_ray_t r with the given #graphene_sphere_t s.

intersectTriangle
graphene.types.RayIntersectionKind intersectTriangle(graphene.triangle.Triangle t, float tOut)

Intersects the given #graphene_ray_t r with the given #graphene_triangle_t t.

intersectsBox
bool intersectsBox(graphene.box.Box b)

Checks whether the given #graphene_ray_t r intersects the given #graphene_box_t b.

intersectsSphere
bool intersectsSphere(graphene.sphere.Sphere s)

Checks if the given #graphene_ray_t r intersects the given #graphene_sphere_t s.

intersectsTriangle
bool intersectsTriangle(graphene.triangle.Triangle t)

Checks whether the given #graphene_ray_t r intersects the given #graphene_triangle_t b.

Static functions

alloc
graphene.ray.Ray alloc()

Allocates a new #graphene_ray_t structure.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.