Skip to main content

aabb3_detailed_volume_intersection

Constants

Functions

Figures out intersection volume between an AABB and a frustum for much tighter bounds

Especially beneficial when trying to intersect a large AABB against a small frustum, where where traditionally only AABB corners would be considered, we're instead able to compute minimum bounds of the overlap of the two

scratch_aabb_corners : Array.<number>

Kind: global constant

scratch_aabb_planes : Array.<number>

Kind: global constant

scratch_corner_out_bitfields : Array.<number>

Kind: global constant

scratch_v3_array : Array.<number>

Kind: global constant

aabb3_detailed_volume_intersection(destination, destination_offset, x0, y0, z0, x1, y1, z1, planes, plane_mask, plane_count) ⇒ number

Figures out intersection volume between an AABB and a frustum for much tighter bounds

Especially beneficial when trying to intersect a large AABB against a small frustum, where where traditionally only AABB corners would be considered, we're instead able to compute minimum bounds of the overlap of the two

Kind: global function

ParamType
destinationArray.<number>
destination_offsetnumber
x0number
y0number
z0number
x1number
y1number
z1number
planesArray.<number>
plane_masknumber
plane_countnumber

aabb3_detailed_volume_intersection~outside_corner_mask : number

Bitfield marking which corners are outside of the frustum

Kind: inner property of aabb3_detailed_volume_intersection

aabb3_detailed_volume_intersection~intersecting_edge_mask : number

Bitfield marking edges that are attached to outside corners

Kind: inner property of aabb3_detailed_volume_intersection

aabb3_detailed_volume_intersection~corner_plane_out_bitfield : number

Bitfield to outside of which planes a particular corner lies

Kind: inner property of aabb3_detailed_volume_intersection