#include <nurbsGL.h>
Inheritance diagram for PLib::ObjectGL:
Public Types | |
enum | ObjectCategory { badType, nurbsType, pointType, vectorType, listType } |
enum | ObjectType { badObject, curveObject, surfaceObject, pointObject, cpointObject, cpointPolygonObject, bboxObject, vectorObject, listObject, hSurfObject, hcpointObject, pointListObject, spointObject } |
Public Member Functions | |
ObjectGL () | |
virtual | ~ObjectGL () |
ObjectGL & | operator= (const ObjectGL &a) |
void | setObjectColor (const Color &c) |
void | setSelectColor (const Color &c) |
void | setCurrentColor (const Color &c) |
void | glSelectColor () const |
void | glObjectColor () const |
void | glCurrentColor () const |
void | hideObject () |
void | selectObject () |
void | viewObject () |
void | currentObject () |
virtual void | glColor () const |
void | glColor (const Color &c) const |
virtual void | glObject () const =0 |
virtual void | glTransform () const |
virtual void | display () const |
virtual void | displayList () |
virtual void | displayName () |
virtual void | glNewList () |
virtual ObjectGL *& | previous () |
virtual ObjectGL *& | next () |
virtual ObjectGL * | previous () const |
virtual ObjectGL * | next () const |
ObjectGLState | getState () const |
virtual void | select () |
virtual void | deselect () |
int | isSelected () const |
virtual void | activate () |
virtual void | deactivate () |
int | isActive () const |
virtual ObjectGL * | copy () |
virtual void | applyTransform () |
virtual int | read (const char *filename) |
virtual int | write (const char *filename) const |
virtual int | writeRIB (const char *filename) const |
virtual int | writePOVRAY (const char *filename) const |
virtual int | read (ifstream &fin) |
virtual int | write (ofstream &fout) const |
virtual int | writeRIB (ofstream &fout) const |
virtual int | writePOVRAY (ofstream &fout) const |
void | setName (const char *n) |
char * | name () const |
char * | typeName () const |
Public Attributes | |
Color | objectColor |
Color | selectColor |
Color | currentColor |
GLfloat * | materialColor |
ObjectType | type |
ObjectCategory | category |
GLfloat | tx |
GLfloat | ty |
GLfloat | tz |
GLfloat | rx |
GLfloat | ry |
GLfloat | rz |
GLfloat | sx |
GLfloat | sy |
GLfloat | sz |
int | callListId |
Protected Attributes | |
int | selected |
int | active |
ObjectGLState | state |
ObjectGL * | prev_ |
ObjectGL * | next_ |
char * | name_ |
This is the base virtual class for objects which can be displayed using OpenGL.
The class contains informations regarding the color of the object and the state of the object (selected, active, displayed, hidden). It also associates a color for each state.
Information about local transformations which should be applied to the objects are also given.
|
The basic constructor. It sets default values for the state and the colors. The default values are defined by the default global variables: objectColorDefault, selectColorDefault, currentColorDefault and objectStateDefault.
|
|
The destructor.
|
|
generates a default call list Generates a default call list. It generates a call list from the glObject() call using .GL_COMPILE..
|
|
Performs the local transformation. Performs the local transformation in this order: scaling, translation, rotation in x, rotation in y and rotation in z.
|
|
Copies another ObjectGL. Copies another ObjectGL. This will not copy the prev and next pointers.
|
|
Reads the information from a stream.
Reimplemented in PLib::PointListGL, PLib::NurbsCurveGL, PLib::NurbsSurfaceGL, and PLib::HNurbsSurfaceGL. |
|
Reads the information from a stream.
Reimplemented in PLib::ObjectListGL, PLib::PointListGL, and PLib::HNurbsSurfaceGL. |
|
Sets the name of the object. Sets the name of the object. The content of n is copied to the name.
|
|
Returns the name of the type of the class.
|
|
Writes a ObjectGL to a stream.
Reimplemented in PLib::PointListGL, PLib::NurbsCurveGL, PLib::NurbsSurfaceGL, and PLib::HNurbsSurfaceGL. |
|
Writes a ObjectGL to a file.
Reimplemented in PLib::ObjectListGL, PLib::PointListGL, and PLib::HNurbsSurfaceGL. |