navigate.C

Go to the documentation of this file.
00001 /*
00002  * This file is part of the "Archon" framework.
00003  * (http://files3d.sourceforge.net)
00004  *
00005  * Copyright © 2002 by Kristian Spangsege and Brian Kristiansen.
00006  *
00007  * Permission to use, copy, modify, and distribute this software and
00008  * its documentation under the terms of the GNU General Public License is
00009  * hereby granted. No representations are made about the suitability of
00010  * this software for any purpose. It is provided "as is" without express
00011  * or implied warranty. See the GNU General Public License
00012  * (http://www.gnu.org/copyleft/gpl.html) for more details.
00013  *
00014  * The characters in this file are ISO8859-1 encoded.
00015  *
00016  * The documentation in this file is in "Doxygen" style
00017  * (http://www.doxygen.org).
00018  */
00019 
00026 #include <archon/x3d/server/field_type.H>
00027 #include <archon/x3d/server/field.H>
00028 #include <archon/x3d/server/navigate.H>
00029 
00030 namespace Archon
00031 {
00032   namespace X3D
00033   {
00034     const NodeType *Billboard::type = 0;
00035     const NodeType *Viewpoint::type = 0;
00036 
00037     void initializeNavigateComponent()
00038     {
00039       vector<const FieldBase *> fields;
00040 
00041 
00042       // Billboard
00043 
00044       fields.push_back(newExposedField("axisOfRotation", SFVec3f::type,
00045                                        &Billboard::axisOfRotation,
00046                                        &Billboard::axisOfRotationChanged,
00047                                        &Billboard::axisOfRotationStamp));
00048       Billboard::type =
00049         NodeType::newConcrete("Billboard", "children",
00050                               Billboard::instantiate, &fields,
00051                               GroupingNode::type, BoundedObject::type);
00052       fields.clear();
00053 
00054 
00055       // Viewpoint
00056 
00057       fields.push_back(newExposedField("jump", SFBool::type,
00058                                        &Viewpoint::jump,
00059                                        &Viewpoint::jumpChanged,
00060                                        &Viewpoint::jumpStamp));
00061       fields.push_back(newExposedField("position", SFVec3f::type,
00062                                        &Viewpoint::position,
00063                                        &Viewpoint::positionChanged,
00064                                        &Viewpoint::positionStamp));
00065       fields.push_back(newExposedField("orientation", SFRotation::type,
00066                                        &Viewpoint::orientation,
00067                                        &Viewpoint::orientationChanged,
00068                                        &Viewpoint::orientationStamp));
00069       fields.push_back(newExposedField("fieldOfView", SFFloat::type,
00070                                        &Viewpoint::fieldOfView,
00071                                        &Viewpoint::fieldOfViewChanged,
00072                                        &Viewpoint::fieldOfViewStamp));
00073       fields.push_back(newExposedField("centerOfRotation", SFVec3f::type,
00074                                        &Viewpoint::centerOfRotation,
00075                                        &Viewpoint::centerOfRotationChanged,
00076                                        &Viewpoint::centerOfRotationStamp));
00077       fields.push_back(newPrivateField("description", SFString::type,
00078                                        &Viewpoint::description));
00079       Viewpoint::type =
00080         NodeType::newConcrete("Viewpoint", "children",
00081                               Viewpoint::instantiate, &fields,
00082                               BindableNode::type);
00083       fields.clear();
00084     }
00085   }
00086 }

Generated on Sun Jul 30 22:55:49 2006 for Archon by  doxygen 1.4.4