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.
function Distance
(Self : not null access Graphene_Plane_T;
Point : not null access Graphene.Point3d.Graphene_Point3D_T)
return Interfaces.C.C_float
Computes the distance of Point from a Graphene.Plane.Graphene_Plane_T. Since: gtk+ 1.2
a Graphene.Point3d.Graphene_Point3D_T
the distance of the given Graphene.Point3d.Graphene_Point3D_T from the plane
function Equal
(Self : not null access Graphene_Plane_T;
B : not null access Graphene_Plane_T) return Boolean
Checks whether the two given Graphene.Plane.Graphene_Plane_T are equal. Since: gtk+ 1.2
a Graphene.Plane.Graphene_Plane_T
true if the given planes are equal
procedure Free (Self : not null access Graphene_Plane_T)
Frees the resources allocated by graphene_plane_alloc. Since: gtk+ 1.2
function From_Object_Free
(B : not null access Graphene_Plane_T) return Graphene_Plane_T
Return the underlying object and free the pointer. This is meant to be used internally by GtkAda, and should not in general be called by user code.
function Get_Constant
(Self : not null access Graphene_Plane_T) return Interfaces.C.C_float
Retrieves the distance along the normal vector of the given Graphene.Plane.Graphene_Plane_T from the origin. Since: gtk+ 1.2
the constant value of the plane
procedure Get_Normal
(Self : not null access Graphene_Plane_T;
Normal : not null access Graphene.Vec3.Graphene_Vec3_T)
Retrieves the normal vector pointing towards the origin of the given Graphene.Plane.Graphene_Plane_T. Since: gtk+ 1.2
return location for the normal vector
function Get_Type return Glib.GType
type Graphene_Plane_Array is array (Natural range <>) of Graphene_Plane_T;
type Graphene_Plane_T is record
Normal : Graphene.Vec3.Graphene_Vec3_T;
The_Constant : Interfaces.C.C_float;
end record;
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.
function Init
(Self : not null access Graphene_Plane_T;
Normal : access Graphene.Vec3.Graphene_Vec3_T;
The_Constant : Interfaces.C.C_float) return access Graphene_Plane_T
Initializes the given Graphene.Plane.Graphene_Plane_T using the given Normal vector and Constant values. Since: gtk+ 1.2
a unit length normal vector defining the plane pointing towards the origin; if unset, we use the X axis by default
the distance from the origin to the plane along the normal vector; the sign determines the half-space occupied by the plane
the initialized plane
function Init_From_Point
(Self : not null access Graphene_Plane_T;
Normal : not null access Graphene.Vec3.Graphene_Vec3_T;
Point : not null access Graphene.Point3d.Graphene_Point3D_T)
return access Graphene_Plane_T
Initializes the given Graphene.Plane.Graphene_Plane_T using the given normal vector and an arbitrary co-planar point. Since: gtk+ 1.2
a normal vector defining the plane pointing towards the origin
a Graphene.Point3d.Graphene_Point3D_T
the initialized plane
function Init_From_Points
(Self : not null access Graphene_Plane_T;
A : not null access Graphene.Point3d.Graphene_Point3D_T;
B : not null access Graphene.Point3d.Graphene_Point3D_T;
C : not null access Graphene.Point3d.Graphene_Point3D_T)
return access Graphene_Plane_T
Initializes the given Graphene.Plane.Graphene_Plane_T using the 3 provided co-planar points. The winding order is counter-clockwise, and determines which direction the normal vector will point. Since: gtk+ 1.2
a Graphene.Point3d.Graphene_Point3D_T
a Graphene.Point3d.Graphene_Point3D_T
a Graphene.Point3d.Graphene_Point3D_T
the initialized plane
function Init_From_Vec4
(Self : not null access Graphene_Plane_T;
Src : not null access Graphene.Vec4.Graphene_Vec4_T)
return access Graphene_Plane_T
Initializes the given Graphene.Plane.Graphene_Plane_T using the components of the given Graphene.Vec4.Graphene_Vec4_T vector. Since: gtk+ 1.2
a Graphene.Vec4.Graphene_Vec4_T containing the normal vector in its first three components, and the distance in its fourth component
the initialized plane
procedure Negate
(Self : not null access Graphene_Plane_T;
Res : not null access Graphene_Plane_T)
Negates the normal vector and constant of a Graphene.Plane.Graphene_Plane_T, effectively mirroring the plane across the origin. Since: gtk+ 1.2
return location for the negated plane
procedure Normalize
(Self : not null access Graphene_Plane_T;
Res : not null access Graphene_Plane_T)
Normalizes the vector of the given Graphene.Plane.Graphene_Plane_T, and adjusts the constant accordingly. Since: gtk+ 1.2
return location for the normalized plane
procedure Transform
(Self : not null access Graphene_Plane_T;
Matrix : not null access Graphene.Matrix.Graphene_Matrix_T;
Normal_Matrix : access Graphene.Matrix.Graphene_Matrix_T;
Res : not null access Graphene_Plane_T)
Transforms a Graphene.Plane.Graphene_Plane_T P using the given Matrix and Normal_Matrix. If Normal_Matrix is null, a transformation matrix for the plane normal will be computed from Matrix. If you are transforming multiple planes using the same Matrix it's recommended to compute the normal matrix beforehand to avoid incurring in the cost of recomputing it every time. Since: gtk+ 1.10
a Graphene.Matrix.Graphene_Matrix_T
a Graphene.Matrix.Graphene_Matrix_T
the transformed plane