Package ch.bailu.gtk.graphene
Klasse Plane
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.graphene.Plane
- Alle implementierten Schnittstellen:
PointerInterface
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.
The contents of the `graphene_plane_t` are private, and should not be
modified directly.
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Plane
Allocates a new #graphene_plane_t structure.float
Computes the distance of @point from a #graphene_plane_t.boolean
Checks whether the two given #graphene_plane_t are equal.void
free()
Frees the resources allocated by graphene_plane_alloc().static ClassHandler
float
Retrieves the distance along the normal vector of the
given #graphene_plane_t from the origin.float
static int
void
Retrieves the normal vector pointing towards the origin of the
given #graphene_plane_t.static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
Initializes the given #graphene_plane_t using the given @normal vector
and @constant values.initFromPlane
(Plane src) Initializes the given #graphene_plane_t using the normal
vector and constant of another #graphene_plane_t.initFromPoint
(Vec3 normal, Point3D point) Initializes the given #graphene_plane_t using the given normal vector
and an arbitrary co-planar point.initFromPoints
(Point3D a, Point3D b, Point3D c) Initializes the given #graphene_plane_t using the 3 provided co-planar
points.initFromVec4
(Vec4 src) Initializes the given #graphene_plane_t using the components of
the given #graphene_vec4_t vector.void
Negates the normal vector and constant of a #graphene_plane_t, effectively
mirroring the plane across the origin.void
Normalizes the vector of the given #graphene_plane_t,
and adjusts the constant accordingly.void
Transforms a #graphene_plane_t @p using the given @matrix
and @normal_matrix.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
NORMAL
Private field: direct-type- Siehe auch:
-
CONSTANT
- Siehe auch:
-
-
Konstruktordetails
-
Plane
-
Plane
public Plane()
-
-
Methodendetails
-
getClassHandler
-
getFieldConstant
public float getFieldConstant() -
allocPlane
Allocates a new #graphene_plane_t structure.
The contents of the returned structure are undefined.- Gibt zurück:
- the newly allocated #graphene_plane_t. Use graphene_plane_free() to free the resources allocated by this function
-
distance
Computes the distance of @point from a #graphene_plane_t.- Parameter:
point
- a #graphene_point3d_t- Gibt zurück:
- the distance of the given #graphene_point3d_t from the plane
-
equal
Checks whether the two given #graphene_plane_t are equal.- Parameter:
b
- a #graphene_plane_t- Gibt zurück:
- `true` if the given planes are equal
-
free
public void free()Frees the resources allocated by graphene_plane_alloc(). -
getConstant
public float getConstant()Retrieves the distance along the normal vector of the
given #graphene_plane_t from the origin.- Gibt zurück:
- the constant value of the plane
-
getNormal
Retrieves the normal vector pointing towards the origin of the
given #graphene_plane_t.- Parameter:
normal
- return location for the normal vector
-
init
Initializes the given #graphene_plane_t using the given @normal vector
and @constant values.- Parameter:
normal
- a unit length normal vector defining the plane pointing towards the origin; if unset, we use the X axis by defaultconstant
- the distance from the origin to the plane along the normal vector; the sign determines the half-space occupied by the plane- Gibt zurück:
- the initialized plane
-
initFromPlane
Initializes the given #graphene_plane_t using the normal
vector and constant of another #graphene_plane_t.- Parameter:
src
- a #graphene_plane_t- Gibt zurück:
- the initialized plane
-
initFromPoint
Initializes the given #graphene_plane_t using the given normal vector
and an arbitrary co-planar point.- Parameter:
normal
- a normal vector defining the plane pointing towards the originpoint
- a #graphene_point3d_t- Gibt zurück:
- the initialized plane
-
initFromPoints
Initializes the given #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.- Parameter:
a
- a #graphene_point3d_tb
- a #graphene_point3d_tc
- a #graphene_point3d_t- Gibt zurück:
- the initialized plane
-
initFromVec4
Initializes the given #graphene_plane_t using the components of
the given #graphene_vec4_t vector.- Parameter:
src
- a #graphene_vec4_t containing the normal vector in its first three components, and the distance in its fourth component- Gibt zurück:
- the initialized plane
-
negate
Negates the normal vector and constant of a #graphene_plane_t, effectively
mirroring the plane across the origin.- Parameter:
res
- return location for the negated plane
-
normalize
Normalizes the vector of the given #graphene_plane_t,
and adjusts the constant accordingly.- Parameter:
res
- return location for the normalized plane
-
transform
Transforms a #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.- Parameter:
matrix
- a #graphene_matrix_tnormal_matrix
- a #graphene_matrix_tres
- the transformed plane
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-