geoprop.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.H>
00027 #include <archon/x3d/server/geoprop.H>
00028 
00029 namespace Archon
00030 {
00031   namespace X3D
00032   {
00033     const NodeType *GeometricPropertyNode::type = 0;
00034 
00035     const NodeType *ColorNode::type = 0;
00036     const NodeType *CoordinateNode::type = 0;
00037     const NodeType *NormalNode::type = 0;
00038 
00039     const NodeType *Color::type = 0;
00040     const NodeType *ColorRGBA::type = 0;
00041     const NodeType *Coordinate::type = 0;
00042     const NodeType *Normal::type = 0;
00043 
00044     void initializeGeopropComponent()
00045     {
00046       vector<const FieldBase *> fields;
00047 
00048       // GeometricPropertyNode
00049 
00050       GeometricPropertyNode::type =
00051         NodeType::newAbstract("GeometricPropertyNode", false, 0,
00052                               Node::type);
00053 
00054 
00055       // ColorNode
00056 
00057       ColorNode::type =
00058         NodeType::newAbstract("ColorNode", false, 0,
00059                               GeometricPropertyNode::type);
00060 
00061 
00062       // CoordinateNode
00063 
00064       CoordinateNode::type =
00065         NodeType::newAbstract("CoordinateNode", false, 0,
00066                               GeometricPropertyNode::type);
00067 
00068 
00069       // NormalNode
00070 
00071       NormalNode::type =
00072         NodeType::newAbstract("NormalNode", false, 0,
00073                               GeometricPropertyNode::type);
00074 
00075 
00076       // Color
00077 
00078       fields.push_back(newExposedField("color", MFColor::type,
00079                                        &Color::color,
00080                                        &Color::colorChanged,
00081                                        &Color::colorStamp));
00082       Color::type =
00083         NodeType::newConcrete("Color", "color", Color::instantiate, &fields,
00084                               ColorNode::type);
00085       fields.clear();
00086 
00087 
00088       // ColorRGBA
00089 
00090       fields.push_back(newExposedField("color", MFColorRGBA::type,
00091                                        &ColorRGBA::color,
00092                                        &ColorRGBA::colorChanged,
00093                                        &ColorRGBA::colorStamp));
00094       ColorRGBA::type =
00095         NodeType::newConcrete("ColorRGBA", "color", ColorRGBA::instantiate, &fields,
00096                               ColorNode::type);
00097       fields.clear();
00098 
00099 
00100       // Coordinate
00101 
00102       fields.push_back(newExposedField("point", MFVec3f::type,
00103                                        &Coordinate::point,
00104                                        &Coordinate::pointChanged,
00105                                        &Coordinate::pointStamp));
00106       Coordinate::type =
00107         NodeType::newConcrete("Coordinate", "coord", Coordinate::instantiate, &fields,
00108                               CoordinateNode::type);
00109       fields.clear();
00110 
00111 
00112       // Normal
00113 
00114       fields.push_back(newExposedField("vector", MFVec3f::type,
00115                                        &Normal::normal,
00116                                        &Normal::normalChanged,
00117                                        &Normal::normalStamp));
00118       Normal::type =
00119         NodeType::newConcrete("Normal", "normal", Normal::instantiate, &fields,
00120                               NormalNode::type);
00121       fields.clear();
00122     }
00123   }
00124 }

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