Files Classes Functions Hierarchy
#include <graphmisc.h>
Public Member Functions | |
| gobjMySphereDraw () | |
| gobjMySphereDraw (floatc x_, floatc y_, floatc z_, gobjQuadric *quadric_) | |
| gobjMySphereDraw (doublec x_, doublec y_, doublec z_, gobjQuadric *quadric_) | |
| gobjMySphereDraw (point3< double > const &p, gobjQuadric *quadric_) | |
| gobjMySphereDraw (point3< float > const &p, gobjQuadric *quadric_) | |
| gobjMySphereDraw (point2< double > const &x, gobjQuadric *quadric_) | |
| gobjMySphereDraw (point2< double > const &x, gobjQuadric &quadricref) | |
| gobjMySphereDraw (point2< float > const &x, gobjQuadric *quadric_) | |
| void | draw () |
| Draw the object. | |
Public Attributes | |
| gobjQuadric * | quadric |
| float | x |
| float | y |
| float | z |
The client supplies the quadric which allows for reuse - multiple spheres can use the same quadric.
gobjpush( new gobjglColor3ub(0,255,0) );
gobjQuadric * q2 = new gobjQuadric();
q2->radius = 0.02;
q2->slices=20;
q2->loops=6;
gobjpush(q2);
for (uint i=0; i<greenpoints.size(); ++i)
gobjpush( new gobjMySphereDraw(greenpoints[i],q2) );
Definition at line 559 of file graphmisc.h.
| gobjMySphereDraw::gobjMySphereDraw | ( | ) | [inline] |
| gobjMySphereDraw::gobjMySphereDraw | ( | floatc | x_, | |
| floatc | y_, | |||
| floatc | z_, | |||
| gobjQuadric * | quadric_ | |||
| ) | [inline] |
| gobjMySphereDraw::gobjMySphereDraw | ( | doublec | x_, | |
| doublec | y_, | |||
| doublec | z_, | |||
| gobjQuadric * | quadric_ | |||
| ) | [inline] |
| gobjMySphereDraw::gobjMySphereDraw | ( | point3< double > const & | p, | |
| gobjQuadric * | quadric_ | |||
| ) | [inline] |
| gobjMySphereDraw::gobjMySphereDraw | ( | point3< float > const & | p, | |
| gobjQuadric * | quadric_ | |||
| ) | [inline] |
| gobjMySphereDraw::gobjMySphereDraw | ( | point2< double > const & | x, | |
| gobjQuadric * | quadric_ | |||
| ) | [inline] |
| gobjMySphereDraw::gobjMySphereDraw | ( | point2< double > const & | x, | |
| gobjQuadric & | quadricref | |||
| ) | [inline] |
| gobjMySphereDraw::gobjMySphereDraw | ( | point2< float > const & | x, | |
| gobjQuadric * | quadric_ | |||
| ) | [inline] |
| void gobjMySphereDraw::draw | ( | ) | [inline, virtual] |
Draw the object.
Implements gobj.
Definition at line 626 of file graphmisc.h.
References GOBJDEBUGCODE, gobjQuadric::loops, gobjQuadric::quadric, quadric, gobjQuadric::radius, gobjQuadric::slices, and z.
00627 { 00628 GOBJDEBUGCODE 00629 assert(quadric!=0); 00630 00631 glPushMatrix(); 00632 glTranslatef(x,y,z); 00633 gluSphere(quadric->quadric,quadric->radius,quadric->slices,quadric->loops); 00634 glPopMatrix(); 00635 }
| float gobjMySphereDraw::x |
Definition at line 565 of file graphmisc.h.
| float gobjMySphereDraw::y |
Definition at line 566 of file graphmisc.h.
| float gobjMySphereDraw::z |
1.5.8