Plane
Object Hierarchy:
Description:
[ CCode ( cname = "graphene_plane_t" , copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "graphene_plane_get_type ()" ) ]
[ Version ( since = "1.2" ) ]
public struct 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.
Content:
Methods:
- public float distance (Point3D point)
Computes the distance of point
from a
Plane.
- public bool equal (Plane b)
Checks whether the two given Plane are
equal.
- public float get_constant ()
Retrieves the distance along the normal vector of the given
Plane from the origin.
- public Vec3 get_normal ()
Retrieves the normal vector pointing towards the origin of the given
Plane.
- public unowned Plane? init (Vec3? normal, float constant)
Initializes the given Plane using the
given normal
vector and constant
values.
- public unowned Plane? init_from_plane (Plane src)
Initializes the given Plane using the
normal vector and constant of another Plane.
- public unowned Plane? init_from_point (Vec3 normal, Point3D point)
Initializes the given Plane using the
given normal vector and an arbitrary co-planar point.
- public unowned Plane? init_from_points (Point3D a, Point3D b, Point3D c)
Initializes the given Plane using the 3
provided co-planar points.
- public unowned Plane? init_from_vec4 (Vec4 src)
Initializes the given Plane using the
components of the given Vec4 vector.
- public Plane negate ()
Negates the normal vector and constant of a Plane
, effectively mirroring the plane across the origin.
- public Plane normalize ()
Normalizes the vector of the given Plane,
and adjusts the constant accordingly.
- public Plane transform (Matrix matrix, Matrix? normal_matrix)
Transforms a Plane
this using the given matrix
and normal_matrix
.