Ray

class Ray(pointer: <Error class: unknown class><<Error class: unknown class>>)

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.

Skipped during bindings generation

  • parameter t_out: t_out: Out parameter is not supported

  • parameter t_out: t_out: Out parameter is not supported

  • parameter t_out: t_out: Out parameter is not supported

  • field origin: Record field origin is private

  • field direction: Record field direction is private

Since

1.4

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val grapheneRayPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun equal(b: Ray): Boolean

Checks whether the two given #graphene_ray_t are equal.

Link copied to clipboard
fun free()

Frees the resources allocated by graphene_ray_alloc().

Link copied to clipboard

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

Link copied to clipboard
fun getDirection(direction: Vec3)

Retrieves the direction of the given #graphene_ray_t.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun getOrigin(origin: Point3D)

Retrieves the origin of the given #graphene_ray_t.

Link copied to clipboard
fun getPositionAt(t: Float, position: Point3D)

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

Link copied to clipboard
fun init(origin: Point3D? = null, direction: Vec3? = null): Ray

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

Link copied to clipboard
fun initFromRay(src: Ray): Ray

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

Link copied to clipboard
fun initFromVec3(origin: Vec3? = null, direction: Vec3? = null): Ray

Initializes the given #graphene_ray_t using the given vectors.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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