Aabb3 class
Defines a 3-dimensional axis-aligned bounding box between a min and a
max position.
Methods
-
containsAabb3(Aabb3 other)
→ bool
-
Return if this contains
other
.
-
containsSphere(Sphere other)
→ bool
-
Return if this contains
other
.
-
containsTriangle(Triangle other)
→ bool
-
Return if this contains
other
.
-
containsVector3(Vector3 other)
→ bool
-
Return if this contains
other
.
-
copyCenter(Vector3 center)
→ void
-
Copy the
center
of this.
-
copyCenterAndHalfExtents(Vector3 center, Vector3 halfExtents)
→ void
-
Copy the
center
and the halfExtents
of this.
-
copyFrom(Aabb3 other)
→ void
-
Copy the min and max from
other
into this.
-
getPN(Vector3 planeNormal, Vector3 outP, Vector3 outN)
→ void
-
-
hull(Aabb3 other)
→ void
-
Set the min and max of this so that this is a hull of this and
other
.
-
hullPoint(Vector3 point)
→ void
-
Set the min and max of this so that this contains
point
.
-
intersectsWithAabb3(Aabb3 other)
→ bool
-
Return if this intersects with
other
.
-
intersectsWithPlane(Plane other, {IntersectionResult? result})
→ bool
-
Return if this intersects with
other
-
intersectsWithQuad(Quad other, {IntersectionResult? result})
→ bool
-
Return
true
if this intersects with other
.
-
intersectsWithSphere(Sphere other)
→ bool
-
Return if this intersects with
other
.
-
intersectsWithTriangle(Triangle other, {double epsilon = 1e-3, IntersectionResult? result})
→ bool
-
Return if this intersects with
other
.
epsilon
allows the caller to specify a custum eplsilon value that should
be used for the test. If result
is specified and an intersection is
found, result is modified to contain more details about the type of
intersection.
-
intersectsWithVector3(Vector3 other)
→ bool
-
Return if this intersects with
other
.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
rotate(Matrix4 t)
→ void
-
Rotate this by the rotation matrix
t
.
-
rotated(Matrix4 t, Aabb3 out)
→ Aabb3
-
Create a copy of this that is rotated by the rotation matrix
t
and
store it in out
.
-
setCenterAndHalfExtents(Vector3 center, Vector3 halfExtents)
→ void
-
Set the AABB by a
center
and halfExtents
.
-
setObb3(Obb3 obb)
→ void
-
Set the AABB to enclose a
obb
.
-
setQuad(Quad quad)
→ void
-
Set the AABB to enclose a
quad
.
-
setRay(Ray ray, double limitMin, double limitMax)
→ void
-
Set the AABB to enclose a limited
ray
(or line segment) that is limited
by limitMin
and limitMax
.
-
setSphere(Sphere sphere)
→ void
-
Set the AABB to enclose a
sphere
.
-
setTriangle(Triangle triangle)
→ void
-
Set the AABB to enclose a
triangle
.
-
toString()
→ String
-
A string representation of this object.
inherited
-
transform(Matrix4 t)
→ void
-
Transform this by the transform
t
.
-
transformed(Matrix4 t, Aabb3 out)
→ Aabb3
-
Create a copy of this that is transformed by the transform
t
and store
it in out
.