Package ch.bailu.gtk.graphene
Klasse Ray
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.graphene.Ray
- Alle implementierten Schnittstellen:
PointerInterface
A ray emitted from an origin in a given direction.
The contents of the `graphene_ray_t` structure are private, and should not
be modified directly.
The contents of the `graphene_ray_t` structure are private, and should not
be modified directly.
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Ray
allocRay()
Allocates a new #graphene_ray_t structure.boolean
Checks whether the two given #graphene_ray_t are equal.void
free()
Frees the resources allocated by graphene_ray_alloc().static ClassHandler
void
getClosestPointToPoint
(Point3D p, Point3D res) Computes the point on the given #graphene_ray_t that is closest to the
given point @p.void
getDirection
(Vec3 direction) Retrieves the direction of the given #graphene_ray_t.float
Computes the distance of the origin of the given #graphene_ray_t from the
given plane.float
Computes the distance of the closest approach between the
given #graphene_ray_t @r and the point @p.static int
void
Retrieves the origin of the given #graphene_ray_t.static long
static TypeSystem.TypeSize
void
getPositionAt
(float t, Point3D position) Retrieves the coordinates of a point at the distance @t along the
given #graphene_ray_t.static long
static TypeSystem.TypeSize
Initializes the given #graphene_ray_t using the given @origin
and @direction values.initFromRay
(Ray src) Initializes the given #graphene_ray_t using the origin and direction
values of another #graphene_ray_t.initFromVec3
(Vec3 origin, Vec3 direction) Initializes the given #graphene_ray_t using the given vectors.int
intersectBox
(Box b, Flt t_out) Intersects the given #graphene_ray_t @r with the given
#graphene_box_t @b.boolean
intersectsBox
(Box b) Checks whether the given #graphene_ray_t @r intersects the
given #graphene_box_t @b.int
intersectSphere
(Sphere s, Flt t_out) Intersects the given #graphene_ray_t @r with the given
#graphene_sphere_t @s.boolean
Checks if the given #graphene_ray_t @r intersects the
given #graphene_sphere_t @s.boolean
Checks whether the given #graphene_ray_t @r intersects the
given #graphene_triangle_t @b.int
intersectTriangle
(Triangle t, Flt t_out) Intersects the given #graphene_ray_t @r with the given
#graphene_triangle_t @t.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
-
ORIGIN
Private field: direct-type- Siehe auch:
-
DIRECTION
Private field: direct-type- Siehe auch:
-
-
Konstruktordetails
-
Ray
-
Ray
public Ray()
-
-
Methodendetails
-
getClassHandler
-
allocRay
Allocates a new #graphene_ray_t structure.
The contents of the returned structure are undefined.- Gibt zurück:
- the newly allocated #graphene_ray_t. Use graphene_ray_free() to free the resources allocated by this function
-
equal
Checks whether the two given #graphene_ray_t are equal.- Parameter:
b
- a #graphene_ray_t- Gibt zurück:
- `true` if the given rays are equal
-
free
public void free()Frees the resources allocated by graphene_ray_alloc(). -
getClosestPointToPoint
Computes the point on the given #graphene_ray_t that is closest to the
given point @p.- Parameter:
p
- a #graphene_point3d_tres
- return location for the closest point3d
-
getDirection
Retrieves the direction of the given #graphene_ray_t.- Parameter:
direction
- return location for the direction
-
getDistanceToPlane
Computes the distance of the origin of the given #graphene_ray_t from the
given plane.
If the ray does not intersect the plane, this function returns `INFINITY`.- Parameter:
p
- a #graphene_plane_t- Gibt zurück:
- the distance of the origin of the ray from the plane
-
getDistanceToPoint
Computes the distance of the closest approach between the
given #graphene_ray_t @r and the point @p.
The closest approach to a ray from a point is the distance
between the point and the projection of the point on the
ray itself.- Parameter:
p
- a #graphene_point3d_t- Gibt zurück:
- the distance of the point
-
getOrigin
Retrieves the origin of the given #graphene_ray_t.- Parameter:
origin
- return location for the origin
-
getPositionAt
Retrieves the coordinates of a point at the distance @t along the
given #graphene_ray_t.- Parameter:
t
- the distance along the rayposition
- return location for the position
-
init
Initializes the given #graphene_ray_t using the given @origin
and @direction values.- Parameter:
origin
- the origin of the raydirection
- the direction vector- Gibt zurück:
- the initialized ray
-
initFromRay
Initializes the given #graphene_ray_t using the origin and direction
values of another #graphene_ray_t.- Parameter:
src
- a #graphene_ray_t- Gibt zurück:
- the initialized ray
-
initFromVec3
Initializes the given #graphene_ray_t using the given vectors.- Parameter:
origin
- a #graphene_vec3_tdirection
- a #graphene_vec3_t- Gibt zurück:
- the initialized ray
-
intersectBox
Intersects the given #graphene_ray_t @r with the given
#graphene_box_t @b.- Parameter:
b
- a #graphene_box_tt_out
- the distance of the point on the ray that intersects the box- Gibt zurück:
- the type of intersection
-
intersectSphere
Intersects the given #graphene_ray_t @r with the given
#graphene_sphere_t @s.- Parameter:
s
- a #graphene_sphere_tt_out
- the distance of the point on the ray that intersects the sphere- Gibt zurück:
- the type of intersection
-
intersectTriangle
Intersects the given #graphene_ray_t @r with the given
#graphene_triangle_t @t.- Parameter:
t
- a #graphene_triangle_tt_out
- the distance of the point on the ray that intersects the triangle- Gibt zurück:
- the type of intersection
-
intersectsBox
Checks whether the given #graphene_ray_t @r intersects the
given #graphene_box_t @b.
See also: graphene_ray_intersect_box()- Parameter:
b
- a #graphene_box_t- Gibt zurück:
- `true` if the ray intersects the box
-
intersectsSphere
Checks if the given #graphene_ray_t @r intersects the
given #graphene_sphere_t @s.
See also: graphene_ray_intersect_sphere()- Parameter:
s
- a #graphene_sphere_t- Gibt zurück:
- `true` if the ray intersects the sphere
-
intersectsTriangle
Checks whether the given #graphene_ray_t @r intersects the
given #graphene_triangle_t @b.
See also: graphene_ray_intersect_triangle()- Parameter:
t
- a #graphene_triangle_t- Gibt zurück:
- `true` if the ray intersects the triangle
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-