I have still one dubt. Each handle is an index to one array. So if you delete one element from that array you will have to shift the elements to fill that space. That would make the handles that refered to those elements invalid. Do I have to update all the handles that refered to those elements? Do I need to traverse all the objects in search of handles to components that have became invalid each time I delete an object? That seems like a lot of work.

Thanks.

]]>To simplify things we instead use absC = Abs( C ). To project B onto A’s x axis we now do: Dot( B.e, absC.Column0( ) ). Since the result is always positive it can always represent our rB vector (in the diagram) that is pointing in the right direction. So your question is a good one! I intentionally left out the Abs trick as an exercise to the reader, but since you asked such a good question I’ll just add it in.

Note: Usually it’s best to write code in *row major* format, since in memory you darn better have row major format, as all accelerated hardware expects this. This means the basis vectors of a rotation matrix are the *rows*, in memory, of a rotation matrix. So when we do absC.Column*( ), we are taking all of the x, y or z components of all three basis vectors depending on what * is (x, y, or z).

]]>float s = dot( t, l ) – (A.e.x + dot( C.Column0( ), B.e ));

When taking the dot product how do you make sure that B.e points in the right direction?

Ideally B.e should be the b vector in the illustration but in reality B.e could be pointing to an adjacent vertex. In this case the dot product would be incorrect?

]]>Also if I’m not wrong, when you take e.x as a, that means l is the x-axis in the frame of a. Only then will e.x will be a. Is this right?

My second confusion is that dot( C.Column0( ), l ) does not take into account the extents of b which seems counter-intuitive. C is just a multiplication of rotation matrices.

]]>