From: Braden M. <br...@us...> - 2007-07-01 02:07:37
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21147/src/libopenvrml/openvrml Modified Files: node.cpp node.h vrml97node.cpp Log Message: Expose common attributes of lighting nodes via openvrml::light_node. Index: node.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** node.h 1 Jun 2007 05:34:02 -0000 1.60 --- node.h 1 Jul 2007 01:38:40 -0000 1.61 *************** *** 1046,1049 **** --- 1046,1054 ---- virtual ~light_node() OPENVRML_NOTHROW = 0; + float ambient_intensity() const OPENVRML_NOTHROW; + float intensity() const OPENVRML_NOTHROW; + bool on() const OPENVRML_NOTHROW; + const openvrml::color & color() const OPENVRML_NOTHROW; + protected: light_node(const node_type & type, *************** *** 1053,1056 **** --- 1058,1066 ---- private: virtual light_node * to_light() OPENVRML_NOTHROW; + + virtual float do_ambient_intensity() const OPENVRML_NOTHROW = 0; + virtual float do_intensity() const OPENVRML_NOTHROW = 0; + virtual bool do_on() const OPENVRML_NOTHROW = 0; + virtual const openvrml::color & do_color() const OPENVRML_NOTHROW = 0; }; Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** vrml97node.cpp 21 Jun 2007 20:53:18 -0000 1.131 --- vrml97node.cpp 1 Jul 2007 01:38:40 -0000 1.132 *************** *** 1585,1597 **** virtual ~abstract_light_node() OPENVRML_NOTHROW = 0; - float ambient_intensity() const OPENVRML_NOTHROW; - float intensity() const OPENVRML_NOTHROW; - bool on() const OPENVRML_NOTHROW; - const openvrml::color & color() const OPENVRML_NOTHROW; - protected: abstract_light_node( const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); }; --- 1585,1598 ---- virtual ~abstract_light_node() OPENVRML_NOTHROW = 0; protected: abstract_light_node( const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); + + private: + virtual float do_ambient_intensity() const OPENVRML_NOTHROW; + virtual float do_intensity() const OPENVRML_NOTHROW; + virtual bool do_on() const OPENVRML_NOTHROW; + virtual const openvrml::color & do_color() const OPENVRML_NOTHROW; }; *************** *** 1654,1660 **** */ template <typename Derived> ! float abstract_light_node<Derived>::ambient_intensity() const OPENVRML_NOTHROW { ! return this->ambient_intensity_.sffloat::value; } --- 1655,1662 ---- */ template <typename Derived> ! float abstract_light_node<Derived>::do_ambient_intensity() const ! OPENVRML_NOTHROW { ! return this->ambient_intensity_.sffloat::value(); } *************** *** 1665,1671 **** */ template <typename Derived> ! float abstract_light_node<Derived>::intensity() const OPENVRML_NOTHROW { ! return this->intensity_.sffloat::value; } --- 1667,1673 ---- */ template <typename Derived> ! float abstract_light_node<Derived>::do_intensity() const OPENVRML_NOTHROW { ! return this->intensity_.sffloat::value(); } *************** *** 1676,1682 **** */ template <typename Derived> ! bool abstract_light_node<Derived>::on() const OPENVRML_NOTHROW { ! return this->on_.sfbool::value; } --- 1678,1684 ---- */ template <typename Derived> ! bool abstract_light_node<Derived>::do_on() const OPENVRML_NOTHROW { ! return this->on_.sfbool::value(); } *************** *** 1688,1694 **** template <typename Derived> const openvrml::color & ! abstract_light_node<Derived>::color() const OPENVRML_NOTHROW { ! return this->color_.sfcolor::value; } --- 1690,1696 ---- template <typename Derived> const openvrml::color & ! abstract_light_node<Derived>::do_color() const OPENVRML_NOTHROW { ! return this->color_.sfcolor::value(); } Index: node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.cpp,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** node.cpp 1 Jun 2007 05:34:02 -0000 1.93 --- node.cpp 1 Jul 2007 01:38:40 -0000 1.94 *************** *** 1471,1475 **** * @var class openvrml::node::exposedfield<sfbool> * ! * @brief <code>sfbool</code> <code>exposedfield</code>. */ --- 1471,1475 ---- * @var class openvrml::node::exposedfield<sfbool> * ! * @brief @c sfbool @c exposedfield. */ [...1443 lines suppressed...] --- 4568,4573 ---- * @brief Construct. * ! * @param[in] type the @c node_type associated with the @c node. ! * @param[in] scope the @c scope the @c node belongs to. */ openvrml::texture_transform_node:: *************** *** 4563,4567 **** * @brief Update with the current time. * ! * This function delegates to @c time_dependent_node::do_update. * * @param[in] time the current time. --- 4643,4647 ---- * @brief Update with the current time. * ! * This function delegates to @c #do_update. * * @param[in] time the current time. |