Share

Generic Graphics Toolkit

Tracker: Bugs

5 examples/FAQ need header mention + VecOps.h vs Generate.h - ID: 2860916
Last Update: Comment added ( nobody )

How in god's name is someone supposed to know that they need to include
Generate.h to get the FAQ code for cross products to work? And why would
this not be in VecOps.h?

gmtl::Vec3f vecA, vecB, crossVec;
crossVec = gmtl::cross( vecA, vecB );

I was beating my head up against the wall for hours first thinking that
cross( vec3f, vec3f ) had been removed completely.

Please put some documentation as to where


Nobody/Anonymous ( nobody ) - 2009-09-17 20:09

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2009-09-17 20:40
Sender: nobody

...and the compiler with optimization turned on produces the same code in
either case since in eliminates unnecessary temp vars. I checked:

gmtl::Vec3d vec1(1.0, 1.5, -1.0), vec2(1.5, 1.0, -1.0), vec3;
gmtl::cross(vec1, vec2, vec3);
vs
gmtl::Vec3d vec1(1.0, 1.5, -1.0), vec2(1.5, 1.0, -1.0), vec3;
vec3 = gmtl::makeCross(vec1, vec2);

With -O3 in gcc is the same.


Date: 2009-09-17 20:18
Sender: nobody

It looks like maybe the documentation is out of sync with the code
Some versions have it in VecOps.h some in Generate.h some it doesn't
exist, and there is only makeCross
WTF.


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.