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-04-12 20:08:19
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29008/tests Modified Files: testsuite.at Log Message: Emit an error when a requested component level is not supported. Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** testsuite.at 11 Apr 2006 07:34:51 -0000 1.13 --- testsuite.at 12 Apr 2006 20:08:15 -0000 1.14 *************** *** 226,227 **** --- 226,240 ---- AT_CHECK([parse-x3dvrml < minimal-full.x3dv]) AT_CLEANUP + + AT_BANNER([X3D VRML parse tests: code that should be rejected]) + + AT_SETUP([Unsupported component level]) + AT_DATA([unsupported-component-level.x3dv], + [[#X3D V3.0 utf8 + PROFILE Core + COMPONENT Grouping:100 + ]]) + AT_CHECK([parse-x3dvrml < unsupported-component-level.x3dv], [1], [], + [urn:X-openvrml:stream:1:3:19: error: unsupported component level + ]) + AT_CLEANUP |
From: Braden M. <br...@us...> - 2006-04-11 07:34:54
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19235/src/libopenvrml/openvrml Modified Files: browser.cpp Added Files: x3d_dis.cpp x3d_dis.h x3d_geospatial.cpp x3d_geospatial.h x3d_hanim.cpp x3d_hanim.h x3d_nurbs.cpp x3d_nurbs.h Log Message: Added support for constructing X3D Full profile scenes. From Andrew Grieve <sg...@us...> --- NEW FILE: x3d_hanim.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 [...2421 lines suppressed...] abstract_node<self_t>(type, scope), child_node(type, scope), add_children_listener_(*this), remove_children_listener_(*this), center_(*this), children_(*this), name_(*this), rotation_(*this), scale_(*this, vec3f(1,1,1)), scale_orientation_(*this), translation_(*this), bbox_size_(vec3f(-1.0f, -1.0f, -1.0f)) {} /** * @brief Destroy. */ hanim_site_node::~hanim_site_node() OPENVRML_NOTHROW {} } --- NEW FILE: x3d_dis.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_DIS_H # define OPENVRML_X3D_DIS_H namespace openvrml { class browser; } extern "C" void register_dis_node_classes(openvrml::browser & b); # endif Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 *** browser.cpp 5 Apr 2006 07:23:17 -0000 1.160 --- browser.cpp 11 Apr 2006 07:34:51 -0000 1.161 *************** *** 55,58 **** --- 55,62 ---- # include "x3d_key_device_sensor.h" # include "x3d_event_utilities.h" + # include "x3d_dis.h" + # include "x3d_geospatial.h" + # include "x3d_hanim.h" + # include "x3d_nurbs.h" namespace openvrml { *************** [...2047 lines suppressed...] + this->add_component(x3d_shape_component::id, 3); + this->add_component(x3d_geometry3d_component::id, 4); + this->add_component(x3d_geometry2d_component::id, 2); + this->add_component(x3d_text_component::id, 1); + this->add_component(x3d_sound_component::id, 1); + this->add_component(x3d_lighting_component::id, 3); + this->add_component(x3d_texturing_component::id, 3); + this->add_component(x3d_interpolation_component::id, 3); + this->add_component(x3d_pointing_device_sensor_component::id, 1); + this->add_component(x3d_key_device_sensor_component::id, 2); + this->add_component(x3d_environmental_sensor_component::id, 2); + this->add_component(x3d_navigation_component::id, 2); + this->add_component(x3d_environmental_effects_component::id, 3); + this->add_component(x3d_geospatial_component::id, 1); + this->add_component(x3d_hanim_component::id, 1); + this->add_component(x3d_nurbs_component::id, 4); + this->add_component(x3d_dis_component::id, 1); + this->add_component(x3d_event_utilities_component::id, 1); + } } // namespace --- NEW FILE: x3d_dis.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 [...5421 lines suppressed...] site_id_(*this), transmit_frequency_bandwidth_(*this), transmit_state_(*this), which_geometry_(*this, 1), write_interval_(*this, 1), is_active_emitter_(*this, this->is_active_), is_network_reader_emitter_(*this, this->is_network_reader_), is_network_writer_emitter_(*this, this->is_network_writer_), is_rtp_header_heard_emitter_(*this, this->is_rtp_header_heard_), is_stand_alone_emitter_(*this, this->is_stand_alone_), timestamp_emitter_(*this, this->timestamp_), bbox_size_(vec3f(-1.0f, -1.0f, -1.0f)) {} /** * @brief Destroy. */ transmitter_pdu_node::~transmitter_pdu_node() OPENVRML_NOTHROW {} } --- NEW FILE: x3d_geospatial.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_GEOSPATIAL_H # define OPENVRML_X3D_GEOSPATIAL_H namespace openvrml { class browser; } extern "C" void register_geospatial_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_nurbs.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 [...4399 lines suppressed...] child_node(type, scope), add_trimming_contour_listener_(*this), remove_trimming_contour_listener_(*this), control_point_(*this), tex_coord_(*this), trimming_contour_(*this), u_tessellation_(*this), v_tessellation_(*this), weight_(*this), solid_(true), u_order_(3), v_order_(3) {} /** * @brief Destroy. */ nurbs_trimmed_surface_node::~nurbs_trimmed_surface_node() throw () {} } --- NEW FILE: x3d_hanim.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_HANIM_H # define OPENVRML_X3D_HANIM_H namespace openvrml { class browser; } extern "C" void register_hanim_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_geospatial.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 [...3220 lines suppressed...] set_orientation_listener_(*this), set_position_listener_(*this), description_(*this), field_of_view_(*this, 0.785398163f), headlight_(*this, true), jump_(*this, true), nav_type_(*this, default_nav_type), bind_time_emitter_(*this, this->bind_time_), is_bound_emitter_(*this, this->is_bound_), geo_system_(default_geo_system), position_(vec3d(0,0,100000)), speed_factor_(1) {} /** * @brief Destroy. */ geo_viewpoint_node::~geo_viewpoint_node() throw () {} } --- NEW FILE: x3d_nurbs.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_NURBS_H # define OPENVRML_X3D_NURBS_H namespace openvrml { class browser; } extern "C" void register_nurbs_node_classes(openvrml::browser & b); # endif |
From: Braden M. <br...@us...> - 2006-04-11 07:34:54
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19235 Modified Files: ChangeLog Log Message: Added support for constructing X3D Full profile scenes. From Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1214 retrieving revision 1.1215 diff -C2 -d -r1.1214 -r1.1215 *** ChangeLog 9 Apr 2006 08:42:53 -0000 1.1214 --- ChangeLog 11 Apr 2006 07:34:51 -0000 1.1215 *************** *** 1,2 **** --- 1,67 ---- + 2006-04-11 Braden McDaniel <br...@en...> + + Added support for constructing X3D Full profile scenes. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/Makefile.am + (openvrml_include_HEADERS): Added x3d_dis.h, x3d_geospatial.h, + x3d_hanim.h, and x3d_nurbs.h. + (libopenvrml_la_SOURCES): Added x3d_dis.cpp, x3d_geospatial.cpp, + x3d_hanim.cpp, and x3d_nurbs.cpp. + * src/libopenvrml/openvrml/browser.cpp + (x3d_full_profile): Added class corresponding to the X3D Full + profile. + (profile_registry::profile_registry()): Add x3d_full_profile to + the registry. + (register_node_classes): Register DIS, Geospatial, H-Anim, and + NURBS node_classes. + (x3d_geospatial_component): Added class corresponding to the X3D + Geospatial component. + (x3d_geospatial_component::id): Component id. + (x3d_geospatial_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of X3D + Geospatial nodes. + (x3d_hanim_component): Added class corresponding to the X3D H-Anim + component. + (x3d_hanim_component::id): Component id. + (x3d_hanim_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of X3D H-Anim + nodes. + (x3d_nurbs_component): Added class corresponding to the X3D NURBS + component. + (x3d_nurbs_component::id): Component id. + (x3d_nurbs_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of X3D NURBS + nodes. + (x3d_dis_component): Added class corresponding to the X3D DIS + component. + (x3d_dis_component::id): Component id. + (x3d_dis_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of X3D DIS + nodes. + (component_registry::component_registry()): Add + x3d_geospatial_component, x3d_hanim_component, + x3d_nurbs_component, and x3d_dis_component to the registry. + (x3d_full_profile::id): Profile id. + (x3d_full_profile::x3d_full_profile()): Construct the Full + profile. + * src/libopenvrml/openvrml/x3d_dis.cpp: Added file; + DIS component node implementations. + * src/libopenvrml/openvrml/x3d_dis.h: Added file; expose + node_class registration function. + * src/libopenvrml/openvrml/x3d_geospatial.cpp: Added file; + Geospatial component node implementations. + * src/libopenvrml/openvrml/x3d_geospatial.h: Added file; expose + node_class registration function. + * src/libopenvrml/openvrml/x3d_hanim.cpp: Added file; H-Anim + component node implementations. + * src/libopenvrml/openvrml/x3d_hanim.h: Added file; expose + node_class registration function. + * src/libopenvrml/openvrml/x3d_nurbs.cpp: Added file; NURBS + component node implementations. + * src/libopenvrml/openvrml/x3d_nurbs.h: Added file; expose + node_class registration function. + * tests/testsuite.at: Added test of minimal X3D Full world. + 2006-04-09 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-11 07:34:54
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19235/tests Modified Files: testsuite.at Log Message: Added support for constructing X3D Full profile scenes. From Andrew Grieve <sg...@us...> Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** testsuite.at 28 Mar 2006 06:56:18 -0000 1.12 --- testsuite.at 11 Apr 2006 07:34:51 -0000 1.13 *************** *** 218,219 **** --- 218,227 ---- AT_CHECK([parse-x3dvrml < minimal-immersive.x3dv]) AT_CLEANUP + + AT_SETUP([Minimal Full world]) + AT_DATA([minimal-full.x3dv], + [[#X3D V3.0 utf8 + PROFILE Full + ]]) + AT_CHECK([parse-x3dvrml < minimal-full.x3dv]) + AT_CLEANUP |
From: Braden M. <br...@us...> - 2006-04-11 07:34:54
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19235/src/libopenvrml Modified Files: Makefile.am Log Message: Added support for constructing X3D Full profile scenes. From Andrew Grieve <sg...@us...> Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Makefile.am 30 Mar 2006 04:25:48 -0000 1.29 --- Makefile.am 11 Apr 2006 07:34:51 -0000 1.30 *************** *** 27,31 **** openvrml/x3d_texturing.h \ openvrml/x3d_key_device_sensor.h \ ! openvrml/x3d_event_utilities.h VRML97PARSER_BUILT_SOURCEFILES = \ --- 27,35 ---- openvrml/x3d_texturing.h \ openvrml/x3d_key_device_sensor.h \ ! openvrml/x3d_event_utilities.h \ ! openvrml/x3d_dis.h \ ! openvrml/x3d_geospatial.h \ ! openvrml/x3d_hanim.h \ ! openvrml/x3d_nurbs.h VRML97PARSER_BUILT_SOURCEFILES = \ *************** *** 106,110 **** openvrml/x3d_texturing.cpp \ openvrml/x3d_key_device_sensor.cpp \ ! openvrml/x3d_event_utilities.cpp libopenvrml_la_LDFLAGS = \ --- 110,118 ---- openvrml/x3d_texturing.cpp \ openvrml/x3d_key_device_sensor.cpp \ ! openvrml/x3d_event_utilities.cpp \ ! openvrml/x3d_dis.cpp \ ! openvrml/x3d_geospatial.cpp \ ! openvrml/x3d_hanim.cpp \ ! openvrml/x3d_nurbs.cpp libopenvrml_la_LDFLAGS = \ |
From: Braden M. <br...@us...> - 2006-04-09 08:43:08
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18976 Modified Files: ChangeLog Log Message: Fixed linking for test programs. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1213 retrieving revision 1.1214 diff -C2 -d -r1.1213 -r1.1214 *** ChangeLog 5 Apr 2006 07:21:35 -0000 1.1213 --- ChangeLog 9 Apr 2006 08:42:53 -0000 1.1214 *************** *** 1,2 **** --- 1,11 ---- + 2006-04-09 Braden McDaniel <br...@en...> + + Fixed linking for test programs. + + * tests/Makefile.am + (LDADD): Removed. + (node_interface_set_LDADD): Added libopenvrml.la. + (node_class_id_LDADD): Added libopenvrml.la. + 2006-04-05 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-09 08:43:04
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18976/tests Modified Files: Makefile.am Log Message: Fixed linking for test programs. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.am 30 Mar 2006 04:25:48 -0000 1.11 --- Makefile.am 9 Apr 2006 08:42:54 -0000 1.12 *************** *** 4,8 **** AM_CXXFLAGS = @PTHREAD_CFLAGS@ AM_LDFLAGS = @OPENVRML_RPATH@ - LDADD = $(top_builddir)/src/libopenvrml/libopenvrml.la TESTS_ENVIRONMENT = BOOST_TEST_REPORT_LEVEL=detailed --- 4,7 ---- *************** *** 27,34 **** node_interface_set_SOURCES = node_interface_set.cpp ! node_interface_set_LDADD = -lboost_unit_test_framework node_class_id_SOURCES = node_class_id.cpp ! node_class_id_LDADD = -lboost_unit_test_framework parse_vrml97_SOURCES = parse_vrml97.cpp --- 26,37 ---- node_interface_set_SOURCES = node_interface_set.cpp ! node_interface_set_LDADD = \ ! $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework node_class_id_SOURCES = node_class_id.cpp ! node_class_id_LDADD = \ ! $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework parse_vrml97_SOURCES = parse_vrml97.cpp |
From: Braden M. <br...@us...> - 2006-04-05 07:23:33
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3880/src/libopenvrml/openvrml Modified Files: browser.cpp browser.h vrml97node.cpp Log Message: Fixed resolution of relative URIs in Inline nodes to be resolved against the URI of the containing scene. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.159 retrieving revision 1.160 diff -C2 -d -r1.159 -r1.160 *** browser.cpp 5 Apr 2006 06:57:37 -0000 1.159 --- browser.cpp 5 Apr 2006 07:23:17 -0000 1.160 *************** *** 7430,7503 **** } - struct OPENVRML_LOCAL openvrml::scene::load_scene { - - load_scene(openvrml::scene & scene, - const std::vector<std::string> & url): - scene_(&scene), - url_(&url) - {} - - void operator()() const OPENVRML_NOTHROW - try { - using std::endl; - using std::string; - using std::vector; - - openvrml::scene & scene = *this->scene_; - const vector<string> & url = *this->url_; - - assert(scene.url_.empty()); - - vector<boost::intrusive_ptr<node> > nodes; - try { - std::auto_ptr<resource_istream> in = scene.get_resource(url); - if (!(*in)) { throw unreachable_url(); } - scene.load(*in); - } catch (antlr::ANTLRException & ex) { - scene.browser().err(ex.getMessage()); - } catch (std::exception & ex) { - scene.browser().err(ex.what()); - throw unreachable_url(); - } catch (...) { - throw unreachable_url(); - } - scene.nodes(nodes); - scene.scene_loaded(); - } catch (std::exception & ex) { - this->scene_->browser().err(ex.what()); - } - - private: - openvrml::scene * const scene_; - const std::vector<std::string> * const url_; - }; - - /** - * @brief Load a world. - * - * The world specified by @p url is loaded asynchronously. - * <code>scene::scene_loaded</code> is called when loading the world has - * completed (i.e., when <code>scene::nodes</code> will return the world's - * root <code>node</code>s). - * - * As this function executes asynchronously, note that it will not throw upon - * encountering a malformed or unreachable URI, or syntactically incorrect - * VRML. - * - * @param[in] url the URI for the world. Per VRML97 convention, this is a list - * of alternative URIs. The first one in the list to load - * successfully is used. - * - * @exception boost::thread_resource_error if a new thread of execution cannot - * be started. - * @exception std::bad_alloc if memory allocation fails. - */ - void openvrml::scene::load(const std::vector<std::string> & url) - OPENVRML_THROW2(boost::thread_resource_error, std::bad_alloc) - { - boost::function0<void> f = load_scene(*this, url); - boost::thread t(f); - } - /** * @brief Load the scene from a stream. --- 7430,7433 ---- *************** *** 7518,7521 **** --- 7448,7452 ---- this->url_ = in.url(); parse_vrml(in, in.url(), in.type(), *this, this->nodes_, this->meta_); + this->scene_loaded(); } *************** *** 7676,7680 **** boost::mutex::scoped_lock lock(this->url_mutex_); using std::string; ! const string result = this->parent_ ? string(uri(this->url_) .resolve_against(uri(this->parent_->url()))) --- 7607,7611 ---- boost::mutex::scoped_lock lock(this->url_mutex_); using std::string; ! const string result = (this->parent_ && !this->url_.empty()) ? string(uri(this->url_) .resolve_against(uri(this->parent_->url()))) Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** browser.h 12 Mar 2006 23:42:14 -0000 1.52 --- browser.h 5 Apr 2006 07:23:20 -0000 1.53 *************** *** 352,357 **** class OPENVRML_API scene : boost::noncopyable { - struct load_scene; - openvrml::browser * const browser_; scene * const parent_; --- 352,355 ---- *************** *** 373,378 **** openvrml::browser & browser() const OPENVRML_NOTHROW; scene * parent() const OPENVRML_NOTHROW; - void load(const std::vector<std::string> & url) - OPENVRML_THROW2(boost::thread_resource_error, std::bad_alloc); void load(resource_istream & in); void initialize(double timestamp) OPENVRML_THROW1(std::bad_alloc); --- 371,374 ---- Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** vrml97node.cpp 19 Mar 2006 00:05:29 -0000 1.101 --- vrml97node.cpp 5 Apr 2006 07:23:20 -0000 1.102 *************** *** 1,3 **** ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML --- 1,3 ---- ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // OpenVRML *************** *** 38,41 **** --- 38,42 ---- # include <boost/algorithm/string/predicate.hpp> # include <boost/array.hpp> + # include <boost/thread.hpp> # ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE # include <ft2build.h> *************** *** 3048,3051 **** --- 3049,3054 ---- friend class inline_class; + struct load_inline_scene; + exposedfield<mfstring> url_; exposedfield<sfbool> load_; *************** *** 3053,3058 **** sfvec3f bbox_size_; ! openvrml::scene * inlineScene; ! bool hasLoaded; public: --- 3056,3062 ---- sfvec3f bbox_size_; ! openvrml::scene * inline_scene_; ! bool loaded_; ! boost::scoped_ptr<boost::thread> load_inline_scene_thread_; public: *************** *** 13760,13765 **** url_(*this), load_(*this, true), ! inlineScene(0), ! hasLoaded(false) { this->bounding_volume_dirty(true); --- 13764,13769 ---- url_(*this), load_(*this, true), ! inline_scene_(0), ! loaded_(false) { this->bounding_volume_dirty(true); *************** *** 13770,13774 **** */ inline_node::~inline_node() OPENVRML_NOTHROW ! {} /** --- 13774,13782 ---- */ inline_node::~inline_node() OPENVRML_NOTHROW ! { ! if (this->load_inline_scene_thread_) { ! this->load_inline_scene_thread_->join(); ! } ! } /** *************** *** 13786,13790 **** { this->load(); ! if (this->inlineScene) { this->inlineScene->render(viewer, context); } } --- 13794,13798 ---- { this->load(); ! if (this->inline_scene_) { this->inline_scene_->render(viewer, context); } } *************** *** 13798,13806 **** { static const std::vector<boost::intrusive_ptr<openvrml::node> > empty; ! return this->inlineScene ! ? this->inlineScene->nodes() : empty; } /** * @brief Load the children from the URL. --- 13806,13859 ---- { static const std::vector<boost::intrusive_ptr<openvrml::node> > empty; ! return this->inline_scene_ ! ? this->inline_scene_->nodes() : empty; } + struct OPENVRML_LOCAL inline_node::load_inline_scene { + + load_inline_scene(openvrml::scene & scene, + const std::vector<std::string> & url): + inline_scene_(&scene), + url_(&url) + {} + + void operator()() const OPENVRML_NOTHROW + try { + using std::endl; + using std::string; + using std::vector; + + openvrml::scene & inline_scene = *this->inline_scene_; + const vector<string> & url = *this->url_; + + assert(inline_scene.url().empty()); + + vector<boost::intrusive_ptr<node> > nodes; + try { + // + // Any relative URLs passed here will be relative to the + // *parent* scene; so we call get_resource on the parent. + // + assert(inline_scene.parent()); + std::auto_ptr<resource_istream> in = + inline_scene.parent()->get_resource(url); + if (!(*in)) { throw unreachable_url(); } + inline_scene.load(*in); + } catch (std::exception & ex) { + inline_scene.browser().err(ex.what()); + throw unreachable_url(); + } catch (...) { + throw unreachable_url(); + } + } catch (std::exception & ex) { + this->inline_scene_->browser().err(ex.what()); + } + + private: + openvrml::scene * const inline_scene_; + const std::vector<std::string> * const url_; + }; + /** * @brief Load the children from the URL. *************** *** 13812,13822 **** inline_scene(openvrml::browser & b, openvrml::scene * parent): openvrml::scene(b, parent) ! {} private: virtual void scene_loaded() ! { ! this->initialize(openvrml::browser::current_time()); ! } }; --- 13865,13875 ---- inline_scene(openvrml::browser & b, openvrml::scene * parent): openvrml::scene(b, parent) ! {} private: virtual void scene_loaded() ! { ! this->initialize(openvrml::browser::current_time()); ! } }; *************** *** 13824,13836 **** // XXX Need to check whether Url has been modified. // ! if (this->hasLoaded) { return; } ! this->hasLoaded = true; // although perhaps not successfully this->bounding_volume_dirty(true); assert(this->scene()); ! this->inlineScene = new inline_scene(this->scene()->browser(), ! this->scene()); ! this->inlineScene->load(this->url_.mfstring::value()); } --- 13877,13892 ---- // XXX Need to check whether Url has been modified. // ! if (this->loaded_) { return; } ! this->loaded_ = true; // although perhaps not successfully this->bounding_volume_dirty(true); assert(this->scene()); ! this->inline_scene_ = new inline_scene(this->scene()->browser(), ! this->scene()); ! boost::function0<void> f = ! load_inline_scene(*this->inline_scene_, ! this->url_.mfstring::value()); ! this->load_inline_scene_thread_.reset(new boost::thread(f)); } |
From: Braden M. <br...@us...> - 2006-04-05 06:57:43
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16893 Modified Files: ChangeLog Log Message: Removed erroneously committed debugging output. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1211 retrieving revision 1.1212 diff -C2 -d -r1.1211 -r1.1212 *** ChangeLog 5 Apr 2006 05:14:49 -0000 1.1211 --- ChangeLog 5 Apr 2006 06:57:36 -0000 1.1212 *************** *** 2,5 **** --- 2,13 ---- * src/libopenvrml/openvrml/browser.cpp + (component::add_scope_entry(const openvrml::browser &, const + char*, const openvrml::node_interface_set &, const char *, + openvrml::scope &) const): Removed erroneously committed debugging + output. + + 2006-04-05 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/browser.cpp (uri::resolve_against(const uri &) const): Fixed use of std::ostringstream. |
From: Braden M. <br...@us...> - 2006-04-05 06:57:43
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16893/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Removed erroneously committed debugging output. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -d -r1.158 -r1.159 *** browser.cpp 5 Apr 2006 05:14:51 -0000 1.158 --- browser.cpp 5 Apr 2006 06:57:37 -0000 1.159 *************** *** 7911,7915 **** { boost::shared_ptr<openvrml::node_class> node_class = b.node_class(urn); - if (!node_class) { std::cout << node_name << std::endl; } assert(node_class); const bool succeeded = --- 7911,7914 ---- |
From: Braden M. <br...@us...> - 2006-04-05 05:15:01
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8338 Modified Files: ChangeLog Log Message: Fixed use of std::ostringstream. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1210 retrieving revision 1.1211 diff -C2 -d -r1.1210 -r1.1211 *** ChangeLog 30 Mar 2006 04:25:48 -0000 1.1210 --- ChangeLog 5 Apr 2006 05:14:49 -0000 1.1211 *************** *** 1,2 **** --- 1,8 ---- + 2006-04-05 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/browser.cpp + (uri::resolve_against(const uri &) const): Fixed use of + std::ostringstream. + 2006-03-29 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-05 05:15:01
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8338/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Fixed use of std::ostringstream. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -d -r1.157 -r1.158 *** browser.cpp 28 Mar 2006 06:56:17 -0000 1.157 --- browser.cpp 5 Apr 2006 05:14:51 -0000 1.158 *************** *** 3734,3742 **** } ! ostringstream path; ! path.unsetf(ostringstream::skipws); ! path << absolute_uri.path(); const string::size_type last_slash_index = ! path.str().find_last_of('/'); // --- 3734,3740 ---- } ! const string abs_uri_path = absolute_uri.path(); const string::size_type last_slash_index = ! abs_uri_path.find_last_of('/'); // *************** *** 3744,3748 **** // file name). // ! path.str(path.str().substr(1, last_slash_index)); // --- 3742,3748 ---- // file name). // ! ostringstream path; ! path.unsetf(ostringstream::skipws); ! path << abs_uri_path.substr(1, last_slash_index); // |
From: Braden M. <br...@us...> - 2006-03-30 04:25:59
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10514/tests Modified Files: Makefile.am Log Message: Improved placement of some -l flags. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 5 Mar 2006 06:25:12 -0000 1.10 --- Makefile.am 30 Mar 2006 04:25:48 -0000 1.11 *************** *** 21,26 **** browser_SOURCES = browser.cpp ! browser_LDADD = libtest-openvrml.la ! browser_LDFLAGS = -lboost_unit_test_framework parse_anchor_SOURCES = parse_anchor.cpp --- 21,25 ---- browser_SOURCES = browser.cpp ! browser_LDADD = libtest-openvrml.la -lboost_unit_test_framework parse_anchor_SOURCES = parse_anchor.cpp *************** *** 28,35 **** node_interface_set_SOURCES = node_interface_set.cpp ! node_interface_set_LDFLAGS = -lboost_unit_test_framework node_class_id_SOURCES = node_class_id.cpp ! node_class_id_LDFLAGS = -lboost_unit_test_framework parse_vrml97_SOURCES = parse_vrml97.cpp --- 27,34 ---- node_interface_set_SOURCES = node_interface_set.cpp ! node_interface_set_LDADD = -lboost_unit_test_framework node_class_id_SOURCES = node_class_id.cpp ! node_class_id_LDADD = -lboost_unit_test_framework parse_vrml97_SOURCES = parse_vrml97.cpp |
From: Braden M. <br...@us...> - 2006-03-30 04:25:59
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10514 Modified Files: ChangeLog Log Message: Improved placement of some -l flags. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1209 retrieving revision 1.1210 diff -C2 -d -r1.1209 -r1.1210 *** ChangeLog 29 Mar 2006 07:47:14 -0000 1.1209 --- ChangeLog 30 Mar 2006 04:25:48 -0000 1.1210 *************** *** 1,4 **** --- 1,11 ---- 2006-03-29 Braden McDaniel <br...@en...> + Improved placement of some -l flags. + + * src/libopenvrml/Makefile.am + * tests/Makefile.am + + 2006-03-29 Braden McDaniel <br...@en...> + Applied exception specification macros. |
From: Braden M. <br...@us...> - 2006-03-30 04:25:59
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10514/src/libopenvrml Modified Files: Makefile.am Log Message: Improved placement of some -l flags. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile.am 28 Mar 2006 06:56:17 -0000 1.28 --- Makefile.am 30 Mar 2006 04:25:48 -0000 1.29 *************** *** 116,123 **** @JS_LIBS@ \ @JNI_LIBS@ \ - -lboost_thread \ @PTHREAD_LIBS@ ! libopenvrml_la_LIBADD = $(top_builddir)/lib/antlr/libantlr.la EXTRA_DIST = \ --- 116,122 ---- @JS_LIBS@ \ @JNI_LIBS@ \ @PTHREAD_LIBS@ ! libopenvrml_la_LIBADD = $(top_builddir)/lib/antlr/libantlr.la -lboost_thread EXTRA_DIST = \ |
From: Braden M. <br...@us...> - 2006-03-29 08:11:59
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29201 Modified Files: README.build_from_cvs Added Files: bootstrap configure-gcc-dbg configure-gcc-opt Removed Files: bootstrap.sh Log Message: Added scripts to invoke configure with frequently used options. Index: README.build_from_cvs =================================================================== RCS file: /cvsroot/openvrml/openvrml/README.build_from_cvs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README.build_from_cvs 29 Mar 2006 07:48:36 -0000 1.3 --- README.build_from_cvs 29 Mar 2006 08:11:53 -0000 1.4 *************** *** 1,10 **** 1. Execute the script bootstrap.sh: ! $ ./bootstrap.sh Note: You may need to make the script executable before you can do this: ! $ chmod a+x bootstrap.sh 2. Make a directory to store the build files, and change to that --- 1,10 ---- 1. Execute the script bootstrap.sh: ! $ ./bootstrap Note: You may need to make the script executable before you can do this: ! $ chmod +x bootstrap 2. Make a directory to store the build files, and change to that *************** *** 19,22 **** --- 19,29 ---- $ ../configure + Note: The convenience scripts "configure-gcc-dbg" and + "configure-gcc-opt" simply invoke "configure" (as above) with some + frequently used options for debugging and optimized builds, + respectively, using the GNU compiler. Read INSTALL for more + information on using "configure". + + 4. Build it: --- bootstrap.sh DELETED --- --- NEW FILE: bootstrap --- autoreconf --install --symlink --- NEW FILE: configure-gcc-dbg --- #!/bin/bash ./$(dirname $0)/configure -C --disable-static CXXFLAGS='-g -O0 -Wall -Wextra -Wno-missing-braces' $* --- NEW FILE: configure-gcc-opt --- #!/bin/bash ./$(dirname $0)/configure -C --disable-static --disable-exception-specs CXXFLAGS='-Os -Wall -Wextra -Wno-missing-braces -fvisibility=hidden' $* |
From: Braden M. <br...@us...> - 2006-03-29 07:48:44
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8875 Modified Files: README.build_from_cvs Log Message: Updated to reflect change from lookat to sdl-viewer. Index: README.build_from_cvs =================================================================== RCS file: /cvsroot/openvrml/openvrml/README.build_from_cvs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README.build_from_cvs 15 Dec 2002 05:20:11 -0000 1.2 --- README.build_from_cvs 29 Mar 2006 07:48:36 -0000 1.3 *************** *** 3,7 **** $ ./bootstrap.sh ! Note: You may need to make the script executable before you can do this: $ chmod a+x bootstrap.sh --- 3,8 ---- $ ./bootstrap.sh ! Note: You may need to make the script executable before you can do ! this: $ chmod a+x bootstrap.sh *************** *** 10,15 **** directory (recommended, but not required): ! $ mkdir BUILD ! $ cd BUILD 3. Execute the configure script that was created when you ran the --- 11,16 ---- directory (recommended, but not required): ! $ mkdir build ! $ cd build 3. Execute the configure script that was created when you ran the *************** *** 23,27 **** ! Prior to installation (refer to the file INSTALL), the lookat program (a ! glut-based VRML viewer) will be in the src/lookat directory. You can ! run it from that location to view the models in the models directory. --- 24,28 ---- ! The sdl-viewer program will be in the examples/sdl-viewer directory. ! You can run it from that location to view the models in the models ! directory. |
From: Braden M. <br...@us...> - 2006-03-29 07:47:18
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8311/src/libopenvrml/openvrml Modified Files: x3d_geometry2d.cpp Log Message: Applied exception specification macros. Index: x3d_geometry2d.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_geometry2d.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x3d_geometry2d.cpp 28 Mar 2006 06:56:17 -0000 1.1 --- x3d_geometry2d.cpp 29 Mar 2006 07:47:14 -0000 1.2 *************** *** 29,33 **** # include "node_impl_util.h" # include "x3d_geometry2d.h" ! using namespace openvrml; using namespace openvrml::node_impl_util; --- 29,33 ---- # include "node_impl_util.h" # include "x3d_geometry2d.h" ! using namespace openvrml; using namespace openvrml::node_impl_util; *************** *** 42,46 **** public: explicit polyline2d_class(openvrml::browser & browser); ! virtual ~polyline2d_class() throw (); private: --- 42,46 ---- public: explicit polyline2d_class(openvrml::browser & browser); ! virtual ~polyline2d_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); }; *************** *** 58,62 **** public: explicit polypoint2d_class(openvrml::browser & browser); ! virtual ~polypoint2d_class() throw (); private: --- 58,62 ---- public: explicit polypoint2d_class(openvrml::browser & browser); ! virtual ~polypoint2d_class() OPENVRML_NOTHROW; private: *************** *** 64,68 **** do_create_type(const std::string & id, const node_interface_set & interfaces) const ! throw (unsupported_interface, std::bad_alloc); }; --- 64,68 ---- do_create_type(const std::string & id, const node_interface_set & interfaces) const ! OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; *************** *** 74,78 **** public: explicit rectangle2d_class(openvrml::browser & browser); ! virtual ~rectangle2d_class() throw (); private: --- 74,78 ---- public: explicit rectangle2d_class(openvrml::browser & browser); ! virtual ~rectangle2d_class() OPENVRML_NOTHROW; private: *************** *** 80,84 **** do_create_type(const std::string & id, const node_interface_set & interfaces) const ! throw (unsupported_interface, std::bad_alloc); }; --- 80,84 ---- do_create_type(const std::string & id, const node_interface_set & interfaces) const ! OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; *************** *** 90,94 **** public: explicit triangle_set2d_class(openvrml::browser & browser); ! virtual ~triangle_set2d_class() throw (); private: --- 90,94 ---- public: explicit triangle_set2d_class(openvrml::browser & browser); ! virtual ~triangle_set2d_class() OPENVRML_NOTHROW; private: *************** *** 96,102 **** do_create_type(const std::string & id, const node_interface_set & interfaces) const ! throw (unsupported_interface, std::bad_alloc); }; ! } void register_geometry2d_node_classes(openvrml::browser & b) --- 96,102 ---- do_create_type(const std::string & id, const node_interface_set & interfaces) const ! OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; ! } void register_geometry2d_node_classes(openvrml::browser & b) *************** *** 128,134 **** public: ! polyline2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~polyline2d_node() throw (); virtual bool modified() const; --- 128,134 ---- public: ! polyline2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~polyline2d_node() OPENVRML_NOTHROW; virtual bool modified() const; *************** *** 148,154 **** public: ! polypoint2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~polypoint2d_node() throw (); virtual bool modified() const; --- 148,154 ---- public: ! polypoint2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~polypoint2d_node() OPENVRML_NOTHROW; virtual bool modified() const; *************** *** 169,175 **** public: ! rectangle2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~rectangle2d_node() throw (); virtual bool modified() const; --- 169,175 ---- public: ! rectangle2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~rectangle2d_node() OPENVRML_NOTHROW; virtual bool modified() const; *************** *** 190,196 **** public: ! triangle_set2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~triangle_set2d_node() throw (); virtual bool modified() const; --- 190,196 ---- public: ! triangle_set2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); ! virtual ~triangle_set2d_node() OPENVRML_NOTHROW; virtual bool modified() const; *************** *** 213,217 **** * @brief Destroy. */ ! polyline2d_class::~polyline2d_class() throw () {} --- 213,217 ---- * @brief Destroy. */ ! polyline2d_class::~polyline2d_class() OPENVRML_NOTHROW {} *************** *** 231,235 **** polyline2d_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; --- 231,235 ---- polyline2d_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, 2> supported_interfaces_t; *************** *** 241,250 **** field_value::mfvec2f_id, "lineSegments") ! }; typedef node_type_impl<polyline2d_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(); --- 241,250 ---- field_value::mfvec2f_id, "lineSegments") ! }; typedef node_type_impl<polyline2d_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(); *************** *** 278,282 **** throw unsupported_interface(*interface); } ! } return type; } --- 278,282 ---- throw unsupported_interface(*interface); } ! } return type; } *************** *** 294,298 **** * @brief Destroy. */ ! polypoint2d_class::~polypoint2d_class() throw () {} --- 294,298 ---- * @brief Destroy. */ ! polypoint2d_class::~polypoint2d_class() OPENVRML_NOTHROW {} *************** *** 312,316 **** polypoint2d_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; --- 312,316 ---- polypoint2d_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, 2> supported_interfaces_t; *************** *** 322,331 **** field_value::mfvec2f_id, "point") ! }; typedef node_type_impl<polypoint2d_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(); --- 322,331 ---- field_value::mfvec2f_id, "point") ! }; typedef node_type_impl<polypoint2d_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(); *************** *** 359,363 **** throw unsupported_interface(*interface); } ! } return type; } --- 359,363 ---- throw unsupported_interface(*interface); } ! } return type; } *************** *** 375,379 **** * @brief Destroy. */ ! rectangle2d_class::~rectangle2d_class() throw () {} --- 375,379 ---- * @brief Destroy. */ ! rectangle2d_class::~rectangle2d_class() OPENVRML_NOTHROW {} *************** *** 393,397 **** rectangle2d_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; --- 393,397 ---- rectangle2d_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, 3> supported_interfaces_t; *************** *** 406,415 **** field_value::sfbool_id, "solid") ! }; typedef node_type_impl<rectangle2d_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(); --- 406,415 ---- field_value::sfbool_id, "solid") ! }; typedef node_type_impl<rectangle2d_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(); *************** *** 450,454 **** throw unsupported_interface(*interface); } ! } return type; } --- 450,454 ---- throw unsupported_interface(*interface); } ! } return type; } *************** *** 466,470 **** * @brief Destroy. */ ! triangle_set2d_class::~triangle_set2d_class() throw () {} --- 466,470 ---- * @brief Destroy. */ ! triangle_set2d_class::~triangle_set2d_class() OPENVRML_NOTHROW {} *************** *** 484,488 **** triangle_set2d_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; --- 484,488 ---- triangle_set2d_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, 3> supported_interfaces_t; *************** *** 497,506 **** field_value::sfbool_id, "solid") ! }; typedef node_type_impl<triangle_set2d_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(); --- 497,506 ---- field_value::sfbool_id, "solid") ! }; typedef node_type_impl<triangle_set2d_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(); *************** *** 550,554 **** throw unsupported_interface(*interface); } ! } return type; } --- 550,554 ---- throw unsupported_interface(*interface); } ! } return type; } *************** *** 573,577 **** */ ! /** * @brief Insert this geometry into @p viewer's display list. --- 573,577 ---- */ ! /** * @brief Insert this geometry into @p viewer's display list. *************** *** 590,594 **** return 0; } ! /** --- 590,594 ---- return 0; } ! /** *************** *** 602,606 **** return this->node::modified(); } ! /** * @brief Construct. --- 602,606 ---- return this->node::modified(); } ! /** * @brief Construct. *************** *** 622,626 **** * @brief Destroy. */ ! polyline2d_node::~polyline2d_node() throw () {} --- 622,626 ---- * @brief Destroy. */ ! polyline2d_node::~polyline2d_node() OPENVRML_NOTHROW {} *************** *** 644,648 **** */ ! /** * @brief Insert this geometry into @p viewer's display list. --- 644,648 ---- */ ! /** * @brief Insert this geometry into @p viewer's display list. *************** *** 661,665 **** return 0; } ! /** --- 661,665 ---- return 0; } ! /** *************** *** 673,677 **** return this->node::modified(); } ! /** * @brief Construct. --- 673,677 ---- return this->node::modified(); } ! /** * @brief Construct. *************** *** 693,697 **** * @brief Destroy. */ ! polypoint2d_node::~polypoint2d_node() throw () {} --- 693,697 ---- * @brief Destroy. */ ! polypoint2d_node::~polypoint2d_node() OPENVRML_NOTHROW {} *************** *** 721,725 **** */ ! /** * @brief Insert this geometry into @p viewer's display list. --- 721,725 ---- */ ! /** * @brief Insert this geometry into @p viewer's display list. *************** *** 738,742 **** return 0; } ! /** --- 738,742 ---- return 0; } ! /** *************** *** 750,754 **** return this->node::modified(); } ! /** * @brief Construct. --- 750,754 ---- return this->node::modified(); } ! /** * @brief Construct. *************** *** 771,775 **** * @brief Destroy. */ ! rectangle2d_node::~rectangle2d_node() throw () {} --- 771,775 ---- * @brief Destroy. */ ! rectangle2d_node::~rectangle2d_node() OPENVRML_NOTHROW {} *************** *** 799,803 **** */ ! /** * @brief Insert this geometry into @p viewer's display list. --- 799,803 ---- */ ! /** * @brief Insert this geometry into @p viewer's display list. *************** *** 816,820 **** return 0; } ! /** --- 816,820 ---- return 0; } ! /** *************** *** 828,832 **** return this->node::modified(); } ! /** * @brief Construct. --- 828,832 ---- return this->node::modified(); } ! /** * @brief Construct. *************** *** 849,853 **** * @brief Destroy. */ ! triangle_set2d_node::~triangle_set2d_node() throw () {} } --- 849,853 ---- * @brief Destroy. */ ! triangle_set2d_node::~triangle_set2d_node() OPENVRML_NOTHROW {} } |
From: Braden M. <br...@us...> - 2006-03-29 07:47:18
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8311 Modified Files: ChangeLog Log Message: Applied exception specification macros. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1208 retrieving revision 1.1209 diff -C2 -d -r1.1208 -r1.1209 *** ChangeLog 28 Mar 2006 06:56:17 -0000 1.1208 --- ChangeLog 29 Mar 2006 07:47:14 -0000 1.1209 *************** *** 1,2 **** --- 1,8 ---- + 2006-03-29 Braden McDaniel <br...@en...> + + Applied exception specification macros. + + * src/libopenvrml/openvrml/x3d_geometry2d.cpp + 2006-03-28 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-03-28 06:56:21
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27736/tests Modified Files: testsuite.at Log Message: Added support for constructing X3D Immersive profile scenes. From Andrew Grieve <sg...@us...> Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** testsuite.at 27 Mar 2006 05:12:13 -0000 1.11 --- testsuite.at 28 Mar 2006 06:56:18 -0000 1.12 *************** *** 210,211 **** --- 210,219 ---- AT_CHECK([parse-x3dvrml < minimal-mpeg4.x3dv]) AT_CLEANUP + + AT_SETUP([Minimal Immersive world]) + AT_DATA([minimal-immersive.x3dv], + [[#X3D V3.0 utf8 + PROFILE Immersive + ]]) + AT_CHECK([parse-x3dvrml < minimal-immersive.x3dv]) + AT_CLEANUP |
From: Braden M. <br...@us...> - 2006-03-28 06:56:21
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27736/src/libopenvrml Modified Files: Makefile.am Log Message: Added support for constructing X3D Immersive profile scenes. From Andrew Grieve <sg...@us...> Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Makefile.am 26 Mar 2006 07:42:14 -0000 1.27 --- Makefile.am 28 Mar 2006 06:56:17 -0000 1.28 *************** *** 21,25 **** --- 21,28 ---- openvrml/vrml97node.h \ openvrml/x3d_core.h \ + openvrml/x3d_networking.h \ openvrml/x3d_rendering.h \ + openvrml/x3d_shape.h \ + openvrml/x3d_geometry2d.h \ openvrml/x3d_texturing.h \ openvrml/x3d_key_device_sensor.h \ *************** *** 97,101 **** --- 100,107 ---- openvrml/vrml97node.cpp \ openvrml/x3d_core.cpp \ + openvrml/x3d_networking.cpp \ openvrml/x3d_rendering.cpp \ + openvrml/x3d_shape.cpp \ + openvrml/x3d_geometry2d.cpp \ openvrml/x3d_texturing.cpp \ openvrml/x3d_key_device_sensor.cpp \ |
From: Braden M. <br...@us...> - 2006-03-28 06:56:21
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27736 Modified Files: ChangeLog Log Message: Added support for constructing X3D Immersive profile scenes. From Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1207 retrieving revision 1.1208 diff -C2 -d -r1.1207 -r1.1208 *** ChangeLog 27 Mar 2006 05:12:12 -0000 1.1207 --- ChangeLog 28 Mar 2006 06:56:17 -0000 1.1208 *************** *** 1,2 **** --- 1,87 ---- + 2006-03-28 Braden McDaniel <br...@en...> + + Added support for constructing X3D Immersive profile scenes. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/Makefile.am + (openvrml_include_HEADERS): Added openvrml/x3d_networking.h, + openvrml/x3d_shape.h, and openvrml/x3d_geometry2d.h. + (libopenvrml_la_SOURCES): Added openvrml/x3d_networking.cpp, + openvrml/x3d_shape.cpp, and openvrml/x3d_geometry2d.cpp. + * src/libopenvrml/openvrml/browser.cpp + (x3d_immersive_profile): Added class corresponding to the X3D + Immersive profile. + (profile_registry::profile_registry()): Add the + x3d_immersive_profile to the registry. + (register_node_classes(openvrml::browser &)): Register the + Networking, Shape, and Geometry2D component node implementations. + (x3d_networking_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 3 + nodes: LoadSensor. + (x3d_grouping_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 2 + nodes (Switch). + (x3d_shape_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 2 + nodes: LineProperties. + (x3d_geometry3d_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 3 and + level 4 nodes: ElevationGrid, Extrusion. + (x3d_geometry2d_component): Added class corresponding to the X3D + Geometry2D component. + (x3d_geometry2d_component::id): Component id. + (x3d_geometry2d_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 1 + Geometry2D nodes: Polyline2D, Polypoint2D, Rectangle2D, + TriangleSet2D. + (x3d_text_component): Added class corresponding to the X3D Text + component. + (x3d_text_component::id): Component id. + (x3d_text_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 1 Text + nodes: FontStyle, Text. + (x3d_sound_component): Added class corresponding to the X3D Sound + component. + (x3d_sound_component::id): Component id. + (x3d_sound_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 1 Sound + nodes: AudioClip, Sound. + (x3d_texturing_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 3 + Texturing nodes: MovieTexture. + (x3d_key_device_sensor_component::add_to_scope(const + openvrml::browser &, openvrml::scope &, int) const): Added + definitions of level 2 KeyDeviceSensor nodes: StringSensor. + (x3d_environmental_sensor_component::add_to_scope(const + openvrml::browser &, openvrml::scope &, int) const): Added + definitions of level 2 EnvironmentalSensor nodes: VisbilitySensor. + (x3d_navigation_component::add_to_scope(const openvrml::browser &, + openvrml::scope &, int) const): Added definitions of level 2 + Navigation nodes: Billboard, Collision, LOD. + (x3d_environmental_effects_component::add_to_scope(const + openvrml::browser &, openvrml::scope &, int) const): Added + definitions of level 2 EnvironmentalEffects nodes: Fog. + (component_registry::component_registry()): Add + x3d_geometry2d_component, x3d_text_component, and + x3d_sound_component to the registry. + (x3d_immersive_profile::id): Profile id. + (x3d_immersive_profile::x3d_immersive_profile()): Add components + for the X3D Immersive profile. + * src/libopenvrml/openvrml/x3d_geometry2d.cpp: Added file; + Geometry2D component level 1 node implementations. + * src/libopenvrml/openvrml/x3d_geometry2d.h: Added file; expose + node_class registration function. + * src/libopenvrml/openvrml/x3d_key_device_sensor.cpp: Added + StringSensor node implementation. + * src/libopenvrml/openvrml/x3d_networking.cpp: Added file; + Networking component level 2 node implementations. + * src/libopenvrml/openvrml/x3d_networking.h: Added file; expose + node_class registration function. + * src/libopenvrml/openvrml/x3d_shape.cpp: Added file; Shape + component level 2 node implementations. + * src/libopenvrml/openvrml/x3d_shape.h: Added file; expose + node_class registration function. + * tests/testsuite.at: Added test of minimal X3D Immersive world. + 2006-03-27 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-03-28 06:56:21
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27736/src/libopenvrml/openvrml Modified Files: browser.cpp x3d_key_device_sensor.cpp Added Files: x3d_geometry2d.cpp x3d_geometry2d.h x3d_networking.cpp x3d_networking.h x3d_shape.cpp x3d_shape.h Log Message: Added support for constructing X3D Immersive profile scenes. From Andrew Grieve <sg...@us...> --- NEW FILE: x3d_shape.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_SHAPE_H # define OPENVRML_X3D_SHAPE_H namespace openvrml { class browser; } extern "C" void register_shape_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_geometry2d.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_GEOMETRY2D_H # define OPENVRML_X3D_GEOMETRY2D_H namespace openvrml { class browser; } extern "C" void register_geometry2d_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_geometry2d.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_geometry2d.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for Polyline2D nodes. */ class OPENVRML_LOCAL polyline2d_class : public node_class { public: explicit polyline2d_class(openvrml::browser & browser); virtual ~polyline2d_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 Polypoint2D nodes. */ class OPENVRML_LOCAL polypoint2d_class : public node_class { public: explicit polypoint2d_class(openvrml::browser & browser); virtual ~polypoint2d_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 Rectangle2D nodes. */ class OPENVRML_LOCAL rectangle2d_class : public node_class { public: explicit rectangle2d_class(openvrml::browser & browser); virtual ~rectangle2d_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 TriangleSet2D nodes. */ class OPENVRML_LOCAL triangle_set2d_class : public node_class { public: explicit triangle_set2d_class(openvrml::browser & browser); virtual ~triangle_set2d_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_geometry2d_node_classes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_class; b.add_node_class("urn:X-openvrml:node:Polyline2D", shared_ptr<node_class>(new polyline2d_class(b))); b.add_node_class("urn:X-openvrml:node:Polypoint2D", shared_ptr<node_class>(new polypoint2d_class(b))); b.add_node_class("urn:X-openvrml:node:Rectangle2D", shared_ptr<node_class>(new rectangle2d_class(b))); b.add_node_class("urn:X-openvrml:node:TriangleSet2D", shared_ptr<node_class>(new triangle_set2d_class(b))); } namespace { using namespace openvrml_; class OPENVRML_LOCAL polyline2d_node : public abstract_node<polyline2d_node>, public geometry_node, public child_node { friend class polyline2d_class; mfvec2f line_segments_; public: polyline2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~polyline2d_node() throw (); virtual bool modified() const; private: virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, rendering_context context); }; class OPENVRML_LOCAL polypoint2d_node : public abstract_node<polypoint2d_node>, public geometry_node, public child_node { friend class polypoint2d_class; mfvec2f point_; public: polypoint2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~polypoint2d_node() throw (); virtual bool modified() const; private: virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, rendering_context context); }; class OPENVRML_LOCAL rectangle2d_node : public abstract_node<rectangle2d_node>, public geometry_node, public child_node { friend class rectangle2d_class; sfvec2f size_; sfbool solid_; public: rectangle2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~rectangle2d_node() throw (); virtual bool modified() const; private: virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, rendering_context context); }; class OPENVRML_LOCAL triangle_set2d_node : public abstract_node<triangle_set2d_node>, public geometry_node, public child_node { friend class triangle_set2d_class; exposedfield<mfvec2f> vertices_; sfbool solid_; public: triangle_set2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~triangle_set2d_node() throw (); virtual bool modified() const; private: virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, rendering_context context); }; /** * @brief Construct. * * @param browser the browser associated with this polyline2d_class. */ polyline2d_class::polyline2d_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ polyline2d_class::~polyline2d_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 Polyline2D nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by polyline2d_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> polyline2d_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::field_id, field_value::mfvec2f_id, "lineSegments") }; typedef node_type_impl<polyline2d_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<polyline2d_node>::exposedfield<sfnode> >( &polyline2d_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<polyline2d_node>::exposedfield<sfnode> >( &polyline2d_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<polyline2d_node>::exposedfield<sfnode> >( &polyline2d_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<mfvec2f>( &polyline2d_node::line_segments_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @brief Construct. * * @param browser the browser associated with this polypoint2d_class. */ polypoint2d_class::polypoint2d_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ polypoint2d_class::~polypoint2d_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 Polypoint2D nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by polypoint2d_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> polypoint2d_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::field_id, field_value::mfvec2f_id, "point") }; typedef node_type_impl<polypoint2d_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<polypoint2d_node>::exposedfield<sfnode> >( &polypoint2d_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<polypoint2d_node>::exposedfield<sfnode> >( &polypoint2d_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<polypoint2d_node>::exposedfield<sfnode> >( &polypoint2d_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<mfvec2f>( &polypoint2d_node::point_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @brief Construct. * * @param browser the browser associated with this rectangle2d_class. */ rectangle2d_class::rectangle2d_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ rectangle2d_class::~rectangle2d_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 Rectangle2D nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by rectangle2d_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> rectangle2d_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::field_id, field_value::sfvec2f_id, "size"), node_interface(node_interface::field_id, field_value::sfbool_id, "solid") }; typedef node_type_impl<rectangle2d_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<rectangle2d_node>::exposedfield<sfnode> >( &rectangle2d_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<rectangle2d_node>::exposedfield<sfnode> >( &rectangle2d_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<rectangle2d_node>::exposedfield<sfnode> >( &rectangle2d_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<sfvec2f>( &rectangle2d_node::size_))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<sfbool>( &rectangle2d_node::solid_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @brief Construct. * * @param browser the browser associated with this triangle_set2d_class. */ triangle_set2d_class::triangle_set2d_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ triangle_set2d_class::~triangle_set2d_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 TriangleSet2D nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by triangle_set2d_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> triangle_set2d_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::mfvec2f_id, "vertices"), node_interface(node_interface::field_id, field_value::sfbool_id, "solid") }; typedef node_type_impl<triangle_set2d_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<triangle_set2d_node>::exposedfield<sfnode> >( &triangle_set2d_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<triangle_set2d_node>::exposedfield<sfnode> >( &triangle_set2d_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<triangle_set2d_node>::exposedfield<sfnode> >( &triangle_set2d_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<triangle_set2d_node>::exposedfield<mfvec2f> >( &triangle_set2d_node::vertices_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<triangle_set2d_node>::exposedfield<mfvec2f> >( &triangle_set2d_node::vertices_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<triangle_set2d_node>::exposedfield<mfvec2f> >( &triangle_set2d_node::vertices_))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<sfbool>( &triangle_set2d_node::solid_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @class polyline2d_node * * @brief Represents Polyline2D node instances. */ /** * @var polyline2d_node::Polyline2D_class * * @brief Class object for Polyline2D nodes. */ /** * @var polyline2d_node::line_segments_ * * @brief line_segments field */ /** * @brief Insert this geometry into @p viewer's display list. * * @param viewer a Viewer. * @param context the rendering context. * * @todo Implement this! */ openvrml::viewer::object_t polyline2d_node:: do_render_geometry(openvrml::viewer & /* viewer */, const rendering_context /* context */) { //TODO: Implement this! return 0; } /** * @brief Determine whether the node has been modified. * * @return @c true if the node or one of its children has been modified, * @c false otherwise. */ bool polyline2d_node::modified() const { return this->node::modified(); } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ polyline2d_node:: polyline2d_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), geometry_node(type, scope), child_node(type, scope) {} /** * @brief Destroy. */ polyline2d_node::~polyline2d_node() throw () {} /** * @class polypoint2d_node * * @brief Represents Polypoint2D node instances. */ /** * @var polypoint2d_node::Polypoint2D_class * * @brief Class object for Polypoint2D nodes. */ /** * @var polypoint2d_node::point_ * * @brief point field */ /** * @brief Insert this geometry into @p viewer's display list. * * @param viewer a Viewer. * @param context the rendering context. * * @todo Implement this! */ openvrml::viewer::object_t polypoint2d_node:: do_render_geometry(openvrml::viewer & /* viewer */, const rendering_context /* context */) { //TODO: Implement this! return 0; } /** * @brief Determine whether the node has been modified. * * @return @c true if the node or one of its children has been modified, * @c false otherwise. */ bool polypoint2d_node::modified() const { return this->node::modified(); } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ polypoint2d_node:: polypoint2d_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), geometry_node(type, scope), child_node(type, scope) {} /** * @brief Destroy. */ polypoint2d_node::~polypoint2d_node() throw () {} /** * @class rectangle2d_node * * @brief Represents Rectangle2D node instances. */ /** * @var rectangle2d_node::Rectangle2D_class * * @brief Class object for Rectangle2D nodes. */ /** * @var rectangle2d_node::size_ * * @brief size field */ /** * @var rectangle2d_node::solid_ * * @brief solid field */ /** * @brief Insert this geometry into @p viewer's display list. * * @param viewer a Viewer. * @param context the rendering context. * * @todo Implement this! */ openvrml::viewer::object_t rectangle2d_node:: do_render_geometry(openvrml::viewer & /* viewer */, const rendering_context /* context */) { //TODO: Implement this! return 0; } /** * @brief Determine whether the node has been modified. * * @return @c true if the node or one of its children has been modified, * @c false otherwise. */ bool rectangle2d_node::modified() const { return this->node::modified(); } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ rectangle2d_node:: rectangle2d_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), geometry_node(type, scope), child_node(type, scope), size_(vec2f(2,2)) {} /** * @brief Destroy. */ rectangle2d_node::~rectangle2d_node() throw () {} /** * @class triangle_set2d_node * * @brief Represents TriangleSet2D node instances. */ /** * @var triangle_set2d_node::TriangleSet2D_class * * @brief Class object for TriangleSet2D nodes. */ /** * @var triangle_set2d_node::vertices_ * * @brief vertices exposedField */ /** * @var triangle_set2d_node::solid_ * * @brief solid field */ /** * @brief Insert this geometry into @p viewer's display list. * * @param viewer a Viewer. * @param context the rendering context. * * @todo Implement this! */ openvrml::viewer::object_t triangle_set2d_node:: do_render_geometry(openvrml::viewer & /* viewer */, const rendering_context /* context */) { //TODO: Implement this! return 0; } /** * @brief Determine whether the node has been modified. * * @return @c true if the node or one of its children has been modified, * @c false otherwise. */ bool triangle_set2d_node::modified() const { return this->node::modified(); } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ triangle_set2d_node:: triangle_set2d_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), geometry_node(type, scope), child_node(type, scope), vertices_(*this) {} /** * @brief Destroy. */ triangle_set2d_node::~triangle_set2d_node() throw () {} } Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -d -r1.156 -r1.157 *** browser.cpp 27 Mar 2006 05:12:13 -0000 1.156 --- browser.cpp 28 Mar 2006 06:56:17 -0000 1.157 *************** *** 48,52 **** --- 48,55 ---- # include "vrml97node.h" # include "x3d_core.h" + # include "x3d_networking.h" # include "x3d_rendering.h" + # include "x3d_shape.h" + # include "x3d_geometry2d.h" # include "x3d_texturing.h" # include "x3d_key_device_sensor.h" *************** [...1112 lines suppressed...] + this->add_component(x3d_time_component::id, 1); + this->add_component(x3d_networking_component::id, 3); + this->add_component(x3d_grouping_component::id, 2); + this->add_component(x3d_rendering_component::id, 3); + this->add_component(x3d_shape_component::id, 2); + this->add_component(x3d_geometry3d_component::id, 4); + this->add_component(x3d_geometry2d_component::id, 1); + this->add_component(x3d_text_component::id, 1); + this->add_component(x3d_sound_component::id, 1); + this->add_component(x3d_lighting_component::id, 2); + this->add_component(x3d_texturing_component::id, 3); + 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, 2); + this->add_component(x3d_environmental_sensor_component::id, 2); + this->add_component(x3d_navigation_component::id, 2); + this->add_component(x3d_environmental_effects_component::id, 2); + this->add_component(x3d_event_utilities_component::id, 1); + } } // namespace --- NEW FILE: x3d_networking.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_NETWORKING_H # define OPENVRML_X3D_NETWORKING_H namespace openvrml { class browser; } extern "C" void register_networking_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_networking.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_networking.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for LoadSensor nodes. */ class OPENVRML_LOCAL load_sensor_class : public node_class { public: explicit load_sensor_class(openvrml::browser & browser); virtual ~load_sensor_class() OPENVRML_NOTHROW; private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; } void register_networking_node_classes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_class; b.add_node_class("urn:X-openvrml:node:LoadSensor", shared_ptr<node_class>(new load_sensor_class(b))); } namespace { using namespace openvrml_; class OPENVRML_LOCAL load_sensor_node : public abstract_node<load_sensor_node>, public child_node { friend class load_sensor_class; exposedfield<sfbool> enabled_; exposedfield<sftime> timeout_; exposedfield<mfnode> watch_list_; sfbool is_active_; sfbool_emitter is_active_emitter_; sfbool is_loaded_; sfbool_emitter is_loaded_emitter_; sftime load_time_; sftime_emitter load_time_emitter_; sffloat progress_; sffloat_emitter progress_emitter_; public: load_sensor_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~load_sensor_node() OPENVRML_NOTHROW; }; /** * @brief Construct. * * @param browser the browser associated with this load_sensor_class. */ load_sensor_class::load_sensor_class(openvrml::browser & browser): node_class(browser) {} /** * @brief Destroy. */ load_sensor_class::~load_sensor_class() OPENVRML_NOTHROW {} /** * @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 LoadSensor nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by load_sensor_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> load_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, 8> 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::exposedfield_id, field_value::sftime_id, "timeout"), node_interface(node_interface::exposedfield_id, field_value::mfnode_id, "watchList"), node_interface(node_interface::eventout_id, field_value::sfbool_id, "isActive"), node_interface(node_interface::eventout_id, field_value::sfbool_id, "isLoaded"), node_interface(node_interface::eventout_id, field_value::sftime_id, "loadTime"), node_interface(node_interface::eventout_id, field_value::sffloat_id, "progress") }; typedef node_type_impl<load_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<load_sensor_node>::exposedfield<sfnode> >( &load_sensor_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<load_sensor_node>::exposedfield<sfnode> >( &load_sensor_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<load_sensor_node>::exposedfield<sfnode> >( &load_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<load_sensor_node>::exposedfield<sfbool> >( &load_sensor_node::enabled_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<load_sensor_node>::exposedfield<sfbool> >( &load_sensor_node::enabled_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<load_sensor_node>::exposedfield<sfbool> >( &load_sensor_node::enabled_))); } 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<load_sensor_node>::exposedfield<sftime> >( &load_sensor_node::timeout_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<load_sensor_node>::exposedfield<sftime> >( &load_sensor_node::timeout_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<load_sensor_node>::exposedfield<sftime> >( &load_sensor_node::timeout_))); } 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<load_sensor_node>::exposedfield<mfnode> >( &load_sensor_node::watch_list_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<load_sensor_node>::exposedfield<mfnode> >( &load_sensor_node::watch_list_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<load_sensor_node>::exposedfield<mfnode> >( &load_sensor_node::watch_list_))); } 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< load_sensor_node::sfbool_emitter>( &load_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< load_sensor_node::sfbool_emitter>( &load_sensor_node::is_loaded_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< load_sensor_node::sftime_emitter>( &load_sensor_node::load_time_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< load_sensor_node::sffloat_emitter>( &load_sensor_node::progress_emitter_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @class load_sensor_node * * @brief Represents LoadSensor node instances. */ /** * @var load_sensor_node::LoadSensor_class * * @brief Class object for LoadSensor nodes. */ /** * @var load_sensor_node::enabled_ * * @brief enabled exposedField */ /** * @var load_sensor_node::timeout_ * * @brief timeout exposedField */ /** * @var load_sensor_node::watch_list_ * * @brief watch_list exposedField */ /** * @var load_sensor_node::is_active_ * * @brief is_active eventOut */ /** * @var load_sensor_node::is_loaded_ * * @brief is_loaded eventOut */ /** * @var load_sensor_node::load_time_ * * @brief load_time eventOut */ /** * @var load_sensor_node::progress_ * * @brief progress eventOut */ /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ load_sensor_node:: load_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), timeout_(*this), watch_list_(*this), is_active_emitter_(*this, this->is_active_), is_loaded_emitter_(*this, this->is_loaded_), load_time_emitter_(*this, this->load_time_), progress_emitter_(*this, this->progress_) {} /** * @brief Destroy. */ load_sensor_node::~load_sensor_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.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** x3d_key_device_sensor.cpp 27 Mar 2006 03:25:35 -0000 1.2 --- x3d_key_device_sensor.cpp 28 Mar 2006 06:56:17 -0000 1.3 *************** *** 50,53 **** --- 50,69 ---- OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; + + + /** + * @brief Class object for StringSensor nodes. + */ + class OPENVRML_LOCAL string_sensor_class : public node_class { + public: + explicit string_sensor_class(openvrml::browser & browser); + virtual ~string_sensor_class() OPENVRML_NOTHROW; + + private: + virtual const boost::shared_ptr<node_type> + do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc); + }; } *************** *** 58,61 **** --- 74,79 ---- b.add_node_class("urn:X-openvrml:node:KeySensor", shared_ptr<node_class>(new key_sensor_class(b))); + b.add_node_class("urn:X-openvrml:node:StringSensor", + shared_ptr<node_class>(new string_sensor_class(b))); } *************** *** 92,95 **** --- 110,136 ---- }; + + class OPENVRML_LOCAL string_sensor_node : + public abstract_node<string_sensor_node>, + public child_node { + + friend class string_sensor_class; + + exposedfield<sfbool> deletion_allowed_; + exposedfield<sfbool> enabled_; + sfstring entered_text_; + sfstring_emitter entered_text_emitter_; + sfstring final_text_; + sfstring_emitter final_text_emitter_; + sfbool is_active_; + sfbool_emitter is_active_emitter_; + + public: + string_sensor_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope); + virtual ~string_sensor_node() OPENVRML_NOTHROW; + }; + + /** * @brief Construct. *************** *** 366,368 **** --- 407,622 ---- key_sensor_node::~key_sensor_node() OPENVRML_NOTHROW {} + + + /** + * @brief Construct. + * + * @param browser the browser associated with this string_sensor_class. + */ + string_sensor_class::string_sensor_class(openvrml::browser & browser): + node_class(browser) + {} + + /** + * @brief Destroy. + */ + string_sensor_class::~string_sensor_class() OPENVRML_NOTHROW + {} + + /** + * @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 StringSensor nodes. + * + * @exception unsupported_interface if @p interfaces includes an interface + * not supported by string_sensor_class. + * @exception std::bad_alloc if memory allocation fails. + */ + const boost::shared_ptr<openvrml::node_type> + string_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, 6> 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, + "deletionAllowed"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "enabled"), + node_interface(node_interface::eventout_id, + field_value::sfstring_id, + "enteredText"), + node_interface(node_interface::eventout_id, + field_value::sfstring_id, + "finalText"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isActive") + }; + typedef node_type_impl<string_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<string_sensor_node>::exposedfield<sfnode> >( + &string_sensor_node::metadata)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<string_sensor_node>::exposedfield<sfnode> >( + &string_sensor_node::metadata)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<string_sensor_node>::exposedfield<sfnode> >( + &string_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<string_sensor_node>::exposedfield<sfbool> >( + &string_sensor_node::deletion_allowed_)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<string_sensor_node>::exposedfield<sfbool> >( + &string_sensor_node::deletion_allowed_)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<string_sensor_node>::exposedfield<sfbool> >( + &string_sensor_node::deletion_allowed_))); + } 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<string_sensor_node>::exposedfield<sfbool> >( + &string_sensor_node::enabled_)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<string_sensor_node>::exposedfield<sfbool> >( + &string_sensor_node::enabled_)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<string_sensor_node>::exposedfield<sfbool> >( + &string_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< + string_sensor_node::sfstring_emitter>( + &string_sensor_node::entered_text_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< + string_sensor_node::sfstring_emitter>( + &string_sensor_node::final_text_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< + string_sensor_node::sfbool_emitter>( + &string_sensor_node::is_active_emitter_))); + } else { + throw unsupported_interface(*interface); + } + } + return type; + } + + /** + * @class string_sensor_node + * + * @brief Represents StringSensor node instances. + */ + + /** + * @var string_sensor_node::StringSensor_class + * + * @brief Class object for StringSensor nodes. + */ + + /** + * @var string_sensor_node::deletion_allowed_ + * + * @brief deletion_allowed exposedField + */ + + /** + * @var string_sensor_node::enabled_ + * + * @brief enabled exposedField + */ + + /** + * @var string_sensor_node::entered_text_ + * + * @brief entered_text eventOut + */ + + /** + * @var string_sensor_node::final_text_ + * + * @brief final_text eventOut + */ + + /** + * @var string_sensor_node::is_active_ + * + * @brief is_active eventOut + */ + + + /** + * @brief Construct. + * + * @param type the node_type associated with this node. + * @param scope the scope to which the node belongs. + */ + string_sensor_node:: + string_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), + deletion_allowed_(*this, true), + enabled_(*this, true), + entered_text_emitter_(*this, this->entered_text_), + final_text_emitter_(*this, this->final_text_), + is_active_emitter_(*this, this->is_active_) + {} + + /** + * @brief Destroy. + */ + string_sensor_node::~string_sensor_node() OPENVRML_NOTHROW + {} } --- NEW FILE: x3d_shape.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_shape.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for LineProperties nodes. */ ... [truncated message content] |
From: Braden M. <br...@us...> - 2006-03-27 05:12:16
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29874/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Added support for constructing X3D MPEG-4 Interactive profile scenes. From Andrew Grieve <sg...@us...> Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.155 retrieving revision 1.156 diff -C2 -d -r1.155 -r1.156 *** browser.cpp 26 Mar 2006 07:42:14 -0000 1.155 --- browser.cpp 27 Mar 2006 05:12:13 -0000 1.156 *************** *** 3861,3864 **** --- 3861,3872 ---- + class OPENVRML_LOCAL x3d_mpeg4_profile : public profile { + public: + static const char * const id; + + x3d_mpeg4_profile(); + }; + + class OPENVRML_LOCAL component { public: *************** *** 3909,3912 **** --- 3917,3924 ---- succeeded = this->insert(key, new x3d_interactive_profile).second; assert(succeeded); + + key = x3d_mpeg4_profile::id; + succeeded = this->insert(key, new x3d_mpeg4_profile).second; + assert(succeeded); } *************** *** 9840,9843 **** --- 9852,9950 ---- + class OPENVRML_LOCAL x3d_networking_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_networking_component::id = "Networking"; + + void x3d_networking_component::add_to_scope(const openvrml::browser & b, + openvrml::scope & scope, + const int support_level) const + { + using namespace openvrml; + + if (support_level >= 2) { + // + // Anchor 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::mfnode_id, + "addChildren"), + node_interface(node_interface::eventin_id, + field_value::mfnode_id, + "removeChildren"), + node_interface(node_interface::exposedfield_id, + field_value::mfnode_id, + "children"), + node_interface(node_interface::exposedfield_id, + field_value::sfstring_id, + "description"), + node_interface(node_interface::exposedfield_id, + field_value::mfstring_id, + "parameter"), + node_interface(node_interface::exposedfield_id, + field_value::mfstring_id, + "url"), + node_interface(node_interface::field_id, + field_value::sfvec3f_id, + "bboxCenter"), + node_interface(node_interface::field_id, + field_value::sfvec3f_id, + "bboxSize") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 9); + add_scope_entry(b, + "Anchor", + interface_set, + "urn:X-openvrml:node:Anchor", + scope); + } + + // + // Inline 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, + "load"), + node_interface(node_interface::exposedfield_id, + field_value::mfstring_id, + "url"), + node_interface(node_interface::field_id, + field_value::sfvec3f_id, + "bboxCenter"), + node_interface(node_interface::field_id, + field_value::sfvec3f_id, + "bboxSize") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 5); + add_scope_entry(b, + "Inline", + interface_set, + "urn:X-openvrml:node:Inline", + scope); + } + } + } + + class OPENVRML_LOCAL x3d_grouping_component : public component { public: *************** *** 12098,12101 **** --- 12205,12212 ---- assert(succeeded); + key = x3d_networking_component::id; + succeeded = this->insert(key, new x3d_networking_component).second; + assert(succeeded); + key = x3d_grouping_component::id; succeeded = this->insert(key, new x3d_grouping_component).second; *************** *** 12245,12247 **** --- 12356,12379 ---- this->add_component(x3d_event_utilities_component::id, 1); } + + + const char * const x3d_mpeg4_profile::id = "MPEG-4"; + + x3d_mpeg4_profile::x3d_mpeg4_profile() + { + this->add_component(x3d_core_component::id, 1); + this->add_component(x3d_time_component::id, 1); + this->add_component(x3d_networking_component::id, 2); + this->add_component(x3d_grouping_component::id, 2); + this->add_component(x3d_rendering_component::id, 1); + this->add_component(x3d_shape_component::id, 1); + this->add_component(x3d_geometry3d_component::id, 2); + 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_environmental_sensor_component::id, 1); + this->add_component(x3d_navigation_component::id, 1); + this->add_component(x3d_environmental_effects_component::id, 1); + } } // namespace |
From: Braden M. <br...@us...> - 2006-03-27 05:12:16
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29874/tests Modified Files: testsuite.at Log Message: Added support for constructing X3D MPEG-4 Interactive profile scenes. From Andrew Grieve <sg...@us...> Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** testsuite.at 26 Mar 2006 07:42:14 -0000 1.10 --- testsuite.at 27 Mar 2006 05:12:13 -0000 1.11 *************** *** 202,203 **** --- 202,211 ---- AT_CHECK([parse-x3dvrml < minimal-interactive.x3dv]) AT_CLEANUP + + AT_SETUP([Minimal MPEG-4 Interactive world]) + AT_DATA([minimal-mpeg4.x3dv], + [[#X3D V3.0 utf8 + PROFILE MPEG-4 + ]]) + AT_CHECK([parse-x3dvrml < minimal-mpeg4.x3dv]) + AT_CLEANUP |