Archive for July, 2011

Useless Snippet #2: AABB from a point list

Wednesday, July 27th, 2011

Goal: Calculate the Axis Aligned Bounding Box of a point list.
Restrictions:

  1. Vertices as Vector3f’s
  2. (Optional) Vertex list should be 16-byte aligned

(more…)

Useless Snippet #1: Transform Vec3f by Matrix4x4f

Saturday, July 23rd, 2011

Goal: Multiply a batch of Vector3f’s with the same 4×4 matrix.
Restrictions:

  1. ‘src’ and ‘dst’ arrays shouldn’t point to the same memory location
  2. All pointers should be 16-byte aligned (see below for details on array sizes)
  3. Treat Vector3f’s as positions (w = 1.0)
  4. Matrix is column major

(more…)