Files Classes Functions Hierarchy
#include <graphmisc.h>
Public Member Functions | |
| myRotate (point3< double > const &axis_) | |
| void | draw () |
| Draw the object. | |
Public Attributes | |
| point3< double > | axis |
Static Public Attributes | |
| static point3< double > const | zaxis |
Definition at line 49 of file graphmisc.h.
| myRotate::myRotate | ( | point3< double > const & | axis_ | ) | [inline] |
| void myRotate::draw | ( | ) | [inline, virtual] |
Draw the object.
Implements gobj.
Definition at line 60 of file graphmisc.h.
References axis, point3< T >::distance(), point3< T >::dot(), crossproduct::evalxyz(), GOBJDEBUGCODE, point3< T >::x, point3< T >::y, point3< T >::z, and zaxis.
00061 { 00062 GOBJDEBUGCODE 00063 if (axis!=zaxis) 00064 { 00065 assert(axis!=point3<double>(0,0,0)); 00066 00067 point3<double> N; 00068 crossproduct::evalxyz(N,zaxis,axis); 00069 00070 double angle = acos( axis.dot(zaxis) / axis.distance() ); 00071 angle *= 180.0/PI; 00072 glRotated(angle,N.x,N.y,N.z); 00073 } 00074 }
| point3<double> myRotate::axis |
point3< double > const myRotate::zaxis [static] |
1.5.8