A 3D box, described as the volume between a minimum and a maximum vertices.
function Contains_Box
(Self : not null access Graphene_Box_T;
B : not null access Graphene_Box_T) return Boolean
Checks whether the Graphene.Box.Graphene_Box_T A contains the given Graphene.Box.Graphene_Box_T B. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
true if the box is contained in the given box
function Contains_Point
(Self : not null access Graphene_Box_T;
Point : not null access Graphene.Point3d.Graphene_Point3D_T)
return Boolean
Checks whether Box contains the given Point. Since: gtk+ 1.2
the coordinates to check
true if the point is contained in the given box
function Empty return access constant Graphene_Box_T
A degenerate Graphene.Box.Graphene_Box_T that can only be expanded. The returned value is owned by Graphene and should not be modified or freed. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
function Equal
(Self : not null access Graphene_Box_T;
B : not null access Graphene_Box_T) return Boolean
Checks whether the two given boxes are equal. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
true if the boxes are equal
procedure Expand
(Self : not null access Graphene_Box_T;
Point : not null access Graphene.Point3d.Graphene_Point3D_T;
Res : not null access Graphene_Box_T)
Expands the dimensions of Box to include the coordinates at Point. Since: gtk+ 1.2
the coordinates of the point to include
return location for the expanded box
procedure Expand_Scalar
(Self : not null access Graphene_Box_T;
Scalar : Interfaces.C.C_float;
Res : not null access Graphene_Box_T)
Expands the dimensions of Box by the given Scalar value. If Scalar is positive, the Graphene.Box.Graphene_Box_T will grow; if Scalar is negative, the Graphene.Box.Graphene_Box_T will shrink. Since: gtk+ 1.2
a scalar value
return location for the expanded box
procedure Expand_Vec3
(Self : not null access Graphene_Box_T;
Vec : not null access Graphene.Vec3.Graphene_Vec3_T;
Res : not null access Graphene_Box_T)
Expands the dimensions of Box to include the coordinates of the given vector. Since: gtk+ 1.2
the coordinates of the point to include, as a Graphene.Vec3.Graphene_Vec3_T
return location for the expanded box
procedure Free (Self : not null access Graphene_Box_T)
Frees the resources allocated by graphene_box_alloc. Since: gtk+ 1.2
function From_Object_Free
(B : not null access Graphene_Box_T) return Graphene_Box_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.
procedure Get_Bounding_Sphere
(Self : not null access Graphene_Box_T;
Sphere : not null access Graphene.Sphere.Graphene_Sphere_T)
Computes the bounding Graphene.Sphere.Graphene_Sphere_T capable of containing the given Graphene.Box.Graphene_Box_T. Since: gtk+ 1.2
return location for the bounding sphere
procedure Get_Center
(Self : not null access Graphene_Box_T;
Center : not null access Graphene.Point3d.Graphene_Point3D_T)
Retrieves the coordinates of the center of a Graphene.Box.Graphene_Box_T. Since: gtk+ 1.2
return location for the coordinates of the center
function Get_Depth
(Self : not null access Graphene_Box_T) return Interfaces.C.C_float
Retrieves the size of the Box on the Z axis. Since: gtk+ 1.2
the depth of the box
function Get_Height
(Self : not null access Graphene_Box_T) return Interfaces.C.C_float
Retrieves the size of the Box on the Y axis. Since: gtk+ 1.2
the height of the box
procedure Get_Max
(Self : not null access Graphene_Box_T;
Max : not null access Graphene.Point3d.Graphene_Point3D_T)
Retrieves the coordinates of the maximum point of the given Graphene.Box.Graphene_Box_T. Since: gtk+ 1.2
return location for the maximum point
procedure Get_Min
(Self : not null access Graphene_Box_T;
Min : not null access Graphene.Point3d.Graphene_Point3D_T)
Retrieves the coordinates of the minimum point of the given Graphene.Box.Graphene_Box_T. Since: gtk+ 1.2
return location for the minimum point
procedure Get_Size
(Self : not null access Graphene_Box_T;
Size : not null access Graphene.Vec3.Graphene_Vec3_T)
Retrieves the size of the box on all three axes, and stores it into the given Size vector. Since: gtk+ 1.2
return location for the size
function Get_Type return Glib.GType
procedure Get_Vertices
(Self : not null access Graphene_Box_T;
Vertices : out Graphene_Vec3_Array8)
Computes the vertices of the given Graphene.Box.Graphene_Box_T. Since: gtk+ 1.2
return location for an array of 8 Graphene.Vec3.Graphene_Vec3_T
function Get_Width
(Self : not null access Graphene_Box_T) return Interfaces.C.C_float
Retrieves the size of the Box on the X axis. Since: gtk+ 1.2
the width of the box
type Graphene_Box_T is record
Min : Graphene.Vec3.Graphene_Vec3_T;
Max : Graphene.Vec3.Graphene_Vec3_T;
end record;
A 3D box, described as the volume between a minimum and a maximum vertices.
type Graphene_Vec3_Array8 is array (1 .. 8) of Graphene_Vec3_T;
function Infinite return access constant Graphene_Box_T
A degenerate Graphene.Box.Graphene_Box_T that cannot be expanded. The returned value is owned by Graphene and should not be modified or freed. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
function Init
(Self : not null access Graphene_Box_T;
Min : access Graphene.Point3d.Graphene_Point3D_T;
Max : access Graphene.Point3d.Graphene_Point3D_T)
return access Graphene_Box_T
Initializes the given Graphene.Box.Graphene_Box_T with two vertices. Since: gtk+ 1.2
the coordinates of the minimum vertex
the coordinates of the maximum vertex
the initialized Graphene.Box.Graphene_Box_T
function Init_From_Box
(Self : not null access Graphene_Box_T;
Src : not null access Graphene_Box_T) return access Graphene_Box_T
Initializes the given Graphene.Box.Graphene_Box_T with the vertices of another Graphene.Box.Graphene_Box_T. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
the initialized Graphene.Box.Graphene_Box_T
function Init_From_Points
(Self : not null access Graphene_Box_T;
Points : Graphene.Point3d.Graphene_Point3d_Array) return access Graphene_Box_T
Initializes the given Graphene.Box.Graphene_Box_T with the given array of vertices. If Points'Length is 0, the returned box is initialized with Graphene.Box.Empty. Since: gtk+ 1.2
an array of Graphene.Point3d.Graphene_Point3D_T
the initialized Graphene.Box.Graphene_Box_T
function Init_From_Vec3
(Self : not null access Graphene_Box_T;
Min : access Graphene.Vec3.Graphene_Vec3_T;
Max : access Graphene.Vec3.Graphene_Vec3_T)
return access Graphene_Box_T
Initializes the given Graphene.Box.Graphene_Box_T with two vertices stored inside Graphene.Vec3.Graphene_Vec3_T. Since: gtk+ 1.2
the coordinates of the minimum vertex
the coordinates of the maximum vertex
the initialized Graphene.Box.Graphene_Box_T
function Init_From_Vectors
(Self : not null access Graphene_Box_T;
Vectors : Graphene.Vec3.Graphene_Vec3_Array) return access Graphene_Box_T
Initializes the given Graphene.Box.Graphene_Box_T with the given array of vertices. If Vectors'Length is 0, the returned box is initialized with Graphene.Box.Empty. Since: gtk+ 1.2
an array of Graphene.Vec3.Graphene_Vec3_T
the initialized Graphene.Box.Graphene_Box_T
function Intersection
(Self : not null access Graphene_Box_T;
B : not null access Graphene_Box_T;
Res : access Graphene_Box_T := null) return Boolean
Intersects the two given Graphene.Box.Graphene_Box_T. If the two boxes do not intersect, Res will contain a degenerate box initialized with Graphene.Box.Empty. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
return location for the result
true if the two boxes intersect
function Minus_One return access constant Graphene_Box_T
A Graphene.Box.Graphene_Box_T with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (0, 0, 0). The returned value is owned by Graphene and should not be modified or freed. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
function One return access constant Graphene_Box_T
A Graphene.Box.Graphene_Box_T with the minimum vertex set at (0, 0, 0) and the maximum vertex set at (1, 1, 1). The returned value is owned by Graphene and should not be modified or freed. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
function One_Minus_One return access constant Graphene_Box_T
A Graphene.Box.Graphene_Box_T with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (1, 1, 1). The returned value is owned by Graphene and should not be modified or freed. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T
procedure Union
(Self : not null access Graphene_Box_T;
B : not null access Graphene_Box_T;
Res : not null access Graphene_Box_T)
Unions the two given Graphene.Box.Graphene_Box_T. Since: gtk+ 1.2
the box to union to A
return location for the result
function Zero return access constant Graphene_Box_T
A Graphene.Box.Graphene_Box_T with both the minimum and maximum vertices set at (0, 0, 0). The returned value is owned by Graphene and should not be modified or freed. Since: gtk+ 1.2
a Graphene.Box.Graphene_Box_T