Aabb3 class

Defines a 3-dimensional axis-aligned bounding box between a min and a max position.

Constructors

Aabb3()
Create a new AABB with min and max set to the origin.
Aabb3.centerAndHalfExtents(Vector3 center, Vector3 halfExtents)
Create a new AABB with a center and halfExtents.
factory
Aabb3.copy(Aabb3 other)
Create a new AABB as a copy of other.
Aabb3.fromBuffer(ByteBuffer buffer, int offset)
Constructs Aabb3 with a min/max storage that views given buffer starting at offset. offset has to be multiple of Float64List.bytesPerElement.
Aabb3.fromObb3(Obb3 obb)
Create a new AABB that encloses a obb.
factory
Aabb3.fromQuad(Quad quad)
Create a new AABB that encloses a quad.
factory
Aabb3.fromRay(Ray ray, double limitMin, double limitMax)
Create a new AABB that encloses a limited ray (or line segment) that has a minLimit and maxLimit.
factory
Aabb3.fromSphere(Sphere sphere)
Create a new AABB that encloses a sphere.
factory
Aabb3.fromTriangle(Triangle triangle)
Create a new AABB that encloses a triangle.
factory
Aabb3.minMax(Vector3 min, Vector3 max)
Create a new AABB with a min and max.

Properties

center Vector3
The center of the AABB.
read-only
max Vector3
read-only
min Vector3
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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 halfExtends 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 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.
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.
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.
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited