Skip to content
CoreSource checked

Oriented Bounding Box Intersection

Tests overlap between rotated boxes using candidate separating axes.

Quick Facts

Compact metadata for implementation and discovery.

Category
Geometry
Difficulty
Advanced
Family
Intersection Test
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
4
Code example
Ready
Visualization
Ready

Overview

Oriented bounding box intersection usually applies the separating axis theorem to the local axes of both boxes and their cross products.

Core Concepts

oriented boxseparating axisaxis projectioninterval overlap

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(1)

Average

O(1)

Worst

O(1)

Space

O(1)

When to Use

  • Use when collision and intersection tests needs oriented box.
  • Use when the input matches the assumptions behind intersection Test.

When Not to Use

  • Avoid when floating-point robustness is critical and no tolerance strategy is defined.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Tests overlap between rotated boxes using candidate separating axes
  • Uses oriented box and separating axis to guide the work.
  • Produces geometric relation, simplified shape, or constructed geometry.

Use Cases

  • Collision and intersection tests
  • Shape analysis
  • Geometry processing

Inputs

  • Points, segments, polygons, or meshes
  • Query shape or tolerance

Outputs

  • Geometric relation, simplified shape, or constructed geometry

Key Formulas (1)

Separating axis test

overlapon axis = projectiona overlaps projectionb
overlap_on_axis = projection_a overlaps projection_b

Boxes intersect only if projections overlap on every candidate axis.

Pseudocode

  1. 1.Prepare the inputs and state needed for Oriented Bounding Box Intersection.
  2. 2.Apply the oriented box step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return geometric relation, simplified shape, or constructed geometry.

Canonical Example

Input
Oriented Bounding Box Intersection input with a small representative case
Output
Geometric relation, simplified shape, or constructed geometry
Explanation
Oriented Bounding Box Intersection applies oriented box to produce geometric relation, simplified shape, or constructed geometry.

Implementation Notes

  • Use robust orientation and tolerance checks for boundary cases.
  • Keep the oriented box step separate enough to test independently.

Common Pitfalls

  • Degenerate cases such as collinear points or shared edges often need explicit handling.
  • Forgetting to check edge cases can make Oriented Bounding Box Intersection look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Draw the input shapes, active tests, and generated geometric result.

Oriented Bounding Box Intersection mechanism walkthrough step 1 of 4
Step 1 of 4: Prepare the inputs and state needed for Oriented Bounding Box Intersection.
geometry-mechanism

Notes

Oriented Bounding Box Intersection should be used with the assumptions and tradeoffs of intersection Test in mind.

Sources (1)

What each reference supports for this entry.

Real-Time Collision Detection

Book

Geometric collision reference for Oriented Bounding Box Intersection's primitive tests, bounding volumes, and numerical edge cases.

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

OBB tests fit rotated objects more tightly at higher cost.

OBB intersection commonly uses SAT projections.

Tags

Computational GeometryBounding VolumeCollision DetectionGeometry