|
From: <br...@us...> - 2009-03-30 02:30:24
|
Revision: 3873
http://openvrml.svn.sourceforge.net/openvrml/?rev=3873&view=rev
Author: braden
Date: 2009-03-30 02:30:12 +0000 (Mon, 30 Mar 2009)
Log Message:
-----------
Use the nonvirtual interface pattern consistently with the abstract node types.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/browser.cpp
trunk/src/libopenvrml/openvrml/node.cpp
trunk/src/libopenvrml/openvrml/node.h
trunk/src/node/vrml97/abstract_texture.h
trunk/src/node/vrml97/appearance.cpp
trunk/src/node/vrml97/color.cpp
trunk/src/node/vrml97/coordinate.cpp
trunk/src/node/vrml97/font_style.cpp
trunk/src/node/vrml97/image_texture.cpp
trunk/src/node/vrml97/material.cpp
trunk/src/node/vrml97/movie_texture.cpp
trunk/src/node/vrml97/navigation_info.cpp
trunk/src/node/vrml97/navigation_info.h
trunk/src/node/vrml97/normal.cpp
trunk/src/node/vrml97/pixel_texture.cpp
trunk/src/node/vrml97/texture_coordinate.cpp
trunk/src/node/vrml97/transform.cpp
trunk/src/node/vrml97/viewpoint.cpp
trunk/src/node/vrml97/viewpoint.h
trunk/src/node/x3d-rendering/color_rgba.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/ChangeLog 2009-03-30 02:30:12 UTC (rev 3873)
@@ -1,5 +1,31 @@
2009-03-29 Braden McDaniel <br...@en...>
+ Use the nonvirtual interface pattern consistently with the
+ abstract node types.
+
+ * src/libopenvrml/openvrml/browser.cpp
+ * src/libopenvrml/openvrml/node.cpp
+ * src/libopenvrml/openvrml/node.h
+ * src/node/vrml97/material.cpp
+ * src/node/vrml97/movie_texture.cpp
+ * src/node/vrml97/navigation_info.cpp
+ * src/node/vrml97/color.cpp
+ * src/node/vrml97/coordinate.cpp
+ * src/node/vrml97/viewpoint.h
+ * src/node/vrml97/image_texture.cpp
+ * src/node/vrml97/navigation_info.h
+ * src/node/vrml97/appearance.cpp
+ * src/node/vrml97/pixel_texture.cpp
+ * src/node/vrml97/texture_coordinate.cpp
+ * src/node/vrml97/transform.cpp
+ * src/node/vrml97/font_style.cpp
+ * src/node/vrml97/normal.cpp
+ * src/node/vrml97/viewpoint.cpp
+ * src/node/vrml97/abstract_texture.h
+ * src/node/x3d-rendering/color_rgba.cpp
+
+2009-03-29 Braden McDaniel <br...@en...>
+
* src/libopenvrml-control/openvrml_control/browser.cpp
(openvrml_control::browser::uninitialized_plugin_streambuf_map::map_entry_matches_streambuf):
Applied OPENVRML_LOCAL.
Modified: trunk/src/libopenvrml/openvrml/browser.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/libopenvrml/openvrml/browser.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -96,13 +96,6 @@
OPENVRML_NOTHROW;
virtual ~default_navigation_info() OPENVRML_NOTHROW;
- virtual const std::vector<float> & avatar_size() const
- OPENVRML_NOTHROW;
- virtual bool headlight() const OPENVRML_NOTHROW;
- virtual float speed() const OPENVRML_NOTHROW;
- virtual const std::vector<std::string> & type() const OPENVRML_NOTHROW;
- virtual float visibility_limit() const OPENVRML_NOTHROW;
-
private:
virtual void do_field(const std::string & id,
const openvrml::field_value & value)
@@ -124,6 +117,14 @@
virtual openvrml::event_emitter &
do_event_emitter(const std::string & id)
OPENVRML_THROW1(openvrml::unsupported_interface);
+
+ virtual const std::vector<float> & do_avatar_size() const
+ OPENVRML_NOTHROW;
+ virtual bool do_headlight() const OPENVRML_NOTHROW;
+ virtual float do_speed() const OPENVRML_NOTHROW;
+ virtual const std::vector<std::string> & do_type() const
+ OPENVRML_NOTHROW;
+ virtual float do_visibility_limit() const OPENVRML_NOTHROW;
};
const boost::shared_ptr<openvrml::scope> null_scope_ptr;
@@ -153,7 +154,7 @@
*
* @return [0.25, 1.6, 0.75]
*/
- const std::vector<float> & default_navigation_info::avatar_size() const
+ const std::vector<float> & default_navigation_info::do_avatar_size() const
OPENVRML_NOTHROW
{
static const float array[] = { 0.25f, 1.6f, 0.75f };
@@ -166,7 +167,7 @@
*
* @return @c true
*/
- bool default_navigation_info::headlight() const OPENVRML_NOTHROW
+ bool default_navigation_info::do_headlight() const OPENVRML_NOTHROW
{
return true;
}
@@ -176,7 +177,7 @@
*
* @return 1.0
*/
- float default_navigation_info::speed() const OPENVRML_NOTHROW
+ float default_navigation_info::do_speed() const OPENVRML_NOTHROW
{
return 1.0;
}
@@ -186,7 +187,7 @@
*
* @return ["WALK", "ANY"]
*/
- const std::vector<std::string> & default_navigation_info::type() const
+ const std::vector<std::string> & default_navigation_info::do_type() const
OPENVRML_NOTHROW
{
static const char * array[] = { "WALK", "ANY" };
@@ -199,7 +200,7 @@
*
* @return 0.0
*/
- float default_navigation_info::visibility_limit() const OPENVRML_NOTHROW
+ float default_navigation_info::do_visibility_limit() const OPENVRML_NOTHROW
{
return 0.0;
}
@@ -265,15 +266,6 @@
OPENVRML_NOTHROW;
virtual ~default_viewpoint() OPENVRML_NOTHROW;
- virtual const openvrml::mat4f & transformation() const
- OPENVRML_NOTHROW;
- virtual const openvrml::mat4f & user_view_transform() const
- OPENVRML_NOTHROW;
- virtual void user_view_transform(const openvrml::mat4f & transform)
- OPENVRML_NOTHROW;
- virtual const std::string & description() const OPENVRML_NOTHROW;
- virtual float field_of_view() const OPENVRML_NOTHROW;
-
private:
virtual void do_field(const std::string & id,
const openvrml::field_value & value)
@@ -295,6 +287,15 @@
virtual openvrml::event_emitter &
do_event_emitter(const std::string & id)
OPENVRML_THROW1(openvrml::unsupported_interface);
+
+ virtual const openvrml::mat4f & do_transformation() const
+ OPENVRML_NOTHROW;
+ virtual const openvrml::mat4f & do_user_view_transform() const
+ OPENVRML_NOTHROW;
+ virtual void do_user_view_transform(const openvrml::mat4f & transform)
+ OPENVRML_NOTHROW;
+ virtual const std::string & do_description() const OPENVRML_NOTHROW;
+ virtual float do_field_of_view() const OPENVRML_NOTHROW;
};
/**
@@ -317,7 +318,7 @@
default_viewpoint::~default_viewpoint() OPENVRML_NOTHROW
{}
- const openvrml::mat4f & default_viewpoint::transformation() const
+ const openvrml::mat4f & default_viewpoint::do_transformation() const
OPENVRML_NOTHROW
{
using openvrml::mat4f;
@@ -338,26 +339,27 @@
return t;
}
- const openvrml::mat4f & default_viewpoint::user_view_transform() const
+ const openvrml::mat4f & default_viewpoint::do_user_view_transform() const
OPENVRML_NOTHROW
{
return this->userViewTransform;
}
void
- default_viewpoint::user_view_transform(const openvrml::mat4f & transform)
+ default_viewpoint::do_user_view_transform(const openvrml::mat4f & transform)
OPENVRML_NOTHROW
{
this->userViewTransform = transform;
}
- const std::string & default_viewpoint::description() const OPENVRML_NOTHROW
+ const std::string & default_viewpoint::do_description() const
+ OPENVRML_NOTHROW
{
static const std::string desc;
return desc;
}
- float default_viewpoint::field_of_view() const OPENVRML_NOTHROW
+ float default_viewpoint::do_field_of_view() const OPENVRML_NOTHROW
{
static const float fieldOfView = 0.785398f;
return fieldOfView;
Modified: trunk/src/libopenvrml/openvrml/node.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/node.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/libopenvrml/openvrml/node.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -3195,6 +3195,17 @@
}
/**
+ * @brief Get the material node associated with this appearance node.
+ *
+ * @return the @c material_node associated with this @c appearance_node.
+ */
+const boost::intrusive_ptr<openvrml::node> &
+openvrml::appearance_node::material() const OPENVRML_NOTHROW
+{
+ return this->do_material();
+}
+
+/**
* @fn const boost::intrusive_ptr<openvrml::node> & openvrml::appearance_node::material() const
*
* @brief Get the material node associated with this appearance node.
@@ -3203,6 +3214,17 @@
*/
/**
+ * @brief Get the texture node associated with this appearance node.
+ *
+ * @return the @c texture_node associated with this @c appearance_node.
+ */
+const boost::intrusive_ptr<openvrml::node> &
+openvrml::appearance_node::texture() const OPENVRML_NOTHROW
+{
+ return this->do_texture();
+}
+
+/**
* @fn const boost::intrusive_ptr<openvrml::node> & openvrml::appearance_node::texture() const
*
* @brief Get the texture node associated with this appearance node.
@@ -3211,6 +3233,18 @@
*/
/**
+ * @brief Get the texture transform node associated with this appearance node.
+ *
+ * @return the @c texture_transform_node associated with this
+ * @c appearance_node.
+ */
+const boost::intrusive_ptr<openvrml::node> &
+openvrml::appearance_node::texture_transform() const OPENVRML_NOTHROW
+{
+ return this->do_texture_transform();
+}
+
+/**
* @fn const boost::intrusive_ptr<openvrml::node> & openvrml::appearance_node::texture_transform() const
*
* @brief Get the texture transform node associated with this appearance node.
@@ -3514,8 +3548,21 @@
}
/**
- * @fn const std::vector<openvrml::color> & openvrml::color_node::color() const
+ * @brief Get the color array encapsulated by this node.
*
+ * This function delegates to @c #do_color.
+ *
+ * @return the color array for this node.
+ */
+const std::vector<openvrml::color> & openvrml::color_node::color() const
+ OPENVRML_NOTHROW
+{
+ return this->do_color();
+}
+
+/**
+ * @fn const std::vector<openvrml::color> & openvrml::color_node::do_color() const
+ *
* @brief Get the color array encapsulated by this node.
*
* @return the color array for this node.
@@ -3559,8 +3606,21 @@
}
/**
- * @fn const std::vector<openvrml::color_rgba> & openvrml::color_rgba_node::color_rgba() const
+ * @brief Get the @c color_rgba array encapsulated by this @c node.
*
+ * This function delegates to @c #do_color.
+ *
+ * @return the @c color_rgba array for this @c node.
+ */
+const std::vector<openvrml::color_rgba> &
+openvrml::color_rgba_node::color_rgba() const OPENVRML_NOTHROW
+{
+ return this->do_color_rgba();
+}
+
+/**
+ * @fn const std::vector<openvrml::color_rgba> & openvrml::color_rgba_node::do_color_rgba() const
+ *
* @brief Get the @c color_rgba array encapsulated by this @c node.
*
* @return the @c color_rgba array for this @c node.
@@ -3604,8 +3664,21 @@
}
/**
- * @fn const std::vector<openvrml::vec3f> & openvrml::coordinate_node::point() const
+ * @brief Get the points encapsulated by this node.
*
+ * This function delegates to @c #do_point.
+ *
+ * @return the array of points for this node.
+ */
+const std::vector<openvrml::vec3f> & openvrml::coordinate_node::point() const
+ OPENVRML_NOTHROW
+{
+ return this->do_point();
+}
+
+/**
+ * @fn const std::vector<openvrml::vec3f> & openvrml::coordinate_node::do_point() const
+ *
* @brief Get the points encapsulated by this node.
*
* @return the array of points for this node.
@@ -3649,16 +3722,43 @@
}
/**
- * @fn const std::vector<std::string> & openvrml::font_style_node::family() const
+ * @brief Get the list of font families.
*
+ * This function delegates to @c #do_family.
+ *
+ * @return the font families that may be used for this FontStyle.
+ */
+const std::vector<std::string> & openvrml::font_style_node::family() const
+ OPENVRML_NOTHROW
+{
+ return this->do_family();
+}
+
+/**
+ * @fn const std::vector<std::string> & openvrml::font_style_node::do_family() const
+ *
* @brief Get the list of font families.
*
* @return the font families that may be used for this FontStyle.
*/
/**
- * @fn bool openvrml::font_style_node::horizontal() const
+ * @brief Get the flag indicating whether the text should be horizontal or
+ * vertical.
*
+ * This function delegates to @c #do_horizontal.
+ *
+ * @return @c true if the text should be horizontal, or @c false if the text
+ * should be vertical.
+ */
+bool openvrml::font_style_node::horizontal() const OPENVRML_NOTHROW
+{
+ return this->do_horizontal();
+}
+
+/**
+ * @fn bool openvrml::font_style_node::do_horizontal() const
+ *
* @brief Get the flag indicating whether the text should be horizontal or
* vertical.
*
@@ -3667,24 +3767,63 @@
*/
/**
- * @fn const std::vector<std::string> & openvrml::font_style_node::justify() const
+ * @brief Get the descriptor for the text justification.
*
+ * This function delegates to @c #do_justify.
+ *
+ * @return the characteristics of the text justification.
+ */
+const std::vector<std::string> & openvrml::font_style_node::justify() const
+ OPENVRML_NOTHROW
+{
+ return this->do_justify();
+}
+
+/**
+ * @fn const std::vector<std::string> & openvrml::font_style_node::do_justify() const
+ *
* @brief Get the descriptor for the text justification.
*
* @return the characteristics of the text justification.
*/
/**
- * @fn const std::string & openvrml::font_style_node::language() const
+ * @brief Get the language code.
*
+ * This function delegates to @c #do_language.
+ *
+ * @return the language code.
+ */
+const std::string & openvrml::font_style_node::language() const OPENVRML_NOTHROW
+{
+ return this->do_language();
+}
+
+/**
+ * @fn const std::string & openvrml::font_style_node::do_language() const
+ *
* @brief Get the language code.
*
* @return the language code.
*/
/**
- * @fn bool openvrml::font_style_node::left_to_right() const
+ * @brief Get the flag indicating whether the text should be rendered
+ * left-to-right.
*
+ * This function delegates to @c #do_left_to_right.
+ *
+ * @return @c true if the text should be rendered left-to-right, or @c false if
+ * the text should be rendered right-to-left.
+ */
+bool openvrml::font_style_node::left_to_right() const OPENVRML_NOTHROW
+{
+ return this->do_left_to_right();
+}
+
+/**
+ * @fn bool openvrml::font_style_node::do_left_to_right() const
+ *
* @brief Get the flag indicating whether the text should be rendered
* left-to-right.
*
@@ -3693,32 +3832,82 @@
*/
/**
- * @fn float openvrml::font_style_node::size() const
+ * @brief Get the size of the text.
*
+ * This function delegates to @c #do_size.
+ *
+ * @return the size of the text.
+ */
+float openvrml::font_style_node::size() const OPENVRML_NOTHROW
+{
+ return this->do_size();
+}
+
+/**
+ * @fn float openvrml::font_style_node::do_size() const
+ *
* @brief Get the size of the text.
*
* @return the size of the text.
*/
/**
- * @fn float openvrml::font_style_node::spacing() const
+ * @brief Get the spacing for the text.
*
+ * This function delegates to @c #do_spacing.
+ *
+ * @return the spacing for the text.
+ */
+float openvrml::font_style_node::spacing() const OPENVRML_NOTHROW
+{
+ return this->do_spacing();
+}
+
+/**
+ * @fn float openvrml::font_style_node::do_spacing() const
+ *
* @brief Get the spacing for the text.
*
* @return the spacing for the text.
*/
/**
- * @fn const std::string & openvrml::font_style_node::style() const
+ * @brief Get the style for the text.
*
+ * This function delegates to @c #do_style.
+ *
+ * @return the text style.
+ */
+const std::string & openvrml::font_style_node::style() const OPENVRML_NOTHROW
+{
+ return this->do_style();
+}
+
+/**
+ * @fn const std::string & openvrml::font_style_node::do_style() const
+ *
* @brief Get the style for the text.
*
* @return the text style.
*/
/**
- * @fn bool openvrml::font_style_node::top_to_bottom() const
+ * @brief Get the flag indicating whether the text should be rendered
+ * top-to-bottom.
*
+ * This function delegates to @c #do_top_to_bottom.
+ *
+ * @return @c true if the text should be rendered top-to-bottom, or @c false if
+ * the text should be rendered bottom-to-top.
+ */
+bool openvrml::font_style_node::top_to_bottom() const OPENVRML_NOTHROW
+{
+ return this->do_top_to_bottom();
+}
+
+/**
+ * @fn bool openvrml::font_style_node::do_top_to_bottom() const
+ *
* @brief Get the flag indicating whether the text should be rendered
* top-to-bottom.
*
@@ -3866,6 +4055,18 @@
const openvrml::color_node * openvrml::geometry_node::color() const
OPENVRML_NOTHROW
{
+ return this->do_color();
+}
+
+/**
+ * @brief Get the color node (if any) associated with this geometry.
+ *
+ * @return the @c color_node associated associated with this geometry, or 0 if
+ * there is no such node.
+ */
+const openvrml::color_node * openvrml::geometry_node::do_color() const
+ OPENVRML_NOTHROW
+{
return 0;
}
@@ -4125,48 +4326,123 @@
}
/**
- * @fn float openvrml::material_node::ambient_intensity() const
+ * @brief Get the ambient intensity.
*
+ * This function delegates to @c #do_ambient_intensity.
+ *
+ * @return the ambient intensity.
+ */
+float openvrml::material_node::ambient_intensity() const OPENVRML_NOTHROW
+{
+ return this->do_ambient_intensity();
+}
+
+/**
+ * @fn float openvrml::material_node::do_ambient_intensity() const
+ *
* @brief Get the ambient intensity.
*
* @return the ambient intensity.
*/
/**
- * @fn const openvrml::color & openvrml::material_node::diffuse_color() const
+ * @brief Get the diffuse color.
*
+ * This function delegatest to @c #do_diffuse_color.
+ *
+ * @return the diffuse color.
+ */
+const openvrml::color & openvrml::material_node::diffuse_color() const
+ OPENVRML_NOTHROW
+{
+ return this->do_diffuse_color();
+}
+
+/**
+ * @fn const openvrml::color & openvrml::material_node::do_diffuse_color() const
+ *
* @brief Get the diffuse color.
*
* @return the diffuse color.
*/
/**
- * @fn const openvrml::color & openvrml::material_node::emissive_color() const
+ * @brief Get the emissive color.
*
+ * This function delegates to @c #do_emissive_color.
+ *
+ * @return the emissive color.
+ */
+const openvrml::color & openvrml::material_node::emissive_color() const
+ OPENVRML_NOTHROW
+{
+ return this->do_emissive_color();
+}
+
+/**
+ * @fn const openvrml::color & openvrml::material_node::do_emissive_color() const
+ *
* @brief Get the emissive color.
*
* @return the emissive color.
*/
/**
- * @fn float openvrml::material_node::shininess() const
+ * @brief Get the shininess.
*
+ * This function delegates to @c #do_shininess.
+ *
+ * @return the shininess.
+ */
+float openvrml::material_node::shininess() const OPENVRML_NOTHROW
+{
+ return this->do_shininess();
+}
+
+/**
+ * @fn float openvrml::material_node::do_shininess() const
+ *
* @brief Get the shininess.
*
* @return the shininess.
*/
/**
- * @fn const openvrml::color & openvrml::material_node::specular_color() const
+ * @brief Get the specular color.
*
+ * This function delegates to @c #do_specular_color.
+ *
+ * @return the specular color.
+ */
+const openvrml::color & openvrml::material_node::specular_color() const
+ OPENVRML_NOTHROW
+{
+ return this->do_specular_color();
+}
+
+/**
+ * @fn const openvrml::color & openvrml::material_node::do_specular_color() const
+ *
* @brief Get the specular color.
*
* @return the specular color.
*/
/**
- * @fn float openvrml::material_node::transparency() const
+ * @brief Get the transparency.
*
+ * This function delegates to @c #do_transparency.
+ *
+ * @return the transparency.
+ */
+float openvrml::material_node::transparency() const OPENVRML_NOTHROW
+{
+ return this->do_transparency();
+}
+
+/**
+ * @fn float openvrml::material_node::do_transparency() const
+ *
* @brief Get the transparency.
*
* @return the transparency.
@@ -4212,40 +4488,102 @@
}
/**
- * @fn const std::vector<float> & openvrml::navigation_info_node::avatar_size() const
+ * @brief Get the avatar dimensions.
*
+ * This function delegates to @c #do_avatar_size.
+ *
+ * @return the avatar dimensions.
+ */
+const std::vector<float> & openvrml::navigation_info_node::avatar_size() const
+ OPENVRML_NOTHROW
+{
+ return this->do_avatar_size();
+}
+
+/**
+ * @fn const std::vector<float> & openvrml::navigation_info_node::do_avatar_size() const
+ *
* @brief Get the avatar dimensions.
*
* @return the avatar dimensions.
*/
/**
- * @fn bool openvrml::navigation_info_node::headlight() const
+ * @brief Get the state of the headlight.
*
+ * This function delegates to @c #do_headlight.
+ *
+ * @return @c true if the headlight is on; @c false otherwise.
+ */
+bool openvrml::navigation_info_node::headlight() const OPENVRML_NOTHROW
+{
+ return this->do_headlight();
+}
+
+/**
+ * @fn bool openvrml::navigation_info_node::do_headlight() const
+ *
* @brief Get the state of the headlight.
*
* @return @c true if the headlight is on; @c false otherwise.
*/
/**
- * @fn float openvrml::navigation_info_node::speed() const
+ * @brief Get the current speed of the user view.
*
+ * This function delegates to @c #do_speed.
+ *
+ * @return the current speed of the user view.
+ */
+float openvrml::navigation_info_node::speed() const OPENVRML_NOTHROW
+{
+ return this->do_speed();
+}
+
+/**
+ * @fn float openvrml::navigation_info_node::do_speed() const
+ *
* @brief Get the current speed of the user view.
*
* @return the current speed of the user view.
*/
/**
- * @fn const std::vector<std::string> & openvrml::navigation_info_node::type() const
+ * @brief Get the navigation type.
*
+ * This function delegates to @c do_type.
+ *
+ * @return the navigation type.
+ */
+const std::vector<std::string> & openvrml::navigation_info_node::type() const
+ OPENVRML_NOTHROW
+{
+ return this->do_type();
+}
+
+/**
+ * @fn const std::vector<std::string> & openvrml::navigation_info_node::do_type() const
+ *
* @brief Get the navigation type.
*
* @return the navigation type.
*/
/**
- * @fn float openvrml::navigation_info_node::visibility_limit() const
+ * @brief Get the visibility limit.
*
+ * This function delegates to @c #do_visibility_limit.
+ *
+ * @return the visibility limit.
+ */
+float openvrml::navigation_info_node::visibility_limit() const OPENVRML_NOTHROW
+{
+ return this->do_visibility_limit();
+}
+
+/**
+ * @fn float openvrml::navigation_info_node::do_visibility_limit() const
+ *
* @brief Get the visibility limit.
*
* @return the visibility limit.
@@ -4288,8 +4626,21 @@
}
/**
- * @fn const std::vector<openvrml::vec3f> & openvrml::normal_node::vector() const
+ * @brief Get the array of normal vectors.
*
+ * This function delegates to @c #do_vector.
+ *
+ * @return the array of normal vectors.
+ */
+const std::vector<openvrml::vec3f> & openvrml::normal_node::vector() const
+ OPENVRML_NOTHROW
+{
+ return this->do_vector();
+}
+
+/**
+ * @fn const std::vector<openvrml::vec3f> & openvrml::normal_node::do_vector() const
+ *
* @brief Get the array of normal vectors.
*
* @return the array of normal vectors.
@@ -4571,17 +4922,45 @@
return this;
}
+
/**
- * @fn const openvrml::image & openvrml::texture_node::image() const
+ * @brief The image.
*
+ * This function delegates to @c #do_image.
+ *
+ * @return the image.
+ */
+const openvrml::image & openvrml::texture_node::image() const
+ OPENVRML_NOTHROW
+{
+ return this->do_image();
+}
+
+/**
+ * @fn const openvrml::image & openvrml::texture_node::do_image() const
+ *
* @brief The image.
*
* @return the image.
*/
/**
- * @fn bool openvrml::texture_node::repeat_s() const
+ * @brief Get the flag indicating whether the texture should repeat in the
+ * <var>S</var> direction.
*
+ * This function delegates to @c #do_repeat_s.
+ *
+ * @return @c true if the image should repeat in the <var>S</var> direction,
+ * @c false otherwise.
+ */
+bool openvrml::texture_node::repeat_s() const OPENVRML_NOTHROW
+{
+ return this->do_repeat_s();
+}
+
+/**
+ * @fn bool openvrml::texture_node::do_repeat_s() const
+ *
* @brief Get the flag indicating whether the texture should repeat in the
* <var>S</var> direction.
*
@@ -4590,8 +4969,22 @@
*/
/**
- * @fn bool openvrml::texture_node::repeat_t() const
+ * @brief Get the flag indicating whether the texture should repeat in the
+ * <var>T</var> direction.
*
+ * This function delegates to @c #do_repeat_t.
+ *
+ * @return @c true if the image should repeat in the <var>T</var> direction,
+ * @c false otherwise.
+ */
+bool openvrml::texture_node::repeat_t() const OPENVRML_NOTHROW
+{
+ return this->do_repeat_t();
+}
+
+/**
+ * @fn bool openvrml::texture_node::do_repeat_t() const
+ *
* @brief Get the flag indicating whether the texture should repeat in the
* <var>T</var> direction.
*
@@ -4638,8 +5031,21 @@
}
/**
- * @fn const std::vector<openvrml::vec2f> & openvrml::texture_coordinate_node::point() const
+ * @brief The texture coordinates.
*
+ * This function delegates to @c #do_point.
+ *
+ * @return the texture coordinates.
+ */
+const std::vector<openvrml::vec2f> &
+openvrml::texture_coordinate_node::point() const OPENVRML_NOTHROW
+{
+ return this->do_point();
+}
+
+/**
+ * @fn const std::vector<openvrml::vec2f> & openvrml::texture_coordinate_node::do_point() const
+ *
* @brief The texture coordinates.
*
* @return the texture coordinates.
@@ -4802,8 +5208,21 @@
}
/**
- * @fn const openvrml::mat4f & openvrml::transform_node::transform() const
+ * @brief Get the transformation associated with the @c node as a matrix.
*
+ * This function delegates to @c #do_transform.
+ *
+ * @return the transformation associated with the @c node.
+ */
+const openvrml::mat4f & openvrml::transform_node::transform() const
+ OPENVRML_NOTHROW
+{
+ return this->do_transform();
+}
+
+/**
+ * @fn const openvrml::mat4f & openvrml::transform_node::do_transform() const
+ *
* @brief Get the transformation associated with the @c node as a matrix.
*
* @return the transformation associated with the @c node.
@@ -4849,8 +5268,23 @@
}
/**
- * @fn const openvrml::mat4f & openvrml::viewpoint_node::transformation() const
+ * @brief Get the transformation of the @c viewpoint_node in the global
+ * coordinate system.
*
+ * This function delegates to @c #do_transformation.
+ *
+ * @return the transformation of the @c viewpoint_node in the global coordinate
+ * system.
+ */
+const openvrml::mat4f & openvrml::viewpoint_node::transformation() const
+ OPENVRML_NOTHROW
+{
+ return this->do_transformation();
+}
+
+/**
+ * @fn const openvrml::mat4f & openvrml::viewpoint_node::do_transformation() const
+ *
* @brief Get the transformation of the @c viewpoint_node in the global
* coordinate system.
*
@@ -4859,8 +5293,23 @@
*/
/**
- * @fn const openvrml::mat4f & openvrml::viewpoint_node::user_view_transform() const
+ * @brief Get the transformation of the user view relative to the
+ * @c viewpoint_node.
*
+ * This function delegates to @c #do_user_view_transform().
+ *
+ * @return the transformation of the user view relative to the
+ * @c viewpoint_node.
+ */
+const openvrml::mat4f & openvrml::viewpoint_node::user_view_transform() const
+ OPENVRML_NOTHROW
+{
+ return this->do_user_view_transform();
+}
+
+/**
+ * @fn const openvrml::mat4f & openvrml::viewpoint_node::do_user_view_transform() const
+ *
* @brief Get the transformation of the user view relative to the
* @c viewpoint_node.
*
@@ -4869,8 +5318,22 @@
*/
/**
- * @fn void openvrml::viewpoint_node::user_view_transform(const mat4f & transform)
+ * @brief Set the transformation of the user view relative to the
+ * @c viewpoint_node.
*
+ * This function delegates to @c #do_user_view_transform(const mat4f &).
+ *
+ * @param[in] transform the new transformation.
+ */
+void openvrml::viewpoint_node::user_view_transform(const mat4f & transform)
+ OPENVRML_NOTHROW
+{
+ this->do_user_view_transform(transform);
+}
+
+/**
+ * @fn void openvrml::viewpoint_node::do_user_view_transform(const mat4f & transform)
+ *
* @brief Set the transformation of the user view relative to the
* @c viewpoint_node.
*
@@ -4878,16 +5341,41 @@
*/
/**
- * @fn const std::string & openvrml::viewpoint_node::description() const
+ * @brief Get the description.
*
+ * This function delegates to @c #do_description.
+ *
+ * @return the description.
+ */
+const std::string & openvrml::viewpoint_node::description() const
+ OPENVRML_NOTHROW
+{
+ return this->do_description();
+}
+
+/**
+ * @fn const std::string & openvrml::viewpoint_node::do_description() const
+ *
* @brief Get the description.
*
* @return the description.
*/
/**
- * @fn float openvrml::viewpoint_node::field_of_view() const
+ * @brief Get the field of view.
*
+ * This function delegates to @c #do_field_of_view.
+ *
+ * @return the field of view in radians.
+ */
+float openvrml::viewpoint_node::field_of_view() const OPENVRML_NOTHROW
+{
+ return this->do_field_of_view();
+}
+
+/**
+ * @fn float openvrml::viewpoint_node::do_field_of_view() const
+ *
* @brief Get the field of view.
*
* @return the field of view in radians.
Modified: trunk/src/libopenvrml/openvrml/node.h
===================================================================
--- trunk/src/libopenvrml/openvrml/node.h 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/libopenvrml/openvrml/node.h 2009-03-30 02:30:12 UTC (rev 3873)
@@ -884,12 +884,10 @@
void render_appearance(viewer & v, rendering_context context);
- virtual const boost::intrusive_ptr<node> & material() const
- OPENVRML_NOTHROW = 0;
- virtual const boost::intrusive_ptr<node> & texture() const
- OPENVRML_NOTHROW = 0;
- virtual const boost::intrusive_ptr<node> & texture_transform() const
- OPENVRML_NOTHROW = 0;
+ const boost::intrusive_ptr<node> & material() const OPENVRML_NOTHROW;
+ const boost::intrusive_ptr<node> & texture() const OPENVRML_NOTHROW;
+ const boost::intrusive_ptr<node> & texture_transform() const
+ OPENVRML_NOTHROW;
protected:
appearance_node(const node_type & type,
@@ -899,6 +897,12 @@
private:
virtual appearance_node * to_appearance() OPENVRML_NOTHROW;
+ virtual const boost::intrusive_ptr<node> & do_material() const
+ OPENVRML_NOTHROW = 0;
+ virtual const boost::intrusive_ptr<node> & do_texture() const
+ OPENVRML_NOTHROW = 0;
+ virtual const boost::intrusive_ptr<node> & do_texture_transform() const
+ OPENVRML_NOTHROW = 0;
virtual void do_render_appearance(viewer & v,
rendering_context context);
};
@@ -953,8 +957,7 @@
public:
virtual ~color_node() OPENVRML_NOTHROW = 0;
- virtual const std::vector<openvrml::color> & color() const
- OPENVRML_NOTHROW = 0;
+ const std::vector<openvrml::color> & color() const OPENVRML_NOTHROW;
protected:
color_node(const node_type & type,
@@ -963,6 +966,9 @@
private:
virtual color_node * to_color() OPENVRML_NOTHROW;
+
+ virtual const std::vector<openvrml::color> & do_color() const
+ OPENVRML_NOTHROW = 0;
};
@@ -970,8 +976,8 @@
public:
virtual ~color_rgba_node() OPENVRML_NOTHROW = 0;
- virtual const std::vector<openvrml::color_rgba> & color_rgba() const
- OPENVRML_NOTHROW = 0;
+ const std::vector<openvrml::color_rgba> & color_rgba() const
+ OPENVRML_NOTHROW;
protected:
color_rgba_node(const node_type & type,
@@ -980,6 +986,9 @@
private:
virtual color_rgba_node * to_color_rgba() OPENVRML_NOTHROW;
+
+ virtual const std::vector<openvrml::color_rgba> & do_color_rgba() const
+ OPENVRML_NOTHROW = 0;
};
@@ -987,7 +996,7 @@
public:
virtual ~coordinate_node() OPENVRML_NOTHROW = 0;
- virtual const std::vector<vec3f> & point() const OPENVRML_NOTHROW = 0;
+ const std::vector<vec3f> & point() const OPENVRML_NOTHROW;
protected:
coordinate_node(const node_type & type,
@@ -996,6 +1005,9 @@
private:
virtual coordinate_node * to_coordinate() OPENVRML_NOTHROW;
+
+ virtual const std::vector<vec3f> & do_point() const
+ OPENVRML_NOTHROW = 0;
};
@@ -1003,17 +1015,15 @@
public:
virtual ~font_style_node() OPENVRML_NOTHROW = 0;
- virtual const std::vector<std::string> & family() const
- OPENVRML_NOTHROW = 0;
- virtual bool horizontal() const OPENVRML_NOTHROW = 0;
- virtual const std::vector<std::string> & justify() const
- OPENVRML_NOTHROW = 0;
- virtual const std::string & language() const OPENVRML_NOTHROW = 0;
- virtual bool left_to_right() const OPENVRML_NOTHROW = 0;
- virtual float size() const OPENVRML_NOTHROW = 0;
- virtual float spacing() const OPENVRML_NOTHROW = 0;
- virtual const std::string & style() const OPENVRML_NOTHROW = 0;
- virtual bool top_to_bottom() const OPENVRML_NOTHROW = 0;
+ const std::vector<std::string> & family() const OPENVRML_NOTHROW;
+ bool horizontal() const OPENVRML_NOTHROW;
+ const std::vector<std::string> & justify() const OPENVRML_NOTHROW;
+ const std::string & language() const OPENVRML_NOTHROW;
+ bool left_to_right() const OPENVRML_NOTHROW;
+ float size() const OPENVRML_NOTHROW;
+ float spacing() const OPENVRML_NOTHROW;
+ const std::string & style() const OPENVRML_NOTHROW;
+ bool top_to_bottom() const OPENVRML_NOTHROW;
protected:
font_style_node(const node_type & type,
@@ -1022,6 +1032,18 @@
private:
virtual font_style_node * to_font_style() OPENVRML_NOTHROW;
+
+ virtual const std::vector<std::string> & do_family() const
+ OPENVRML_NOTHROW = 0;
+ virtual bool do_horizontal() const OPENVRML_NOTHROW = 0;
+ virtual const std::vector<std::string> & do_justify() const
+ OPENVRML_NOTHROW = 0;
+ virtual const std::string & do_language() const OPENVRML_NOTHROW = 0;
+ virtual bool do_left_to_right() const OPENVRML_NOTHROW = 0;
+ virtual float do_size() const OPENVRML_NOTHROW = 0;
+ virtual float do_spacing() const OPENVRML_NOTHROW = 0;
+ virtual const std::string & do_style() const OPENVRML_NOTHROW = 0;
+ virtual bool do_top_to_bottom() const OPENVRML_NOTHROW = 0;
};
@@ -1035,7 +1057,7 @@
viewer::object_t render_geometry(viewer & v,
rendering_context context);
bool emissive() const OPENVRML_NOTHROW;
- virtual const color_node * color() const OPENVRML_NOTHROW;
+ const color_node * color() const OPENVRML_NOTHROW;
protected:
geometry_node(const node_type & type,
@@ -1046,6 +1068,7 @@
virtual viewer::object_t
do_render_geometry(viewer & v, rendering_context context);
virtual bool do_emissive() const OPENVRML_NOTHROW;
+ virtual const color_node * do_color() const OPENVRML_NOTHROW;
virtual geometry_node * to_geometry() OPENVRML_NOTHROW;
};
@@ -1069,8 +1092,10 @@
private:
virtual grouping_node * to_grouping() OPENVRML_NOTHROW;
- virtual const std::vector<boost::intrusive_ptr<node> >
- do_children() const OPENVRML_THROW1(std::bad_alloc) = 0;
+
+ virtual
+ const std::vector<boost::intrusive_ptr<node> > do_children() const
+ OPENVRML_THROW1(std::bad_alloc) = 0;
};
@@ -1102,12 +1127,12 @@
public:
virtual ~material_node() OPENVRML_NOTHROW = 0;
- virtual float ambient_intensity() const OPENVRML_NOTHROW = 0;
- virtual const color & diffuse_color() const OPENVRML_NOTHROW = 0;
- virtual const color & emissive_color() const OPENVRML_NOTHROW = 0;
- virtual float shininess() const OPENVRML_NOTHROW = 0;
- virtual const color & specular_color() const OPENVRML_NOTHROW = 0;
- virtual float transparency() const OPENVRML_NOTHROW = 0;
+ float ambient_intensity() const OPENVRML_NOTHROW;
+ const color & diffuse_color() const OPENVRML_NOTHROW;
+ const color & emissive_color() const OPENVRML_NOTHROW;
+ float shininess() const OPENVRML_NOTHROW;
+ const color & specular_color() const OPENVRML_NOTHROW;
+ float transparency() const OPENVRML_NOTHROW;
protected:
material_node(const node_type & type,
@@ -1116,6 +1141,13 @@
private:
virtual material_node * to_material() OPENVRML_NOTHROW;
+
+ virtual float do_ambient_intensity() const OPENVRML_NOTHROW = 0;
+ virtual const color & do_diffuse_color() const OPENVRML_NOTHROW = 0;
+ virtual const color & do_emissive_color() const OPENVRML_NOTHROW = 0;
+ virtual float do_shininess() const OPENVRML_NOTHROW = 0;
+ virtual const color & do_specular_color() const OPENVRML_NOTHROW = 0;
+ virtual float do_transparency() const OPENVRML_NOTHROW = 0;
};
@@ -1123,13 +1155,11 @@
public:
virtual ~navigation_info_node() OPENVRML_NOTHROW = 0;
- virtual const std::vector<float> & avatar_size() const
- OPENVRML_NOTHROW = 0;
- virtual bool headlight() const OPENVRML_NOTHROW = 0;
- virtual float speed() const OPENVRML_NOTHROW = 0;
- virtual const std::vector<std::string> & type() const
- OPENVRML_NOTHROW = 0;
- virtual float visibility_limit() const OPENVRML_NOTHROW = 0;
+ const std::vector<float> & avatar_size() const OPENVRML_NOTHROW;
+ bool headlight() const OPENVRML_NOTHROW;
+ float speed() const OPENVRML_NOTHROW;
+ const std::vector<std::string> & type() const OPENVRML_NOTHROW;
+ float visibility_limit() const OPENVRML_NOTHROW;
protected:
navigation_info_node(const node_type & type,
@@ -1138,6 +1168,14 @@
private:
virtual navigation_info_node * to_navigation_info() OPENVRML_NOTHROW;
+
+ virtual const std::vector<float> & do_avatar_size() const
+ OPENVRML_NOTHROW = 0;
+ virtual bool do_headlight() const OPENVRML_NOTHROW = 0;
+ virtual float do_speed() const OPENVRML_NOTHROW = 0;
+ virtual const std::vector<std::string> & do_type() const
+ OPENVRML_NOTHROW = 0;
+ virtual float do_visibility_limit() const OPENVRML_NOTHROW = 0;
};
@@ -1145,7 +1183,7 @@
public:
virtual ~normal_node() OPENVRML_NOTHROW = 0;
- virtual const std::vector<vec3f> & vector() const OPENVRML_NOTHROW = 0;
+ const std::vector<vec3f> & vector() const OPENVRML_NOTHROW;
protected:
normal_node(const node_type & type,
@@ -1154,6 +1192,9 @@
private:
virtual normal_node * to_normal() OPENVRML_NOTHROW;
+
+ virtual const std::vector<vec3f> & do_vector() const
+ OPENVRML_NOTHROW = 0;
};
@@ -1218,9 +1259,9 @@
viewer::texture_object_t render_texture(viewer & v);
- virtual const openvrml::image & image() const OPENVRML_NOTHROW = 0;
- virtual bool repeat_s() const OPENVRML_NOTHROW = 0;
- virtual bool repeat_t() const OPENVRML_NOTHROW = 0;
+ const openvrml::image & image() const OPENVRML_NOTHROW;
+ bool repeat_s() const OPENVRML_NOTHROW;
+ bool repeat_t() const OPENVRML_NOTHROW;
protected:
texture_node(const node_type & type,
@@ -1231,6 +1272,10 @@
virtual texture_node * to_texture() OPENVRML_NOTHROW;
virtual viewer::texture_object_t do_render_texture(viewer & v);
+
+ virtual const openvrml::image & do_image() const OPENVRML_NOTHROW = 0;
+ virtual bool do_repeat_s() const OPENVRML_NOTHROW = 0;
+ virtual bool do_repeat_t() const OPENVRML_NOTHROW = 0;
};
@@ -1238,7 +1283,7 @@
public:
virtual ~texture_coordinate_node() OPENVRML_NOTHROW = 0;
- virtual const std::vector<vec2f> & point() const OPENVRML_NOTHROW = 0;
+ const std::vector<vec2f> & point() const OPENVRML_NOTHROW;
protected:
texture_coordinate_node(
@@ -1249,6 +1294,9 @@
private:
virtual texture_coordinate_node * to_texture_coordinate()
OPENVRML_NOTHROW;
+
+ virtual const std::vector<vec2f> & do_point() const
+ OPENVRML_NOTHROW = 0;
};
@@ -1294,7 +1342,7 @@
public:
virtual ~transform_node() OPENVRML_NOTHROW = 0;
- virtual const mat4f & transform() const OPENVRML_NOTHROW = 0;
+ const mat4f & transform() const OPENVRML_NOTHROW;
protected:
transform_node(const node_type & type,
@@ -1303,6 +1351,8 @@
private:
virtual transform_node * to_transform() OPENVRML_NOTHROW;
+
+ virtual const mat4f & do_transform() const OPENVRML_NOTHROW = 0;
};
@@ -1310,12 +1360,11 @@
public:
virtual ~viewpoint_node() OPENVRML_NOTHROW = 0;
- virtual const mat4f & transformation() const OPENVRML_NOTHROW = 0;
- virtual const mat4f & user_view_transform() const OPENVRML_NOTHROW = 0;
- virtual void user_view_transform(const mat4f & transform)
- OPENVRML_NOTHROW = 0;
- virtual const std::string & description() const OPENVRML_NOTHROW = 0;
- virtual float field_of_view() const OPENVRML_NOTHROW = 0;
+ const mat4f & transformation() const OPENVRML_NOTHROW;
+ const mat4f & user_view_transform() const OPENVRML_NOTHROW;
+ void user_view_transform(const mat4f & transform) OPENVRML_NOTHROW;
+ const std::string & description() const OPENVRML_NOTHROW;
+ float field_of_view() const OPENVRML_NOTHROW;
protected:
viewpoint_node(const node_type & type,
@@ -1324,6 +1373,14 @@
private:
virtual viewpoint_node * to_viewpoint() OPENVRML_NOTHROW;
+
+ virtual const mat4f & do_transformation() const OPENVRML_NOTHROW = 0;
+ virtual const mat4f & do_user_view_transform() const
+ OPENVRML_NOTHROW = 0;
+ virtual void do_user_view_transform(const mat4f & transform)
+ OPENVRML_NOTHROW = 0;
+ virtual const std::string & do_description() const OPENVRML_NOTHROW = 0;
+ virtual float do_field_of_view() const OPENVRML_NOTHROW = 0;
};
Modified: trunk/src/node/vrml97/abstract_texture.h
===================================================================
--- trunk/src/node/vrml97/abstract_texture.h 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/abstract_texture.h 2009-03-30 02:30:12 UTC (rev 3873)
@@ -40,16 +40,17 @@
public:
virtual ~abstract_texture_node() OPENVRML_NOTHROW = 0;
- //
- // texture_node implementation.
- //
- virtual bool repeat_s() const OPENVRML_NOTHROW;
- virtual bool repeat_t() const OPENVRML_NOTHROW;
-
protected:
abstract_texture_node(
const openvrml::node_type & type,
const boost::shared_ptr<openvrml::scope> & scope);
+
+ private:
+ //
+ // texture_node implementation.
+ //
+ virtual bool do_repeat_s() const OPENVRML_NOTHROW;
+ virtual bool do_repeat_t() const OPENVRML_NOTHROW;
};
/**
@@ -96,7 +97,7 @@
* direction, @c false otherwise.
*/
template <typename Derived>
- bool abstract_texture_node<Derived>::repeat_s() const OPENVRML_NOTHROW
+ bool abstract_texture_node<Derived>::do_repeat_s() const OPENVRML_NOTHROW
{
return this->repeat_s_.value();
}
@@ -108,7 +109,7 @@
* direction, @c false otherwise.
*/
template <typename Derived>
- bool abstract_texture_node<Derived>::repeat_t() const OPENVRML_NOTHROW
+ bool abstract_texture_node<Derived>::do_repeat_t() const OPENVRML_NOTHROW
{
return this->repeat_t_.value();
}
Modified: trunk/src/node/vrml97/appearance.cpp
===================================================================
--- trunk/src/node/vrml97/appearance.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/appearance.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -49,14 +49,16 @@
virtual bool modified() const;
+ private:
//
// appearance_node implementation
//
- virtual const boost::intrusive_ptr<node> & material() const OPENVRML_NOTHROW;
- virtual const boost::intrusive_ptr<node> & texture() const OPENVRML_NOTHROW;
- virtual const boost::intrusive_ptr<node> & texture_transform() const OPENVRML_NOTHROW;
-
- private:
+ virtual const boost::intrusive_ptr<node> & do_material() const
+ OPENVRML_NOTHROW;
+ virtual const boost::intrusive_ptr<node> & do_texture() const
+ OPENVRML_NOTHROW;
+ virtual const boost::intrusive_ptr<node> & do_texture_transform() const
+ OPENVRML_NOTHROW;
virtual void do_render_appearance(openvrml::viewer & v,
openvrml::rendering_context context);
};
@@ -140,19 +142,19 @@
* this Appearance.
*/
const boost::intrusive_ptr<openvrml::node> &
- appearance_node::material() const OPENVRML_NOTHROW
+ appearance_node::do_material() const OPENVRML_NOTHROW
{
return this->material_.sfnode::value();
}
-/**
- * @brief Get the texture node.
- *
- * @return an sfnode object containing the texture node associated with
- * this Appearance.
- */
+ /**
+ * @brief Get the texture node.
+ *
+ * @return an sfnode object containing the texture node associated with
+ * this Appearance.
+ */
const boost::intrusive_ptr<openvrml::node> &
- appearance_node::texture() const OPENVRML_NOTHROW
+ appearance_node::do_texture() const OPENVRML_NOTHROW
{
return this->texture_.sfnode::value();
}
@@ -164,7 +166,7 @@
* associated with this Appearance.
*/
const boost::intrusive_ptr<openvrml::node> &
- appearance_node::texture_transform() const OPENVRML_NOTHROW
+ appearance_node::do_texture_transform() const OPENVRML_NOTHROW
{
return this->texture_transform_.sfnode::value();
}
Modified: trunk/src/node/vrml97/color.cpp
===================================================================
--- trunk/src/node/vrml97/color.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/color.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -42,10 +42,11 @@
const boost::shared_ptr<openvrml::scope> & scope);
virtual ~color_node() OPENVRML_NOTHROW;
+ private:
//
// color_node implementation
//
- virtual const std::vector<openvrml::color> & color() const
+ virtual const std::vector<openvrml::color> & do_color() const
OPENVRML_NOTHROW;
};
@@ -93,8 +94,8 @@
*
* @return the color array associated with the node.
*/
- const std::vector<openvrml::color> &
- color_node::color() const OPENVRML_NOTHROW
+ const std::vector<openvrml::color> & color_node::do_color() const
+ OPENVRML_NOTHROW
{
return this->color_.mfcolor::value();
}
Modified: trunk/src/node/vrml97/coordinate.cpp
===================================================================
--- trunk/src/node/vrml97/coordinate.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/coordinate.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -42,10 +42,12 @@
const boost::shared_ptr<openvrml::scope> & scope);
virtual ~coordinate_node() OPENVRML_NOTHROW;
+ private:
//
// coordinate_node implementation
//
- virtual const std::vector<openvrml::vec3f> & point() const OPENVRML_NOTHROW;
+ virtual const std::vector<openvrml::vec3f> & do_point() const
+ OPENVRML_NOTHROW;
};
/**
@@ -92,8 +94,8 @@
*
* @return the array of points for this node.
*/
- const std::vector<openvrml::vec3f> &
- coordinate_node::point() const OPENVRML_NOTHROW
+ const std::vector<openvrml::vec3f> & coordinate_node::do_point() const
+ OPENVRML_NOTHROW
{
return this->point_.mfvec3f::value();
}
Modified: trunk/src/node/vrml97/font_style.cpp
===================================================================
--- trunk/src/node/vrml97/font_style.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/font_style.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -52,18 +52,21 @@
const boost::shared_ptr<openvrml::scope> & scope);
virtual ~font_style_node() OPENVRML_NOTHROW;
+ private:
//
// font_style_node implementation
//
- virtual const std::vector<std::string> & family() const OPENVRML_NOTHROW;
- virtual bool horizontal() const OPENVRML_NOTHROW;
- virtual const std::vector<std::string> & justify() const OPENVRML_NOTHROW;
- virtual const std::string & language() const OPENVRML_NOTHROW;
- virtual bool left_to_right() const OPENVRML_NOTHROW;
- virtual float size() const OPENVRML_NOTHROW;
- virtual float spacing() const OPENVRML_NOTHROW;
- virtual const std::string & style() const OPENVRML_NOTHROW;
- virtual bool top_to_bottom() const OPENVRML_NOTHROW;
+ virtual const std::vector<std::string> & do_family() const
+ OPENVRML_NOTHROW;
+ virtual bool do_horizontal() const OPENVRML_NOTHROW;
+ virtual const std::vector<std::string> & do_justify() const
+ OPENVRML_NOTHROW;
+ virtual const std::string & do_language() const OPENVRML_NOTHROW;
+ virtual bool do_left_to_right() const OPENVRML_NOTHROW;
+ virtual float do_size() const OPENVRML_NOTHROW;
+ virtual float do_spacing() const OPENVRML_NOTHROW;
+ virtual const std::string & do_style() const OPENVRML_NOTHROW;
+ virtual bool do_top_to_bottom() const OPENVRML_NOTHROW;
};
/**
@@ -172,7 +175,7 @@
* this <code>font_style_node</code>.
*/
const std::vector<std::string> &
- font_style_node::family() const OPENVRML_NOTHROW
+ font_style_node::do_family() const OPENVRML_NOTHROW
{
return this->family_.value();
}
@@ -184,7 +187,7 @@
* @return @c true if the text should be horizontal, or @c false if the
* text should be vertical.
*/
- bool font_style_node::horizontal() const OPENVRML_NOTHROW
+ bool font_style_node::do_horizontal() const OPENVRML_NOTHROW
{
return this->horizontal_.value();
}
@@ -196,7 +199,7 @@
* justification.
*/
const std::vector<std::string> &
- font_style_node::justify() const OPENVRML_NOTHROW
+ font_style_node::do_justify() const OPENVRML_NOTHROW
{
return this->justify_.value();
}
@@ -206,7 +209,7 @@
*
* @return the language code.
*/
- const std::string & font_style_node::language() const
+ const std::string & font_style_node::do_language() const
OPENVRML_NOTHROW
{
return this->language_.value();
@@ -219,7 +222,7 @@
* @return @c true if the text should be rendered left-to-right, or
* @c false if the text should be rendered right-to-left.
*/
- bool font_style_node::left_to_right() const OPENVRML_NOTHROW
+ bool font_style_node::do_left_to_right() const OPENVRML_NOTHROW
{
return this->leftToRight.value();
}
@@ -229,7 +232,7 @@
*
* @return the size of the text.
*/
- float font_style_node::size() const OPENVRML_NOTHROW
+ float font_style_node::do_size() const OPENVRML_NOTHROW
{
return this->size_.value();
}
@@ -239,7 +242,7 @@
*
* @return the spacing for the text.
*/
- float font_style_node::spacing() const OPENVRML_NOTHROW
+ float font_style_node::do_spacing() const OPENVRML_NOTHROW
{
return this->spacing_.value();
}
@@ -249,7 +252,7 @@
*
* @return an string descriptor of the text style.
*/
- const std::string & font_style_node::style() const
+ const std::string & font_style_node::do_style() const
OPENVRML_NOTHROW
{
return this->style_.value();
@@ -262,7 +265,7 @@
* @return @c true if the text should be rendered top-to-bottom, or
* @c false if the text should be rendered bottom-to-top.
*/
- bool font_style_node::top_to_bottom() const OPENVRML_NOTHROW
+ bool font_style_node::do_top_to_bottom() const OPENVRML_NOTHROW
{
return this->topToBottom.value();
}
Modified: trunk/src/node/vrml97/image_texture.cpp
===================================================================
--- trunk/src/node/vrml97/image_texture.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/image_texture.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -64,9 +64,8 @@
const boost::shared_ptr<openvrml::scope> & scope);
virtual ~image_texture_node() OPENVRML_NOTHROW;
- virtual const openvrml::image & image() const OPENVRML_NOTHROW;
-
private:
+ virtual const openvrml::image & do_image() const OPENVRML_NOTHROW;
virtual openvrml::viewer::texture_object_t
do_render_texture(openvrml::viewer & v);
@@ -216,7 +215,7 @@
* @return the image.
*/
const openvrml::image &
- image_texture_node::image() const OPENVRML_NOTHROW
+ image_texture_node::do_image() const OPENVRML_NOTHROW
{
return this->image_;
}
Modified: trunk/src/node/vrml97/material.cpp
===================================================================
--- trunk/src/node/vrml97/material.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/material.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -49,17 +49,19 @@
const boost::shared_ptr<openvrml::scope> & scope);
virtual ~material_node() OPENVRML_NOTHROW;
+ private:
//
// material_node implementation
//
- virtual float ambient_intensity() const OPENVRML_NOTHROW;
- virtual const openvrml::color & diffuse_color() const OPENVRML_NOTHROW;
- virtual const openvrml::color & emissive_color() const
+ virtual float do_ambient_intensity() const OPENVRML_NOTHROW;
+ virtual const openvrml::color & do_diffuse_color() const
OPENVRML_NOTHROW;
- virtual float shininess() const OPENVRML_NOTHROW;
- virtual const openvrml::color & specular_color() const
+ virtual const openvrml::color & do_emissive_color() const
OPENVRML_NOTHROW;
- virtual float transparency() const OPENVRML_NOTHROW;
+ virtual float do_shininess() const OPENVRML_NOTHROW;
+ virtual const openvrml::color & do_specular_color() const
+ OPENVRML_NOTHROW;
+ virtual float do_transparency() const OPENVRML_NOTHROW;
};
/**
@@ -141,7 +143,7 @@
*
* @return the ambient intensity.
*/
- float material_node::ambient_intensity() const OPENVRML_NOTHROW
+ float material_node::do_ambient_intensity() const OPENVRML_NOTHROW
{
return this->ambient_intensity_.sffloat::value();
}
@@ -152,7 +154,7 @@
* @return the diffuse color.
*/
const openvrml::color &
- material_node::diffuse_color() const OPENVRML_NOTHROW
+ material_node::do_diffuse_color() const OPENVRML_NOTHROW
{
return this->diffuse_color_.sfcolor::value();
}
@@ -163,7 +165,7 @@
* @return the emissive color.
*/
const openvrml::color &
- material_node::emissive_color() const OPENVRML_NOTHROW
+ material_node::do_emissive_color() const OPENVRML_NOTHROW
{
return this->emissive_color_.sfcolor::value();
}
@@ -173,7 +175,7 @@
*
* @return the shininess.
*/
- float material_node::shininess() const OPENVRML_NOTHROW
+ float material_node::do_shininess() const OPENVRML_NOTHROW
{
return this->shininess_.sffloat::value();
}
@@ -184,7 +186,7 @@
* @return the specular color.
*/
const openvrml::color &
- material_node::specular_color() const OPENVRML_NOTHROW
+ material_node::do_specular_color() const OPENVRML_NOTHROW
{
return this->specular_color_.sfcolor::value();
}
@@ -194,7 +196,7 @@
*
* @return the transparency.
*/
- float material_node::transparency() const OPENVRML_NOTHROW
+ float material_node::do_transparency() const OPENVRML_NOTHROW
{
return this->transparency_.sffloat::value();
}
Modified: trunk/src/node/vrml97/movie_texture.cpp
===================================================================
--- trunk/src/node/vrml97/movie_texture.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/movie_texture.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -75,13 +75,14 @@
const boost::shared_ptr<openvrml::scope> & scope);
virtual ~movie_texture_node() OPENVRML_NOTHROW;
- virtual const openvrml::image & image() const OPENVRML_NOTHROW;
-
private:
virtual void do_initialize(double timestamp) OPENVRML_THROW1(std::bad_alloc);
virtual void do_shutdown(double timestamp) OPENVRML_NOTHROW;
+
+ virtual const openvrml::image & do_image() const OPENVRML_NOTHROW;
virtual openvrml::viewer::texture_object_t
do_render_texture(openvrml::viewer & v);
+
virtual void do_update(double time);
};
@@ -414,7 +415,7 @@
* @return the image.
*/
const openvrml::image &
- movie_texture_node::image() const OPENVRML_NOTHROW
+ movie_texture_node::do_image() const OPENVRML_NOTHROW
{
return this->image_;
}
Modified: trunk/src/node/vrml97/navigation_info.cpp
===================================================================
--- trunk/src/node/vrml97/navigation_info.cpp 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/navigation_info.cpp 2009-03-30 02:30:12 UTC (rev 3873)
@@ -486,7 +486,7 @@
* @return the avatar size.
*/
const std::vector<float> &
-openvrml_node_vrml97::navigation_info_node::avatar_size() const
+openvrml_node_vrml97::navigation_info_node::do_avatar_size() const
OPENVRML_NOTHROW
{
return this->avatar_size_.mffloat::value();
@@ -497,7 +497,7 @@
*
* @return @c true if the headlight is on; @c false otherwise.
*/
-bool openvrml_node_vrml97::navigation_info_node::headlight() const
+bool openvrml_node_vrml97::navigation_info_node::do_headlight() const
OPENVRML_NOTHROW
{
return this->headlight_.sfbool::value();
@@ -508,7 +508,7 @@
*
* @return the speed.
*/
-float openvrml_node_vrml97::navigation_info_node::speed() const
+float openvrml_node_vrml97::navigation_info_node::do_speed() const
OPENVRML_NOTHROW
{
return this->speed_.sffloat::value();
@@ -520,7 +520,7 @@
* @return the navigation type.
*/
const std::vector<std::string> &
-openvrml_node_vrml97::navigation_info_node::type() const OPENVRML_NOTHROW
+openvrml_node_vrml97::navigation_info_node::do_type() const OPENVRML_NOTHROW
{
return this->type_.mfstring::value();
}
@@ -530,7 +530,7 @@
*
* @return the visibility limit.
*/
-float openvrml_node_vrml97::navigation_info_node::visibility_limit() const
+float openvrml_node_vrml97::navigation_info_node::do_visibility_limit() const
OPENVRML_NOTHROW
{
return this->visibility_limit_.sffloat::value();
Modified: trunk/src/node/vrml97/navigation_info.h
===================================================================
--- trunk/src/node/vrml97/navigation_info.h 2009-03-29 04:34:20 UTC (rev 3872)
+++ trunk/src/node/vrml97/naviga...
[truncated message content] |