Plane

class Plane(val graphenePlanePointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

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.

Since

1.2

Constructors

Link copied to clipboard
constructor()

Allocate a new Plane.

constructor(scope: <Error class: unknown class>)

Allocate a new Plane using the provided AutofreeScope.

constructor(graphenePlanePointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

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

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
fun getConstant(): <Error class: unknown class>

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