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-05-12 22:27:12
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16731 Modified Files: ChangeLog Log Message: If a thread other than the rendering thread destroys the scene, we will run into problems if we try to call OpenGL functions without first changing the GL context to the current thread. Rather than do that, we probably want just to refactor display list and texture object cleanup such that it is encapsulated in the renderer and always handled by the rendering thread. For now, though, we will just punt and leak the display list and texture objects. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1238 retrieving revision 1.1239 diff -C2 -d -r1.1238 -r1.1239 *** ChangeLog 12 May 2006 22:16:16 -0000 1.1238 --- ChangeLog 12 May 2006 22:27:08 -0000 1.1239 *************** *** 1,4 **** --- 1,21 ---- 2006-05-12 Braden McDaniel <br...@en...> + If a thread other than the rendering thread destroys the scene, we + will run into problems if we try to call OpenGL functions without + first changing the GL context to the current thread. Rather than + do that, we probably want just to refactor display list and + texture object cleanup such that it is encapsulated in the + renderer and always handled by the rendering thread. For now, + though, we will just punt and leak the display list and texture + objects. + + * src/libopenvrml/openvrml/node.cpp + (openvrml::geometry_node::~geometry_node()): Removed code to clean + up the renderer object. + (openvrml::texture_node::~texture_node()): Removed code to clean + up the renderer object. + + 2006-05-12 Braden McDaniel <br...@en...> + Make a copy of the URI passed to the root_scene_loader, since it very well may go away. |
From: Braden M. <br...@us...> - 2006-05-12 22:16:19
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12865/src/libopenvrml/openvrml Modified Files: browser.cpp browser.h Log Message: Make a copy of the URI passed to the root_scene_loader, since it very well may go away. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** browser.cpp 8 May 2006 08:34:16 -0000 1.173 --- browser.cpp 12 May 2006 22:16:16 -0000 1.174 *************** *** 6631,6637 **** struct OPENVRML_LOCAL openvrml::browser::root_scene_loader { root_scene_loader(browser & b, const std::vector<std::string> & url) ! OPENVRML_NOTHROW: browser_(&b), ! url_(&url) {} --- 6631,6637 ---- struct OPENVRML_LOCAL openvrml::browser::root_scene_loader { root_scene_loader(browser & b, const std::vector<std::string> & url) ! OPENVRML_THROW1(std::bad_alloc): browser_(&b), ! url_(url) {} *************** *** 6646,6650 **** try { std::auto_ptr<resource_istream> in = ! browser.scene_->get_resource(*this->url_); if (!(*in)) { throw unreachable_url(); } browser.set_world(*in); --- 6646,6650 ---- try { std::auto_ptr<resource_istream> in = ! browser.scene_->get_resource(this->url_); if (!(*in)) { throw unreachable_url(); } browser.set_world(*in); *************** *** 6664,6668 **** private: browser * browser_; ! const std::vector<std::string> * url_; }; --- 6664,6668 ---- private: browser * browser_; ! const std::vector<std::string> url_; }; *************** *** 6678,6682 **** void openvrml::browser::load_url(const std::vector<std::string> & url, const std::vector<std::string> &) ! OPENVRML_THROW1(boost::thread_resource_error) { boost::function0<void> f = root_scene_loader(*this, url); --- 6678,6682 ---- void openvrml::browser::load_url(const std::vector<std::string> & url, const std::vector<std::string> &) ! OPENVRML_THROW2(std::bad_alloc, boost::thread_resource_error) { boost::function0<void> f = root_scene_loader(*this, url); Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** browser.h 8 May 2006 08:34:16 -0000 1.57 --- browser.h 12 May 2006 22:16:17 -0000 1.58 *************** *** 292,296 **** void load_url(const std::vector<std::string> & url, const std::vector<std::string> & parameter) ! OPENVRML_THROW1(boost::thread_resource_error); virtual void description(const std::string & description); const std::vector<boost::intrusive_ptr<node> > --- 292,296 ---- void load_url(const std::vector<std::string> & url, const std::vector<std::string> & parameter) ! OPENVRML_THROW2(std::bad_alloc, boost::thread_resource_error); virtual void description(const std::string & description); const std::vector<boost::intrusive_ptr<node> > |
From: Braden M. <br...@us...> - 2006-05-12 22:16:19
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12865 Modified Files: ChangeLog Log Message: Make a copy of the URI passed to the root_scene_loader, since it very well may go away. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1237 retrieving revision 1.1238 diff -C2 -d -r1.1237 -r1.1238 *** ChangeLog 12 May 2006 20:59:44 -0000 1.1237 --- ChangeLog 12 May 2006 22:16:16 -0000 1.1238 *************** *** 1,4 **** --- 1,25 ---- 2006-05-12 Braden McDaniel <br...@en...> + Make a copy of the URI passed to the root_scene_loader, since it + very well may go away. + + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::root_scene_loader): Changed url_ member to a + const value from a pointer. + (openvrml::browser::root_scene_loader::root_scene_loader(browser + &, const std::vector<std::string> &)): Make a copy of the URI + vector; note that std::bad_alloc may be thrown. + (openvrml::browser::root_scene_loader::operator()): url_ member is + no longer a pointer. + (openvrml::browser::load_url(const std::vector<std::string> &, + const std::vector<std::string> &)): Added std::bad_alloc to + exception specification. + * src/libopenvrml/openvrml/browser.h + (openvrml::browser::load_url(const std::vector<std::string> &, + const std::vector<std::string> &)): Added std::bad_alloc to + exception specification. + + 2006-05-12 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/basetypes.cpp (rgb_to_hsv(const float *, float *)): Removed "inline"; changed |
From: Braden M. <br...@us...> - 2006-05-12 20:59:54
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18409/src/libopenvrml/openvrml Modified Files: basetypes.cpp Log Message: Removed "inline"; changed argument names for clarity. Index: basetypes.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** basetypes.cpp 12 May 2006 20:39:37 -0000 1.32 --- basetypes.cpp 12 May 2006 20:59:44 -0000 1.33 *************** *** 31,71 **** // h in [0,360), s,v in [0,1]. From Foley, van Dam p615-616. ! OPENVRML_LOCAL inline void rgb_to_hsv(const float * const inrgb, ! float * const outhsv) OPENVRML_NOTHROW { ! assert(inrgb[0] >= 0.0 && inrgb[0] <= 1.0); ! assert(inrgb[1] >= 0.0 && inrgb[1] <= 1.0); ! assert(inrgb[2] >= 0.0 && inrgb[2] <= 1.0); ! const float maxrgb = *std::max_element(inrgb, inrgb + 3); ! const float minrgb = *std::min_element(inrgb, inrgb + 3); ! outhsv[0] = 0.0; ! outhsv[1] = (maxrgb > 0.0) ? ((maxrgb - minrgb) / maxrgb) : 0.0f; ! outhsv[2] = maxrgb; ! if (outhsv[1] != 0.0) { ! const float rc = (maxrgb - inrgb[0]) / (maxrgb - minrgb); ! const float gc = (maxrgb - inrgb[1]) / (maxrgb - minrgb); ! const float bc = (maxrgb - inrgb[2]) / (maxrgb - minrgb); ! if (inrgb[0] == maxrgb) { ! outhsv[0] = bc - gc; ! } else if (inrgb[1] == maxrgb) { ! outhsv[0] = 2 + rc - bc; } else { ! outhsv[0] = 4 + gc - rc; } ! outhsv[0] *= 60.0; ! if (outhsv[0] < 0.0) { outhsv[0] += 360.0; } } } ! OPENVRML_LOCAL inline void hsv_to_rgb(float h, ! const float s, ! const float v, ! float * const outhsv) OPENVRML_NOTHROW { --- 31,71 ---- // h in [0,360), s,v in [0,1]. From Foley, van Dam p615-616. ! OPENVRML_LOCAL void rgb_to_hsv(const float * const rgb, ! float * const hsv) OPENVRML_NOTHROW { ! assert(rgb[0] >= 0.0 && rgb[0] <= 1.0); ! assert(rgb[1] >= 0.0 && rgb[1] <= 1.0); ! assert(rgb[2] >= 0.0 && rgb[2] <= 1.0); ! const float maxrgb = *std::max_element(rgb, rgb + 3); ! const float minrgb = *std::min_element(rgb, rgb + 3); ! hsv[0] = 0.0; ! hsv[1] = (maxrgb > 0.0) ? ((maxrgb - minrgb) / maxrgb) : 0.0f; ! hsv[2] = maxrgb; ! if (hsv[1] != 0.0) { ! const float rc = (maxrgb - rgb[0]) / (maxrgb - minrgb); ! const float gc = (maxrgb - rgb[1]) / (maxrgb - minrgb); ! const float bc = (maxrgb - rgb[2]) / (maxrgb - minrgb); ! if (rgb[0] == maxrgb) { ! hsv[0] = bc - gc; ! } else if (rgb[1] == maxrgb) { ! hsv[0] = 2 + rc - bc; } else { ! hsv[0] = 4 + gc - rc; } ! hsv[0] *= 60.0; ! if (hsv[0] < 0.0) { hsv[0] += 360.0; } } } ! OPENVRML_LOCAL void hsv_to_rgb(float h, ! const float s, ! const float v, ! float * const rgb) OPENVRML_NOTHROW { *************** *** 75,79 **** if (s == 0.0) { ! outhsv[0] = outhsv[1] = outhsv[2] = v; } else { if (h >= 360.0) { h -= 360.0; } --- 75,79 ---- if (s == 0.0) { ! rgb[0] = rgb[1] = rgb[2] = v; } else { if (h >= 360.0) { h -= 360.0; } *************** *** 86,95 **** switch (int(i)) { default: ! case 0: outhsv[0] = v; outhsv[1] = t; outhsv[2] = p; break; ! case 1: outhsv[0] = q; outhsv[1] = v; outhsv[2] = p; break; ! case 2: outhsv[0] = p; outhsv[1] = v; outhsv[2] = t; break; ! case 3: outhsv[0] = p; outhsv[1] = q; outhsv[2] = v; break; ! case 4: outhsv[0] = t; outhsv[1] = p; outhsv[2] = v; break; ! case 5: outhsv[0] = v; outhsv[1] = p; outhsv[2] = q; break; } } --- 86,95 ---- switch (int(i)) { default: ! case 0: rgb[0] = v; rgb[1] = t; rgb[2] = p; break; ! case 1: rgb[0] = q; rgb[1] = v; rgb[2] = p; break; ! case 2: rgb[0] = p; rgb[1] = v; rgb[2] = t; break; ! case 3: rgb[0] = p; rgb[1] = q; rgb[2] = v; break; ! case 4: rgb[0] = t; rgb[1] = p; rgb[2] = v; break; ! case 5: rgb[0] = v; rgb[1] = p; rgb[2] = q; break; } } |
From: Braden M. <br...@us...> - 2006-05-12 20:59:52
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18409 Modified Files: ChangeLog Log Message: Removed "inline"; changed argument names for clarity. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1236 retrieving revision 1.1237 diff -C2 -d -r1.1236 -r1.1237 *** ChangeLog 12 May 2006 20:39:37 -0000 1.1236 --- ChangeLog 12 May 2006 20:59:44 -0000 1.1237 *************** *** 2,5 **** --- 2,13 ---- * src/libopenvrml/openvrml/basetypes.cpp + (rgb_to_hsv(const float *, float *)): Removed "inline"; changed + argument names for clarity. + (hsv_to_rgb(float, float, float, float *)): Removed "inline"; + changed argument names for clarity. + + 2006-05-12 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/basetypes.cpp (rgb_to_hsv(const float *, float *)): Assert validity of input parameter. |
From: Braden M. <br...@us...> - 2006-05-12 20:39:49
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11568/src/libopenvrml/openvrml Modified Files: basetypes.cpp Log Message: Assert validity of input parameters. Index: basetypes.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** basetypes.cpp 25 Feb 2006 08:37:27 -0000 1.31 --- basetypes.cpp 12 May 2006 20:39:37 -0000 1.32 *************** *** 35,38 **** --- 35,42 ---- OPENVRML_NOTHROW { + assert(inrgb[0] >= 0.0 && inrgb[0] <= 1.0); + assert(inrgb[1] >= 0.0 && inrgb[1] <= 1.0); + assert(inrgb[2] >= 0.0 && inrgb[2] <= 1.0); + const float maxrgb = *std::max_element(inrgb, inrgb + 3); const float minrgb = *std::min_element(inrgb, inrgb + 3); *************** *** 66,69 **** --- 70,77 ---- OPENVRML_NOTHROW { + assert(h >= 0.0 && h <= 360.0); + assert(s >= 0.0 && s <= 1.0); + assert(v >= 0.0 && v <= 1.0); + if (s == 0.0) { outhsv[0] = outhsv[1] = outhsv[2] = v; |
From: Braden M. <br...@us...> - 2006-05-12 20:39:46
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11568 Modified Files: ChangeLog Log Message: Assert validity of input parameters. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1235 retrieving revision 1.1236 diff -C2 -d -r1.1235 -r1.1236 *** ChangeLog 8 May 2006 08:49:01 -0000 1.1235 --- ChangeLog 12 May 2006 20:39:37 -0000 1.1236 *************** *** 1,2 **** --- 1,10 ---- + 2006-05-12 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/basetypes.cpp + (rgb_to_hsv(const float *, float *)): Assert validity of input + parameter. + (hsv_to_rgb(float, float, float, float *)): Assert validity of + input parameters. + 2006-05-08 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-05-09 01:10:04
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29107 Modified Files: ChangeLog README configure.ac Log Message: Accommodate building against Boost libraries that have a configuration-specific suffix. Index: README =================================================================== RCS file: /cvsroot/openvrml/openvrml/README,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** README 12 Feb 2006 09:40:16 -0000 1.62 --- README 7 May 2006 03:39:19 -0000 1.63 *************** *** 101,104 **** --- 101,111 ---- can obtain Boost from <http://boost.org>. + Note that Boost binaries built from the boost.org distribution, as + well as some other distributions, apply a suffix to the library + name that depends on the particular build configuration. When + building OpenVRML with such binaries it will be necessary to set the + variable BOOST_LIB_SUFFIX to match the suffix applied to the Boost + binaries; refer to the output of "configure --help". + Building OpenVRML is fairly demanding of system resources. It is recommended that build hosts have at least 512 MB of system memory. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** configure.ac 6 May 2006 07:32:15 -0000 1.86 --- configure.ac 7 May 2006 03:39:19 -0000 1.87 *************** *** 106,109 **** --- 106,114 ---- # + # Allow users to specify any Boost library name suffix + # + AC_ARG_VAR([BOOST_LIB_SUFFIX], [Boost library name suffix]) + + # # Use exception specifications? # Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1232 retrieving revision 1.1233 diff -C2 -d -r1.1232 -r1.1233 *** ChangeLog 6 May 2006 07:32:15 -0000 1.1232 --- ChangeLog 7 May 2006 03:39:19 -0000 1.1233 *************** *** 1,4 **** --- 1,14 ---- 2006-05-06 Braden McDaniel <br...@en...> + Accommodate building against Boost libraries that have a + configuration-specific suffix. + + * README + * configure.ac: Added AC_ARG_VAR BOOST_LIB_SUFFIX. + * src/libopenvrml/Makefile.am: Append BOOST_LIB_SUFFIX to + boost_thread. + + 2006-05-06 Braden McDaniel <br...@en...> + * configure.ac: Added missing comma. * m4/antlr.m4: Check to ensure JAVA is set; direct stdout and |
From: Braden M. <br...@us...> - 2006-05-09 01:10:00
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29107/src/libopenvrml Modified Files: Makefile.am Log Message: Accommodate building against Boost libraries that have a configuration-specific suffix. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Makefile.am 22 Apr 2006 03:29:04 -0000 1.33 --- Makefile.am 7 May 2006 03:39:19 -0000 1.34 *************** *** 132,136 **** @PTHREAD_LIBS@ ! libopenvrml_la_LIBADD = $(top_builddir)/lib/antlr/libantlr.la -lboost_thread EXTRA_DIST = \ --- 132,138 ---- @PTHREAD_LIBS@ ! libopenvrml_la_LIBADD = \ ! $(top_builddir)/lib/antlr/libantlr.la \ ! -lboost_thread@BOOST_LIB_SUFFIX@ EXTRA_DIST = \ |
From: Braden M. <br...@us...> - 2006-05-08 23:50:01
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5787/src/libopenvrml/openvrml Modified Files: script.cpp Log Message: Handle 0 or 1 argument calls to Browser.loadURL. Index: script.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/script.cpp,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** script.cpp 16 Apr 2006 08:22:18 -0000 1.69 --- script.cpp 8 May 2006 08:49:01 -0000 1.70 *************** *** 4280,4284 **** JSBool loadURL(JSContext * const cx, JSObject *, ! uintN, jsval * const argv, jsval *) --- 4280,4284 ---- JSBool loadURL(JSContext * const cx, JSObject *, ! const uintN argc, jsval * const argv, jsval *) *************** *** 4291,4322 **** *static_cast<js_::script *>(JS_GetContextPrivate(cx)); ! // ! // Make sure our first argument (the URL) is an MFString. ! // ! JSObject * arg0_obj; ! if (!JS_ValueToObject(cx, argv[0], &arg0_obj)) { return JS_FALSE; } ! if (!JS_InstanceOf(cx, arg0_obj, &MFString::jsclass, argv)) { ! return JS_FALSE; ! } ! auto_ptr<openvrml::mfstring> url = ! MFString::createFromJSObject(cx, arg0_obj); ! assert(url.get()); ! // ! // Make sure our second argument is an MFString ! // ! JSObject * arg1_obj; ! if (!JS_ValueToObject(cx, argv[1], &arg1_obj)) { return JS_FALSE; } ! if (!JS_InstanceOf(cx, arg1_obj, &MFString::jsclass, argv)) { return JS_FALSE; } - auto_ptr<openvrml::mfstring> parameters = - MFString::createFromJSObject(cx, arg1_obj); - assert(parameters.get()); - - script.script_node().scene()->browser().load_url(url->value(), - parameters->value()); return JS_TRUE; } --- 4291,4340 ---- *static_cast<js_::script *>(JS_GetContextPrivate(cx)); ! try { ! openvrml::mfstring url, parameter; ! if (argc > 0) { ! // ! // Make sure our first argument (the URL) is an MFString. ! // ! JSObject * arg0_obj; ! if (!JS_ValueToObject(cx, argv[0], &arg0_obj)) { return JS_FALSE; } ! if (!JS_InstanceOf(cx, arg0_obj, &MFString::jsclass, argv)) { ! return JS_FALSE; ! } ! auto_ptr<openvrml::mfstring> url_ptr = ! MFString::createFromJSObject(cx, arg0_obj); ! assert(url_ptr.get()); ! url = *url_ptr; ! } ! ! if (argc > 1) { ! // ! // Make sure our second argument is an MFString ! // ! JSObject * arg1_obj; ! if (!JS_ValueToObject(cx, argv[1], &arg1_obj)) { return JS_FALSE; } ! if (!JS_InstanceOf(cx, arg1_obj, &MFString::jsclass, argv)) { ! return JS_FALSE; ! } ! ! auto_ptr<openvrml::mfstring> parameter_ptr = ! MFString::createFromJSObject(cx, arg1_obj); ! assert(parameter_ptr.get()); ! parameter = *parameter_ptr; ! } ! ! script.script_node().scene()->browser().load_url(url.value(), ! parameter.value()); ! } catch (std::bad_alloc &) { ! JS_ReportOutOfMemory(cx); return JS_FALSE; + } catch (std::exception & ex) { + JS_ReportError(cx, ex.what()); + } catch (...) { + JS_ReportError(cx, "unexpected exception"); } return JS_TRUE; } |
From: Braden M. <br...@us...> - 2006-05-08 18:00:51
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5787 Modified Files: ChangeLog Log Message: Handle 0 or 1 argument calls to Browser.loadURL. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1234 retrieving revision 1.1235 diff -C2 -d -r1.1234 -r1.1235 *** ChangeLog 8 May 2006 08:34:16 -0000 1.1234 --- ChangeLog 8 May 2006 08:49:01 -0000 1.1235 *************** *** 1,4 **** --- 1,11 ---- 2006-05-08 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/script.cpp + (js_::Browser::loadURL(JSContext *, JSObject *, uintN, jsval *, + jsval *)): Accommodate calls using 0 or 1 argument; handle any + exceptions. + + 2006-05-08 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.cpp (openvrml::browser::load_url(const std::vector<std::string> &, |
From: Braden M. <br...@us...> - 2006-05-08 17:08:19
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29916/src/libopenvrml/openvrml Modified Files: browser.cpp browser.h Log Message: Changed exception specification of openvrml::browser::load_url to throw boost::thread_resource_error. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -d -r1.172 -r1.173 *** browser.cpp 22 Apr 2006 03:34:15 -0000 1.172 --- browser.cpp 8 May 2006 08:34:16 -0000 1.173 *************** *** 6630,6634 **** struct OPENVRML_LOCAL openvrml::browser::root_scene_loader { ! root_scene_loader(browser & b, const std::vector<std::string> & url): browser_(&b), url_(&url) --- 6630,6635 ---- struct OPENVRML_LOCAL openvrml::browser::root_scene_loader { ! root_scene_loader(browser & b, const std::vector<std::string> & url) ! OPENVRML_NOTHROW: browser_(&b), url_(&url) *************** *** 6672,6680 **** * @param[in] parameter parameters for @p url. * ! * @exception std::bad_alloc if memory allocation fails. */ void openvrml::browser::load_url(const std::vector<std::string> & url, const std::vector<std::string> &) ! OPENVRML_THROW1(std::bad_alloc) { boost::function0<void> f = root_scene_loader(*this, url); --- 6673,6682 ---- * @param[in] parameter parameters for @p url. * ! * @exception std::bad_alloc if memory allocation fails. ! * @exception boost::thread_resource_error if thread creation fails. */ void openvrml::browser::load_url(const std::vector<std::string> & url, const std::vector<std::string> &) ! OPENVRML_THROW1(boost::thread_resource_error) { boost::function0<void> f = root_scene_loader(*this, url); Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** browser.h 17 Apr 2006 07:29:17 -0000 1.56 --- browser.h 8 May 2006 08:34:16 -0000 1.57 *************** *** 292,296 **** void load_url(const std::vector<std::string> & url, const std::vector<std::string> & parameter) ! OPENVRML_THROW1(std::bad_alloc); virtual void description(const std::string & description); const std::vector<boost::intrusive_ptr<node> > --- 292,296 ---- void load_url(const std::vector<std::string> & url, const std::vector<std::string> & parameter) ! OPENVRML_THROW1(boost::thread_resource_error); virtual void description(const std::string & description); const std::vector<boost::intrusive_ptr<node> > |
From: Braden M. <br...@us...> - 2006-05-08 17:03:25
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29916 Modified Files: ChangeLog Log Message: Changed exception specification of openvrml::browser::load_url to throw boost::thread_resource_error. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1233 retrieving revision 1.1234 diff -C2 -d -r1.1233 -r1.1234 *** ChangeLog 7 May 2006 03:39:19 -0000 1.1233 --- ChangeLog 8 May 2006 08:34:16 -0000 1.1234 *************** *** 1,2 **** --- 1,12 ---- + 2006-05-08 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::load_url(const std::vector<std::string> &, + const std::vector<std::string> &)): Changed exception + specification to throw boost::thread_resource_error. + * src/libopenvrml/openvrml/browser.h (openvrml::browser): Changed + exception specification of load_url member function to throw + boost::thread_resource_error. + 2006-05-06 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-05-06 07:32:20
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8394 Modified Files: ChangeLog configure.ac Log Message: Fixes for antlr configure check. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** configure.ac 27 Apr 2006 04:51:24 -0000 1.85 --- configure.ac 6 May 2006 07:32:15 -0000 1.86 *************** *** 49,53 **** OV_PROG_JAR OV_PROG_ANTLR([2.7.4]) ! AS_IF([test -z "$ANTLR"] [AS_IF([test ! -f $top_srcdir/src/libopenvrml/Vrml97Parser.cpp], [AC_MSG_FAILURE([antlr 2.7.4 not found])], --- 49,53 ---- OV_PROG_JAR OV_PROG_ANTLR([2.7.4]) ! AS_IF([test -z "$ANTLR"], [AS_IF([test ! -f $top_srcdir/src/libopenvrml/Vrml97Parser.cpp], [AC_MSG_FAILURE([antlr 2.7.4 not found])], Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1231 retrieving revision 1.1232 diff -C2 -d -r1.1231 -r1.1232 *** ChangeLog 27 Apr 2006 04:51:24 -0000 1.1231 --- ChangeLog 6 May 2006 07:32:15 -0000 1.1232 *************** *** 1,2 **** --- 1,8 ---- + 2006-05-06 Braden McDaniel <br...@en...> + + * configure.ac: Added missing comma. + * m4/antlr.m4: Check to ensure JAVA is set; direct stdout and + stderr output from antlr to /dev/null. + 2006-04-27 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-05-06 07:32:19
|
Update of /cvsroot/openvrml/openvrml/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8394/m4 Modified Files: antlr.m4 Log Message: Fixes for antlr configure check. Index: antlr.m4 =================================================================== RCS file: /cvsroot/openvrml/openvrml/m4/antlr.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** antlr.m4 27 Apr 2006 04:51:24 -0000 1.2 --- antlr.m4 6 May 2006 07:32:16 -0000 1.3 *************** *** 10,14 **** rule:; EOF ! AS_IF([$JAVA $JAVAFLAGS antlr.Tool conftest.g], [ANTLR="$JAVA $JAVAFLAGS antlr.Tool" AC_MSG_RESULT([yes])], --- 10,14 ---- rule:; EOF ! AS_IF([test -n "$JAVA" && $JAVA $JAVAFLAGS antlr.Tool conftest.g > /dev/null 2> /dev/null], [ANTLR="$JAVA $JAVAFLAGS antlr.Tool" AC_MSG_RESULT([yes])], *************** *** 26,28 **** --- 26,29 ---- fi fi + AC_SUBST([ANTLR]) ]) |
From: Braden M. <br...@us...> - 2006-04-27 04:51:27
|
Update of /cvsroot/openvrml/openvrml/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25598/m4 Modified Files: antlr.m4 Log Message: Ensure the version of antlr that gets used to generate code is the same as the version of libantlr that is included with OpenVRML. Index: antlr.m4 =================================================================== RCS file: /cvsroot/openvrml/openvrml/m4/antlr.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** antlr.m4 4 Nov 2005 07:47:29 -0000 1.1 --- antlr.m4 27 Apr 2006 04:51:24 -0000 1.2 *************** *** 1,15 **** AC_DEFUN([OV_PROG_ANTLR], [AC_REQUIRE([OV_PROG_JAVA]) ! AC_ARG_VAR([ANTLR]) AC_PATH_PROG([ANTLR], [antlr]) if test -z "$ANTLR"; then cat <<EOF > conftest.g class TestParser extends Parser; rule:; EOF ! AS_IF([$JAVA antlr.Tool conftest.g], ! [ANTLR="$JAVA antlr.Tool"], ! []) rm -rf conftest.g TestParser.java TestParserTokenTypes.java TestParserTokenTypes.txt fi ]) --- 1,28 ---- + dnl -*- mode: autoconf -*- AC_DEFUN([OV_PROG_ANTLR], [AC_REQUIRE([OV_PROG_JAVA]) ! AC_ARG_VAR([ANTLR], [antlr parser generator]) AC_PATH_PROG([ANTLR], [antlr]) if test -z "$ANTLR"; then + AC_MSG_CHECKING([if antlr is available to the Java runtime]) cat <<EOF > conftest.g class TestParser extends Parser; rule:; EOF ! AS_IF([$JAVA $JAVAFLAGS antlr.Tool conftest.g], ! [ANTLR="$JAVA $JAVAFLAGS antlr.Tool" ! AC_MSG_RESULT([yes])], ! [AC_MSG_RESULT([no])]) rm -rf conftest.g TestParser.java TestParserTokenTypes.java TestParserTokenTypes.txt fi + if test -n "$1" -a -n "$ANTLR"; then + AC_MSG_CHECKING([if antlr version is $1]) + version=`$ANTLR 2>&1 | head -n1 | cut -d' ' -f7` + if test X$version = X$1; then + AC_MSG_RESULT([yes]) + else + ANTLR= + AC_MSG_RESULT([no]) + fi + fi ]) |
From: Braden M. <br...@us...> - 2006-04-27 04:51:27
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25598 Modified Files: ChangeLog configure.ac Log Message: Ensure the version of antlr that gets used to generate code is the same as the version of libantlr that is included with OpenVRML. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** configure.ac 17 Feb 2006 03:40:08 -0000 1.84 --- configure.ac 27 Apr 2006 04:51:24 -0000 1.85 *************** *** 48,52 **** OV_PROG_JAVAH OV_PROG_JAR ! OV_PROG_ANTLR AC_ARG_VAR([DOXYGEN], [Doxygen documentation generator]) --- 48,56 ---- OV_PROG_JAVAH OV_PROG_JAR ! OV_PROG_ANTLR([2.7.4]) ! AS_IF([test -z "$ANTLR"] ! [AS_IF([test ! -f $top_srcdir/src/libopenvrml/Vrml97Parser.cpp], ! [AC_MSG_FAILURE([antlr 2.7.4 not found])], ! [AC_MSG_WARN([antlr 2.7.4 not found; but generated files already exist])])]) AC_ARG_VAR([DOXYGEN], [Doxygen documentation generator]) Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1230 retrieving revision 1.1231 diff -C2 -d -r1.1230 -r1.1231 *** ChangeLog 27 Apr 2006 04:45:56 -0000 1.1230 --- ChangeLog 27 Apr 2006 04:51:24 -0000 1.1231 *************** *** 1,4 **** --- 1,13 ---- 2006-04-27 Braden McDaniel <br...@en...> + Ensure the version of antlr that gets used to generate code is the + same as the version of libantlr that is included with OpenVRML. + + * configure.ac: Check for antlr 2.7.4. + * m4/antlr.m4 (OV_PROG_ANTLR): Allow specification of a particular + version of antlr. + + 2006-04-27 Braden McDaniel <br...@en...> + * m4/jdk.m4 (OV_PROG_JAVA): Added AC_ARG_VAR JAVAFLAGS. |
From: Braden M. <br...@us...> - 2006-04-27 04:46:06
|
Update of /cvsroot/openvrml/openvrml/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21075/m4 Modified Files: jdk.m4 Log Message: Added AC_ARG_VAR JAVAFLAGS. Index: jdk.m4 =================================================================== RCS file: /cvsroot/openvrml/openvrml/m4/jdk.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** jdk.m4 8 Nov 2003 00:09:34 -0000 1.3 --- jdk.m4 27 Apr 2006 04:45:56 -0000 1.4 *************** *** 50,53 **** --- 50,54 ---- AC_DEFUN([OV_PROG_JAVA], [AC_ARG_VAR([JAVA], [Java interpreter command])dnl + AC_ARG_VAR([JAVAFLAGS], [Java interpreter flags])dnl if test -z "$JAVA"; then AC_CHECK_PROG([JAVA], [gij], [gij]) |
From: Braden M. <br...@us...> - 2006-04-27 04:46:06
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21075 Modified Files: ChangeLog Log Message: Added AC_ARG_VAR JAVAFLAGS. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1229 retrieving revision 1.1230 diff -C2 -d -r1.1229 -r1.1230 *** ChangeLog 22 Apr 2006 03:34:15 -0000 1.1229 --- ChangeLog 27 Apr 2006 04:45:56 -0000 1.1230 *************** *** 1,2 **** --- 1,6 ---- + 2006-04-27 Braden McDaniel <br...@en...> + + * m4/jdk.m4 (OV_PROG_JAVA): Added AC_ARG_VAR JAVAFLAGS. + 2006-04-21 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-22 03:34:19
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23780 Modified Files: ChangeLog Log Message: Incremented Rendering and Lighting component support levels to 4 and 3, respectively. These levels to not indicate any additional node support. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1228 retrieving revision 1.1229 diff -C2 -d -r1.1228 -r1.1229 *** ChangeLog 22 Apr 2006 03:29:03 -0000 1.1228 --- ChangeLog 22 Apr 2006 03:34:15 -0000 1.1229 *************** *** 1,4 **** --- 1,14 ---- 2006-04-21 Braden McDaniel <br...@en...> + Incremented Rendering and Lighting component support levels to 4 + and 3, respectively. These levels to not indicate any additional + node support. + + * src/libopenvrml/openvrml/browser.cpp + (x3d_rendering_component::support_level() const): Return 4. + (x3d_lighting_component::support_level() const): Return 3. + + 2006-04-21 Braden McDaniel <br...@en...> + Added support for creating scene graphs with the level 3 nodes of the EnvironmentalEffects component. |
From: Braden M. <br...@us...> - 2006-04-22 03:34:19
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23780/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Incremented Rendering and Lighting component support levels to 4 and 3, respectively. These levels to not indicate any additional node support. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** browser.cpp 22 Apr 2006 03:29:04 -0000 1.171 --- browser.cpp 22 Apr 2006 03:34:15 -0000 1.172 *************** *** 10340,10344 **** size_t x3d_rendering_component::support_level() const OPENVRML_NOTHROW { ! return 3; } --- 10340,10344 ---- size_t x3d_rendering_component::support_level() const OPENVRML_NOTHROW { ! return 4; } *************** *** 11878,11882 **** size_t x3d_lighting_component::support_level() const OPENVRML_NOTHROW { ! return 2; } --- 11878,11882 ---- size_t x3d_lighting_component::support_level() const OPENVRML_NOTHROW { ! return 3; } |
From: Braden M. <br...@us...> - 2006-04-22 03:29:21
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20646 Modified Files: ChangeLog Log Message: Added support for creating scene graphs with the level 3 nodes of the EnvironmentalEffects component. From Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1227 retrieving revision 1.1228 diff -C2 -d -r1.1227 -r1.1228 *** ChangeLog 21 Apr 2006 14:33:11 -0000 1.1227 --- ChangeLog 22 Apr 2006 03:29:03 -0000 1.1228 *************** *** 2,5 **** --- 2,30 ---- Added support for creating scene graphs with the level 3 nodes of + the EnvironmentalEffects component. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/Makefile.am + (openvrml_include_HEADERS): Added + openvrml/x3d_environmental_effects.h. + (libopenvrml_la_SOURCES): Added + openvrml/x3d_environmental_effects.cpp. + * src/libopenvrml/openvrml/browser.cpp + (register_node_classes(openvrml::browser &)): Register + EnvironmentalEffects node_classes. + (x3d_environmental_effects_component::support_level() const): + Return 3. + (x3d_environmental_effects_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Add the + level 3 node types to the scope. + * src/libopenvrml/openvrml/x3d_environmental_effects.cpp: Added + file; EnvironmentalEffects component node implementations that + aren't VRML97 nodes. + * src/libopenvrml/openvrml/x3d_environmental_effects.h: Added + file; expose node_class registration function. + + 2006-04-21 Braden McDaniel <br...@en...> + + Added support for creating scene graphs with the level 3 nodes of the Interpolation component. From Andrew Grieve <sg...@us...> |
From: Braden M. <br...@us...> - 2006-04-22 03:29:21
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20646/src/libopenvrml/openvrml Modified Files: browser.cpp Added Files: x3d_environmental_effects.cpp x3d_environmental_effects.h Log Message: Added support for creating scene graphs with the level 3 nodes of the EnvironmentalEffects component. From Andrew Grieve <sg...@us...> Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.170 retrieving revision 1.171 diff -C2 -d -r1.170 -r1.171 *** browser.cpp 21 Apr 2006 14:33:12 -0000 1.170 --- browser.cpp 22 Apr 2006 03:29:04 -0000 1.171 *************** *** 58,61 **** --- 58,62 ---- # include "x3d_event_utilities.h" # include "x3d_dis.h" + # include "x3d_environmental_effects.h" # include "x3d_geospatial.h" # include "x3d_hanim.h" *************** *** 6012,6015 **** --- 6013,6017 ---- register_event_utilities_node_classes(b); register_dis_node_classes(b); + register_environmental_effects_node_classes(b); register_geospatial_node_classes(b); register_hanim_node_classes(b); *************** *** 13339,13343 **** OPENVRML_NOTHROW { ! return 2; } --- 13341,13345 ---- OPENVRML_NOTHROW { ! return 3; } *************** *** 13449,13452 **** --- 13451,13517 ---- } } + + if (level >= 3) { + // + // TextureBackground node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sfbool_id, + "set_bind"), + node_interface(node_interface::exposedfield_id, + field_value::mffloat_id, + "groundAngle"), + node_interface(node_interface::exposedfield_id, + field_value::mfcolor_id, + "groundColor"), + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "backTexture"), + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "bottomTexture"), + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "frontTexture"), + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "leftTexture"), + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "rightTexture"), + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "topTexture"), + node_interface(node_interface::exposedfield_id, + field_value::mffloat_id, + "skyAngle"), + node_interface(node_interface::exposedfield_id, + field_value::mfcolor_id, + "skyColor"), + node_interface(node_interface::exposedfield_id, + field_value::mffloat_id, + "transparency"), + node_interface(node_interface::eventout_id, + field_value::sftime_id, + "bindTime"), + node_interface(node_interface::eventout_id, + field_value::sfbool_id, + "isBound") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 15); + add_scope_entry(b, + "TextureBackground", + interface_set, + "urn:X-openvrml:node:TextureBackground", + scope); + } + } } --- NEW FILE: x3d_environmental_effects.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*- // // OpenVRML // // Copyright 1998 Chris Morley // Copyright 2001, 2002, 2003, 2004, 2005 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_environmental_effects.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for TextureBackground nodes. */ class OPENVRML_LOCAL texture_background_class : public node_class { public: static const char * const id; explicit texture_background_class(openvrml::browser & browser); virtual ~texture_background_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_environmental_effects_node_classes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_class; b.add_node_class(texture_background_class::id, shared_ptr<node_class>(new texture_background_class(b))); } namespace { using namespace openvrml_; class OPENVRML_LOCAL texture_background_node : public abstract_node<texture_background_node>, public child_node { friend class texture_background_class; class set_bind_listener : public event_listener_base<self_t>, public sfbool_listener { public: explicit set_bind_listener(self_t & node); virtual ~set_bind_listener() OPENVRML_NOTHROW; private: virtual void do_process_event(const sfbool & fraction, double timestamp) OPENVRML_THROW1(std::bad_alloc); }; set_bind_listener set_bind_listener_; exposedfield<mffloat> ground_angle_; exposedfield<mfcolor> ground_color_; exposedfield<sfnode> back_texture_; exposedfield<sfnode> bottom_texture_; exposedfield<sfnode> front_texture_; exposedfield<sfnode> left_texture_; exposedfield<sfnode> right_texture_; exposedfield<sfnode> top_texture_; exposedfield<mffloat> sky_angle_; exposedfield<mfcolor> sky_color_; exposedfield<mffloat> transparency_; sftime bind_time_; sftime_emitter bind_time_emitter_; sfbool is_bound_; sfbool_emitter is_bound_emitter_; public: texture_background_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~texture_background_node() OPENVRML_NOTHROW; }; /** * @brief @c node_class identifier. */ const char * const texture_background_class::id = "urn:X-openvrml:node:TextureBackground"; /** * @brief Construct. * * @param browser the @c browser associated with this * @c texture_background_class. */ texture_background_class:: texture_background_class(openvrml::browser & browser): node_class(texture_background_class::id, browser) {} /** * @brief Destroy. */ texture_background_class::~texture_background_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 TextureBackground nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by texture_background_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> texture_background_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, 15> 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::eventin_id, field_value::sfbool_id, "set_bind"), node_interface(node_interface::exposedfield_id, field_value::mffloat_id, "groundAngle"), node_interface(node_interface::exposedfield_id, field_value::mfcolor_id, "groundColor"), node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "backTexture"), node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "bottomTexture"), node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "frontTexture"), node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "leftTexture"), node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "rightTexture"), node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "topTexture"), node_interface(node_interface::exposedfield_id, field_value::mffloat_id, "skyAngle"), node_interface(node_interface::exposedfield_id, field_value::mfcolor_id, "skyColor"), node_interface(node_interface::exposedfield_id, field_value::mffloat_id, "transparency"), node_interface(node_interface::eventout_id, field_value::sftime_id, "bindTime"), node_interface(node_interface::eventout_id, field_value::sfbool_id, "isBound") }; typedef node_type_impl<texture_background_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_eventin( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< texture_background_node::set_bind_listener>( &texture_background_node::set_bind_listener_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::ground_angle_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::ground_angle_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::ground_angle_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<mfcolor> >( &texture_background_node::ground_color_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<mfcolor> >( &texture_background_node::ground_color_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<mfcolor> >( &texture_background_node::ground_color_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::back_texture_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::back_texture_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::back_texture_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::bottom_texture_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::bottom_texture_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::bottom_texture_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::front_texture_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::front_texture_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::front_texture_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::left_texture_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::left_texture_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::left_texture_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::right_texture_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::right_texture_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::right_texture_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::top_texture_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::top_texture_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<sfnode> >( &texture_background_node::top_texture_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::sky_angle_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::sky_angle_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::sky_angle_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<mfcolor> >( &texture_background_node::sky_color_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<mfcolor> >( &texture_background_node::sky_color_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<mfcolor> >( &texture_background_node::sky_color_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::transparency_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::transparency_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<texture_background_node>::exposedfield<mffloat> >( &texture_background_node::transparency_))); } 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< texture_background_node::sftime_emitter>( &texture_background_node::bind_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< texture_background_node::sfbool_emitter>( &texture_background_node::is_bound_emitter_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @class texture_background_node * * @brief Represents TextureBackground node instances. */ /** * @var texture_background_node::TextureBackground_class * * @brief Class object for TextureBackground nodes. */ /** * @var texture_background_node::set_bind_ * * @brief set_bind eventIn */ /** * @var texture_background_node::ground_angle_ * * @brief ground_angle exposedField */ /** * @var texture_background_node::ground_color_ * * @brief ground_color exposedField */ /** * @var texture_background_node::back_texture_ * * @brief back_texture exposedField */ /** * @var texture_background_node::bottom_texture_ * * @brief bottom_texture exposedField */ /** * @var texture_background_node::front_texture_ * * @brief front_texture exposedField */ /** * @var texture_background_node::left_texture_ * * @brief left_texture exposedField */ /** * @var texture_background_node::right_texture_ * * @brief right_texture exposedField */ /** * @var texture_background_node::top_texture_ * * @brief top_texture exposedField */ /** * @var texture_background_node::sky_angle_ * * @brief sky_angle exposedField */ /** * @var texture_background_node::sky_color_ * * @brief sky_color exposedField */ /** * @var texture_background_node::transparency_ * * @brief transparency exposedField */ /** * @var texture_background_node::bind_time_ * * @brief bind_time eventOut */ /** * @var texture_background_node::is_bound_ * * @brief is_bound eventOut */ texture_background_node::set_bind_listener:: set_bind_listener(self_t & node): node_event_listener(node), event_listener_base<self_t>(node), sfbool_listener(node) {} texture_background_node::set_bind_listener:: ~set_bind_listener() OPENVRML_NOTHROW {} void texture_background_node::set_bind_listener:: do_process_event(const sfbool & /* fraction */, const double /* timestamp */) OPENVRML_THROW1(std::bad_alloc) { //TODO: add logic here } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ texture_background_node:: texture_background_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), bounded_volume_node(type, scope), abstract_node<self_t>(type, scope), child_node(type, scope), set_bind_listener_(*this), ground_angle_(*this), ground_color_(*this), back_texture_(*this), bottom_texture_(*this), front_texture_(*this), left_texture_(*this), right_texture_(*this), top_texture_(*this), sky_angle_(*this), sky_color_(*this), transparency_(*this), bind_time_emitter_(*this, this->bind_time_), is_bound_emitter_(*this, this->is_bound_) {} /** * @brief Destroy. */ texture_background_node::~texture_background_node() OPENVRML_NOTHROW {} } --- NEW FILE: x3d_environmental_effects.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*- // // OpenVRML // // Copyright 1998 Chris Morley // Copyright 2001, 2002, 2003, 2004, 2005 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_ENVIRONMENTAL_EFFECTS_H # define OPENVRML_X3D_ENVIRONMENTAL_EFFECTS_H namespace openvrml { class browser; } extern "C" void register_environmental_effects_node_classes(openvrml::browser & b); # endif |
From: Braden M. <br...@us...> - 2006-04-22 03:29:19
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20646/src/libopenvrml Modified Files: Makefile.am Log Message: Added support for creating scene graphs with the level 3 nodes of the EnvironmentalEffects component. From Andrew Grieve <sg...@us...> Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Makefile.am 21 Apr 2006 14:33:12 -0000 1.32 --- Makefile.am 22 Apr 2006 03:29:04 -0000 1.33 *************** *** 31,34 **** --- 31,35 ---- openvrml/x3d_event_utilities.h \ openvrml/x3d_dis.h \ + openvrml/x3d_environmental_effects.h \ openvrml/x3d_geospatial.h \ openvrml/x3d_hanim.h \ *************** *** 116,119 **** --- 117,121 ---- openvrml/x3d_event_utilities.cpp \ openvrml/x3d_dis.cpp \ + openvrml/x3d_environmental_effects.cpp \ openvrml/x3d_geospatial.cpp \ openvrml/x3d_hanim.cpp \ |
From: Braden M. <br...@us...> - 2006-04-21 14:33:28
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24242 Modified Files: ChangeLog Log Message: Added support for creating scene graphs with the level 3 nodes of the Interpolation component. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1226 retrieving revision 1.1227 diff -C2 -d -r1.1226 -r1.1227 *** ChangeLog 21 Apr 2006 03:41:14 -0000 1.1226 --- ChangeLog 21 Apr 2006 14:33:11 -0000 1.1227 *************** *** 1,2 **** --- 1,24 ---- + 2006-04-21 Braden McDaniel <br...@en...> + + Added support for creating scene graphs with the level 3 nodes of + the Interpolation component. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/Makefile.am + (openvrml_include_HEADERS): Added openvrml/x3d_interpolation.h. + (libopenvrml_la_SOURCES): Added openvrml/x3d_interpolation.cpp. + * src/libopenvrml/openvrml/browser.cpp + (register_node_classes(openvrml::browser &)): Register + Interpolation node_classes. + (x3d_interpolation_component::support_level() const): Return 3. + (x3d_interpolation_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Add the + level 3 node types to the scope. + * src/libopenvrml/openvrml/x3d_interpolation.cpp: Added file; + Interpolation component node implementations that aren't VRML97 + nodes. + * src/libopenvrml/openvrml/x3d_interpolation.h: Added file; expose + node_class registration function. + 2006-04-20 Braden McDaniel <br...@en...> |