public interface AABBic
| Modifier and Type | Method and Description |
|---|---|
org.joml.Vector3d |
center(org.joml.Vector3d dest)
Return the center of the aabb
|
org.joml.Vector3f |
center(org.joml.Vector3f dest)
Return the center of the aabb
|
boolean |
containsAABB(AABBdc aabb)
Check if this AABB contains the given
AABB. |
boolean |
containsAABB(AABBfc aabb)
Check if this AABB contains the given
AABB. |
boolean |
containsAABB(AABBic aabb)
Check if this AABB contains the given
AABB. |
boolean |
containsPoint(float x,
float y,
float z)
Test whether the point
(x, y, z) lies inside this AABB. |
boolean |
containsPoint(int x,
int y,
int z)
Test whether the point
(x, y, z) lies inside this AABB. |
boolean |
containsPoint(org.joml.Vector3fc point)
Test whether the given point lies inside this AABB.
|
boolean |
containsPoint(org.joml.Vector3ic point)
Test whether the given point lies inside this AABB.
|
org.joml.Vector3d |
extent(org.joml.Vector3d dest)
Extent of the aabb (max - min) / 2.0.
|
org.joml.Vector3f |
extent(org.joml.Vector3f dest)
Extent of the aabb (max - min) / 2.0.
|
int |
getMax(int component)
Get the maximum corner coordinate of the given component.
|
int |
getMin(int component)
Get the minimum corner coordinate of the given component.
|
AABBi |
intersection(AABBic other,
AABBi dest)
Compute the AABB of intersection between
this and the given AABB. |
int |
intersectLineSegment(float p0X,
float p0Y,
float p0Z,
float p1X,
float p1Y,
float p1Z,
org.joml.Vector2f result)
Determine whether the undirected line segment with the end points
(p0X, p0Y, p0Z) and (p1X, p1Y, p1Z)
intersects this AABB, and return the values of the parameter t in the ray equation
p(t) = origin + p0 * (p1 - p0) of the near and far point of intersection. |
int |
intersectLineSegment(LineSegmentf lineSegment,
org.joml.Vector2f result)
Determine whether the given undirected line segment intersects this AABB, and return the values of the parameter t in the ray equation
p(t) = origin + p0 * (p1 - p0) of the near and far point of intersection.
|
boolean |
intersectsAABB(AABBfc other)
Test whether
this and other intersect. |
boolean |
intersectsAABB(AABBic other)
Test whether
this and other intersect. |
boolean |
intersectsPlane(float a,
float b,
float c,
float d)
Test whether the plane given via its plane equation
a*x + b*y + c*z + d = 0 intersects this AABB. |
boolean |
intersectsPlane(Planef plane)
Test whether the given plane intersects this AABB.
|
boolean |
intersectsRay(float originX,
float originY,
float originZ,
float dirX,
float dirY,
float dirZ)
Test whether the given ray with the origin
(originX, originY, originZ) and direction (dirX, dirY, dirZ)
intersects this AABB. |
boolean |
intersectsRay(float originX,
float originY,
float originZ,
float dirX,
float dirY,
float dirZ,
org.joml.Vector2f result)
Determine whether the given ray with the origin
(originX, originY, originZ) and direction (dirX, dirY, dirZ)
intersects this AABB, and return the values of the parameter t in the ray equation
p(t) = origin + t * dir of the near and far point of intersection. |
boolean |
intersectsRay(Rayf ray)
Test whether the given ray intersects this AABB.
|
boolean |
intersectsRay(Rayf ray,
org.joml.Vector2f result)
Determine whether the given ray intersects this AABB, and return the values of the parameter t in the ray equation
p(t) = origin + t * dir of the near and far point of intersection.
|
boolean |
intersectsSphere(float centerX,
float centerY,
float centerZ,
float radiusSquared)
Test whether this AABB intersects the given sphere with equation
(x - centerX)^2 + (y - centerY)^2 + (z - centerZ)^2 - radiusSquared = 0. |
boolean |
intersectsSphere(Spheref sphere)
Test whether this AABB intersects the given sphere.
|
boolean |
isValid()
Check whether
this AABB represents a valid AABB. |
int |
maxX() |
int |
maxY() |
int |
maxZ() |
int |
minX() |
int |
minY() |
int |
minZ() |
AABBi |
transform(org.joml.Matrix4fc m,
AABBi dest)
|
AABBi |
translate(int x,
int y,
int z,
AABBi dest)
Translate
this by the vector (x, y, z) and store the result in dest. |
AABBi |
union(AABBic other,
AABBi dest)
Compute the union of
this and other and store the result in dest. |
AABBi |
union(int x,
int y,
int z,
AABBi dest)
Compute the union of
this and the given point (x, y, z) and store the result in dest. |
AABBi |
union(org.joml.Vector3ic p,
AABBi dest)
Compute the union of
this and the given point p and store the result in dest. |
int minX()
int minY()
int minZ()
int maxX()
int maxY()
int maxZ()
boolean isValid()
this AABB represents a valid AABB.true iff this AABB is valid; false otherwiseint getMax(int component)
component - the component, within [0..2]IllegalArgumentException - if component is not within [0..2]int getMin(int component)
component - the component, within [0..2]IllegalArgumentException - if component is not within [0..2]org.joml.Vector3f center(org.joml.Vector3f dest)
dest - will hold the resultorg.joml.Vector3d center(org.joml.Vector3d dest)
dest - will hold the resultorg.joml.Vector3d extent(org.joml.Vector3d dest)
dest - will hold the resultorg.joml.Vector3f extent(org.joml.Vector3f dest)
dest - will hold the resultAABBi union(int x, int y, int z, AABBi dest)
this and the given point (x, y, z) and store the result in dest.x - the x coordinate of the pointy - the y coordinate of the pointz - the z coordinate of the pointdest - will hold the resultAABBi union(org.joml.Vector3ic p, AABBi dest)
this and the given point p and store the result in dest.p - the pointdest - will hold the resultAABBi union(AABBic other, AABBi dest)
this and other and store the result in dest.other - the other AABBidest - will hold the resultAABBi translate(int x, int y, int z, AABBi dest)
this by the vector (x, y, z) and store the result in dest.x - the x coordinate to translate byy - the y coordinate to translate byz - the z coordinate to translate bydest - will hold the resultAABBi intersection(AABBic other, AABBi dest)
this and the given AABB.
If the two AABBs do not intersect, then the minimum coordinates of this
will have a value of Integer.MAX_VALUE and the maximum coordinates will have a value of
Integer.MIN_VALUE.
other - the other AABBdest - will hold the resultboolean containsAABB(AABBdc aabb)
AABB.aabb - the AABB to testtrue iff this AABB contains the AABB; false otherwiseboolean containsAABB(AABBfc aabb)
AABB.aabb - the AABB to testtrue iff this AABB contains the AABB; false otherwiseboolean containsAABB(AABBic aabb)
AABB.aabb - the AABB to testtrue iff this AABB contains the AABB; false otherwiseboolean containsPoint(int x,
int y,
int z)
(x, y, z) lies inside this AABB.x - the x coordinate of the pointy - the y coordinate of the pointz - the z coordinate of the pointtrue iff the given point lies inside this AABB; false otherwiseboolean containsPoint(float x,
float y,
float z)
(x, y, z) lies inside this AABB.x - the x coordinate of the pointy - the y coordinate of the pointz - the z coordinate of the pointtrue iff the given point lies inside this AABB; false otherwiseboolean containsPoint(org.joml.Vector3ic point)
point - the coordinates of the pointtrue iff the given point lies inside this AABB; false otherwiseboolean containsPoint(org.joml.Vector3fc point)
point - the coordinates of the pointtrue iff the given point lies inside this AABB; false otherwiseboolean intersectsPlane(float a,
float b,
float c,
float d)
a*x + b*y + c*z + d = 0 intersects this AABB.
Reference: http://www.lighthouse3d.com ("Geometric Approach - Testing Boxes II")
a - the x factor in the plane equationb - the y factor in the plane equationc - the z factor in the plane equationd - the constant in the plane equationtrue iff the plane intersects this AABB; false otherwiseboolean intersectsPlane(Planef plane)
Reference: http://www.lighthouse3d.com ("Geometric Approach - Testing Boxes II")
plane - the planetrue iff the plane intersects this AABB; false otherwiseboolean intersectsAABB(AABBic other)
this and other intersect.other - the other AABBtrue iff both AABBs intersect; false otherwiseboolean intersectsAABB(AABBfc other)
this and other intersect.other - the other AABBtrue iff both AABBs intersect; false otherwiseboolean intersectsSphere(float centerX,
float centerY,
float centerZ,
float radiusSquared)
(x - centerX)^2 + (y - centerY)^2 + (z - centerZ)^2 - radiusSquared = 0.
Reference: http://stackoverflow.com
centerX - the x coordinate of the center of the spherecenterY - the y coordinate of the center of the spherecenterZ - the z coordinate of the center of the sphereradiusSquared - the square radius of the spheretrue iff this AABB and the sphere intersect; false otherwiseboolean intersectsSphere(Spheref sphere)
Reference: http://stackoverflow.com
sphere - the spheretrue iff this AABB and the sphere intersect; false otherwiseboolean intersectsRay(float originX,
float originY,
float originZ,
float dirX,
float dirY,
float dirZ)
(originX, originY, originZ) and direction (dirX, dirY, dirZ)
intersects this AABB.
This method returns true for a ray whose origin lies inside this AABB.
Reference: An Efficient and Robust Ray–Box Intersection
originX - the x coordinate of the ray's originoriginY - the y coordinate of the ray's originoriginZ - the z coordinate of the ray's origindirX - the x coordinate of the ray's directiondirY - the y coordinate of the ray's directiondirZ - the z coordinate of the ray's directiontrue if this AABB and the ray intersect; false otherwiseboolean intersectsRay(Rayf ray)
This method returns true for a ray whose origin lies inside this AABB.
Reference: An Efficient and Robust Ray–Box Intersection
ray - the raytrue if this AABB and the ray intersect; false otherwiseboolean intersectsRay(float originX,
float originY,
float originZ,
float dirX,
float dirY,
float dirZ,
org.joml.Vector2f result)
(originX, originY, originZ) and direction (dirX, dirY, dirZ)
intersects this AABB, and return the values of the parameter t in the ray equation
p(t) = origin + t * dir of the near and far point of intersection.
This method returns true for a ray whose origin lies inside this AABB.
Reference: An Efficient and Robust Ray–Box Intersection
originX - the x coordinate of the ray's originoriginY - the y coordinate of the ray's originoriginZ - the z coordinate of the ray's origindirX - the x coordinate of the ray's directiondirY - the y coordinate of the ray's directiondirZ - the z coordinate of the ray's directionresult - a vector which will hold the resulting values of the parameter
t in the ray equation p(t) = origin + t * dir of the near and far point of intersection
iff the ray intersects this AABBtrue if the given ray intersects this AABB; false otherwiseboolean intersectsRay(Rayf ray, org.joml.Vector2f result)
This method returns true for a ray whose origin lies inside this AABB.
Reference: An Efficient and Robust Ray–Box Intersection
ray - the rayresult - a vector which will hold the resulting values of the parameter
t in the ray equation p(t) = origin + t * dir of the near and far point of intersection
iff the ray intersects this AABBtrue if the given ray intersects this AABB; false otherwiseint intersectLineSegment(float p0X,
float p0Y,
float p0Z,
float p1X,
float p1Y,
float p1Z,
org.joml.Vector2f result)
(p0X, p0Y, p0Z) and (p1X, p1Y, p1Z)
intersects this AABB, and return the values of the parameter t in the ray equation
p(t) = origin + p0 * (p1 - p0) of the near and far point of intersection.
This method returns true for a line segment whose either end point lies inside this AABB.
Reference: An Efficient and Robust Ray–Box Intersection
p0X - the x coordinate of the line segment's first end pointp0Y - the y coordinate of the line segment's first end pointp0Z - the z coordinate of the line segment's first end pointp1X - the x coordinate of the line segment's second end pointp1Y - the y coordinate of the line segment's second end pointp1Z - the z coordinate of the line segment's second end pointresult - a vector which will hold the resulting values of the parameter
t in the ray equation p(t) = p0 + t * (p1 - p0) of the near and far point of intersection
iff the line segment intersects this AABBIntersectionf.INSIDE if the line segment lies completely inside of this AABB; or
Intersectionf.OUTSIDE if the line segment lies completely outside of this AABB; or
Intersectionf.ONE_INTERSECTION if one of the end points of the line segment lies inside of this AABB; or
Intersectionf.TWO_INTERSECTION if the line segment intersects two sides of this AABB or lies on an edge or a side of this AABBint intersectLineSegment(LineSegmentf lineSegment, org.joml.Vector2f result)
This method returns true for a line segment whose either end point lies inside this AABB.
Reference: An Efficient and Robust Ray–Box Intersection
lineSegment - the line segmentresult - a vector which will hold the resulting values of the parameter
t in the ray equation p(t) = p0 + t * (p1 - p0) of the near and far point of intersection
iff the line segment intersects this AABBIntersectionf.INSIDE if the line segment lies completely inside of this AABB; or
Intersectionf.OUTSIDE if the line segment lies completely outside of this AABB; or
Intersectionf.ONE_INTERSECTION if one of the end points of the line segment lies inside of this AABB; or
Intersectionf.TWO_INTERSECTION if the line segment intersects two sides of this AABB or lies on an edge or a side of this AABBCopyright © 2020 JOML. All rights reserved.