JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Simple 8-point Vec3f
cube compound having z-far <= z-near @endiliteral.
More...
Public Member Functions | |
final String | toString () |
Cube () | |
Construct a Cube with all points set to zero. More... | |
Cube (final Cube o) | |
Copy construct for a Cube . More... | |
Cube (final AABBox box) | |
Construct a Cube with given AABBox . More... | |
Cube (final Vec3f lo_lbf, final Vec3f hi_rtn) | |
Construct a Cube with given AABBox minimum and maximum. More... | |
Cube | set (final AABBox box) |
Setting this cube to given AABBox minimum and maximum. More... | |
Cube | set (final Vec3f lo_lbf, final Vec3f hi_rtn) |
Setting this cube to given AABBox minimum and maximum. More... | |
Cube | set (final Cube o) |
Cube | transform (final Matrix4f mat) |
Affine 3f-vector transformation of all 8-points with given matrix, Matrix4f#mulVec3f(Vec3f) . More... | |
Frustum | updateFrustumPlanes (final Frustum frustum) |
Calculate the frustum planes using this Cube . More... | |
Public Attributes | |
final Vec3f | lbf |
left -bottom-far (xyz) in AABB case, otherwise arbitrary More... | |
final Vec3f | rbf |
right-bottom-far (xyz) in AABB case, otherwise arbitrary More... | |
final Vec3f | rtf |
right-top -far (xyz) in AABB case, otherwise arbitrary More... | |
final Vec3f | ltf |
left -top -far (xyz) in AABB case, otherwise arbitrary More... | |
final Vec3f | lbn |
left -bottom-near (xyz) in AABB case, otherwise arbitrary More... | |
final Vec3f | rbn |
right-bottom-near (xyz) in AABB case, otherwise arbitrary More... | |
final Vec3f | rtn |
right-top -near (xyz) in AABB case, otherwise arbitrary More... | |
final Vec3f | ltn |
left -top -near (xyz) in AABB case, otherwise arbitrary More... | |
Simple 8-point Vec3f
cube compound having z-far <= z-near @endiliteral.
8-points from far to near (z), left to right (x) and bottom to top (y) in AABB case, otherwise arbitrary
A cube can be used to transform an AABBox
from object-space to e.g. model-view (Mv) space via Cube(AABBox)
and transform(Matrix4f)
as required for an Mv Frustum
presentation, see updateFrustumPlanes(Frustum)
.
com.jogamp.math.geom.Cube.Cube | ( | ) |
com.jogamp.math.geom.Cube.Cube | ( | final Cube | o | ) |
com.jogamp.math.geom.Cube.Cube | ( | final AABBox | box | ) |
Affine 3f-vector transformation of all 8-points with given matrix, Matrix4f#mulVec3f(Vec3f)
.
Definition at line 163 of file Cube.java.
Calculate the frustum planes using this Cube
.
One useful application is to transform
an AABBox
, see Cube#Cube(AABBox)
from its object-space into model-view (Mv) and produce the Frustum
planes using this method for CPU side object culling and GPU shader side fragment clipping.
Frustum plane's normals will point to the inside of the viewing frustum, as required by the Frustum
class.
frustum | the output frustum |
Definition at line 194 of file Cube.java.
final Vec3f com.jogamp.math.geom.Cube.lbf |
final Vec3f com.jogamp.math.geom.Cube.lbn |
final Vec3f com.jogamp.math.geom.Cube.ltf |
final Vec3f com.jogamp.math.geom.Cube.ltn |
final Vec3f com.jogamp.math.geom.Cube.rbf |
final Vec3f com.jogamp.math.geom.Cube.rbn |
final Vec3f com.jogamp.math.geom.Cube.rtf |
final Vec3f com.jogamp.math.geom.Cube.rtn |