As part of my self-introduction to OpenGL, I am writing myself a library
filled with useful classes to keep track of object hierarchies, position and
orientation, etc. This is to be written in VC++ 5.
I would like to define a class GLpoint that will have x, y, and z components;
and also it will contain overloaded operators for common math operations.
This seems like a good idea to me, however I am bothered by something I read
in the OpenGL guide for Windows that said that the 3dv and 3fv functions
(using vectors, i.e., 3-element arrays) always operate more quickly than their
3d and 3f counterparts.
In the last system I used, points were represented only as a typedef
translating to vectors. If I use a class with separate x, y, and z
components, I will have to use the 3d and 3f routines. Will I be likely to
inflict and inexcusable performance hit on my system by doing this? Would you
recommend using classes in the way I have suggested or not?
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man."
-- George Bernard Shaw
Russell can be heckled at