Ray

A ray emitted from an origin in a given direction.

The contents of the graphene_ray_t structure are private, and should not be modified directly.

Constructors

this
this(graphene_ray_t* graphene_ray, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Allocates a new #graphene_ray_t structure.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

equal
bool equal(Ray b)

Checks whether the two given #graphene_ray_t are equal.

free
void free()

Frees the resources allocated by graphene_ray_alloc().

getClosestPointToPoint
void getClosestPointToPoint(Point3D p, Point3D res)

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

getDirection
void getDirection(Vec3 direction)

Retrieves the direction of the given #graphene_ray_t.

getDistanceToPlane
float getDistanceToPlane(Plane p)

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

getDistanceToPoint
float getDistanceToPoint(Point3D p)

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

getOrigin
void getOrigin(Point3D origin)

Retrieves the origin of the given #graphene_ray_t.

getPositionAt
void getPositionAt(float t, Point3D position)

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

getRayStruct
graphene_ray_t* getRayStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

init
Ray init(Point3D origin, Vec3 direction)

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

initFromRay
Ray initFromRay(Ray src)

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

initFromVec3
Ray initFromVec3(Vec3 origin, Vec3 direction)

Initializes the given #graphene_ray_t using the given vectors.

intersectBox
graphene_ray_intersection_kind_t intersectBox(Box b, float tOut)

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

intersectSphere
graphene_ray_intersection_kind_t intersectSphere(Sphere s, float tOut)

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

intersectTriangle
graphene_ray_intersection_kind_t intersectTriangle(Triangle t, float tOut)

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

intersectsBox
bool intersectsBox(Box b)

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

intersectsSphere
bool intersectsSphere(Sphere s)

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

intersectsTriangle
bool intersectsTriangle(Triangle t)

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

Static functions

getType
GType getType()

Variables

graphene_ray
graphene_ray_t* graphene_ray;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta