Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 39518

The smallest box shape that fully encloses a 3D mesh. They are usually used for things like broad phase culling, a technique to do an initial coarse check for which parts of a 3D scene to include for rendering or collision detection.

1 vote
Accepted

Ray-Square Intersection where the Ray always lies on the Interior of the Square?

Here's some glsl-type code for how we can do this. The trick is to think of the ray as a particle starting at some position and moving at some velocity. Then we can calculate how long it takes the par …
DMGregory's user avatar
  • 136k
1 vote

Project 3D points to a plane, then project their bounding box back to 3D

As you go through your points, before you project them to the plane, look at their height off the plane. Note down the greatest and least height off plane that you encounter for each object. Once you …
DMGregory's user avatar
  • 136k
2 votes
Accepted

Ray-Box (AABB) is slower than without

It looks like you're using the bounding boxes on sphere primitives. A sphere intersection is very cheap, as computer graphics operations go. In fact, it's often substantially cheaper than testing agai …
DMGregory's user avatar
  • 136k
2 votes
Accepted

Categorize contact & overlap cases for 2D & 3D axis-aligned bounding boxes

For each axis, compute whether the intervals spanned by the two boxes are...  -1: overlapped (minA < maxB & maxA > minB)   0: adjacent (minA == maxB or minB == maxA) +1: separated (minA > maxB or mi …
DMGregory's user avatar
  • 136k
0 votes
Accepted

Unity Vertex shader recalculate renderer bounds

You can't recalculate the bounds in the vertex shader itself (culling happens before we've even decided to send those vertices to the GPU), but we can manually set the bounds in a C# script: // Note: …
DMGregory's user avatar
  • 136k
2 votes

How do Axis-Aligned Bounding Boxes update with rotations?

Given an original axis-aligned bounding box and a transformation matrix, you can compute a new axis-aligned bounding box from the extents of the original box, transformed by the matrix, like so: // K …
DMGregory's user avatar
  • 136k
0 votes

How to check if one object's local bounding box contains another

You're still mixing and matching different coordinate spaces. Mesh.bounds is defined in local space. You can't use it to check for containment of a point in world space. Similarly, Collider.bounds is …
DMGregory's user avatar
  • 136k