JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.math.geom.Cube Class Reference

Simple 8-point Vec3f cube compound having z-far <= z-near @endiliteral.
More...

Collaboration diagram for com.jogamp.math.geom.Cube:

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...
 

Detailed Description

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

  • lbf, rbf, rtf, ltf
  • lbn, rbn, rtn, ltn

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).

Definition at line 48 of file Cube.java.

Constructor & Destructor Documentation

◆ Cube() [1/4]

com.jogamp.math.geom.Cube.Cube ( )

Construct a Cube with all points set to zero.

Definition at line 75 of file Cube.java.

◆ Cube() [2/4]

com.jogamp.math.geom.Cube.Cube ( final Cube  o)

Copy construct for a Cube.

Definition at line 88 of file Cube.java.

◆ Cube() [3/4]

com.jogamp.math.geom.Cube.Cube ( final AABBox  box)

Construct a Cube with given AABBox.

Definition at line 101 of file Cube.java.

Here is the call graph for this function:

◆ Cube() [4/4]

com.jogamp.math.geom.Cube.Cube ( final Vec3f  lo_lbf,
final Vec3f  hi_rtn 
)

Construct a Cube with given AABBox minimum and maximum.

Parameters
lo_lbfminimum left -bottom-far (xyz)
hi_rtnmaximum right-top -near (xyz)

Definition at line 110 of file Cube.java.

Member Function Documentation

◆ set() [1/3]

Cube com.jogamp.math.geom.Cube.set ( final AABBox  box)

Setting this cube to given AABBox minimum and maximum.

Definition at line 126 of file Cube.java.

Here is the caller graph for this function:

◆ set() [2/3]

Cube com.jogamp.math.geom.Cube.set ( final Cube  o)

Definition at line 149 of file Cube.java.

Here is the call graph for this function:

◆ set() [3/3]

Cube com.jogamp.math.geom.Cube.set ( final Vec3f  lo_lbf,
final Vec3f  hi_rtn 
)

Setting this cube to given AABBox minimum and maximum.

Parameters
lo_lbfminimum left -bottom-far (xyz)
hi_rtnmaximum right-top -near (xyz)

Definition at line 135 of file Cube.java.

Here is the call graph for this function:

◆ toString()

final String com.jogamp.math.geom.Cube.toString ( )

Definition at line 68 of file Cube.java.

◆ transform()

Cube com.jogamp.math.geom.Cube.transform ( final Matrix4f  mat)

Affine 3f-vector transformation of all 8-points with given matrix, Matrix4f#mulVec3f(Vec3f).

Definition at line 163 of file Cube.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateFrustumPlanes()

Frustum com.jogamp.math.geom.Cube.updateFrustumPlanes ( final Frustum  frustum)

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.

Parameters
frustumthe output frustum
Returns
the output frustum for chaining
See also
Frustum::updateFrustumPlanes(Cube)
Cube::Cube(AABBox)
Cube::transform(Matrix4f)

Definition at line 194 of file Cube.java.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ lbf

final Vec3f com.jogamp.math.geom.Cube.lbf

left -bottom-far (xyz) in AABB case, otherwise arbitrary

Definition at line 50 of file Cube.java.

◆ lbn

final Vec3f com.jogamp.math.geom.Cube.lbn

left -bottom-near (xyz) in AABB case, otherwise arbitrary

Definition at line 59 of file Cube.java.

◆ ltf

final Vec3f com.jogamp.math.geom.Cube.ltf

left -top -far (xyz) in AABB case, otherwise arbitrary

Definition at line 56 of file Cube.java.

◆ ltn

final Vec3f com.jogamp.math.geom.Cube.ltn

left -top -near (xyz) in AABB case, otherwise arbitrary

Definition at line 65 of file Cube.java.

◆ rbf

final Vec3f com.jogamp.math.geom.Cube.rbf

right-bottom-far (xyz) in AABB case, otherwise arbitrary

Definition at line 52 of file Cube.java.

◆ rbn

final Vec3f com.jogamp.math.geom.Cube.rbn

right-bottom-near (xyz) in AABB case, otherwise arbitrary

Definition at line 61 of file Cube.java.

◆ rtf

final Vec3f com.jogamp.math.geom.Cube.rtf

right-top -far (xyz) in AABB case, otherwise arbitrary

Definition at line 54 of file Cube.java.

◆ rtn

final Vec3f com.jogamp.math.geom.Cube.rtn

right-top -near (xyz) in AABB case, otherwise arbitrary

Definition at line 63 of file Cube.java.


The documentation for this class was generated from the following file: