Here is the complete class info from my circle.hpp file
class Circle { private: GLfloat x, y, z; //coordinates of center float Cx, Cy, Cz; float radius; int circlePoints,pnts; GLfloat r,g,b; //color public: void set(GLfloat x, GLfloat y, GLfloat z, float r, int pnts); void setColor(GLfloat r, GLfloat g, GLfloat b); float get(GLfloat x, GLfloat y, GLfloat z, float r, int pnts); float getColor(GLfloat r, GLfloat g, GLfloat b); void draw(); };
Here is the complete code from my circle.cpp file
#include "circle.hpp"void Circle::setColor(GLfloat r, GLfloat g, GLfloat b){ glColor3f(r, g, b); }void Circle::set(GLfloat x, GLfloat y, GLfloat z, float r, int pnts){ Cx = x; Cy = y; Cz = z; radius = r; circlePoints = pnts; }float Circle::get(GLfloat x, GLfloat y, GLfloat z, float r, int pnts){ return x, y, z, r, pnts; } float Circle::getColor(GLfloat r, GLfloat g, GLfloat b){ return r, g, b; } void Circle::draw(){ float get(); float getColor(); glColor3f(r, g, b); glPushMatrix(); glEnable(GL_LINE_SMOOTH); glLineWidth(2); glBegin(GL_LINE_LOOP); for(int i=0; i <= pnts; i++){ float angle = 2 * PI * r / pnts; glNormal3f(cos(angle), 0, -sin(angle)); angle = 2*PI * i / pnts; glVertex3f(Cx+r * cos(angle),Cy+r * sin(angle),Cz); } glEnd(); glPopMatrix(); }
If you like I can post all or part of the code fom the main file
Thank all of you for all of the help you have given me so far, I really do appreciate it. Much Thanks, Jody Bush