You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(128) |
Dec
(65) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(132) |
Mar
(95) |
Apr
(47) |
May
(54) |
Jun
(2) |
Jul
(57) |
Aug
(109) |
Sep
(131) |
Oct
(186) |
Nov
(105) |
Dec
(78) |
2007 |
Jan
(125) |
Feb
(105) |
Mar
(52) |
Apr
(104) |
May
(63) |
Jun
(116) |
Jul
(76) |
Aug
|
Sep
(18) |
Oct
(93) |
Nov
(110) |
Dec
(169) |
2008 |
Jan
(90) |
Feb
(64) |
Mar
(41) |
Apr
(23) |
May
(6) |
Jun
(18) |
Jul
(10) |
Aug
(61) |
Sep
(139) |
Oct
(50) |
Nov
(55) |
Dec
(2) |
2009 |
Jan
|
Feb
(1) |
Mar
(62) |
Apr
(22) |
May
(17) |
Jun
(19) |
Jul
(40) |
Aug
(21) |
Sep
|
Oct
(40) |
Nov
(23) |
Dec
|
2010 |
Jan
(14) |
Feb
(40) |
Mar
(9) |
Apr
(11) |
May
(19) |
Jun
(4) |
Jul
(10) |
Aug
(22) |
Sep
(15) |
Oct
|
Nov
(2) |
Dec
|
2011 |
Jan
(13) |
Feb
(10) |
Mar
|
Apr
(13) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(33) |
May
(20) |
Jun
|
Jul
(8) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Braden M. <br...@us...> - 2006-03-27 05:12:16
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29874 Modified Files: ChangeLog Log Message: Added support for constructing X3D MPEG-4 Interactive profile scenes. From Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1206 retrieving revision 1.1207 diff -C2 -d -r1.1206 -r1.1207 *** ChangeLog 27 Mar 2006 03:25:34 -0000 1.1206 --- ChangeLog 27 Mar 2006 05:12:12 -0000 1.1207 *************** *** 1,2 **** --- 1,26 ---- + 2006-03-27 Braden McDaniel <br...@en...> + + Added support for constructing X3D MPEG-4 Interactive profile + scenes. From Andrew Grieve <sg...@us...> + + * src/libopenvrml/openvrml/browser.cpp + (x3d_mpeg4_profile): Added class corresponding to the X3D MPEG-4 + Interactive profile. + (profile_registry::profile_registry()): Add the x3d_mpeg4_profile + to the registry. + (x3d_networking_component): Added class corresponding to the X3D + Networking component. + (x3d_networking_component::id): Component id. + (x3d_networking_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + level 2 of the Networking component to the scope. + (component_registry::component_registry()): Add the + x3d_networking_component to the registry. + (x3d_mpeg4_profile::id): Profile id. + (x3d_mpeg4_profile::x3d_mpeg4_profile()): Add components for the + MPEG-4 Interactive profile. + * tests/testsuite.at: Added test of minimal X3D MPEG-4 Interactive + world. + 2006-03-26 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-03-27 03:25:44
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16471 Modified Files: ChangeLog Log Message: Applied exception specification macros. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1205 retrieving revision 1.1206 diff -C2 -d -r1.1205 -r1.1206 *** ChangeLog 26 Mar 2006 07:42:14 -0000 1.1205 --- ChangeLog 27 Mar 2006 03:25:34 -0000 1.1206 *************** *** 1,4 **** --- 1,11 ---- 2006-03-26 Braden McDaniel <br...@en...> + Applied exception specification macros. + + * src/libopenvrml/openvrml/x3d_event_utilities.cpp + * src/libopenvrml/openvrml/x3d_key_device_sensor.cpp + + 2006-03-26 Braden McDaniel <br...@en...> + Added support for constructing X3D Interactive profile scenes. From Andrew Grieve <sg...@us...> |
From: Braden M. <br...@us...> - 2006-03-27 03:25:44
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16471/src/libopenvrml/openvrml Modified Files: x3d_event_utilities.cpp x3d_key_device_sensor.cpp Log Message: Applied exception specification macros. Index: x3d_event_utilities.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_event_utilities.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x3d_event_utilities.cpp 26 Mar 2006 07:42:14 -0000 1.1 --- x3d_event_utilities.cpp 27 Mar 2006 03:25:35 -0000 1.2 *************** *** 42,46 **** public: explicit boolean_filter_class(openvrml::browser & browser); ! virtual ~boolean_filter_class() throw (); private: --- 42,46 ---- public: explicit boolean_filter_class(openvrml::browser & browser); ! virtual ~boolean_filter_class() OPENVRML_NOTHROW; [...1020 lines suppressed...] {} void time_trigger_node::set_boolean_listener:: do_process_event(const sfbool & /* fraction */, const double /* timestamp */) ! OPENVRML_THROW1(std::bad_alloc) { //TODO: add logic here *************** *** 1868,1872 **** * @brief Destroy. */ ! time_trigger_node::~time_trigger_node() throw () {} } --- 1868,1872 ---- * @brief Destroy. */ ! time_trigger_node::~time_trigger_node() OPENVRML_NOTHROW {} } Index: x3d_key_device_sensor.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_key_device_sensor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x3d_key_device_sensor.cpp 26 Mar 2006 07:42:14 -0000 1.1 --- x3d_key_device_sensor.cpp 27 Mar 2006 03:25:35 -0000 1.2 *************** *** 42,46 **** public: explicit key_sensor_class(openvrml::browser & browser); ! virtual ~key_sensor_class() throw (); private: --- 42,46 ---- public: explicit key_sensor_class(openvrml::browser & browser); ! virtual ~key_sensor_class() OPENVRML_NOTHROW; private: *************** *** 48,52 **** do_create_type(const std::string & id, const node_interface_set & interfaces) const ! throw (unsupported_interface, std::bad_alloc); }; } --- 48,52 ---- do_create_type(const std::string & id, const node_interface_set & interfaces) const ! OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; } *************** *** 89,93 **** key_sensor_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~key_sensor_node() throw (); }; --- 89,93 ---- key_sensor_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~key_sensor_node() OPENVRML_NOTHROW; }; *************** *** 104,108 **** * @brief Destroy. */ ! key_sensor_class::~key_sensor_class() throw () {} --- 104,108 ---- * @brief Destroy. */ ! key_sensor_class::~key_sensor_class() OPENVRML_NOTHROW {} *************** *** 122,126 **** key_sensor_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const ! throw (unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 10> supported_interfaces_t; --- 122,126 ---- key_sensor_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const ! OPENVRML_THROW2(unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 10> supported_interfaces_t; *************** *** 364,368 **** * @brief Destroy. */ ! key_sensor_node::~key_sensor_node() throw () {} } --- 364,368 ---- * @brief Destroy. */ ! key_sensor_node::~key_sensor_node() OPENVRML_NOTHROW {} } |
From: Braden M. <br...@us...> - 2006-03-26 07:42:18
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11762/src/libopenvrml/openvrml Modified Files: browser.cpp Added Files: x3d_event_utilities.cpp x3d_event_utilities.h x3d_key_device_sensor.cpp x3d_key_device_sensor.h Log Message: Added support for constructing X3D Interactive profile scenes. From Andrew Grieve <sg...@us...> --- NEW FILE: x3d_key_device_sensor.h --- # ifndef OPENVRML_X3D_KEY_DEVICE_SENSOR_H # define OPENVRML_X3D_KEY_DEVICE_SENSOR_H namespace openvrml { class browser; } extern "C" void register_key_device_sensor_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_event_utilities.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...1833 lines suppressed...] * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ time_trigger_node:: time_trigger_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), bounded_volume_node(type, scope), abstract_node<self_t>(type, scope), child_node(type, scope), set_boolean_listener_(*this), trigger_time_emitter_(*this, this->trigger_time_) {} /** * @brief Destroy. */ time_trigger_node::~time_trigger_node() throw () {} } Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.154 retrieving revision 1.155 diff -C2 -d -r1.154 -r1.155 *** browser.cpp 25 Mar 2006 09:22:16 -0000 1.154 --- browser.cpp 26 Mar 2006 07:42:14 -0000 1.155 *************** *** 50,53 **** --- 50,55 ---- # include "x3d_rendering.h" # include "x3d_texturing.h" + # include "x3d_key_device_sensor.h" + # include "x3d_event_utilities.h" namespace openvrml { *************** *** 3851,3854 **** --- 3853,3864 ---- + class OPENVRML_LOCAL x3d_interactive_profile : public profile { + public: + static const char * const id; + + x3d_interactive_profile(); + }; + + class OPENVRML_LOCAL component { public: *************** *** 3895,3898 **** --- 3905,3912 ---- succeeded = this->insert(key, new x3d_interchange_profile).second; assert(succeeded); + + key = x3d_interactive_profile::id; + succeeded = this->insert(key, new x3d_interactive_profile).second; + assert(succeeded); } *************** *** 3928,3932 **** * @param[out] meta the scene metadata. * ! * @exception openvrml::bad_media_type * @exception openvrml::invalid_vrml */ --- 3942,3946 ---- * @param[out] meta the scene metadata. * ! * @exception openvrml::bad_media_type * @exception openvrml::invalid_vrml */ *************** *** 5882,5885 **** --- 5896,5901 ---- register_rendering_node_classes(b); register_texturing_node_classes(b); + register_key_device_sensor_node_classes(b); + register_event_utilities_node_classes(b); } } *************** *** 11287,11290 **** --- 11303,11658 ---- + class OPENVRML_LOCAL x3d_pointing_device_sensor_component : + public component { + public: + static const char * const id; + + virtual void add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + int support_level) const; + }; + + const char * const x3d_pointing_device_sensor_component::id = + "PointingDeviceSensor"; + + void + x3d_pointing_device_sensor_component:: + add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + const int support_level) const + { + using namespace openvrml; + + if (support_level >= 1) { + // + // CylinderSensor node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "autoOffset"), + node_interface(node_interface::exposedfield_id, + field_value::sfstring_id, + "description"), + node_interface(node_interface::exposedfield_id, + field_value::sffloat_id, + "diskAngle"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "enabled"), + node_interface(node_interface::exposedfield_id, + field_value::sffloat_id, + "maxAngle"), + node_interface(node_interface::exposedfield_id, + field_value::sffloat_id, + "minAngle"), + node_interface(node_interface::exposedfield_id, + field_value::sffloat_id, + "offset"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isActive"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isOver"), + node_interface(node_interface::eventout_id, + field_value::sfrotation_id, + "rotation_changed"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "trackPoint_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 12); + add_scope_entry(b, + "CylinderSensor", + interface_set, + "urn:X-openvrml:node:CylinderSensor", + scope); + } + + // + // PlaneSensor node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "autoOffset"), + node_interface(node_interface::exposedfield_id, + field_value::sfstring_id, + "description"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "enabled"), + node_interface(node_interface::exposedfield_id, + field_value::sfvec2f_id, + "maxPosition"), + node_interface(node_interface::exposedfield_id, + field_value::sfvec2f_id, + "minPosition"), + node_interface(node_interface::exposedfield_id, + field_value::sfvec3f_id, + "offset"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isActive"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isOver"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "trackPoint_changed"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "translation_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 11); + add_scope_entry(b, + "PlaneSensor", + interface_set, + "urn:X-openvrml:node:PlaneSensor", + scope); + } + + // + // SphereSensor node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "autoOffset"), + node_interface(node_interface::exposedfield_id, + field_value::sfstring_id, + "description"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "enabled"), + node_interface(node_interface::exposedfield_id, + field_value::sfrotation_id, + "offset"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isActive"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isOver"), + node_interface(node_interface::eventout_id, + field_value::sfrotation_id, + "rotation_changed"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "trackPoint_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 9); + add_scope_entry(b, + "SphereSensor", + interface_set, + "urn:X-openvrml:node:SphereSensor", + scope); + } + + // + // TouchSensor node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfstring_id, + "description"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "enabled"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "hitNormal_changed"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "hitPoint_changed"), + node_interface(node_interface::eventout_id, + field_value::sfvec2f_id, + "hitTexCoord_changed"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isActive"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isOver"), + node_interface(node_interface::eventout_id, + field_value::sftime_id, + "touchTime") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 9); + add_scope_entry(b, + "TouchSensor", + interface_set, + "urn:X-openvrml:node:TouchSensor", + scope); + } + } + } + + + class OPENVRML_LOCAL x3d_key_device_sensor_component : public component { + public: + static const char * const id; + + virtual void add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + int support_level) const; + }; + + const char * const x3d_key_device_sensor_component::id = "KeyDeviceSensor"; + + void + x3d_key_device_sensor_component:: + add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + const int support_level) const + { + using namespace openvrml; + + if (support_level >= 1) { + // + // KeySensor node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "enabled"), + node_interface(node_interface::eventout_id, + field_value::sfint32_id, + "actionKeyPress"), + node_interface(node_interface::eventout_id, + field_value::sfint32_id, + "actionKeyRelease"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "altKey"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "controlKey"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isActive"), + node_interface(node_interface::eventout_id, + field_value::sfstring_id, + "keyPress"), + node_interface(node_interface::eventout_id, + field_value::sfstring_id, + "keyRelease"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "shiftKey") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 10); + add_scope_entry(b, + "KeySensor", + interface_set, + "urn:X-openvrml:node:KeySensor", + scope); + } + } + } + + + class OPENVRML_LOCAL x3d_environmental_sensor_component : + public component { + public: + static const char * const id; + + virtual void add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + int support_level) const; + }; + + const char * const x3d_environmental_sensor_component::id = + "EnvironmentalSensor"; + + void + x3d_environmental_sensor_component:: + add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + const int support_level) const + { + using namespace openvrml; + + if (support_level >= 1) { + // + // ProximitySensor node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfvec3f_id, + "center"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "enabled"), + node_interface(node_interface::exposedfield_id, + field_value::sfvec3f_id, + "size"), + node_interface(node_interface::eventout_id, + field_value::sftime_id, + "enterTime"), + node_interface(node_interface::eventout_id, + field_value::sftime_id, + "exitTime"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "centerOfRotation_changed"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isActive"), + node_interface(node_interface::eventout_id, + field_value::sfrotation_id, + "orientation_changed"), + node_interface(node_interface::eventout_id, + field_value::sfvec3f_id, + "position_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 10); + add_scope_entry(b, + "ProximitySensor", + interface_set, + "urn:X-openvrml:node:ProximitySensor", + scope); + } + } + } + + class OPENVRML_LOCAL x3d_navigation_component : public component { public: *************** *** 11483,11486 **** --- 11851,12084 ---- + class OPENVRML_LOCAL x3d_event_utilities_component : public component { + public: + static const char * const id; + + virtual void add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + int support_level) const; + }; + + const char * const x3d_event_utilities_component::id = "EventUtilities"; + + void + x3d_event_utilities_component::add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + const int support_level) const + { + using namespace openvrml; + + if (support_level >= 1) { + // + // BooleanFilter node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "set_boolean"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "inputFalse"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "inputNegate"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "inputTrue") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 5); + add_scope_entry(b, + "BooleanFilter", + interface_set, + "urn:X-openvrml:node:BooleanFilter", + scope); + } + + // + // BooleanSequencer node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "next"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "previous"), + node_interface(node_interface::eventin_id, + field_value::sffloat_id, + "set_fraction"), + node_interface(node_interface::exposedfield_id, + field_value::mffloat_id, + "key"), + node_interface(node_interface::exposedfield_id, + field_value::mfbool_id, + "keyValue"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "value_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 7); + add_scope_entry(b, + "BooleanSequencer", + interface_set, + "urn:X-openvrml:node:BooleanSequencer", + scope); + } + + // + // BooleanToggle node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "set_boolean"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "toggle") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 3); + add_scope_entry(b, + "BooleanToggle", + interface_set, + "urn:X-openvrml:node:BooleanToggle", + scope); + } + + // + // BooleanTrigger node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sftime_id, + "set_triggerTime"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "triggerTrue") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 3); + add_scope_entry(b, + "BooleanTrigger", + interface_set, + "urn:X-openvrml:node:BooleanTrigger", + scope); + } + + // + // IntegerSequencer node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "next"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "previous"), + node_interface(node_interface::eventin_id, + field_value::sffloat_id, + "set_fraction"), + node_interface(node_interface::exposedfield_id, + field_value::mffloat_id, + "key"), + node_interface(node_interface::exposedfield_id, + field_value::mfint32_id, + "keyValue"), + node_interface(node_interface::eventout_id, + field_value::sfint32_id, + "value_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 7); + add_scope_entry(b, + "IntegerSequencer", + interface_set, + "urn:X-openvrml:node:IntegerSequencer", + scope); + } + + // + // IntegerTrigger node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "set_boolean"), + node_interface(node_interface::exposedfield_id, + field_value::mfint32_id, + "integerKey"), + node_interface(node_interface::eventout_id, + field_value::sfint32_id, + "triggerValue") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 4); + add_scope_entry(b, + "IntegerTrigger", + interface_set, + "urn:X-openvrml:node:IntegerTrigger", + scope); + } + + // + // TimeTrigger node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "set_boolean"), + node_interface(node_interface::eventout_id, + field_value::sftime_id, + "triggerTime") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 3); + add_scope_entry(b, + "TimeTrigger", + interface_set, + "urn:X-openvrml:node:TimeTrigger", + scope); + } + } + } + + component_registry::component_registry() { *************** *** 11528,11531 **** --- 12126,12144 ---- assert(succeeded); + key = x3d_pointing_device_sensor_component::id; + succeeded = + this->insert(key, new x3d_pointing_device_sensor_component).second; + assert(succeeded); + + key = x3d_key_device_sensor_component::id; + succeeded = + this->insert(key, new x3d_key_device_sensor_component).second; + assert(succeeded); + + key = x3d_environmental_sensor_component::id; + succeeded = + this->insert(key, new x3d_environmental_sensor_component).second; + assert(succeeded); + key = x3d_navigation_component::id; succeeded = this->insert(key, new x3d_navigation_component).second; *************** *** 11536,11539 **** --- 12149,12157 ---- this->insert(key, new x3d_environmental_effects_component).second; assert(succeeded); + + key = x3d_event_utilities_component::id; + succeeded = + this->insert(key, new x3d_event_utilities_component).second; + assert(succeeded); } *************** *** 11605,11607 **** --- 12223,12247 ---- this->add_component(x3d_environmental_effects_component::id, 1); } + + + const char * const x3d_interactive_profile::id = "Interactive"; + + x3d_interactive_profile::x3d_interactive_profile() + { + this->add_component(x3d_core_component::id, 1); + this->add_component(x3d_time_component::id, 1); + this->add_component(x3d_grouping_component::id, 2); + this->add_component(x3d_rendering_component::id, 2); + this->add_component(x3d_shape_component::id, 1); + this->add_component(x3d_geometry3d_component::id, 3); + this->add_component(x3d_lighting_component::id, 2); + this->add_component(x3d_texturing_component::id, 2); + this->add_component(x3d_interpolation_component::id, 2); + this->add_component(x3d_pointing_device_sensor_component::id, 1); + this->add_component(x3d_key_device_sensor_component::id, 1); + this->add_component(x3d_environmental_sensor_component::id, 1); + this->add_component(x3d_navigation_component::id, 1); + this->add_component(x3d_environmental_effects_component::id, 1); + this->add_component(x3d_event_utilities_component::id, 1); + } } // namespace --- NEW FILE: x3d_event_utilities.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifndef OPENVRML_X3D_EVENT_UTILITIES_H # define OPENVRML_X3D_EVENT_UTILITIES_H namespace openvrml { class browser; } extern "C" void register_event_utilities_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_key_device_sensor.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifdef HAVE_CONFIG_H # include <config.h> # endif # include <boost/array.hpp> # include <private.h> # include "browser.h" # include "node_impl_util.h" # include "x3d_key_device_sensor.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for KeySensor nodes. */ class OPENVRML_LOCAL key_sensor_class : public node_class { public: explicit key_sensor_class(openvrml::browser & browser); virtual ~key_sensor_class() throw (); private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc); }; } void register_key_device_sensor_node_classes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_class; b.add_node_class("urn:X-openvrml:node:KeySensor", shared_ptr<node_class>(new key_sensor_class(b))); } namespace { using namespace openvrml_; class OPENVRML_LOCAL key_sensor_node : public abstract_node<key_sensor_node>, public child_node { friend class key_sensor_class; exposedfield<sfbool> enabled_; sfint32 action_key_press_; sfint32_emitter action_key_press_emitter_; sfint32 action_key_release_; sfint32_emitter action_key_release_emitter_; sfbool alt_key_; sfbool_emitter alt_key_emitter_; sfbool control_key_; sfbool_emitter control_key_emitter_; sfbool is_active_; sfbool_emitter is_active_emitter_; sfstring key_press_; sfstring_emitter key_press_emitter_; sfstring key_release_; sfstring_emitter key_release_emitter_; sfbool shift_key_; sfbool_emitter shift_key_emitter_; public: key_sensor_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~key_sensor_node() throw (); }; /** * @brief Construct. * * @param browser the browser associated with this key_sensor_class. */ key_sensor_class::key_sensor_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ key_sensor_class::~key_sensor_class() throw () {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating KeySensor nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by key_sensor_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> key_sensor_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 10> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::exposedfield_id, field_value::sfbool_id, "enabled"), node_interface(node_interface::eventout_id, field_value::sfint32_id, "actionKeyPress"), node_interface(node_interface::eventout_id, field_value::sfint32_id, "actionKeyRelease"), node_interface(node_interface::eventout_id, field_value::sfbool_id, "altKey"), node_interface(node_interface::eventout_id, field_value::sfbool_id, "controlKey"), node_interface(node_interface::eventout_id, field_value::sfbool_id, "isActive"), node_interface(node_interface::eventout_id, field_value::sfstring_id, "keyPress"), node_interface(node_interface::eventout_id, field_value::sfstring_id, "keyRelease"), node_interface(node_interface::eventout_id, field_value::sfbool_id, "shiftKey") }; typedef node_type_impl<key_sensor_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<key_sensor_node>::exposedfield<sfnode> >( &key_sensor_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<key_sensor_node>::exposedfield<sfnode> >( &key_sensor_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<key_sensor_node>::exposedfield<sfnode> >( &key_sensor_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<key_sensor_node>::exposedfield<sfbool> >( &key_sensor_node::enabled_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<key_sensor_node>::exposedfield<sfbool> >( &key_sensor_node::enabled_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<key_sensor_node>::exposedfield<sfbool> >( &key_sensor_node::enabled_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfint32_emitter>( &key_sensor_node::action_key_press_emitter_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfint32_emitter>( &key_sensor_node::action_key_release_emitter_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfbool_emitter>( &key_sensor_node::alt_key_emitter_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfbool_emitter>( &key_sensor_node::control_key_emitter_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfbool_emitter>( &key_sensor_node::is_active_emitter_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfstring_emitter>( &key_sensor_node::key_press_emitter_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfstring_emitter>( &key_sensor_node::key_release_emitter_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< key_sensor_node::sfbool_emitter>( &key_sensor_node::shift_key_emitter_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @class key_sensor_node * * @brief Represents KeySensor node instances. */ /** * @var key_sensor_node::key_sensor_class * * @brief Class object for KeySensor nodes. */ /** * @var key_sensor_node::enabled_ * * @brief enabled exposedField */ /** * @var key_sensor_node::action_key_press_ * * @brief action_key_press eventOut */ /** * @var key_sensor_node::action_key_release_ * * @brief action_key_release eventOut */ /** * @var key_sensor_node::alt_key_ * * @brief alt_key eventOut */ /** * @var key_sensor_node::control_key_ * * @brief control_key eventOut */ /** * @var key_sensor_node::is_active_ * * @brief is_active eventOut */ /** * @var key_sensor_node::key_press_ * * @brief key_press eventOut */ /** * @var key_sensor_node::key_release_ * * @brief key_release eventOut */ /** * @var key_sensor_node::shift_key_ * * @brief shift_key eventOut */ /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ key_sensor_node:: key_sensor_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), bounded_volume_node(type, scope), abstract_node<self_t>(type, scope), child_node(type, scope), enabled_(*this, true), action_key_press_emitter_(*this, this->action_key_press_), action_key_release_emitter_(*this, this->action_key_release_), alt_key_emitter_(*this, this->alt_key_), control_key_emitter_(*this, this->control_key_), is_active_emitter_(*this, this->is_active_), key_press_emitter_(*this, this->key_press_), key_release_emitter_(*this, this->key_release_), shift_key_emitter_(*this, this->shift_key_) {} /** * @brief Destroy. */ key_sensor_node::~key_sensor_node() throw () {} } |
From: Braden M. <br...@us...> - 2006-03-26 07:42:17
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11762 Modified Files: ChangeLog Log Message: Added support for constructing X3D Interactive profile scenes. From Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1204 retrieving revision 1.1205 diff -C2 -d -r1.1204 -r1.1205 *** ChangeLog 25 Mar 2006 09:22:16 -0000 1.1204 --- ChangeLog 26 Mar 2006 07:42:14 -0000 1.1205 *************** *** 1,3 **** ! 2006-03-22 Braden McDaniel <br...@en...> Added ColorRGBA node to level 1 of the X3D Rendering component. --- 1,64 ---- ! 2006-03-26 Braden McDaniel <br...@en...> ! ! Added support for constructing X3D Interactive profile scenes. ! From Andrew Grieve <sg...@us...> ! ! * src/libopenvrml/Makefile.am ! (openvrml_include_HEADERS): Added openvrml/x3d_key_device_sensor.h ! and openvrml/x3d_event_utilities.h. ! (libopenvrml_la_SOURCES): Added openvrml/x3d_key_device_sensor.cpp ! and openvrml/x3d_event_utilities.cpp. ! * src/libopenvrml/openvrml/browser.cpp ! (x3d_interactive_profile): Added class corresponding to the X3D ! Interactive profile. ! (profile_registry::profile_registry()): Add the ! x3d_interactive_profile to the registry. ! (register_node_classes(openvrml::browser &)): Register the ! KeyDeviceSensor and EventUtilities component node implementations. ! (x3d_pointing_device_sensor_component): Added class corresponding ! to the X3D PointingDeviceSensor component. ! (x3d_pointing_device_sensor_component::id): Component id. ! (x3d_pointing_device_sensor_component::add_to_scope(const ! openvrml::browser &, openvrml::scope &, int) const): Add the ! node_types defined for the PointingDeviceSensor component to the ! scope. ! (x3d_key_device_sensor_component): Added class corresponding to ! the X3D KeyDeviceSensor component. ! (x3d_key_device_sensor_component::id): Component id. ! (x3d_key_device_sensor_component::add_to_scope(const ! openvrml::browser &, openvrml::scope &, int) const): Add the ! node_types defined for the KeyDeviceSensor component to the scope. ! (x3d_environmental_sensor_component): Added class corresponding to ! the X3D EnvironmentalSensor component. ! (x3d_environmental_sensor_component::id): Component id. ! (x3d_environmental_sensor_component::add_to_scope(const ! openvrml::browser &, openvrml::scope &, int) const): Add the ! node_types defined for the EnvironmentalSensor component to the ! scope. ! (x3d_event_utilities_component): Added class corresponding to the ! X3D EventUtilities component. ! (x3d_event_utilities_component::id): Component id. ! (x3d_event_utilities_component::add_to_scope(const ! openvrml::browser &, openvrml::scope &, int) const): Add the ! node_types defined for the EventUtilities component to the scope. ! (component_registry::component_registry()): Register ! x3d_pointing_device_sensor_component, ! x3d_key_device_sensor_component, ! x3d_environmental_sensor_component, and ! x3d_event_utilities_component. ! (x3d_interactive_profile::id): Profile id. ! (x3d_interactive_profile::x3d_interactive_profile()): Add ! components for the Interactive profile. ! * src/libopenvrml/openvrml/x3d_event_utilities.cpp: Added file; ! implementations of X3D EventUtilities component level 1 nodes. ! * src/libopenvrml/openvrml/x3d_event_utilities.h: Added file; ! expose node_class registration function. ! * src/libopenvrml/openvrml/x3d_key_device_sensor.cpp: Added file; ! implementations of X3D KeyDeviceSensor component level 1 nodes. ! * src/libopenvrml/openvrml/x3d_key_device_sensor.h: Added file; ! expose node_class registration function. ! * tests/testsuite.at: Added test of minimal X3D Interactive world. ! ! 2006-03-24 Braden McDaniel <br...@en...> Added ColorRGBA node to level 1 of the X3D Rendering component. |
From: Braden M. <br...@us...> - 2006-03-26 07:42:17
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11762/src/libopenvrml Modified Files: Makefile.am Log Message: Added support for constructing X3D Interactive profile scenes. From Andrew Grieve <sg...@us...> Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Makefile.am 20 Mar 2006 01:46:50 -0000 1.26 --- Makefile.am 26 Mar 2006 07:42:14 -0000 1.27 *************** *** 22,26 **** openvrml/x3d_core.h \ openvrml/x3d_rendering.h \ ! openvrml/x3d_texturing.h VRML97PARSER_BUILT_SOURCEFILES = \ --- 22,28 ---- openvrml/x3d_core.h \ openvrml/x3d_rendering.h \ ! openvrml/x3d_texturing.h \ ! openvrml/x3d_key_device_sensor.h \ ! openvrml/x3d_event_utilities.h VRML97PARSER_BUILT_SOURCEFILES = \ *************** *** 96,100 **** openvrml/x3d_core.cpp \ openvrml/x3d_rendering.cpp \ ! openvrml/x3d_texturing.cpp libopenvrml_la_LDFLAGS = \ --- 98,104 ---- openvrml/x3d_core.cpp \ openvrml/x3d_rendering.cpp \ ! openvrml/x3d_texturing.cpp \ ! openvrml/x3d_key_device_sensor.cpp \ ! openvrml/x3d_event_utilities.cpp libopenvrml_la_LDFLAGS = \ |
From: Braden M. <br...@us...> - 2006-03-26 07:42:17
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11762/tests Modified Files: testsuite.at Log Message: Added support for constructing X3D Interactive profile scenes. From Andrew Grieve <sg...@us...> Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testsuite.at 20 Mar 2006 01:46:50 -0000 1.9 --- testsuite.at 26 Mar 2006 07:42:14 -0000 1.10 *************** *** 194,195 **** --- 194,203 ---- AT_CHECK([parse-x3dvrml < minimal-interchange.x3dv]) AT_CLEANUP + + AT_SETUP([Minimal Interactive world]) + AT_DATA([minimal-interactive.x3dv], + [[#X3D V3.0 utf8 + PROFILE Interactive + ]]) + AT_CHECK([parse-x3dvrml < minimal-interactive.x3dv]) + AT_CLEANUP |
From: Braden M. <br...@us...> - 2006-03-25 09:22:24
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6443 Modified Files: ChangeLog Log Message: Added ColorRGBA node to level 1 of the X3D Rendering component. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1203 retrieving revision 1.1204 diff -C2 -d -r1.1203 -r1.1204 *** ChangeLog 22 Mar 2006 06:46:42 -0000 1.1203 --- ChangeLog 25 Mar 2006 09:22:16 -0000 1.1204 *************** *** 1,4 **** --- 1,14 ---- 2006-03-22 Braden McDaniel <br...@en...> + Added ColorRGBA node to level 1 of the X3D Rendering component. + + * src/libopenvrml/openvrml/browser.cpp + (x3d_rendering_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the ColorRGBA node to level 1. + * src/libopenvrml/openvrml/x3d_rendering.cpp + (color_rgba_class): Added ColorRGBA node_class. + + 2006-03-22 Braden McDaniel <br...@en...> + Fixes for gcc 4.1. |
From: Braden M. <br...@us...> - 2006-03-25 09:22:24
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6443/src/libopenvrml/openvrml Modified Files: browser.cpp x3d_rendering.cpp Log Message: Added ColorRGBA node to level 1 of the X3D Rendering component. Index: x3d_rendering.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_rendering.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x3d_rendering.cpp 20 Mar 2006 01:46:50 -0000 1.1 --- x3d_rendering.cpp 25 Mar 2006 09:22:16 -0000 1.2 *************** *** 38,41 **** --- 38,57 ---- /** + * @brief Class object for ColorRGBA nodes. + */ + class OPENVRML_LOCAL color_rgba_class : public node_class { + public: + explicit color_rgba_class(openvrml::browser & browser); + virtual ~color_rgba_class() throw (); + + private: + virtual const boost::shared_ptr<node_type> + do_create_type(const std::string & id, + const node_interface_set & interfaces) const + throw (unsupported_interface, std::bad_alloc); + }; + + + /** * @brief Class object for IndexedTriangleFanSet nodes. */ *************** *** 137,140 **** --- 153,158 ---- using boost::shared_ptr; using openvrml::node_class; + b.add_node_class("urn:X-openvrml:node:ColorRGBA", + shared_ptr<node_class>(new color_rgba_class(b))); b.add_node_class("urn:X-openvrml:node:IndexedTriangleFanSet", shared_ptr<node_class>(new indexed_triangle_fan_set_class(b))); *************** *** 410,413 **** --- 428,523 ---- }; + + /** + * @brief Construct. + * + * @param browser the browser associated with this color_rgba_class. + */ + color_rgba_class::color_rgba_class(openvrml::browser & browser): + node_class(browser) + {} + + /** + * @brief Destroy. + */ + color_rgba_class::~color_rgba_class() throw () + {} + + /** + * @brief Create a node_type. + * + * @param id the name for the new node_type. + * @param interfaces the interfaces for the new node_type. + * + * @return a node_type_ptr to a node_type capable of creating ColorRGBA nodes. + * + * @exception unsupported_interface if @p interfaces includes an interface + * not supported by color_rgba_class. + * @exception std::bad_alloc if memory allocation fails. + */ + const boost::shared_ptr<openvrml::node_type> + color_rgba_class::do_create_type(const std::string & id, + const node_interface_set & interfaces) const + throw (unsupported_interface, std::bad_alloc) + { + typedef boost::array<node_interface, 2> supported_interfaces_t; + static const supported_interfaces_t supported_interfaces = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::mfcolorrgba_id, + "color") + }; + typedef node_type_impl<color_rgba_node> node_type_t; + + const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); + node_type_t & the_node_type = static_cast<node_type_t &>(*type); + + for (node_interface_set::const_iterator interface(interfaces.begin()); + interface != interfaces.end(); + ++interface) { + supported_interfaces_t::const_iterator supported_interface = + supported_interfaces.begin() - 1; + if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<color_rgba_node>::exposedfield<sfnode> >( + &color_rgba_node::metadata)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<color_rgba_node>::exposedfield<sfnode> >( + &color_rgba_node::metadata)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<color_rgba_node>::exposedfield<sfnode> >( + &color_rgba_node::metadata))); + } else if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<color_rgba_node>::exposedfield<mfcolorrgba> >( + &color_rgba_node::color_)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<color_rgba_node>::exposedfield<mfcolorrgba> >( + &color_rgba_node::color_)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<color_rgba_node>::exposedfield<mfcolorrgba> >( + &color_rgba_node::color_))); + } else { + throw unsupported_interface(*interface); + } + } + return type; + } + + /** * @brief Construct. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.153 retrieving revision 1.154 diff -C2 -d -r1.153 -r1.154 *** browser.cpp 22 Mar 2006 06:46:42 -0000 1.153 --- browser.cpp 25 Mar 2006 09:22:16 -0000 1.154 *************** *** 9994,9997 **** --- 9994,10019 ---- // + // ColorRGBA node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::mfcolorrgba_id, + "color") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 2); + add_scope_entry(b, + "ColorRGBA", + interface_set, + "urn:X-openvrml:node:ColorRGBA", + scope); + } + + // // Coordinate node // |
From: Braden M. <br...@us...> - 2006-03-22 06:46:46
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9916/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Fixes for gcc 4.1. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.152 retrieving revision 1.153 diff -C2 -d -r1.152 -r1.153 *** browser.cpp 20 Mar 2006 01:46:50 -0000 1.152 --- browser.cpp 22 Mar 2006 06:46:42 -0000 1.153 *************** *** 3876,3880 **** profile_registry(); ! using base_type::at; } profile_registry_; --- 3876,3880 ---- profile_registry(); ! using boost::ptr_map<std::string, profile>::at; } profile_registry_; *************** *** 3903,3907 **** component_registry(); ! using base_type::at; } component_registry_; } // namespace --- 3903,3907 ---- component_registry(); ! using boost::ptr_map<std::string, component>::at; } component_registry_; } // namespace |
From: Braden M. <br...@us...> - 2006-03-22 06:46:45
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9916 Modified Files: ChangeLog Log Message: Fixes for gcc 4.1. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1202 retrieving revision 1.1203 diff -C2 -d -r1.1202 -r1.1203 *** ChangeLog 20 Mar 2006 01:46:50 -0000 1.1202 --- ChangeLog 22 Mar 2006 06:46:42 -0000 1.1203 *************** *** 1,2 **** --- 1,10 ---- + 2006-03-22 Braden McDaniel <br...@en...> + + Fixes for gcc 4.1. + + * src/libopenvrml/openvrml/browser.cpp + (profile_registry): Eliminated use of private type "base_type". + (component_registry): Eliminated use of private type "base_type". + 2006-03-19 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-03-20 01:46:55
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5931/src/libopenvrml/openvrml Modified Files: browser.cpp Added Files: x3d_rendering.cpp x3d_rendering.h x3d_texturing.cpp x3d_texturing.h Log Message: Added support for constructing X3D Interchange profile scenes. From Andrew Grieve <sg...@us...> --- NEW FILE: x3d_rendering.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...2752 lines suppressed...] abstract_node<self_t>(type, scope), geometry_node(type, scope), child_node(type, scope), color_(*this), coord_(*this), normal_(*this), strip_count_(*this), tex_coord_(*this), ccw_(true), color_per_vertex_(true), normal_per_vertex_(true), solid_(true) {} /** * @brief Destroy. */ triangle_strip_set_node::~triangle_strip_set_node() OPENVRML_NOTHROW {} } --- NEW FILE: x3d_texturing.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifndef OPENVRML_X3D_TEXTURING_H # define OPENVRML_X3D_TEXTURING_H namespace openvrml { class browser; } extern "C" void register_texturing_node_classes(openvrml::browser & b); # endif Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -d -r1.151 -r1.152 *** browser.cpp 19 Mar 2006 02:26:44 -0000 1.151 --- browser.cpp 20 Mar 2006 01:46:50 -0000 1.152 *************** *** 48,51 **** --- 48,53 ---- # include "vrml97node.h" # include "x3d_core.h" + # include "x3d_rendering.h" + # include "x3d_texturing.h" namespace openvrml { *************** *** 3841,3844 **** --- 3843,3854 ---- [...1826 lines suppressed...] } + + + const char * const x3d_interchange_profile::id = "Interchange"; + + x3d_interchange_profile::x3d_interchange_profile() + { + this->add_component(x3d_core_component::id, 1); + this->add_component(x3d_time_component::id, 1); + this->add_component(x3d_grouping_component::id, 1); + this->add_component(x3d_rendering_component::id, 3); + this->add_component(x3d_shape_component::id, 1); + this->add_component(x3d_geometry3d_component::id, 2); + this->add_component(x3d_lighting_component::id, 1); + this->add_component(x3d_texturing_component::id, 2); + this->add_component(x3d_interpolation_component::id, 2); + this->add_component(x3d_navigation_component::id, 1); + this->add_component(x3d_environmental_effects_component::id, 1); + } } // namespace --- NEW FILE: x3d_texturing.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifdef HAVE_CONFIG_H # include <config.h> # endif # include <boost/array.hpp> # include <private.h> # include "browser.h" # include "node_impl_util.h" # include "x3d_texturing.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for MultiTexture nodes. */ class OPENVRML_LOCAL multi_texture_class : public node_class { public: explicit multi_texture_class(openvrml::browser & browser); virtual ~multi_texture_class() throw (); private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc); }; /** * @brief Class object for MultiTextureCoordinate nodes. */ class OPENVRML_LOCAL multi_texture_coordinate_class : public node_class { public: explicit multi_texture_coordinate_class(openvrml::browser & browser); virtual ~multi_texture_coordinate_class() throw (); private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc); }; /** * @brief Class object for MultiTextureTransform nodes. */ class OPENVRML_LOCAL multi_texture_transform_class : public node_class { public: explicit multi_texture_transform_class(openvrml::browser & browser); virtual ~multi_texture_transform_class() throw (); private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc); }; /** * @brief Class object for TextureCoordinateGenerator nodes. */ class OPENVRML_LOCAL texture_coordinate_generator_class : public node_class { public: explicit texture_coordinate_generator_class( openvrml::browser & browser); virtual ~texture_coordinate_generator_class() throw (); private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc); }; } void register_texturing_node_classes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_class; b.add_node_class("urn:X-openvrml:node:MultiTexture", shared_ptr<node_class>(new multi_texture_class(b))); b.add_node_class( "urn:X-openvrml:node:MultiTextureCoordinate", shared_ptr<node_class>(new multi_texture_coordinate_class(b))); b.add_node_class( "urn:X-openvrml:node:MultiTextureTransform", shared_ptr<node_class>(new multi_texture_transform_class(b))); b.add_node_class( "urn:X-openvrml:node:TextureCoordinateGenerator", shared_ptr<node_class>(new texture_coordinate_generator_class(b))); } namespace { using namespace openvrml_; class OPENVRML_LOCAL multi_texture_node : public abstract_node<multi_texture_node> { friend class multi_texture_class; exposedfield<sffloat> alpha_; exposedfield<sfcolor> color_; exposedfield<mfstring> function_; exposedfield<mfstring> mode_; exposedfield<mfstring> source_; exposedfield<mfnode> texture_; public: multi_texture_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~multi_texture_node() throw (); }; class OPENVRML_LOCAL multi_texture_coordinate_node : public abstract_node<multi_texture_coordinate_node> { friend class multi_texture_coordinate_class; exposedfield<mfnode> tex_coord_; public: multi_texture_coordinate_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~multi_texture_coordinate_node() throw (); }; class OPENVRML_LOCAL multi_texture_transform_node : public abstract_node<multi_texture_transform_node> { friend class multi_texture_transform_class; exposedfield<mfnode> texture_transform_; public: multi_texture_transform_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~multi_texture_transform_node() throw (); }; class OPENVRML_LOCAL texture_coordinate_generator_node : public abstract_node<texture_coordinate_generator_node> { friend class texture_coordinate_generator_class; exposedfield<sfstring> mode_; exposedfield<mffloat> parameter_; public: texture_coordinate_generator_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~texture_coordinate_generator_node() throw (); }; /** * @brief Construct. * * @param browser the browser associated with this multi_texture_class. */ multi_texture_class::multi_texture_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ multi_texture_class::~multi_texture_class() throw () {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating MultiTexture * nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by multi_texture_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> multi_texture_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 7> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::exposedfield_id, field_value::sffloat_id, "alpha"), node_interface(node_interface::exposedfield_id, field_value::sfcolor_id, "color"), node_interface(node_interface::exposedfield_id, field_value::mfstring_id, "function"), node_interface(node_interface::exposedfield_id, field_value::mfstring_id, "mode"), node_interface(node_interface::exposedfield_id, field_value::mfstring_id, "source"), node_interface(node_interface::exposedfield_id, field_value::mfnode_id, "texture") }; typedef node_type_impl<multi_texture_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_node>::exposedfield<sfnode> >( &multi_texture_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_node>::exposedfield<sfnode> >( &multi_texture_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_node>::exposedfield<sfnode> >( &multi_texture_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_node>::exposedfield<sffloat> >( &multi_texture_node::alpha_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_node>::exposedfield<sffloat> >( &multi_texture_node::alpha_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_node>::exposedfield<sffloat> >( &multi_texture_node::alpha_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_node>::exposedfield<sfcolor> >( &multi_texture_node::color_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_node>::exposedfield<sfcolor> >( &multi_texture_node::color_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_node>::exposedfield<sfcolor> >( &multi_texture_node::color_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::function_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::function_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::function_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::mode_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::mode_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::mode_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::source_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::source_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_node>::exposedfield<mfstring> >( &multi_texture_node::source_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_node>::exposedfield<mfnode> >( &multi_texture_node::texture_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_node>::exposedfield<mfnode> >( &multi_texture_node::texture_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_node>::exposedfield<mfnode> >( &multi_texture_node::texture_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @brief Construct. * * @param browser the browser associated with this multi_texture_coordinate_class. */ multi_texture_coordinate_class::multi_texture_coordinate_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ multi_texture_coordinate_class::~multi_texture_coordinate_class() throw () {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating MultiTextureCoordinate nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by multi_texture_coordinate_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> multi_texture_coordinate_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 2> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::exposedfield_id, field_value::mfnode_id, "texCoord") }; typedef node_type_impl<multi_texture_coordinate_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_coordinate_node>::exposedfield<sfnode> >( &multi_texture_coordinate_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_coordinate_node>::exposedfield<sfnode> >( &multi_texture_coordinate_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_coordinate_node>::exposedfield<sfnode> >( &multi_texture_coordinate_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_coordinate_node>::exposedfield<mfnode> >( &multi_texture_coordinate_node::tex_coord_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_coordinate_node>::exposedfield<mfnode> >( &multi_texture_coordinate_node::tex_coord_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_coordinate_node>::exposedfield<mfnode> >( &multi_texture_coordinate_node::tex_coord_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @brief Construct. * * @param browser the browser associated with this multi_texture_transform_class. */ multi_texture_transform_class::multi_texture_transform_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ multi_texture_transform_class::~multi_texture_transform_class() throw () {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating MultiTextureTransform nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by multi_texture_transform_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> multi_texture_transform_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 2> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::exposedfield_id, field_value::mfnode_id, "textureTransform") }; typedef node_type_impl<multi_texture_transform_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_transform_node>::exposedfield<sfnode> >( &multi_texture_transform_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_transform_node>::exposedfield<sfnode> >( &multi_texture_transform_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_transform_node>::exposedfield<sfnode> >( &multi_texture_transform_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<multi_texture_transform_node>::exposedfield<mfnode> >( &multi_texture_transform_node::texture_transform_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<multi_texture_transform_node>::exposedfield<mfnode> >( &multi_texture_transform_node::texture_transform_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<multi_texture_transform_node>::exposedfield<mfnode> >( &multi_texture_transform_node::texture_transform_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @brief Construct. * * @param browser the browser associated with this texture_coordinate_generator_class. */ texture_coordinate_generator_class::texture_coordinate_generator_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ texture_coordinate_generator_class::~texture_coordinate_generator_class() throw () {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating TextureCoordinateGenerator nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by texture_coordinate_generator_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> texture_coordinate_generator_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const throw (unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 3> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::exposedfield_id, field_value::sfstring_id, "mode"), node_interface(node_interface::exposedfield_id, field_value::mffloat_id, "parameter") }; typedef node_type_impl<texture_coordinate_generator_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<sfnode> >( &texture_coordinate_generator_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<sfnode> >( &texture_coordinate_generator_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<sfnode> >( &texture_coordinate_generator_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<sfstring> >( &texture_coordinate_generator_node::mode_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<sfstring> >( &texture_coordinate_generator_node::mode_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<sfstring> >( &texture_coordinate_generator_node::mode_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<mffloat> >( &texture_coordinate_generator_node::parameter_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<mffloat> >( &texture_coordinate_generator_node::parameter_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_coordinate_generator_node>::exposedfield<mffloat> >( &texture_coordinate_generator_node::parameter_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @class multi_texture_node * * @brief Represents MultiTexture node instances. */ /** * @var multi_texture_node::MultiTexture_class * * @brief Class object for MultiTexture nodes. */ /** * @var multi_texture_node::alpha_ * * @brief alpha exposedField */ /** * @var multi_texture_node::color_ * * @brief color exposedField */ /** * @var multi_texture_node::function_ * * @brief function exposedField */ /** * @var multi_texture_node::mode_ * * @brief mode exposedField */ /** * @var multi_texture_node::source_ * * @brief source exposedField */ /** * @var multi_texture_node::texture_ * * @brief texture exposedField */ /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ multi_texture_node:: multi_texture_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), abstract_node<self_t>(type, scope), alpha_(*this, 1), color_(*this, color(1,1,1)), function_(*this), mode_(*this), source_(*this), texture_(*this) {} /** * @brief Destroy. */ multi_texture_node::~multi_texture_node() throw () {} /** * @class multi_texture_coordinate_node * * @brief Represents MultiTextureCoordinate node instances. */ /** * @var multi_texture_coordinate_node::MultiTextureCoordinate_class * * @brief Class object for MultiTextureCoordinate nodes. */ /** * @var multi_texture_coordinate_node::tex_coord_ * * @brief tex_coord exposedField */ /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ multi_texture_coordinate_node:: multi_texture_coordinate_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), abstract_node<self_t>(type, scope), tex_coord_(*this) {} /** * @brief Destroy. */ multi_texture_coordinate_node::~multi_texture_coordinate_node() throw () {} /** * @class multi_texture_transform_node * * @brief Represents MultiTextureTransform node instances. */ /** * @var multi_texture_transform_node::MultiTextureTransform_class * * @brief Class object for MultiTextureTransform nodes. */ /** * @var multi_texture_transform_node::texture_transform_ * * @brief texture_transform exposedField */ /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ multi_texture_transform_node:: multi_texture_transform_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), abstract_node<self_t>(type, scope), texture_transform_(*this) {} /** * @brief Destroy. */ multi_texture_transform_node::~multi_texture_transform_node() throw () {} /** * @class texture_coordinate_generator_node * * @brief Represents TextureCoordinateGenerator node instances. */ /** * @var texture_coordinate_generator_node::TextureCoordinateGenerator_class * * @brief Class object for TextureCoordinateGenerator nodes. */ /** * @var texture_coordinate_generator_node::mode_ * * @brief mode exposedField */ /** * @var texture_coordinate_generator_node::parameter_ * * @brief parameter exposedField */ /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ texture_coordinate_generator_node:: texture_coordinate_generator_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), abstract_node<self_t>(type, scope), mode_(*this, "SPHERE"), parameter_(*this) {} /** * @brief Destroy. */ texture_coordinate_generator_node::~texture_coordinate_generator_node() throw () {} } --- NEW FILE: x3d_rendering.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifndef OPENVRML_X3D_RENDERING_H # define OPENVRML_X3D_RENDERING_H namespace openvrml { class browser; } extern "C" void register_rendering_node_classes(openvrml::browser & b); # endif |
From: Braden M. <br...@us...> - 2006-03-20 01:46:55
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5931/tests Modified Files: testsuite.at Log Message: Added support for constructing X3D Interchange profile scenes. From Andrew Grieve <sg...@us...> Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** testsuite.at 19 Mar 2006 02:26:44 -0000 1.8 --- testsuite.at 20 Mar 2006 01:46:50 -0000 1.9 *************** *** 186,187 **** --- 186,195 ---- AT_CHECK([parse-x3dvrml < x3d+vrml97-component.x3dv]) AT_CLEANUP + + AT_SETUP([Minimal Interchange world]) + AT_DATA([minimal-interchange.x3dv], + [[#X3D V3.0 utf8 + PROFILE Interchange + ]]) + AT_CHECK([parse-x3dvrml < minimal-interchange.x3dv]) + AT_CLEANUP |
From: Braden M. <br...@us...> - 2006-03-20 01:46:55
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5931/src/libopenvrml Modified Files: Makefile.am Log Message: Added support for constructing X3D Interchange profile scenes. From Andrew Grieve <sg...@us...> Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Makefile.am 17 Mar 2006 07:23:29 -0000 1.25 --- Makefile.am 20 Mar 2006 01:46:50 -0000 1.26 *************** *** 20,24 **** openvrml/node_impl_util.h \ openvrml/vrml97node.h \ ! openvrml/x3d_core.h VRML97PARSER_BUILT_SOURCEFILES = \ --- 20,26 ---- openvrml/node_impl_util.h \ openvrml/vrml97node.h \ ! openvrml/x3d_core.h \ ! openvrml/x3d_rendering.h \ ! openvrml/x3d_texturing.h VRML97PARSER_BUILT_SOURCEFILES = \ *************** *** 92,96 **** openvrml/node_impl_util.cpp \ openvrml/vrml97node.cpp \ ! openvrml/x3d_core.cpp libopenvrml_la_LDFLAGS = \ --- 94,100 ---- openvrml/node_impl_util.cpp \ openvrml/vrml97node.cpp \ ! openvrml/x3d_core.cpp \ ! openvrml/x3d_rendering.cpp \ ! openvrml/x3d_texturing.cpp libopenvrml_la_LDFLAGS = \ |
From: Braden M. <br...@us...> - 2006-03-20 01:46:55
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5931 Modified Files: ChangeLog Log Message: Added support for constructing X3D Interchange profile scenes. From Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1201 retrieving revision 1.1202 diff -C2 -d -r1.1201 -r1.1202 *** ChangeLog 19 Mar 2006 16:42:21 -0000 1.1201 --- ChangeLog 20 Mar 2006 01:46:50 -0000 1.1202 *************** *** 1,4 **** --- 1,103 ---- 2006-03-19 Braden McDaniel <br...@en...> + Added support for constructing X3D Interchange profile scenes. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/Makefile.am + (openvrml_include_HEADERS): Added openvrml/x3d_rendering.h and + openvrml/x3d_texturing.h. + (libopenvrml_la_SOURCES): Added openvrml/x3d_rendering.cpp and + openvrml/x3d_texturing.cpp. + * src/libopenvrml/openvrml/browser.cpp + (x3d_interchange_profile): Added class to correspond to the X3D + Interchange profile. + (profile_registry::profile_registry()): Add + x3d_interchange_profile to the registry. + (register_node_classes(openvrml::browser &)): Register + X3D-specific rendering and texturing node_classes. + (x3d_time_component): Added class to correspond to the X3D Time + component. + (x3d_time_component::id): Component identifier. + (x3d_time_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Time component to the scope. + (x3d_grouping_component): Added class to correspond to the X3D + Grouping component. + (x3d_grouping_component::id): Component identifier. + (x3d_grouping_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Grouping component to the scope. + (x3d_rendering_component): Added class to correspond to the X3D + Rendering component. + (x3d_rendering_component::id): Component identifier. + (x3d_rendering_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Rendering component to the scope. + (x3d_shape_component): Added class to correspond to the X3D Shape + component. + (x3d_shape_component::id): Component identifier. + (x3d_shape_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Shape component to the scope. + (x3d_geometry3d_component): Added class to correspond to the X3D + Geometry3D component. + (x3d_geometry3d_component::id): Component identifier. + (x3d_geometry3d_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Geometry3D component to the scope. + (x3d_lighting_component): Added class to correspond to the X3D + Lighting component. + (x3d_lighting_component::id): Component identifier. + (x3d_lighting_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Lighting component to the scope. + (x3d_texturing_component): Added class to correspond to the X3D + Texturing component. + (x3d_texturing_component::id): Component identifier. + (x3d_texturing_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Texturing component to the scope. + (x3d_interpolation_component): Added class to correspond to the + X3D Interpolation component. + (x3d_interpolation_component::id): Component identifier. + (x3d_interpolation_component::add_to_scope(const openvrml::browser + &, openvrml::scope &, int) const): Add the node_types defined for + the Interpolation component to the scope. + (x3d_navigation_component): Added class to correspond to the X3D + Navigation component. + (x3d_navigation_component::id): Component identifier. + (x3d_navigation_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Add the node_types defined for the + Navigation component to the scope. + (x3d_environmental_effects_component): Added class to correspond + to the X3D EnvironmentalEffects component. + (x3d_environmental_effects_component::id): Component identifier. + (x3d_environmental_effects_component::add_to_scope(const + openvrml::browser &, openvrml::scope &, int) const): Add the + node_types defined for the EnvironmentalEffects component to the + scope. + (component_registry::component_registry()): Add to the registry: + x3d_time_component, x3d_grouping_component, + x3d_rendering_component, x3d_shape_component, + x3d_geometry3d_component, x3d_lighting_component, + x3d_texturing_component, x3d_interpolation_component, + x3d_navigation_component, x3d_environmental_effects_component. + (x3d_interchange_profile::id): Profile identifier. + (x3d_interchange_profile::x3d_interchange_profile()): Add + components to profile definition. + * src/libopenvrml/openvrml/x3d_rendering.cpp: Added file; + implementations of Rendering component level 1, 2, and 3 nodes + that are not also VRML97 nodes. + * src/libopenvrml/openvrml/x3d_rendering.h: Added file; expose + node class registration function. + * src/libopenvrml/openvrml/x3d_texturing.cpp: Added file; + implementations of Texturing component level 1 and 2 nodes that + are not also VRML97 nodes. + * src/libopenvrml/openvrml/x3d_texturing.h: Added file; expose + node class registration function. + * tests/testsuite.at: Added test of minimal X3D Interchange world. + + 2006-03-19 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/X3DVrmlParser.g (vrmlScene): Construct antlr::SemanticException to include file |
From: Braden M. <br...@us...> - 2006-03-19 16:42:28
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7719/src/libopenvrml/openvrml Modified Files: X3DVrmlParser.g Log Message: Construct antlr::SemanticException to include file name, line, and column information. Index: X3DVrmlParser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/X3DVrmlParser.g,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** X3DVrmlParser.g 19 Mar 2006 02:26:44 -0000 1.19 --- X3DVrmlParser.g 19 Mar 2006 16:42:22 -0000 1.20 *************** *** 246,250 **** catch [boost::bad_ptr_container_operation &] { throw antlr::SemanticException("unrecognized profile \"" ! + profile_id + "\""); } --- 246,253 ---- catch [boost::bad_ptr_container_operation &] { throw antlr::SemanticException("unrecognized profile \"" ! + profile_id + "\"", ! this->uri, ! LT(1)->getLine(), ! LT(1)->getColumn()); } *************** *** 267,271 **** catch [boost::bad_ptr_container_operation &] { throw antlr::SemanticException("unrecognized component \"" ! + id->getText() + "\""); } --- 270,277 ---- catch [boost::bad_ptr_container_operation &] { throw antlr::SemanticException("unrecognized component \"" ! + id->getText() + "\"", ! this->uri, ! id->getLine(), ! id->getColumn()); } |
From: Braden M. <br...@us...> - 2006-03-19 16:42:28
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7719 Modified Files: ChangeLog Log Message: Construct antlr::SemanticException to include file name, line, and column information. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1200 retrieving revision 1.1201 diff -C2 -d -r1.1200 -r1.1201 *** ChangeLog 19 Mar 2006 02:26:44 -0000 1.1200 --- ChangeLog 19 Mar 2006 16:42:21 -0000 1.1201 *************** *** 1,2 **** --- 1,10 ---- + 2006-03-19 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/X3DVrmlParser.g + (vrmlScene): Construct antlr::SemanticException to include file + name, line, and column information. + (componentStatement): Construct antlr::SemanticException to + include file name, line, and column information. + 2006-03-18 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-03-19 02:26:47
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7838/src/libopenvrml/openvrml Modified Files: X3DVrmlParser.g browser.cpp Log Message: Added component support to the parser. Modified patch from Andrew Grieve <sg...@us...> Index: X3DVrmlParser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/X3DVrmlParser.g,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** X3DVrmlParser.g 17 Mar 2006 07:23:29 -0000 1.18 --- X3DVrmlParser.g 19 Mar 2006 02:26:44 -0000 1.19 *************** *** 239,243 **** const boost::shared_ptr<scope> root_scope(root_scope_auto_ptr); } ! (componentStatement)* (metaStatement[meta_data])* (statement[scene, nodes, root_scope])* ; --- 239,244 ---- const boost::shared_ptr<scope> root_scope(root_scope_auto_ptr); } ! (componentStatement[scene.browser(), *root_scope])* ! (metaStatement[meta_data])* (statement[scene, nodes, root_scope])* ; *************** *** 249,261 **** profileStatement returns [std::string profile_id] : KEYWORD_PROFILE id:ID { profile_id = id->getText(); } ; ! componentStatement { ! size_t level; ! } ! : KEYWORD_COMPONENT ID COLON level=intValue ; metaStatement[std::map<std::string, std::string> & meta_data] --- 250,272 ---- profileStatement returns [std::string profile_id] + options { defaultErrorHandler=false; } : KEYWORD_PROFILE id:ID { profile_id = id->getText(); } ; ! componentStatement[openvrml::browser & browser, openvrml::scope & scope] ! options { defaultErrorHandler=false; } { ! int level; ! } ! : KEYWORD_COMPONENT id:ID COLON level=intValue { ! const component & c = component_registry_.at(id->getText()); ! c.add_to_scope(browser, scope, level); ! } ; + exception + catch [boost::bad_ptr_container_operation &] { + throw antlr::SemanticException("unrecognized component \"" + + id->getText() + "\""); + } metaStatement[std::map<std::string, std::string> & meta_data] Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.150 retrieving revision 1.151 diff -C2 -d -r1.150 -r1.151 *** browser.cpp 19 Mar 2006 00:05:28 -0000 1.150 --- browser.cpp 19 Mar 2006 02:26:44 -0000 1.151 *************** *** 3882,3885 **** --- 3882,3893 ---- assert(succeeded); } + + const class OPENVRML_LOCAL component_registry : boost::ptr_map<std::string, + component> { + public: + component_registry(); + + using base_type::at; + } component_registry_; } // namespace *************** *** 9722,9733 **** - const class OPENVRML_LOCAL component_registry : boost::ptr_map<std::string, - component> { - public: - component_registry(); - - using base_type::at; - } component_registry_; - component_registry::component_registry() { --- 9730,9733 ---- |
From: Braden M. <br...@us...> - 2006-03-19 02:26:47
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7838/tests Modified Files: testsuite.at Log Message: Added component support to the parser. Modified patch from Andrew Grieve <sg...@us...> Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** testsuite.at 5 Mar 2006 06:25:12 -0000 1.7 --- testsuite.at 19 Mar 2006 02:26:44 -0000 1.8 *************** *** 177,178 **** --- 177,187 ---- AT_CHECK([parse-x3dvrml < minimal.x3dv]) AT_CLEANUP + + AT_SETUP([X3D Core plus VRML97 component]) + AT_DATA([x3d+vrml97-component.x3dv], + [[#X3D V3.0 utf8 + PROFILE Core + COMPONENT VRML97:1 + ]]) + AT_CHECK([parse-x3dvrml < x3d+vrml97-component.x3dv]) + AT_CLEANUP |
From: Braden M. <br...@us...> - 2006-03-19 02:26:47
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7838 Modified Files: ChangeLog Log Message: Added component support to the parser. Modified patch from Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1199 retrieving revision 1.1200 diff -C2 -d -r1.1199 -r1.1200 *** ChangeLog 19 Mar 2006 00:05:27 -0000 1.1199 --- ChangeLog 19 Mar 2006 02:26:44 -0000 1.1200 *************** *** 1,4 **** --- 1,20 ---- 2006-03-18 Braden McDaniel <br...@en...> + Added component support to the parser. Modified patch from Andrew + Grieve <sg...@us...> + + * src/libopenvrml/openvrml/X3DVrmlParser.g + (vrmlScene): Pass the browser and scope to componentStatement. + (profileStatement): Disable the defaultErrorHandler. + (componentStatement): Disable the defaultErrorHandler; added + semantic action to add the node types in the component to the root + scope. + * src/libopenvrml/openvrml/browser.cpp: Moved definition of + component_registry_ to be before the parsers are included. + * tests/testsuite.at: Added basic test for parsing X3D COMPONENT + statements. + + 2006-03-18 Braden McDaniel <br...@en...> + Centralize node_class registration. |
From: Braden M. <br...@us...> - 2006-03-19 00:06:08
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13254 Modified Files: ChangeLog Log Message: Centralize node_class registration. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1198 retrieving revision 1.1199 diff -C2 -d -r1.1198 -r1.1199 *** ChangeLog 18 Mar 2006 23:26:37 -0000 1.1198 --- ChangeLog 19 Mar 2006 00:05:27 -0000 1.1199 *************** *** 1,4 **** --- 1,18 ---- 2006-03-18 Braden McDaniel <br...@en...> + Centralize node_class registration. + + * src/libopenvrml/openvrml/browser.cpp + (register_node_classes(openvrml::browser &)): Added function; + register node_classes. + * src/libopenvrml/openvrml/vrml97node.cpp + (register_vrml97_node_classes(openvrml::browser &)): Renamed + function from register_node_classes. + * src/libopenvrml/openvrml/vrml97node.h + (register_vrml97_node_classes(openvrml::browser &)): Renamed + function from register_node_classes. + + 2006-03-18 Braden McDaniel <br...@en...> + Handle the case where openvrml::browser::get_resource returns a null pointer. |
From: Braden M. <br...@us...> - 2006-03-19 00:05:40
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13254/src/libopenvrml/openvrml Modified Files: browser.cpp vrml97node.cpp vrml97node.h Log Message: Centralize node_class registration. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** browser.cpp 18 Mar 2006 23:26:38 -0000 1.149 --- browser.cpp 19 Mar 2006 00:05:28 -0000 1.150 *************** *** 5852,5855 **** --- 5852,5863 ---- */ + namespace { + void OPENVRML_LOCAL register_node_classes(openvrml::browser & b) + { + register_core_node_classes(b); + register_vrml97_node_classes(b); + } + } + /** * @brief Constructor. *************** *** 5882,5886 **** assert(this->active_viewpoint_); assert(this->active_navigation_info_); - register_core_node_classes(*this); register_node_classes(*this); } --- 5890,5893 ---- Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** vrml97node.cpp 9 Mar 2006 05:19:17 -0000 1.100 --- vrml97node.cpp 19 Mar 2006 00:05:29 -0000 1.101 *************** *** 1006,1010 **** } ! void register_node_classes(openvrml::browser & b) { using boost::shared_ptr; --- 1006,1010 ---- } ! void register_vrml97_node_classes(openvrml::browser & b) { using boost::shared_ptr; Index: vrml97node.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** vrml97node.h 29 Nov 2005 05:58:10 -0000 1.38 --- vrml97node.h 19 Mar 2006 00:05:30 -0000 1.39 *************** *** 29,33 **** } ! extern "C" void register_node_classes(openvrml::browser & b); # endif --- 29,33 ---- } ! extern "C" void register_vrml97_node_classes(openvrml::browser & b); # endif |
From: Braden M. <br...@us...> - 2006-03-18 23:26:46
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27695/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Handle the case where openvrml::browser::get_resource returns a null pointer. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.148 retrieving revision 1.149 diff -C2 -d -r1.148 -r1.149 *** browser.cpp 17 Mar 2006 07:23:29 -0000 1.148 --- browser.cpp 18 Mar 2006 23:26:38 -0000 1.149 *************** *** 7733,7737 **** throw unreachable_url(); } ! if (!(*in)) { throw unreachable_url(); } break; } catch (bad_url & ex) { --- 7733,7737 ---- throw unreachable_url(); } ! if (!in.get() || !(*in)) { throw unreachable_url(); } break; } catch (bad_url & ex) { |
From: Braden M. <br...@us...> - 2006-03-18 23:26:46
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27695 Modified Files: ChangeLog Log Message: Handle the case where openvrml::browser::get_resource returns a null pointer. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1197 retrieving revision 1.1198 diff -C2 -d -r1.1197 -r1.1198 *** ChangeLog 17 Mar 2006 07:23:29 -0000 1.1197 --- ChangeLog 18 Mar 2006 23:26:37 -0000 1.1198 *************** *** 1,2 **** --- 1,13 ---- + 2006-03-18 Braden McDaniel <br...@en...> + + Handle the case where openvrml::browser::get_resource returns a null + pointer. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/openvrml/browser.cpp + (openvrml::scene::get_resource(const std::vector<std::string> &) + const): Throw openvrml::unreachable_url if + openvrml::browser::get_resource returns a null pointer. + 2006-03-17 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-03-17 07:23:33
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3751/src/libopenvrml/openvrml Modified Files: Vrml97Parser.g X3DVrmlParser.g browser.cpp Added Files: x3d_core.cpp x3d_core.h Log Message: Added support for X3D Core profile. Substantially modified patch from Andrew Grieve <sg...@us...> --- NEW FILE: x3d_core.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifndef OPENVRML_X3D_CORE_H # define OPENVRML_X3D_CORE_H namespace openvrml { class browser; } extern "C" void register_core_node_classes(openvrml::browser & b); # endif Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.147 retrieving revision 1.148 diff -C2 -d -r1.147 -r1.148 *** browser.cpp 12 Mar 2006 23:42:14 -0000 1.147 --- browser.cpp 17 Mar 2006 07:23:29 -0000 1.148 *************** *** 39,42 **** --- 39,43 ---- # include <boost/functional.hpp> # include <boost/mpl/for_each.hpp> + # include <boost/ptr_container/ptr_map.hpp> # include <boost/spirit.hpp> # include <boost/spirit/phoenix.hpp> *************** *** 46,49 **** --- 47,51 ---- # include "browser.h" [...3816 lines suppressed...] + } + return root_scope; + } + + + const char * const vrml97_profile::id = "VRML97"; + + vrml97_profile::vrml97_profile() + { + this->add_component(vrml97_component::id, 1); + } + + + const char * const x3d_core_profile::id = "Core"; + + x3d_core_profile::x3d_core_profile() + { + this->add_component(x3d_core_component::id, 1); + } + } // namespace --- NEW FILE: x3d_core.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...1071 lines suppressed...] * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ metadata_string_node:: metadata_string_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), abstract_node<self_t>(type, scope), name_(*this), reference_(*this), value_(*this) {} /** * @brief Destroy. */ metadata_string_node::~metadata_string_node() OPENVRML_NOTHROW {} } Index: Vrml97Parser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/Vrml97Parser.g,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** Vrml97Parser.g 13 Mar 2006 06:46:09 -0000 1.60 --- Vrml97Parser.g 17 Mar 2006 07:23:29 -0000 1.61 *************** *** 626,632 **** boost::ignore_unused_variable_warning(meta_data); ! std::auto_ptr<openvrml::scope> root_scope_auto_ptr = ! create_root_scope(scene.browser(), this->uri); ! const boost::shared_ptr<openvrml::scope> root_scope(root_scope_auto_ptr); } : (statement[scene, nodes, root_scope])* --- 626,633 ---- boost::ignore_unused_variable_warning(meta_data); ! const profile & p = ::profile_registry_.at(vrml97_profile::id); ! std::auto_ptr<scope> root_scope_auto_ptr = ! p.create_root_scope(scene.browser(), this->uri); ! const boost::shared_ptr<scope> root_scope(root_scope_auto_ptr); } : (statement[scene, nodes, root_scope])* Index: X3DVrmlParser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/X3DVrmlParser.g,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** X3DVrmlParser.g 12 Mar 2006 07:38:44 -0000 1.17 --- X3DVrmlParser.g 17 Mar 2006 07:23:29 -0000 1.18 *************** *** 231,245 **** options { defaultErrorHandler=false; } { ! std::auto_ptr<openvrml::scope> root_scope_auto_ptr = ! create_root_scope(scene.browser(), this->uri); ! const boost::shared_ptr<openvrml::scope> root_scope(root_scope_auto_ptr); } ! : profileStatement (componentStatement)* (metaStatement[meta_data])* (statement[scene, nodes, root_scope])* ; ! profileStatement ! : KEYWORD_PROFILE id:ID ; --- 231,253 ---- options { defaultErrorHandler=false; } { ! std::string profile_id; } ! : profile_id=profileStatement { ! const profile & p = ::profile_registry_.at(profile_id); ! std::auto_ptr<scope> root_scope_auto_ptr = ! p.create_root_scope(scene.browser(), this->uri); ! const boost::shared_ptr<scope> root_scope(root_scope_auto_ptr); ! } (componentStatement)* (metaStatement[meta_data])* (statement[scene, nodes, root_scope])* ; + exception + catch [boost::bad_ptr_container_operation &] { + throw antlr::SemanticException("unrecognized profile \"" + + profile_id + "\""); + } ! profileStatement returns [std::string profile_id] ! : KEYWORD_PROFILE id:ID { profile_id = id->getText(); } ; |