Main Page | Class Hierarchy | Class List | File List | Class Members

PLib::ObjectListGL Class Reference

A link list of ObjectGL. More...

#include <nurbsGL.h>

Inheritance diagram for PLib::ObjectListGL:

PLib::ObjectGL PLib::NurbsListGL PLib::ObjectRefListGL List of all members.

Public Member Functions

 ObjectListGL ()
virtual ~ObjectListGL ()
ObjectGLfirst () const
ObjectGLlast () const
ObjectGLcurrent () 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)
ObjectGLremove (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)
ObjectGLgoTo (int a)
ObjectGLgoToActive (int a)
ObjectGLgoToNext ()
ObjectGLgoToPrevious ()
ObjectGLgoToNextActive ()
ObjectGLgoToPreviousActive ()
ObjectGLjumpToNext ()
ObjectGLjumpToPrevious ()
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

ObjectGLfirst_
ObjectGLlast_
ObjectGLcurrent_
int jumpSize
int n
int resetMode

Detailed Description

A link list of ObjectGL.

Author:
Philippe Lavoie
Date:
28 September 1997


Constructor & Destructor Documentation

PLib::ObjectListGL::ObjectListGL  ) 
 

The constructor.

By default the reset mode is set to delete all the elements from the list (

NURBSLIST_DELETE_AT_RESET
). If you don't want this behavior, call
setResetMode(NURBS_KEEP_AT_RESET)

Author:
Philippe Lavoie
Date:
30 September 1997

PLib::ObjectListGL::~ObjectListGL  )  [virtual]
 

The destructor.

Author:
Philippe Lavoie
Date:
30 September 1997


Member Function Documentation

void PLib::ObjectListGL::activate  )  [virtual]
 

Activate all the objects of the list.

Author:
Philippe Lavoie
Date:
30 September 1997

Reimplemented from PLib::ObjectGL.

void PLib::ObjectListGL::add ObjectGL obj  ) 
 

adds an element to the list

Adds an element to the list.

Parameters:
obj the element to add
Author:
Philippe Lavoie
Date:
30 September 1997

Reimplemented in PLib::ObjectRefListGL.

void PLib::ObjectListGL::deactivate  )  [virtual]
 

Deactivates all the objects of the list.

Author:
Philippe Lavoie
Date:
30 September 1997

Reimplemented from PLib::ObjectGL.

void PLib::ObjectListGL::deselect  )  [virtual]
 

Deselect all the objects of the list.

Author:
Philippe Lavoie
Date:
2 October 1997

Reimplemented from PLib::ObjectGL.

void PLib::ObjectListGL::display  )  const [virtual]
 

Displays all the elements from the list.

Author:
Philippe Lavoie
Date:
30 September 1997

Reimplemented from PLib::ObjectGL.

Reimplemented in PLib::NurbsListGL.

void PLib::ObjectListGL::displayName  )  const [virtual]
 

Displays all the elements from the list.

Author:
Philippe Lavoie
Date:
30 September 1997

void PLib::ObjectListGL::glObject  )  const [virtual]
 

Calls glObject for all the elements from the list.

Displays all the elements from the list

Author:
Philippe Lavoie
Date:
30 September 1997

Implements PLib::ObjectGL.

Reimplemented in PLib::NurbsListGL.

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.

Parameters:
a the a th element
Returns:
A pointer to the current element or 0 if a was out of range.
Author:
Philippe Lavoie
Date:
30 October 1997

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.

Parameters:
a the a th active element
Returns:
A pointer to the current element or 0 if a was out of range.
Author:
Philippe Lavoie
Date:
29 January 1998

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.

Returns:
A pointer to the current element
Author:
Philippe Lavoie
Date:
2 October 1997

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.

Returns:
A pointer to the current element
Author:
Philippe Lavoie
Date:
29 January 1998

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.

Returns:
A pointer to the current element
Author:
Philippe Lavoie
Date:
30 September 1997

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.

Returns:
A pointer to the current element
Author:
Philippe Lavoie
Date:
29 January 1998

void PLib::ObjectListGL::hideAllObjects  ) 
 

Sets all object inside the list to hide mode.

Author:
Philippe Lavoie
Date:
29 January 1998

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.

Returns:
A pointer to the current element
Author:
Philippe Lavoie
Date:
2 October 1997

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.

Returns:
A pointer to the current element
Author:
Philippe Lavoie
Date:
2 October 1997

int PLib::ObjectListGL::read const char *  filename  )  [virtual]
 

reads a list of objects

Parameters:
filename the name of the file to read from
Returns:
1 on success, 0 otherwise
Author:
Philippe Lavoie
Date:
13 October 1997

Reimplemented from PLib::ObjectGL.

ObjectGL * PLib::ObjectListGL::remove ObjectGL obj  ) 
 

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.

Parameters:
obj the element to search
Returns:
a pointer to obj if it was found in the list, 0 otherwise
Author:
Philippe Lavoie
Date:
30 September 1997

Reimplemented in PLib::ObjectRefListGL.

void PLib::ObjectListGL::reset  ) 
 

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.

Author:
Philippe Lavoie
Date:
30 September 1997

void PLib::ObjectListGL::select  )  [virtual]
 

Select all the objects of the list.

Author:
Philippe Lavoie
Date:
30 September 1997

Reimplemented from PLib::ObjectGL.

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.

Parameters:
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
Author:
Philippe Lavoie
Date:
30 September 1997

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.

Parameters:
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
Author:
Philippe Lavoie
Date:
30 September 1997

void PLib::ObjectListGL::viewAllObjects  ) 
 

Sets all object inside the list to view mode.

Author:
Philippe Lavoie
Date:
29 January 1998

int PLib::ObjectListGL::write const char *  filename  )  const [virtual]
 

Writess a list of objects.

Parameters:
filename the name of the file to read from
Returns:
1 on success, 0 otherwise
Author:
Philippe Lavoie
Date:
13 October 1997

Reimplemented from PLib::ObjectGL.

int PLib::ObjectListGL::writePOVRAY const char *  filename  )  const [virtual]
 

Write a list of object in the POVRAY format.

Parameters:
filename the name of the file to read from
Returns:
1 on success, 0 otherwise
Author:
Philippe Lavoie
Date:
13 October 1997

Reimplemented from PLib::ObjectGL.

int PLib::ObjectListGL::writeRIB const char *  filename  )  const [virtual]
 

Write a list of object in the RIB format.

Parameters:
filename the name of the file to read from
Returns:
1 on success, 0 otherwise
Author:
Philippe Lavoie
Date:
13 October 1997

Reimplemented from PLib::ObjectGL.


The documentation for this class was generated from the following files:
Generated on Tue Jul 27 15:44:57 2004 for NURBS++ by doxygen 1.3.7