GPipe-Collada-0.1.0: Load GPipe meshes from Collada filesSource codeContentsIndex
Data.Vec.AABB
Description
This module provides an axis aligned bounding box based on Data.Vecs.
Synopsis
data AABB = AABB {
aabbMin :: Vec3 Float
aabbMax :: Vec3 Float
}
aabbTransform :: Mat44 Float -> AABB -> AABB
testAABBprojection :: Mat44 Float -> AABB -> Intersection
data Intersection
= Inside
| Intersecting
| Outside
Documentation
data AABB Source
An axis aligned bounding box.
Constructors
AABB
aabbMin :: Vec3 Float
aabbMax :: Vec3 Float
show/hide Instances
aabbTransform :: Mat44 Float -> AABB -> AABBSource

Transforms an 'AABB* using a 4x4 matrix. Note that this may grow the AABB and is not associative with matrix multiplication, i.e.

 (m2 `multmm` m1) `aabbTransform` aabb

is usually not the same as

 m2 `aabbTransform` (m1 `aabbTransform` aabb)

(The former is preferred as it minimizes the growing of the AABB).

testAABBprojection :: Mat44 Float -> AABB -> IntersectionSource
Try if an AABB is inside a projection frustum. The AABB must be defined in the same vector space as the matrix, e.g. use the model-view-projection matrix for model-local aabb's.
data Intersection Source
Constructors
Inside
Intersecting
Outside
show/hide Instances
Produced by Haddock version 2.7.2