Archon::Console3d Namespace Reference

The implementation of 3-D Console itself. More...


Classes

struct  LoaderJob
class  WindowQuitHandler
struct  ViewState

Functions

bool exceptionCatchInfo (Exception::Formatter format, string &result)
bool exceptionCatchInfo (Utilities::Exception::Formatter format, string &result)
 Use this function to describe the various kinds of exceptions known to this library.
string getPrivateDir ()
void evokePrivateDir (string path)
int main (int argc, const char *argv[])
void get_scene (const X3D::Scene *, vector< pair< Vector3, const X3D::LightNode * > > &)
void drawDepthMarker (double depth)
void viewScene (Ref< X3D::Server > server, string initialViewpointName, const CoordSystem3x3 &viewCoordSystem, double fieldOfView, double depthOfRotation, const Vector4 &backgroundColor, int xResolution, int yResolution, bool fullScreen, bool showLightSources, bool headLight, bool wireframeMode, bool enableTexture, bool useMipmapedTextures, bool showNormals, bool textAsQuadsMode, int subdivisionX, int subdivisionY, double frameRate)

Variables

bool opt_help = false
string opt_configFile
bool opt_saveConfig = false
bool opt_dumpNodeDefs = false
bool opt_fullScreen = false
Options::IntByInt opt_resolution = { 1000, 1000 }
ColorRGBA opt_backgroundColor = Color::black
Vector3 opt_eyepoint = Vector3(0, 0, 10)
Vector3 opt_lookat = Vector3(0, 0, 0)
double opt_fieldOfView = 0.78539816339744830961
bool opt_headLight = true
bool opt_showLightSources = false
bool opt_wireframe = false
bool opt_texture = true
bool opt_mipmap = false
bool opt_showNormals = false
bool opt_textAsQuadsMode = false
double opt_frameRate = 40
Options::IntByInt opt_subdivision = { 25, 25 }
double opt_applicationHeartbeat = 1.5
int opt_corbaEndpointPort = -1
bool opt_acceptClients = false
string opt_consoleName = "archon"
bool opt_dumpScene = false
bool opt_progressiveLoad = false
string opt_fontPath = "/usr/share/fonts/default/Type1"


Detailed Description

The implementation of 3-D Console itself.

In fact most of the functionality of 3-D Console is found in the various libraries of the Archon namespace. This namepace holds just the "glue" that fits all the functionality of the libraries together in the way best suited for 3-D Console.


Function Documentation

bool Archon::Console3d::exceptionCatchInfo Utilities::Exception::Formatter  format,
string &  result
[inline]
 

Use this function to describe the various kinds of exceptions known to this library.

It re-throws the last thrown exception, and then attepts to catch any of the exception types known to this library. If this succeeds then the specified formatter is used to produce 'result' and true is returned. If the exception is unknown to this library then it just returns false.

This method is intended to be incorporated into similar methods in other libraries that interact with this library or in applications that need to check various different libraries for exceptions known to them.

Example:

   namespace MyApp
   {
     bool exceptionCatchInfo(Archon::Utilities::Exception::Formatter format,
                             string &result)
     {
       try { throw; }
       catch(MyFooException &e)
       {
         result = (*format)(typeid(e), "", e.getMessage())
"; } catch(MyBarException &e) { result = (*format)(typeid(e), e.getLocation(), "")
"; } catch(...) { return Archon::Utilities::exceptionCatchInfo(formatter, result) || SomeCoolLib::exceptionCatchInfo(formatter, result) || SomeShitLib::exceptionCatchInfo(formatter, result); } return true; } }

   int main(int argc, const char *argv[]) throw()
   {
     set_unexpected(Exception::terminal<MyApp::exceptionCatchInfo>);
     set_terminate(Exception::terminal<MyApp::exceptionCatchInfo>);
     ...
   }

 

Note:
If all your exceptions are derived from Archon::Utilities::Exception, then you do not need to write your own catchInfo function since Archon::Utilities::exceptionCatchInfo will know about it. If, on the other hand, you add new data to an exception derived from Utilities::Exception, and this data is not available through getMessage, you will need to provide your own exceptionCatchInfo to extract this data.
See also:
Exception::terminal

Definition at line 36 of file exception.H.


Generated on Sun Jul 30 22:56:40 2006 for Archon by  doxygen 1.4.4