|
From: <br...@us...> - 2008-10-16 21:50:08
|
Revision: 3742
http://openvrml.svn.sourceforge.net/openvrml/?rev=3742&view=rev
Author: braden
Date: 2008-10-16 21:49:59 +0000 (Thu, 16 Oct 2008)
Log Message:
-----------
Moved floating point comparison functions from private.h to openvrml/local/float.h.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/Makefile.am
trunk/src/libopenvrml/openvrml/basetypes.cpp
trunk/src/libopenvrml/openvrml/bounding_volume.cpp
trunk/src/libopenvrml/openvrml/frustum.cpp
trunk/src/libopenvrml/private.h
trunk/src/node/vrml97/cylinder_sensor.cpp
trunk/src/node/vrml97/normal_interpolator.cpp
trunk/src/node/vrml97/orientation_interpolator.cpp
trunk/src/node/vrml97/proximity_sensor.cpp
trunk/src/node/vrml97/texture_transform.cpp
trunk/src/node/vrml97/time_sensor.cpp
trunk/src/node/vrml97/visibility_sensor.cpp
trunk/src/script/javascript.cpp
Added Paths:
-----------
trunk/src/libopenvrml/openvrml/local/float.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/ChangeLog 2008-10-16 21:49:59 UTC (rev 3742)
@@ -1,5 +1,29 @@
2008-10-16 Braden McDaniel <br...@en...>
+ Moved floating point comparison functions from private.h to
+ openvrml/local/float.h.
+
+ * src/Makefile.am
+ (libopenvrml_libopenvrml_la_SOURCES): Added
+ libopenvrml/openvrml/local/float.h.
+ * src/libopenvrml/private.h: Moved floating point comparison
+ functions to openvrml/local/float.h.
+ * src/libopenvrml/openvrml/basetypes.cpp
+ * src/libopenvrml/openvrml/bounding_volume.cpp
+ * src/libopenvrml/openvrml/frustum.cpp
+ * src/libopenvrml/openvrml/local/float.h: Added file; moved
+ floating point comparison functions here.
+ * src/node/vrml97/cylinder_sensor.cpp
+ * src/node/vrml97/normal_interpolator.cpp
+ * src/node/vrml97/orientation_interpolator.cpp
+ * src/node/vrml97/proximity_sensor.cpp
+ * src/node/vrml97/texture_transform.cpp
+ * src/node/vrml97/time_sensor.cpp
+ * src/node/vrml97/visibility_sensor.cpp
+ * src/script/javascript.cpp
+
+2008-10-16 Braden McDaniel <br...@en...>
+
* configure.ac: Removed redundant AC_ARG_VAR for JAVA_HOME.
2008-10-15 Braden McDaniel <br...@en...>
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/Makefile.am 2008-10-16 21:49:59 UTC (rev 3742)
@@ -158,7 +158,8 @@
libopenvrml/openvrml/local/xml_reader.h \
libopenvrml/openvrml/local/proto.cpp \
libopenvrml/openvrml/local/proto.h \
- libopenvrml/openvrml/local/field_value_types.h
+ libopenvrml/openvrml/local/field_value_types.h \
+ libopenvrml/openvrml/local/float.h
libopenvrml_libopenvrml_la_LDFLAGS = \
-version-info $(LIBOPENVRML_LIBRARY_VERSION) \
Modified: trunk/src/libopenvrml/openvrml/basetypes.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/basetypes.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/libopenvrml/openvrml/basetypes.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -19,12 +19,13 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include "basetypes.h"
+# include "x3d_vrml_grammar.h"
+# include <openvrml/local/float.h>
+# include <private.h>
# include <cmath>
# include <numeric>
# include <ostream>
-# include <private.h>
-# include "basetypes.h"
-# include "x3d_vrml_grammar.h"
/**
* @file openvrml/basetypes.h
@@ -283,7 +284,7 @@
bool openvrml::operator==(const color & lhs, const color & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 3, &rhs[0], fequal);
}
@@ -578,7 +579,7 @@
bool openvrml::operator==(const color_rgba & lhs, const color_rgba & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 4, &rhs[0], fequal);
}
@@ -977,7 +978,7 @@
*/
const openvrml::vec2f openvrml::vec2f::normalize() const OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
const float len = this->length();
vec2f result(*this);
if (!fequal(len, 0.0f)) { result /= len; }
@@ -998,7 +999,7 @@
bool openvrml::operator==(const vec2f & lhs, const vec2f & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 2, &rhs[0], fequal);
}
@@ -1392,7 +1393,7 @@
*/
const openvrml::vec2d openvrml::vec2d::normalize() const OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
const double len = this->length();
vec2d result(*this);
if (!fequal(len, 0.0)) { result /= len; }
@@ -1413,7 +1414,7 @@
bool openvrml::operator==(const vec2d & lhs, const vec2d & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 2, &rhs[0], fequal);
}
@@ -1936,7 +1937,7 @@
*/
const openvrml::vec3f openvrml::vec3f::normalize() const OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
const float len = this->length();
vec3f result(*this);
if (!fequal(len, 0.0f)) { result /= len; }
@@ -1957,7 +1958,7 @@
bool openvrml::operator==(const vec3f & lhs, const vec3f & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 3, &rhs[0], fequal);
}
@@ -2479,7 +2480,7 @@
*/
const openvrml::vec3d openvrml::vec3d::normalize() const OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
const double len = this->length();
vec3d result(*this);
if (!fequal(len, 0.0)) { result /= len; }
@@ -2500,7 +2501,7 @@
bool openvrml::operator==(const vec3d & lhs, const vec3d & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 3, &rhs[0], fequal);
}
@@ -2637,8 +2638,9 @@
assert(rot[2] == rot[2]);
assert(rot[3] == rot[3]);
- assert(openvrml_::fequal(1.0f,
- make_vec3f(rot[0], rot[1], rot[2]).length()));
+ assert(
+ openvrml::local::fequal(1.0f,
+ make_vec3f(rot[0], rot[1], rot[2]).length()));
const rotation r = { { rot[0], rot[1], rot[2], rot[3] } };
return r;
}
@@ -2673,7 +2675,7 @@
assert(z == z);
assert(angle == angle);
- assert(openvrml_::fequal(1.0f, make_vec3f(x, y, z).length()));
+ assert(openvrml::local::fequal(1.0f, make_vec3f(x, y, z).length()));
const rotation r = { { x, y, z, angle } };
return r;
}
@@ -2701,7 +2703,7 @@
//
assert(angle == angle);
- assert(openvrml_::fequal(1.0f, axis.length()));
+ assert(openvrml::local::fequal(1.0f, axis.length()));
const rotation r = { { axis.x(), axis.y(), axis.z(), angle } };
return r;
}
@@ -2745,7 +2747,7 @@
const openvrml::rotation openvrml::make_rotation(const quatf & quat)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
rotation r = make_rotation();
const float val = float(acos(quat.w()));
@@ -2850,7 +2852,7 @@
OPENVRML_LOCAL inline void normalize_(float vec[3])
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
const float len = float(length_(vec));
if (!fequal(len, 0.0f)) {
vec[0] /= len;
@@ -2861,7 +2863,7 @@
OPENVRML_LOCAL void normalize_axis_(float axis[3]) OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
const float axis_length = float(length_(axis));
if (fequal(axis_length, 0.0f)) {
axis[2] = 1.0;
@@ -2911,7 +2913,7 @@
*/
void openvrml::rotation::axis(const vec3f & axis) OPENVRML_NOTHROW
{
- assert(openvrml_::fequal(1.0f, axis.length()));
+ assert(openvrml::local::fequal(1.0f, axis.length()));
this->rot[0] = axis.x();
this->rot[1] = axis.y();
this->rot[2] = axis.z();
@@ -2951,7 +2953,7 @@
const float t) const
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
quatf from_quat = make_quatf(*this), to_quat = make_quatf(dest_rot);
@@ -3011,7 +3013,7 @@
bool openvrml::operator==(const rotation & lhs, const rotation & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 4, &rhs[0], fequal);
}
@@ -3042,7 +3044,7 @@
bool operator()() const
{
using openvrml::make_vec3f;
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return fequal(make_vec3f(this->x_, this->y_, this->z_).length(),
1.0f);
}
@@ -3302,7 +3304,7 @@
const vec3f & c)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
mat4f mat = make_mat4f();
if (t != make_vec3f(0.0, 0.0, 0.0)) {
@@ -3592,7 +3594,7 @@
//
// Some portions are taken from Graphics Gems 2.
//
- using openvrml_::fequal;
+ using openvrml::local::fequal;
//
// Check if it is singular.
@@ -3694,7 +3696,7 @@
//
// Some portions are taken from Graphics Gems 2.
//
- using openvrml_::fequal;
+ using openvrml::local::fequal;
//
// Check if it is singular.
@@ -4071,7 +4073,7 @@
bool openvrml::operator==(const mat4f & lhs, const mat4f & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0][0], &lhs[0][0] + 16, &rhs[0][0], fequal);
}
@@ -4181,7 +4183,7 @@
q.quat[1] = (mat[2][0] - mat[0][2]) * s;
q.quat[2] = (mat[0][1] - mat[1][0]) * s;
} else {
- using openvrml_::fequal;
+ using openvrml::local::fequal;
std::size_t i, j, k;
static const std::size_t next[3] = { 1, 2, 0 };
// diagonal is negative
@@ -4213,7 +4215,7 @@
const openvrml::quatf openvrml::make_quatf(const rotation & rot)
OPENVRML_NOTHROW
{
- assert(openvrml_::fequal(rot.axis().length(), 1.0f));
+ assert(openvrml::local::fequal(rot.axis().length(), 1.0f));
const float sin_angle = float(sin(rot.angle() / 2.0));
const quatf q = { rot.x() * sin_angle,
@@ -4637,7 +4639,7 @@
bool openvrml::operator==(const quatf & lhs, const quatf & rhs)
OPENVRML_NOTHROW
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
return std::equal(&lhs[0], &lhs[0] + 4, &rhs[0], fequal);
}
Modified: trunk/src/libopenvrml/openvrml/bounding_volume.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/bounding_volume.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/libopenvrml/openvrml/bounding_volume.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -19,7 +19,7 @@
//
# include <limits>
-# include <private.h>
+# include <openvrml/local/float.h>
# include "bounding_volume.h"
# include "field_value.h"
# include "frustum.h"
@@ -441,7 +441,7 @@
*/
void openvrml::bounding_sphere::do_extend(const vec3f & p)
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
if (this->maximized()) { return; }
@@ -509,7 +509,7 @@
*/
void openvrml::bounding_sphere::do_extend(const bounding_sphere & b)
{
- using openvrml_::fequal;
+ using openvrml::local::fequal;
if (this->maximized()) { return; }
Modified: trunk/src/libopenvrml/openvrml/frustum.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/frustum.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/libopenvrml/openvrml/frustum.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -18,14 +18,15 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include "basetypes.h"
+# include "frustum.h"
+# include <openvrml/local/float.h>
+# include <cmath>
+
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
-# include <private.h>
-# include "basetypes.h"
-# include "frustum.h"
-
/**
* @file openvrml/frustum.h
*
@@ -132,7 +133,7 @@
float aspect,
double z_near,
double z_far):
- fovy(float((fovy / 360.0) * 2.0 * openvrml_::pi)),
+ fovy(float((fovy / 360.0) * 2.0 * openvrml::local::pi)),
fovx(float(2.0 * atan(float(tan(this->fovy / 2.0)) * aspect))),
z_near(z_near),
z_far(z_far)
Copied: trunk/src/libopenvrml/openvrml/local/float.h (from rev 3740, trunk/src/libopenvrml/private.h)
===================================================================
--- trunk/src/libopenvrml/openvrml/local/float.h (rev 0)
+++ trunk/src/libopenvrml/openvrml/local/float.h 2008-10-16 21:49:59 UTC (rev 3742)
@@ -0,0 +1,81 @@
+// -*- mode: c++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*-
+//
+// OpenVRML
+//
+// Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 3 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, see <http://www.gnu.org/licenses/>.
+//
+
+# ifndef OPENVRML_LOCAL_FLOAT_H
+# define OPENVRML_LOCAL_FLOAT_H
+
+# include <openvrml-common.h>
+# include <limits>
+# include <boost/concept_check.hpp>
+
+namespace openvrml {
+
+ namespace local {
+
+ const double pi = 3.14159265358979323846;
+ const double pi_2 = 1.57079632679489661923;
+ const double pi_4 = 0.78539816339744830962;
+ const double inv_pi = 0.31830988618379067154;
+
+ template <typename Float>
+ OPENVRML_LOCAL inline Float fabs(const Float f)
+ {
+ return f < 0.0 ? -f : f;
+ }
+
+ struct OPENVRML_LOCAL fequal_t {
+ template <typename Float>
+ bool operator()(Float a, Float b) const
+ {
+ const Float diff = fabs(a - b);
+ if (diff == 0.0) { return true; }
+ static const int rounding_errors = 10;
+ static const Float e = std::numeric_limits<Float>::epsilon();
+ static const Float tolerance = e * rounding_errors / 2;
+ return diff / fabs(a) <= tolerance
+ && diff / fabs(b) <= tolerance;
+ }
+ };
+
+ const fequal_t fequal = fequal_t();
+
+ struct OPENVRML_LOCAL fless_equal_t {
+ template <typename Float>
+ bool operator()(Float a, Float b) const
+ {
+ return a < b || fequal(a, b);
+ }
+ };
+
+ const fless_equal_t fless_equal = fless_equal_t();
+
+ struct OPENVRML_LOCAL fgreater_equal_t {
+ template <typename Float>
+ bool operator()(Float a, Float b) const
+ {
+ return a > b || fequal(a, b);
+ }
+ };
+
+ const fgreater_equal_t fgreater_equal = fgreater_equal_t();
+ }
+}
+
+# endif // ifndef OPENVRML_LOCAL_FLOAT_H
Modified: trunk/src/libopenvrml/private.h
===================================================================
--- trunk/src/libopenvrml/private.h 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/libopenvrml/private.h 2008-10-16 21:49:59 UTC (rev 3742)
@@ -57,63 +57,4 @@
<< message_ << std::endl
# endif
-# include <cassert>
-# include <cmath>
-# include <cstddef>
-# include <functional>
-# include <limits>
-# include <boost/concept_check.hpp>
-
-namespace {
- namespace openvrml_ {
-
- const double pi = 3.14159265358979323846;
- const double pi_2 = 1.57079632679489661923;
- const double pi_4 = 0.78539816339744830962;
- const double inv_pi = 0.31830988618379067154;
-
- template <typename Float>
- OPENVRML_LOCAL inline Float fabs(const Float f)
- {
- return f < 0.0 ? -f : f;
- }
-
- struct OPENVRML_LOCAL fequal_t {
- template <typename Float>
- bool operator()(Float a, Float b) const
- {
- const Float diff = fabs(a - b);
- if (diff == 0.0) { return true; }
- static const int rounding_errors = 10;
- static const Float e = std::numeric_limits<Float>::epsilon();
- static const Float tolerance = e * rounding_errors / 2;
- return diff / fabs(a) <= tolerance
- && diff / fabs(b) <= tolerance;
- }
- };
-
- const fequal_t fequal = fequal_t();
-
- struct OPENVRML_LOCAL fless_equal_t {
- template <typename Float>
- bool operator()(Float a, Float b) const
- {
- return a < b || fequal(a, b);
- }
- };
-
- const fless_equal_t fless_equal = fless_equal_t();
-
- struct OPENVRML_LOCAL fgreater_equal_t {
- template <typename Float>
- bool operator()(Float a, Float b) const
- {
- return a > b || fequal(a, b);
- }
- };
-
- const fgreater_equal_t fgreater_equal = fgreater_equal_t();
- }
-}
-
# endif
Modified: trunk/src/node/vrml97/cylinder_sensor.cpp
===================================================================
--- trunk/src/node/vrml97/cylinder_sensor.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/node/vrml97/cylinder_sensor.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -20,15 +20,15 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include "cylinder_sensor.h"
+# include <openvrml/node_impl_util.h>
+# include <openvrml/local/float.h>
+# include <boost/array.hpp>
+
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
-# include <boost/array.hpp>
-# include <openvrml/node_impl_util.h>
-# include <private.h>
-# include "cylinder_sensor.h"
-
namespace {
class OPENVRML_LOCAL cylinder_sensor_node :
@@ -249,8 +249,8 @@
bool active,
const double (&p)[3])
{
- using openvrml_::pi;
- using openvrml_::pi_2;
+ using openvrml::local::pi;
+ using openvrml::local::pi_2;
using openvrml::vec3f;
using openvrml::make_vec3f;
@@ -293,7 +293,7 @@
// Tracking
else if (active) {
- using openvrml_::fequal;
+ using openvrml::local::fequal;
// get local coord for touch point
vec3f Vec = make_vec3f(static_cast<float>(p[0]),
Modified: trunk/src/node/vrml97/normal_interpolator.cpp
===================================================================
--- trunk/src/node/vrml97/normal_interpolator.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/node/vrml97/normal_interpolator.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -19,15 +19,16 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include "normal_interpolator.h"
+# include <openvrml/node_impl_util.h>
+# include <openvrml/local/float.h>
+# include <private.h>
+# include <boost/array.hpp>
+
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
-# include <boost/array.hpp>
-# include <openvrml/node_impl_util.h>
-# include <private.h>
-# include "normal_interpolator.h"
-
namespace {
class OPENVRML_LOCAL normal_interpolator_node :
@@ -152,7 +153,7 @@
// Interpolate on the surface of unit sphere.
for (size_t j = 0; j < nNormals; ++j) {
- using openvrml_::fequal;
+ using openvrml::local::fequal;
float alpha, beta;
const float dot_product = v1->dot(*v2);
Modified: trunk/src/node/vrml97/orientation_interpolator.cpp
===================================================================
--- trunk/src/node/vrml97/orientation_interpolator.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/node/vrml97/orientation_interpolator.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -20,15 +20,16 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include "orientation_interpolator.h"
+# include <openvrml/node_impl_util.h>
+# include <openvrml/local/float.h>
+# include <private.h>
+# include <boost/array.hpp>
+
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
-# include <boost/array.hpp>
-# include <openvrml/node_impl_util.h>
-# include <private.h>
-# include "orientation_interpolator.h"
-
namespace {
class OPENVRML_LOCAL orientation_interpolator_node :
@@ -137,7 +138,7 @@
for (size_t i = 0; i < n; ++i) {
if (key[i] <= fraction.value()
&& fraction.value() <= key[i + 1]) {
- using openvrml_::pi;
+ using openvrml::local::pi;
const rotation & v1 = key_value[i];
const rotation & v2 = key_value[i + 1];
Modified: trunk/src/node/vrml97/proximity_sensor.cpp
===================================================================
--- trunk/src/node/vrml97/proximity_sensor.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/node/vrml97/proximity_sensor.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -20,16 +20,16 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include "proximity_sensor.h"
+# include <openvrml/local/float.h>
+# include <openvrml/node_impl_util.h>
+# include <openvrml/browser.h>
+# include <boost/array.hpp>
+
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
-# include <boost/array.hpp>
-# include <openvrml/node_impl_util.h>
-# include <openvrml/browser.h>
-# include <private.h>
-# include "proximity_sensor.h"
-
namespace {
class OPENVRML_LOCAL proximity_sensor_node :
@@ -223,8 +223,8 @@
&& this->size_.sfvec3f::value().y() > 0.0
&& this->size_.sfvec3f::value().z() > 0.0
&& viewer.mode() == viewer::draw_mode) {
- using openvrml_::fabs;
- using openvrml_::fless_equal;
+ using openvrml::local::fabs;
+ using openvrml::local::fless_equal;
sftime timeNow(browser::current_time());
float x, y, z;
Modified: trunk/src/node/vrml97/texture_transform.cpp
===================================================================
--- trunk/src/node/vrml97/texture_transform.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/node/vrml97/texture_transform.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -31,8 +31,6 @@
namespace {
- using namespace openvrml_;
-
class OPENVRML_LOCAL texture_transform_node :
public openvrml::node_impl_util::abstract_node<texture_transform_node>,
public openvrml::texture_transform_node {
Modified: trunk/src/node/vrml97/time_sensor.cpp
===================================================================
--- trunk/src/node/vrml97/time_sensor.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/node/vrml97/time_sensor.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -19,17 +19,18 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
-# ifdef HAVE_CONFIG_H
-# include <config.h>
-# endif
-
# include "time_sensor.h"
+# include <openvrml/local/float.h>
+# include <private.h>
# include <openvrml/browser.h>
# include <openvrml/node_impl_util.h>
# include <openvrml/scene.h>
-# include <private.h>
# include <boost/array.hpp>
+# ifdef HAVE_CONFIG_H
+# include <config.h>
+# endif
+
namespace {
class OPENVRML_LOCAL time_sensor_node :
@@ -264,7 +265,7 @@
if (enabled.value() != node.is_active_.value()) {
if (node.is_active_.value()) {
- using openvrml_::fequal;
+ using openvrml::local::fequal;
//
// Was active; shutdown.
@@ -545,8 +546,8 @@
// Running (active and enabled)
else if (this->is_active_.value()) {
- using openvrml_::fequal;
- using openvrml_::fless_equal;
+ using openvrml::local::fequal;
+ using openvrml::local::fless_equal;
double f, cycleInt = this->cycle_interval_.value();
bool deactivate = false;
Modified: trunk/src/node/vrml97/visibility_sensor.cpp
===================================================================
--- trunk/src/node/vrml97/visibility_sensor.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/node/vrml97/visibility_sensor.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -19,16 +19,16 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include "visibility_sensor.h"
+# include <openvrml/local/float.h>
+# include <openvrml/node_impl_util.h>
+# include <openvrml/browser.h>
+# include <boost/array.hpp>
+
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
-# include <boost/array.hpp>
-# include <openvrml/node_impl_util.h>
-# include <openvrml/browser.h>
-# include <private.h>
-# include "visibility_sensor.h"
-
namespace {
class OPENVRML_LOCAL visibility_sensor_node :
@@ -190,7 +190,7 @@
// Is the sphere visible? ...
bool inside = xyz[0].z() < 0.0; // && z > - scene->visLimit()
if (inside) {
- using openvrml_::fequal;
+ using openvrml::local::fequal;
openvrml::navigation_info_node & nav_info =
this->type().metatype().browser()
Modified: trunk/src/script/javascript.cpp
===================================================================
--- trunk/src/script/javascript.cpp 2008-10-16 21:39:58 UTC (rev 3741)
+++ trunk/src/script/javascript.cpp 2008-10-16 21:49:59 UTC (rev 3742)
@@ -19,6 +19,7 @@
// along with this library; if not, see <http://www.gnu.org/licenses/>.
//
+# include <openvrml/local/float.h>
# include <openvrml/browser.h>
# include <openvrml/scene.h>
# include <private.h>
@@ -3628,7 +3629,7 @@
OPENVRML_JAVASCRIPT_LOCAL bool normalized(const openvrml::vec3f & v)
{
- return openvrml_::fequal(v.length(), 1.0f);
+ return openvrml::local::fequal(v.length(), 1.0f);
}
JSBool SFRotation::initObject(JSContext * const cx,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|