Plane

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

A 2D plane that extends infinitely in a 3D volume.

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

Skipped during bindings generation

  • field normal: Record field normal is private

  • field constant: Record field constant is private

Since

1.2

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 graphenePlanePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun distance(point: Point3D): Float

Computes the distance of @point from a #graphene_plane_t.

Link copied to clipboard

Checks whether the two given #graphene_plane_t are equal.

Link copied to clipboard
fun free()

Frees the resources allocated by graphene_plane_alloc().

Link copied to clipboard

Retrieves the distance along the normal vector of the given #graphene_plane_t from the origin.

Link copied to clipboard
fun getNormal(normal: Vec3)

Retrieves the normal vector pointing towards the origin of the given #graphene_plane_t.

Link copied to clipboard
fun init(normal: Vec3? = null, constant: Float): Plane

Initializes the given #graphene_plane_t using the given @normal vector and @constant values.

Link copied to clipboard

Initializes the given #graphene_plane_t using the normal vector and constant of another #graphene_plane_t.

Link copied to clipboard
fun initFromPoint(normal: Vec3, point: Point3D): Plane

Initializes the given #graphene_plane_t using the given normal vector and an arbitrary co-planar point.

Link copied to clipboard

Initializes the given #graphene_plane_t using the 3 provided co-planar points.

Link copied to clipboard

Initializes the given #graphene_plane_t using the components of the given #graphene_vec4_t vector.

Link copied to clipboard
fun negate(res: Plane)

Negates the normal vector and constant of a #graphene_plane_t, effectively mirroring the plane across the origin.

Link copied to clipboard
fun normalize(res: Plane)

Normalizes the vector of the given #graphene_plane_t, and adjusts the constant accordingly.

Link copied to clipboard
fun transform(matrix: Matrix, normalMatrix: Matrix? = null, res: Plane)

Transforms a #graphene_plane_t @p using the given @matrix and @normal_matrix.