graphene.ray
Module for Ray class
class Ray
Types 1
classRay : gobject.boxed.Boxed
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
graphene.ray.Ray alloc()Allocates a new #graphene_ray_t structure.bool equal(graphene.ray.Ray b)Checks whether the two given #graphene_ray_t are equal.void getClosestPointToPoint(graphene.point3_d.Point3D p, out graphene.point3_d.Point3D res)Computes the point on the given #graphene_ray_t that is closest to the given point `p`.void getDirection(out graphene.vec3.Vec3 direction)Retrieves the direction of the given #graphene_ray_t.float getDistanceToPlane(graphene.plane.Plane p)Computes the distance of the origin of the given #graphene_ray_t from the given plane.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`.void getOrigin(out graphene.point3_d.Point3D origin)Retrieves the origin of the given #graphene_ray_t.void getPositionAt(float t, out graphene.point3_d.Point3D position)Retrieves the coordinates of a point at the distance `t` along the given #graphene_ray_t.graphene.ray.Ray init_(graphene.point3_d.Point3D origin, graphene.vec3.Vec3 direction = null)Initializes the given #graphene_ray_t using the given origin and direction values.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.graphene.ray.Ray initFromVec3(graphene.vec3.Vec3 origin = null, graphene.vec3.Vec3 direction = null)Initializes the given #graphene_ray_t using the given vectors.graphene.types.RayIntersectionKind intersectBox(graphene.box.Box b, out float tOut)Intersects the given #graphene_ray_t `r` with the given #graphene_box_t `b`.graphene.types.RayIntersectionKind intersectSphere(graphene.sphere.Sphere s, out float tOut)Intersects the given #graphene_ray_t `r` with the given #graphene_sphere_t `s`.graphene.types.RayIntersectionKind intersectTriangle(graphene.triangle.Triangle t, out float tOut)Intersects the given #graphene_ray_t `r` with the given #graphene_triangle_t `t`.bool intersectsBox(graphene.box.Box b)Checks whether the given #graphene_ray_t `r` intersects the given #graphene_box_t `b`.bool intersectsSphere(graphene.sphere.Sphere s)Checks if the given #graphene_ray_t `r` intersects the given #graphene_sphere_t `s`.bool intersectsTriangle(graphene.triangle.Triangle t)Checks whether the given #graphene_ray_t `r` intersects the given #graphene_triangle_t b.