Package ch.bailu.gtk.graphene
Klasse Point3D
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.graphene.Point3D
- Alle implementierten Schnittstellen:
PointerInterface
A point with three components: X, Y, and Z.
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Point3D
Allocates a #graphene_point3d_t structure.void
Computes the cross product of the two given #graphene_point3d_t.float
Computes the distance between the two given #graphene_point3d_t.float
Computes the dot product of the two given #graphene_point3d_t.boolean
Checks whether two given points are equal.void
free()
Frees the resources allocated via graphene_point3d_alloc().static ClassHandler
float
the X coordinatefloat
the Y coordinatefloat
the Z coordinatestatic int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
init
(float x, float y, float z) Initializes a #graphene_point3d_t with the given coordinates.initFromPoint
(Point3D src) Initializes a #graphene_point3d_t using the coordinates of
another #graphene_point3d_t.initFromVec3
(Vec3 v) Initializes a #graphene_point3d_t using the components
of a #graphene_vec3_t.void
interpolate
(Point3D b, double factor, Point3D res) Linearly interpolates each component of @a and @b using the
provided @factor, and places the result in @res.float
length()
Computes the length of the vector represented by the
coordinates of the given #graphene_point3d_t.boolean
Checks whether the two points are near each other, within
an @epsilon factor.void
Computes the normalization of the vector represented by the
coordinates of the given #graphene_point3d_t.void
normalizeViewport
(Rect viewport, float z_near, float z_far, Point3D res) Normalizes the coordinates of a #graphene_point3d_t using the
given viewport and clipping planes.void
Scales the coordinates of the given #graphene_point3d_t by
the given @factor.void
setFieldX
(float x) the X coordinatevoid
setFieldY
(float y) the Y coordinatevoid
setFieldZ
(float z) the Z coordinatevoid
Stores the coordinates of a #graphene_point3d_t into a
#graphene_vec3_t.static Point3D
zero()
Retrieves a constant point with all three coordinates set to 0.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
-
X
the X coordinate- Siehe auch:
-
Y
the Y coordinate- Siehe auch:
-
Z
the Z coordinate- Siehe auch:
-
-
Konstruktordetails
-
Point3D
-
Point3D
public Point3D()
-
-
Methodendetails
-
getClassHandler
-
setFieldX
public void setFieldX(float x) the X coordinate -
getFieldX
public float getFieldX()the X coordinate -
setFieldY
public void setFieldY(float y) the Y coordinate -
getFieldY
public float getFieldY()the Y coordinate -
setFieldZ
public void setFieldZ(float z) the Z coordinate -
getFieldZ
public float getFieldZ()the Z coordinate -
allocPoint3D
Allocates a #graphene_point3d_t structure.- Gibt zurück:
- the newly allocated structure. Use graphene_point3d_free() to free the resources allocated by this function.
-
cross
Computes the cross product of the two given #graphene_point3d_t.- Parameter:
b
- a #graphene_point3d_tres
- return location for the cross product
-
distance
Computes the distance between the two given #graphene_point3d_t.- Parameter:
b
- a #graphene_point3d_tdelta
- return location for the distance components on the X, Y, and Z axis- Gibt zurück:
- the distance between two points
-
dot
Computes the dot product of the two given #graphene_point3d_t.- Parameter:
b
- a #graphene_point3d_t- Gibt zurück:
- the value of the dot product
-
equal
Checks whether two given points are equal.- Parameter:
b
- a #graphene_point3d_t- Gibt zurück:
- `true` if the points are equal
-
free
public void free()Frees the resources allocated via graphene_point3d_alloc(). -
init
Initializes a #graphene_point3d_t with the given coordinates.- Parameter:
x
- the X coordinate of the pointy
- the Y coordinate of the pointz
- the Z coordinate of the point- Gibt zurück:
- the initialized #graphene_point3d_t
-
initFromPoint
Initializes a #graphene_point3d_t using the coordinates of
another #graphene_point3d_t.- Parameter:
src
- a #graphene_point3d_t- Gibt zurück:
- the initialized point
-
initFromVec3
Initializes a #graphene_point3d_t using the components
of a #graphene_vec3_t.- Parameter:
v
- a #graphene_vec3_t- Gibt zurück:
- the initialized #graphene_point3d_t
-
interpolate
Linearly interpolates each component of @a and @b using the
provided @factor, and places the result in @res.- Parameter:
b
- a #graphene_point3d_tfactor
- the interpolation factorres
- the return location for the interpolated #graphene_point3d_t
-
length
public float length()Computes the length of the vector represented by the
coordinates of the given #graphene_point3d_t.- Gibt zurück:
- the length of the vector represented by the point
-
near
Checks whether the two points are near each other, within
an @epsilon factor.- Parameter:
b
- a #graphene_point3d_tepsilon
- fuzzyness factor- Gibt zurück:
- `true` if the points are near each other
-
normalize
Computes the normalization of the vector represented by the
coordinates of the given #graphene_point3d_t.- Parameter:
res
- return location for the normalized #graphene_point3d_t
-
normalizeViewport
public void normalizeViewport(@Nonnull Rect viewport, float z_near, float z_far, @Nonnull Point3D res) Normalizes the coordinates of a #graphene_point3d_t using the
given viewport and clipping planes.
The coordinates of the resulting #graphene_point3d_t will be
in the [ -1, 1 ] range.- Parameter:
viewport
- a #graphene_rect_t representing a viewportz_near
- the coordinate of the near clipping plane, or 0 for the default near clipping planez_far
- the coordinate of the far clipping plane, or 1 for the default far clipping planeres
- the return location for the normalized #graphene_point3d_t
-
scale
Scales the coordinates of the given #graphene_point3d_t by
the given @factor.- Parameter:
factor
- the scaling factorres
- return location for the scaled point
-
toVec3
Stores the coordinates of a #graphene_point3d_t into a
#graphene_vec3_t.- Parameter:
v
- return location for a #graphene_vec3_t
-
zero
Retrieves a constant point with all three coordinates set to 0.- Gibt zurück:
- a zero point
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-