Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages
sglCallback Class Reference
#include <sglCallback.hpp>
Inheritance diagram for sglCallback::
List of all members.
Public Methods |
| sglCallback () |
virtual | ~sglCallback () |
sglCallbackFunc | getCallbackFunc () const |
void | setCallbackFunc (sglCallbackFunc cb_func) |
void* | getCallbackData () const |
void | setCallbackData (void *data) |
virtual sglNode* | clone (unsigned int mode) const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Methods |
virtual void | cull (sglCull< float > &trav_state, unsigned int cull_flags) const |
virtual void | cull (sglCull< double > &trav_state, unsigned int cull_flags) const |
void | copyTo (sglCallback *dst, unsigned int mode) const |
Protected Attributes |
sglCallbackFunc | m_callback_func |
void* | m_callback_data |
Detailed Description
A subclass of sglGroup that executes a callback function during the cull traversal. During cull it will first call the user-specified callback function (passing in the user-specified callback data pointer). Then it will perform sglGroup's cull function. It acts as a pre-cull callback.
This seems like a pretty useless class. I leave it in the distribution because it seems relatively benign. In reality, the callback mechanism has not been given proper consideration yet. In some other scene graphs there exist concepts like pre- and post- cull callbacks that actually affect the results of the cull. (There are also pre- and post-draw traversals which have yet been implemented in SGL, but I digress). Really, if you want to do something special you should implement your own sglGroup subclass.
Definition at line 60 of file sglCallback.hpp.
Constructor & Destructor Documentation
sglCallback::sglCallback (
|
)
|
|
sglCallback::~sglCallback (
|
) [virtual]
|
|
Member Function Documentation
sglCallbackFunc sglCallback::getCallbackFunc (
|
) const [inline]
|
|
|
Get a pointer to the current callback function. -
Returns:
-
pointer to the callback function, or NULL if one has not been set.
Definition at line 72 of file sglCallback.hpp. |
void sglCallback::setCallbackFunc (
|
sglCallbackFunc cb_func )
|
|
|
Set the callback function. -
Parameters:
-
cb_func
|
Callback function pointer. Passing NULL will clear the callback function. |
|
void * sglCallback::getCallbackData (
|
) const [inline]
|
|
|
Get a pointer to the callback data that is sent as a parameter to the callback function. -
Returns:
-
pointer to callback data, or NULL if not set.
Definition at line 84 of file sglCallback.hpp. |
void sglCallback::setCallbackData (
|
void * data ) [inline]
|
|
|
Set the callback data pointer. -
Parameters:
-
data
|
pointer to callback data. NULL to clear. |
Definition at line 89 of file sglCallback.hpp. |
virtual sglNode* sglCallback::clone (
|
unsigned int mode ) const [virtual]
|
|
|
Make a copy of the scenegraph rooted at this node. -
Parameters:
-
mode
|
Bit masks to control the behaviour of the clone. These are OR-ed together from the mode values in sglObject::CloneModeEnum. |
-
Returns:
-
Pointer to root of cloned scene graph.
Reimplemented from sglGroup. |
virtual void sglCallback::printInfo (
|
ostream & ostrm,
|
|
const char * indent_string ) const [virtual]
|
|
|
Output the state of this node to the specified ostream. -
Parameters:
-
ostrm
|
the ostream to which the output is sent |
indent_string
|
the string (usually spaces) that is output at the beginning of every line of output |
Reimplemented from sglGroup. |
virtual void sglCallback::cull (
|
sglCull< float > & trav_state,
|
|
unsigned int cull_flags ) const [protected, virtual]
|
|
|
The single precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class. -
Parameters:
-
trav_state
|
The single precision traversal state that collects all the state and geometry information that passes the cull. |
cull_flags
|
Bit flags that indicate which planes of the view frustum (polytope) still need to be tested to determine if bounding spheres and boxes lie within the frustum. Cull-free drawing can be accomplished with cull_flags = 0. |
Reimplemented from sglGroup. |
virtual void sglCallback::cull (
|
sglCull< double > & trav_state,
|
|
unsigned int cull_flags ) const [protected, virtual]
|
|
|
The double precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class. -
Parameters:
-
trav_state
|
The single precision traversal state that collects all the state and geometry information that passes the cull. |
cull_flags
|
Bit flags that indicate which planes of the view frustum (polytope) still need to be tested to determine if bounding spheres and boxes lie within the frustum. Cull-free drawing can be accomplished with cull_flags = 0. |
Reimplemented from sglGroup. |
The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:07 2002 for SGL by
1.2.6 written by Dimitri van Heesch,
© 1997-2001