#include <nurbsGL.h>
Inheritance diagram for PLib::ObjectListGL:
Public Member Functions | |
ObjectListGL () | |
virtual | ~ObjectListGL () |
ObjectGL * | first () const |
ObjectGL * | last () const |
ObjectGL * | current () const |
ObjectGL *& | first () |
ObjectGL *& | last () |
ObjectGL *& | current () |
virtual void | glObject () const |
virtual void | display () const |
virtual void | displayName () const |
void | reset () |
void | setResetMode (int m) |
void | add (ObjectGL *obj) |
ObjectGL * | remove (ObjectGL *obj) |
void | activate () |
void | deactivate () |
void | select () |
void | deselect () |
void | transformTo (GLfloat x, GLfloat y, GLfloat z, GLfloat a, GLfloat b, GLfloat c, GLfloat sx, GLfloat sy, GLfloat sz, int behavior=NURBS_FLAGS_AFFECT_ALL) |
void | transformBy (GLfloat x, GLfloat y, GLfloat z, GLfloat a, GLfloat b, GLfloat c, GLfloat sx, GLfloat sy, GLfloat sz, int behavior=NURBS_FLAGS_AFFECT_ALL) |
ObjectGL * | goTo (int a) |
ObjectGL * | goToActive (int a) |
ObjectGL * | goToNext () |
ObjectGL * | goToPrevious () |
ObjectGL * | goToNextActive () |
ObjectGL * | goToPreviousActive () |
ObjectGL * | jumpToNext () |
ObjectGL * | jumpToPrevious () |
void | setJumpSize (int a) |
int | size () const |
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 |
void | viewAllObjects () |
void | hideAllObjects () |
Protected Attributes | |
ObjectGL * | first_ |
ObjectGL * | last_ |
ObjectGL * | current_ |
int | jumpSize |
int | n |
int | resetMode |
PLib::ObjectListGL::ObjectListGL | ( | ) |
The constructor.
By default the reset mode is set to delete all the elements from the list (
NURBSLIST_DELETE_AT_RESET
setResetMode(NURBS_KEEP_AT_RESET)
PLib::ObjectListGL::~ObjectListGL | ( | ) | [virtual] |
The destructor.
void PLib::ObjectListGL::glObject | ( | ) | const [virtual] |
Calls glObject for all the elements from the list.
Displays all the elements from the list
Implements PLib::ObjectGL.
Reimplemented in PLib::NurbsListGL.
void PLib::ObjectListGL::display | ( | ) | const [virtual] |
Displays all the elements from the list.
Reimplemented from PLib::ObjectGL.
Reimplemented in PLib::NurbsListGL.
void PLib::ObjectListGL::displayName | ( | ) | const [virtual] |
Displays all the elements from the list.
void PLib::ObjectListGL::reset | ( | void | ) |
Deletes all the node of the list.
Deletes all the node of the list. Depending on the reset mode, it will also delete the elements.
void PLib::ObjectListGL::add | ( | ObjectGL * | obj | ) |
adds an element to the list
Adds an element to the list.
obj | the element to add |
Reimplemented in PLib::ObjectRefListGL.
finds an element and remove it from the list
Finds an element and delete it from the list. The element will not be deleted. This is up to the calling function.
obj | the element to search |
Reimplemented in PLib::ObjectRefListGL.
void PLib::ObjectListGL::activate | ( | ) | [virtual] |
void PLib::ObjectListGL::deactivate | ( | ) | [virtual] |
void PLib::ObjectListGL::select | ( | ) | [virtual] |
void PLib::ObjectListGL::deselect | ( | ) | [virtual] |
void PLib::ObjectListGL::transformTo | ( | GLfloat | x, | |
GLfloat | y, | |||
GLfloat | z, | |||
GLfloat | a, | |||
GLfloat | b, | |||
GLfloat | c, | |||
GLfloat | sx, | |||
GLfloat | sy, | |||
GLfloat | sz, | |||
int | behavior = NURBS_FLAGS_AFFECT_ALL | |||
) |
transforms the elements stored in the list
Transforms the elements stored in the list to a certain value if the elements are in a proper state. The behavior variable specifies which objects should be affected by this function.
x | a translation in the $x$ direction | |
y | a translation in the $y$ direction | |
z | a translation in the $z$ direction | |
a | a rotation around the $x$-axis | |
b | a rotation around the $y$-axis | |
c | a rotation around the $z$-axis | |
sx | a scaling in the direction of the $x$-axis | |
sy | a scaling in the direction of the $x$-axis | |
sz | a scaling in the direction of the $x$-axis | |
behavior | specifies which objects ared affected by the function |
void PLib::ObjectListGL::transformBy | ( | GLfloat | x, | |
GLfloat | y, | |||
GLfloat | z, | |||
GLfloat | a, | |||
GLfloat | b, | |||
GLfloat | c, | |||
GLfloat | sx, | |||
GLfloat | sy, | |||
GLfloat | sz, | |||
int | behavior = NURBS_FLAGS_AFFECT_ALL | |||
) |
Transforms the elements stored in the list.
Transforms the elements stored in the list by a certain value if the elements are in a proper state. The behavior variable specifies which objects should be affected by this function.
x | a translation in the $x$ direction | |
y | a translation in the $y$ direction | |
z | a translation in the $z$ direction | |
a | a rotation around the $x$-axis | |
b | a rotation around the $y$-axis | |
c | a rotation around the $z$-axis | |
sx | a scaling in the direction of the $x$-axis | |
sy | a scaling in the direction of the $x$-axis | |
sz | a scaling in the direction of the $x$-axis | |
behavior | specifies which objects are affected by the function |
ObjectGL * PLib::ObjectListGL::goTo | ( | int | a | ) |
Moves the current pointer to the n th element.
Moves the current pointer to the n th element. This must be in a valid range otherwise 0 is returned.
a | the a th element |
ObjectGL * PLib::ObjectListGL::goToActive | ( | int | a | ) |
moves the current pointer to the n th active element
Moves the current pointer to the n th active element. This must be in a valid range otherwise 0 is returned.
a | the a th active element |
ObjectGL * PLib::ObjectListGL::goToNext | ( | ) |
move the current pointer to the next element
Moves the current pointer to the next element. If there are no next element, it goes to the first element.
ObjectGL * PLib::ObjectListGL::goToPrevious | ( | ) |
move the current pointer to the previous one
Moves the current pointer to the previous element. If there are no previous element, it goes to the last element.
ObjectGL * PLib::ObjectListGL::goToNextActive | ( | ) |
move the current pointer to the next active element
Moves the current pointer to the next element. If there are no next element, it goes to the first element.
ObjectGL * PLib::ObjectListGL::goToPreviousActive | ( | ) |
move the current pointer to the previous activeElement
Moves the current pointer to the previous element. If there are no previous element, it goes to the last element.
ObjectGL * PLib::ObjectListGL::jumpToNext | ( | ) |
move the current pointer to the next element
Moves the current pointer to the next element. If there are no next element, it goes to the first element.
ObjectGL * PLib::ObjectListGL::jumpToPrevious | ( | ) |
move the current pointer to the next element
Moves the current pointer to the next element. If there are no next element, it goes to the first element.
int PLib::ObjectListGL::read | ( | const char * | filename | ) | [virtual] |
reads a list of objects
filename | the name of the file to read from |
Reimplemented from PLib::ObjectGL.
int PLib::ObjectListGL::write | ( | const char * | filename | ) | const [virtual] |
Writess a list of objects.
filename | the name of the file to read from |
Reimplemented from PLib::ObjectGL.
int PLib::ObjectListGL::writeRIB | ( | const char * | filename | ) | const [virtual] |
Write a list of object in the RIB format.
filename | the name of the file to read from |
Reimplemented from PLib::ObjectGL.
int PLib::ObjectListGL::writePOVRAY | ( | const char * | filename | ) | const [virtual] |
Write a list of object in the POVRAY format.
filename | the name of the file to read from |
Reimplemented from PLib::ObjectGL.
void PLib::ObjectListGL::viewAllObjects | ( | ) |
Sets all object inside the list to view mode.
void PLib::ObjectListGL::hideAllObjects | ( | ) |
Sets all object inside the list to hide mode.