On 13/08/06, Reed Hedges <[EMAIL PROTECTED]> wrote:
> If the determinant of the node matrix is less than 0, it means that it > describes a right-hand coordinate system, so it needs mirrored in the > YZ plane, and the pivot.x should be negated too. >Do you think this should be mentioned in the documentation?
Yes, definitely. It's really a (lack of) documentaion problem in the end, rather than a coding problem.
> p.s. In trying to solve this, I added some new functionality to do the > "Polar Matrix Decomposition" stuff from Graphics Gems IV. This > includes 3ds Max-like decomp_affine etc, which could be fairly useful. > If you want it, let me know and I'll send in the patches. > Yes, these would be useful. matrix.h/c maybe.
I've attached a tgz with my modified files. Two of them are new - decompose.[ch] It's really not the most efficient implementation. I wanted to keep as close to the original gems code as possible. My attempt at converting the code failed miserably. The problem is that the gems code deals with column-major matrices and gl/lib3ds deal with row-major (or is it the other way round?). Either way, the code does a transpose on entry to and exit from the functions, effectively just wrapping around the original code.
> If the determinant of the node matrix is less than 0, it means that it > describes a right-hand coordinate system, so it needs mirrored in the > YZ plane, and the pivot.x should be negated too. One question though, should lib3ds change the matrix automatically? Or maybe have an accessor function for the node matrix which does whatever conversions/normalizations are neccesary?
I prefer the utility function approach, and document the difference between the two. That's just me though. Cheers, Dave
lib3ds-decompose-patch.tgz
Description: GNU Zip compressed data
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ lib3ds-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
