Plane

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.

Constructors

this
this(graphene_plane_t* graphene_plane, bool ownedRef)

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

this
this()

Allocates a new #graphene_plane_t structure.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

distance
float distance(Point3D point)

Computes the distance of @point from a #graphene_plane_t.

equal
bool equal(Plane b)

Checks whether the two given #graphene_plane_t are equal.

free
void free()

Frees the resources allocated by graphene_plane_alloc().

getConstant
float getConstant()

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

getNormal
void getNormal(Vec3 normal)

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

getPlaneStruct
graphene_plane_t* getPlaneStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

init
Plane init(Vec3 normal, float constant)

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

initFromPlane
Plane initFromPlane(Plane src)

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

initFromPoint
Plane initFromPoint(Vec3 normal, Point3D point)

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

initFromPoints
Plane initFromPoints(Point3D a, Point3D b, Point3D c)

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

initFromVec4
Plane initFromVec4(Vec4 src)

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

negate
void negate(Plane res)

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

normalize
void normalize(Plane res)

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

transform
void transform(Matrix matrix, Matrix normalMatrix, Plane res)

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

Static functions

getType
GType getType()

Variables

graphene_plane
graphene_plane_t* graphene_plane;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta