Index: nanovis/branches/1.1/FlowParticles.cpp
===================================================================
--- nanovis/branches/1.1/FlowParticles.cpp	(revision 4889)
+++ nanovis/branches/1.1/FlowParticles.cpp	(revision 4890)
@@ -12,5 +12,5 @@
 #include <assert.h>
 
-#include <vrmath/Vector4f.h>
+#include <vrmath/Color4f.h>
 
 #include "nanovis.h"        // For NMESH
@@ -61,8 +61,8 @@
 {
     _renderer->setPos(Flow::getRelativePosition(&_sv.position));
-    _renderer->setColor(Vector4f(_sv.color.r,
-                                 _sv.color.g,
-                                 _sv.color.b, 
-                                 _sv.color.a));
+    _renderer->setColor(Color4f(_sv.color.r,
+                                _sv.color.g,
+                                _sv.color.b, 
+                                _sv.color.a));
     _renderer->particleSize(_sv.particleSize);
     _renderer->setAxis(_sv.position.axis);
Index: nanovis/branches/1.1/Grid.cpp
===================================================================
--- nanovis/branches/1.1/Grid.cpp	(revision 4889)
+++ nanovis/branches/1.1/Grid.cpp	(revision 4890)
@@ -9,4 +9,7 @@
 #include <GL/glew.h>
 #include <GL/gl.h>
+
+#include <util/Fonts.h>
+#include <vrmath/Color4f.h>
 
 #include "Grid.h"
@@ -86,6 +89,6 @@
 
     glLineWidth(2.0f);
-    glColor4f(_axisColor.red, _axisColor.green, _axisColor.blue, 
-              _axisColor.alpha);
+    glColor4f(_axisColor.r, _axisColor.g, _axisColor.b, 
+              _axisColor.a);
 
     glBegin(GL_LINES);
@@ -101,6 +104,6 @@
 
     glLineWidth(1.0f);
-    glColor4f(_majorColor.red, _majorColor.green, _majorColor.blue, 
-              _majorColor.alpha);
+    glColor4f(_majorColor.r, _majorColor.g, _majorColor.b, 
+              _majorColor.a);
 
     glBegin(GL_LINES);
@@ -137,6 +140,6 @@
 
     // Set minor line color
-    glColor4f(_minorColor.red, _minorColor.green, _minorColor.blue,
-              _minorColor.alpha);
+    glColor4f(_minorColor.r, _minorColor.g, _minorColor.b,
+              _minorColor.a);
 
     glBegin(GL_LINES);
Index: nanovis/branches/1.1/Grid.h
===================================================================
--- nanovis/branches/1.1/Grid.h	(revision 4889)
+++ nanovis/branches/1.1/Grid.h	(revision 4890)
@@ -7,5 +7,5 @@
 #define NV_GRID_H
 
-#include <util/Fonts.h>
+#include <vrmath/Color4f.h>
 
 #include "Axis.h"
@@ -14,24 +14,7 @@
 namespace nv {
 
-class RGBA
-{
-public:
-    RGBA(float r, float g, float b, float a) :
-        red(r),
-        green(g),
-        blue(b),
-        alpha(a)
-    {}
-
-    void set(float r, float g, float b, float a)
-    {
-        red   = r;
-        green = g;
-        blue  = b;
-        alpha = a;
-    }
-
-    float red, green, blue, alpha;
-};
+namespace util {
+class Fonts;
+}
 
 class Grid
@@ -71,5 +54,5 @@
 
 private:
-    RGBA _axisColor, _majorColor, _minorColor;
+    vrmath::Color4f _axisColor, _majorColor, _minorColor;
     nv::util::Fonts *_font;
     bool _visible;
Index: nanovis/branches/1.1/Makefile.in
===================================================================
--- nanovis/branches/1.1/Makefile.in	(revision 4889)
+++ nanovis/branches/1.1/Makefile.in	(revision 4890)
@@ -283,5 +283,5 @@
 FlowParticles.o: FlowParticles.cpp FlowParticles.h FlowTypes.h FlowCmd.h Switch.h Trace.h ParticleRenderer.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h
 GradientFilter.o: GradientFilter.cpp GradientFilter.h
-Grid.o: Grid.cpp Grid.h Axis.h Chain.h
+Grid.o: Grid.cpp Grid.h Axis.h Chain.h $(UTIL_DIR)/Fonts.h $(VRMATH_DIR)/include/vrmath/Color4f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h
 HeightMap.o: HeightMap.cpp HeightMap.h
 LIC.o: LIC.cpp LIC.h define.h
@@ -322,4 +322,4 @@
 dxReader.o: dxReader.cpp ReaderCommon.h config.h nanovis.h Unirect.h ZincBlendeVolume.h ZincBlendeReconstructor.h
 md5.o: md5.h
-nanovis.o: nanovis.cpp nanovis.h nanovisServer.h config.h define.h Command.h Flow.h Grid.h HeightMap.h Camera.h LIC.h ZincBlendeReconstructor.h PerfQuery.h PlaneRenderer.h PointSetRenderer.h PointSet.h Switch.h Trace.h Unirect.h VelocityArrowsSlice.h VolumeInterpolator.h VolumeRenderer.h ZincBlendeVolume.h Axis.h Chain.h
+nanovis.o: nanovis.cpp nanovis.h nanovisServer.h config.h define.h Command.h Flow.h Grid.h HeightMap.h Camera.h LIC.h ZincBlendeReconstructor.h PerfQuery.h PlaneRenderer.h PointSetRenderer.h PointSet.h Switch.h Trace.h Unirect.h VelocityArrowsSlice.h VolumeInterpolator.h VolumeRenderer.h ZincBlendeVolume.h Axis.h Chain.h $(UTIL_DIR)/Fonts.h
 nanovisServer.o: nanovisServer.cpp nanovisServer.h config.h nanovis.h define.h Command.h ReadBuffer.h Shader.h Trace.h
Index: nanovis/branches/1.1/PCASplit.h
===================================================================
--- nanovis/branches/1.1/PCASplit.h	(revision 4889)
+++ nanovis/branches/1.1/PCASplit.h	(revision 4890)
@@ -10,5 +10,5 @@
 
 #include <vrmath/Vector3f.h>
-#include <vrmath/Vector4f.h>
+#include <vrmath/Color4f.h>
 
 namespace PCA {
@@ -23,5 +23,5 @@
 
     vrmath::Vector3f position;
-    vrmath::Vector4f color;
+    vrmath::Color4f color;
     float size;
     float value;
@@ -57,5 +57,5 @@
 
     vrmath::Vector3f centroid;
-    vrmath::Vector4f color;
+    vrmath::Color4f color;
     float scale;
 
Index: nanovis/branches/1.1/ParticleRenderer.cpp
===================================================================
--- nanovis/branches/1.1/ParticleRenderer.cpp	(revision 4889)
+++ nanovis/branches/1.1/ParticleRenderer.cpp	(revision 4890)
@@ -12,4 +12,6 @@
 
 #include <GL/glew.h>
+
+#include <vrmath/Color4f.h>
 
 #include "ParticleRenderer.h"
Index: nanovis/branches/1.1/ParticleRenderer.h
===================================================================
--- nanovis/branches/1.1/ParticleRenderer.h	(revision 4889)
+++ nanovis/branches/1.1/ParticleRenderer.h	(revision 4890)
@@ -12,5 +12,5 @@
 
 #include <vrmath/Vector3f.h>
-#include <vrmath/Vector4f.h>
+#include <vrmath/Color4f.h>
 
 #include "ParticleAdvectionShader.h"
@@ -63,5 +63,5 @@
     }
 
-    void setColor(const vrmath::Vector4f& color)
+    void setColor(const vrmath::Color4f& color)
     {
         _color = color;
@@ -122,5 +122,5 @@
     int _sliceAxis;
 
-    vrmath::Vector4f _color;
+    vrmath::Color4f _color;
 
     //the storage of particles is implemented as a 2D array.
Index: nanovis/branches/1.1/PointSet.cpp
===================================================================
--- nanovis/branches/1.1/PointSet.cpp	(revision 4889)
+++ nanovis/branches/1.1/PointSet.cpp	(revision 4890)
@@ -9,4 +9,5 @@
 #include <vrmath/Vector3f.h>
 #include <vrmath/Vector4f.h>
+#include <vrmath/Color4f.h>
 
 #include "PointSet.h"
@@ -58,5 +59,5 @@
 
     PCA::Point *points;
-    vrmath::Vector4f *colors = (vrmath::Vector4f *)color;
+    vrmath::Color4f *colors = (vrmath::Color4f *)color;
     int numOfPoints;
     int index;
Index: nanovis/branches/1.1/PointSetRenderer.cpp
===================================================================
--- nanovis/branches/1.1/PointSetRenderer.cpp	(revision 4889)
+++ nanovis/branches/1.1/PointSetRenderer.cpp	(revision 4890)
@@ -64,5 +64,5 @@
     Point *p = points;
     for (int i = 0; i < length; ++i, ++p) {
-        glColor4f(p->color.x, p->color.y, p->color.z, p->color.w);
+        glColor4f(p->color.r, p->color.g, p->color.b, p->color.a);
         glVertex3f(p->position.x, p->position.y, p->position.z);
     }
Index: nanovis/branches/1.1/vrmath/BBox.cpp
===================================================================
--- nanovis/branches/1.1/vrmath/BBox.cpp	(revision 4889)
+++ nanovis/branches/1.1/vrmath/BBox.cpp	(revision 4890)
@@ -20,14 +20,14 @@
 }
 
-BBox::BBox(const BBox& bbox)
+BBox::BBox(const BBox& other) :
+    min(other.min),
+    max(other.max)
 {
-    min = bbox.min;
-    max = bbox.max;	
 }
 
-BBox::BBox(const Vector3f& minv, const Vector3f& maxv)
+BBox::BBox(const Vector3f& minv, const Vector3f& maxv) :
+    min(minv),
+    max(maxv)
 {
-    min = minv;
-    max = maxv;	
 }
 
@@ -40,9 +40,20 @@
 bool BBox::isEmpty()
 {
-    if ((min.x > max.x) || (min.y > max.y) || (min.z > max.z)) {
-        return true;
-    }
+    return (isEmptyX() && isEmptyY() && isEmptyZ());
+}
 
-    return false;
+bool BBox::isEmptyX()
+{
+    return (min.x > max.x);
+}
+
+bool BBox::isEmptyY()
+{
+    return (min.y > max.y);
+}
+
+bool BBox::isEmptyZ()
+{
+    return (min.z > max.z);
 }
 
@@ -95,43 +106,34 @@
 void BBox::transform(const BBox& box, const Matrix4x4d& mat)
 {
-    float halfSizeX = (box.max.x - box.min.x) * 0.5f;
-    float halfSizeY = (box.max.y - box.min.y) * 0.5f;
-    float halfSizeZ = (box.max.z - box.min.z) * 0.5f;
-
-    float centerX = (box.max.x + box.min.x) * 0.5f;
-    float centerY = (box.max.y + box.min.y) * 0.5f;
-    float centerZ = (box.max.z + box.min.z) * 0.5f;
+    float x0 = box.min.x;
+    float y0 = box.min.y;
+    float z0 = box.min.z;
+    float x1 = box.max.x;
+    float y1 = box.max.y;
+    float z1 = box.max.z;
 
     Vector4f points[8];
 
-    points[0].set(centerX + halfSizeX, centerY + halfSizeY, centerZ + halfSizeZ, 1);
-    points[1].set(centerX + halfSizeX, centerY + halfSizeY, centerZ - halfSizeZ, 1);
-    points[2].set(centerX - halfSizeX, centerY + halfSizeY, centerZ - halfSizeZ, 1);
-    points[3].set(centerX - halfSizeX, centerY + halfSizeY, centerZ + halfSizeZ, 1);
-    points[4].set(centerX - halfSizeX, centerY - halfSizeY, centerZ + halfSizeZ, 1);
-    points[5].set(centerX - halfSizeX, centerY - halfSizeY, centerZ - halfSizeZ, 1);
-    points[6].set(centerX + halfSizeX, centerY - halfSizeY, centerZ - halfSizeZ, 1);
-    points[7].set(centerX + halfSizeX, centerY - halfSizeY, centerZ + halfSizeZ, 1);
+    points[0].set(x0, y0, z0, 1);
+    points[1].set(x1, y0, z0, 1);
+    points[2].set(x0, y1, z0, 1);
+    points[3].set(x0, y0, z1, 1);
+    points[4].set(x1, y1, z0, 1);
+    points[5].set(x1, y0, z1, 1);
+    points[6].set(x0, y1, z1, 1);
+    points[7].set(x1, y1, z1, 1);
 
-    float minX, minY, minZ;
-    float maxX, maxY, maxZ;
+    float minX = FLT_MAX, minY = FLT_MAX, minZ = FLT_MAX;
+    float maxX = -FLT_MAX, maxY = -FLT_MAX, maxZ = -FLT_MAX;
 
-    points[0] = mat.transform(points[0]);
-
-    minX = maxX = points[0].x;
-    minY = maxY = points[0].y;
-    minZ = maxZ = points[0].z;
-
-    for (int i = 1; i < 8; i++) {
+    for (int i = 0; i < 8; i++) {
         points[i] = mat.transform(points[i]);
 
         if (points[i].x > maxX) maxX = points[i].x;
-        else if (points[i].x < minX) minX = points[i].x;
-
+        if (points[i].x < minX) minX = points[i].x;
         if (points[i].y > maxY) maxY = points[i].y;
-        else if (points[i].y < minY) minY = points[i].y;
-
+        if (points[i].y < minY) minY = points[i].y;
         if (points[i].z > maxZ) maxZ = points[i].z;
-        else if (points[i].z < minZ) minZ = points[i].z;
+        if (points[i].z < minZ) minZ = points[i].z;
     }
 
@@ -149,5 +151,5 @@
 }
 
-bool BBox::intersect(const Vector3f& point)
+bool BBox::contains(const Vector3f& point)
 {
     if ((point.x < min.x) || (point.x > max.x)) return false;
Index: nanovis/branches/1.1/vrmath/Makefile.in
===================================================================
--- nanovis/branches/1.1/vrmath/Makefile.in	(revision 4889)
+++ nanovis/branches/1.1/vrmath/Makefile.in	(revision 4890)
@@ -40,9 +40,9 @@
 VRMATHLIB	= vrmath.a
 
-#		BBox.o \
 #		BPlane.o \
 #		Projection.o \
 
 OBJS		= \
+		BBox.o \
 		LineSegment.o \
 		Matrix4x4f.o \
Index: nanovis/branches/1.1/vrmath/Matrix4x4d.cpp
===================================================================
--- nanovis/branches/1.1/vrmath/Matrix4x4d.cpp	(revision 4889)
+++ nanovis/branches/1.1/vrmath/Matrix4x4d.cpp	(revision 4890)
@@ -946,5 +946,5 @@
 }
 
-void Matrix4x4d::setFloat(float *m)
+void Matrix4x4d::setFloat(const float *m)
 {
     for (int i = 0; i < 16; ++i) {
Index: nanovis/branches/1.1/vrmath/Matrix4x4f.cpp
===================================================================
--- nanovis/branches/1.1/vrmath/Matrix4x4f.cpp	(revision 4889)
+++ nanovis/branches/1.1/vrmath/Matrix4x4f.cpp	(revision 4890)
@@ -871,5 +871,5 @@
 }
 
-void Matrix4x4f::setDouble(double *m)
+void Matrix4x4f::setDouble(const double *m)
 {
     for (int i = 0; i < 16; ++i) {
Index: nanovis/branches/1.1/vrmath/include/vrmath/BBox.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/BBox.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/BBox.h	(revision 4890)
@@ -35,4 +35,13 @@
     BBox(const Vector3f& min, const Vector3f& max);
 
+    BBox& operator=(const BBox& other)
+    {
+        if (&other != this) {
+            min = other.min;
+            max = other.max;
+        }
+        return *this;
+    }
+
     /**
      * @brief make an empty bounding box
@@ -51,4 +60,7 @@
      */
     bool isEmpty();
+    bool isEmptyX();
+    bool isEmptyY();
+    bool isEmptyZ();
 
     /**
@@ -63,5 +75,5 @@
 
     /**
-     * @brief transform a bounding box with an matrix and set the bounding box
+     * @brief transform a bounding box with a matrix and set the bounding box
      */
     void transform(const BBox& box, const Matrix4x4d& mat);
@@ -73,7 +85,7 @@
 
     /**
-     * @brief check if the bounding box intersect with a point
+     * @brief check if the bounding box contains a point
      */
-    bool intersect(const Vector3f& point);
+    bool contains(const Vector3f& point);
 
     float getRadius() const;
@@ -93,5 +105,5 @@
 {
     Vector3f temp;
-    temp.x = (max.x+ min.x) * 0.5f;
+    temp.x = (max.x + min.x) * 0.5f;
     temp.y = (max.y + min.y) * 0.5f;
     temp.z = (max.z + min.z) * 0.5f;
Index: nanovis/branches/1.1/vrmath/include/vrmath/Matrix4x4d.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/Matrix4x4d.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/Matrix4x4d.h	(revision 4890)
@@ -30,4 +30,17 @@
     {
         set(m);
+    }
+
+    Matrix4x4d(const Matrix4x4d& other)
+    {
+        set(other.get());
+    }
+
+    Matrix4x4d& operator=(const Matrix4x4d& other)
+    {
+        if (&other != this) {
+            set(other.get());
+        }
+        return *this;
     }
 
@@ -113,7 +126,7 @@
      * @param m float matrix values
      */
-    void set(double *m);
+    void set(const double *m);
 
-    void setFloat(float *m);
+    void setFloat(const float *m);
 
     void print() const;
@@ -136,5 +149,5 @@
 }
 
-inline void Matrix4x4d::set(double *m)
+inline void Matrix4x4d::set(const double *m)
 {
     memcpy(_data, m, sizeof(double) * 16);
Index: nanovis/branches/1.1/vrmath/include/vrmath/Matrix4x4f.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/Matrix4x4f.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/Matrix4x4f.h	(revision 4890)
@@ -30,4 +30,17 @@
     {
         set(m);
+    }
+
+    Matrix4x4f(const Matrix4x4f& other)
+    {
+        set(other.get());
+    }
+
+    Matrix4x4f& operator=(const Matrix4x4f& other)
+    {
+        if (&other != this) {
+            set(other.get());
+        }
+        return *this;
     }
 
@@ -113,5 +126,5 @@
      * @param m float matrix values
      */
-    void set(float *m);
+    void set(const float *m);
 
     /**
@@ -119,5 +132,5 @@
      * @param m float matrix values
      */
-    void setDouble(double *m);
+    void setDouble(const double *m);
 
     void print() const;
@@ -140,5 +153,5 @@
 }
 
-inline void Matrix4x4f::set(float *m)
+inline void Matrix4x4f::set(const float *m)
 {
     memcpy(_data, m, sizeof(float) * 16);
Index: nanovis/branches/1.1/vrmath/include/vrmath/Quaternion.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/Quaternion.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/Quaternion.h	(revision 4890)
@@ -21,5 +21,17 @@
     Quaternion(double x, double y, double z, double w);
 
-    void set(double x1, double y1, double z1, double w1);
+    Quaternion(const Quaternion& other) :
+        x(other.x), y(other.y), z(other.z), w(other.w)
+    {}
+
+    Quaternion& operator=(const Quaternion& other)
+    {
+        if (&other != this) {
+            set(other.x, other.y, other.z, other.w);
+        }
+        return *this;
+    }
+
+    void set(double x, double y, double z, double w);
 
     const Quaternion& set(const Rotation& rot);
@@ -77,10 +89,10 @@
 }
 
-inline void Quaternion::set(double x1, double y1, double z1, double w1)
+inline void Quaternion::set(double x, double y, double z, double w)
 {
-    x = x1;
-    y = y1;
-    z = z1;
-    w = w1;
+    this->x = x;
+    this->y = y;
+    this->z = z;
+    this->w = w;
 }
 
Index: nanovis/branches/1.1/vrmath/include/vrmath/Rotation.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/Rotation.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/Rotation.h	(revision 4890)
@@ -28,7 +28,15 @@
     {}
 
-    Rotation(const Rotation& rotation) :
-        x(rotation.x), y(rotation.y), z(rotation.z), angle(rotation.angle)
+    Rotation(const Rotation& other) :
+        x(other.x), y(other.y), z(other.z), angle(other.angle)
     {}
+
+    Rotation& operator=(const Rotation& other)
+    {
+        if (&other != this) {
+            set(other.x, other.y, other.z, other.angle);
+        }
+        return *this;
+    }
 
     double getX() const
Index: nanovis/branches/1.1/vrmath/include/vrmath/Vector2f.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/Vector2f.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/Vector2f.h	(revision 4890)
@@ -28,5 +28,13 @@
     {}
 
-    void set(float x1, float y1);
+    Vector2f& operator=(const Vector2f& other)
+    {
+        if (&other != this) {
+            set(other.x, other.y);
+        }
+        return *this;
+    }
+
+    void set(float x, float y);
 
     void set(const Vector2f& v);
@@ -38,17 +46,17 @@
     double distance(const Vector2f& v) const;
 
-    double distance(float x1, float y1) const;
+    double distance(float x, float y) const;
 
     double distanceSquare(const Vector2f& v) const;
 
-    double distanceSquare(float x1, float y1) const;
+    double distanceSquare(float x, float y) const;
 
     float x, y;
 };
 
-inline void Vector2f::set(float x1, float y1)
+inline void Vector2f::set(float x, float y)
 {
-    x = x1;
-    y = y1;
+    this->x = x;
+    this->y = y;
 }
 
@@ -75,8 +83,8 @@
 }
 
-inline double Vector2f::distance(float x1, float y1) const
+inline double Vector2f::distance(float x, float y) const
 {	
-    double x2 = ((double)x1 - (double)x) , y2 = ((double)y1 - (double)y);
-    return sqrt(x2 * x2 + y2 * y2);
+    double x1 = ((double)x - (double)this->x) , y1 = ((double)y - (double)this->y);
+    return sqrt(x1 * x1 + y1 * y1);
 }
 
@@ -87,8 +95,8 @@
 }
 
-inline double Vector2f::distanceSquare(float x1, float y1) const
+inline double Vector2f::distanceSquare(float x, float y) const
 {	
-    double x2 = ((double)x1 - (double)x) , y2 = ((double)y1 - (double)y);
-    return (x2 * x2 + y2 * y2);
+    double x1 = ((double)x - (double)this->x) , y1 = ((double)y - (double)this->y);
+    return (x1 * x1 + y1 * y1);
 }
 
Index: nanovis/branches/1.1/vrmath/include/vrmath/Vector3f.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/Vector3f.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/Vector3f.h	(revision 4890)
@@ -27,26 +27,34 @@
         x(x1), y(y1), z(z1)
     {}
-
-    void set(float x1, float y1, float z1);
-
-    void set(const Vector3f& v3);
+    
+    Vector3f& operator=(const Vector3f& other)
+    {
+        if (&other != this) {
+            set(other.x, other.y, other.z);
+        }
+        return *this;
+    }
+
+    void set(float x, float y, float z);
+
+    void set(const Vector3f& v);
 
     double length() const;
 
-    double distance(const Vector3f& v3) const;
-
-    double distance(float x1, float y1, float z1) const;
-
-    double distanceSquare(const Vector3f& v3) const;
-
-    double distanceSquare(float x1, float y1, float z1) const;
+    double distance(const Vector3f& v) const;
+
+    double distance(float x, float y, float z) const;
+
+    double distanceSquare(const Vector3f& v) const;
+
+    double distanceSquare(float x, float y, float z) const;
 
     double dot(const Vector3f& v) const;
 
-    Vector3f cross(const Vector3f& v1) const;
+    Vector3f cross(const Vector3f& v) const;
 
     Vector3f normalize() const;
 
-    Vector3f scale(const Vector3f& sc) const;
+    Vector3f scale(const Vector3f& scale) const;
 
     Vector3f scale(float scale) const;
@@ -166,16 +174,16 @@
 #endif
 
-inline void Vector3f::set(float x1, float y1, float z1)
-{
-    x = x1;
-    y = y1;
-    z = z1;
-}
-
-inline void Vector3f::set(const Vector3f& v3)
-{
-    x = v3.x;
-    y = v3.y;
-    z = v3.z;
+inline void Vector3f::set(float x, float y, float z)
+{
+    this->x = x;
+    this->y = y;
+    this->z = z;
+}
+
+inline void Vector3f::set(const Vector3f& v)
+{
+    x = v.x;
+    y = v.y;
+    z = v.z;
 }
 
@@ -190,26 +198,26 @@
 }
 
-inline double Vector3f::distance(const Vector3f& v3) const
-{
-    double x1 = ((double)v3.x - (double)x) , y1 = ((double)v3.y - (double)y), z1 = ((double)v3.z - (double)z);
+inline double Vector3f::distance(const Vector3f& v) const
+{
+    double x1 = ((double)v.x - (double)x) , y1 = ((double)v.y - (double)y), z1 = ((double)v.z - (double)z);
     return sqrt(x1 * x1 + y1 * y1 + z1 * z1);
 }
 
-inline double Vector3f::distance(float x1, float y1, float z1) const
+inline double Vector3f::distance(float x, float y, float z) const
 {	
-    double x2 = ((double)x1 - (double)x) , y2 = ((double)y1 - (double)y), z2 = ((double)z1 - (double)z);
-    return sqrt(x2 * x2 + y2 * y2 + z2 * z2);
-}
-
-inline double Vector3f::distanceSquare(const Vector3f& v3) const
+    double x1 = ((double)x - (double)this->x) , y1 = ((double)y - (double)this->y), z1 = ((double)z - (double)this->z);
+    return sqrt(x1 * x1 + y1 * y1 + z1 * z1);
+}
+
+inline double Vector3f::distanceSquare(const Vector3f& v) const
 {	
-    double x1 = ((double)v3.x - (double)x) , y1 = ((double)v3.y - (double)y), z1 = ((double)v3.z - (double)z);
+    double x1 = ((double)v.x - (double)x) , y1 = ((double)v.y - (double)y), z1 = ((double)v.z - (double)z);
     return (x1 * x1 + y1 * y1 + z1 * z1);
 }
 
-inline double Vector3f::distanceSquare(float x1, float y1, float z1) const
+inline double Vector3f::distanceSquare(float x, float y, float z) const
 {	
-    double x2 = ((double)x1 - (double)x) , y2 = ((double)y1 - (double)y), z2 = ((double)z1 - (double)z);
-    return (x2 * x2 + y2 * y2 + z2 * z2);
+    double x1 = ((double)x - (double)this->x) , y1 = ((double)y - (double)this->y), z1 = ((double)z - (double)this->z);
+    return (x1 * x1 + y1 * y1 + z1 * z1);
 }
 
@@ -236,7 +244,7 @@
 }
 
-inline Vector3f Vector3f::scale(const Vector3f& sc) const
-{
-    return Vector3f(x * sc.x, y * sc.y, z * sc.z);
+inline Vector3f Vector3f::scale(const Vector3f& scale) const
+{
+    return Vector3f(x * scale.x, y * scale.y, z * scale.z);
 }
 
Index: nanovis/branches/1.1/vrmath/include/vrmath/Vector4f.h
===================================================================
--- nanovis/branches/1.1/vrmath/include/vrmath/Vector4f.h	(revision 4889)
+++ nanovis/branches/1.1/vrmath/include/vrmath/Vector4f.h	(revision 4890)
@@ -24,6 +24,6 @@
     {}
 
-    Vector4f(const Vector3f& v3, float w1) :
-        x(v3.x), y(v3.y), z(v3.z), w(w1)
+    Vector4f(const Vector3f& v, float w1) :
+        x(v.x), y(v.y), z(v.z), w(w1)
     {}
 
@@ -32,9 +32,17 @@
     {}
 
-    void set(float x1, float y1, float z1, float w1);
+    void set(float x, float y, float z, float w);
  
     void set(const Vector3f& v, float w);
 
-    void set(const Vector4f& v4);
+    void set(const Vector4f& v);
+
+    Vector4f& operator=(const Vector4f& other)
+    {
+        if (&other != this) {
+            set(other.x, other.y, other.z, other.w);
+        }
+        return *this;
+    }
 
     bool operator==(const Vector4f& op2) const
@@ -90,31 +98,31 @@
 }
 
-inline void Vector4f::set(float x1, float y1, float z1, float w1)
+inline void Vector4f::set(float x, float y, float z, float w)
 {
-    x = x1;
-    y = y1;
-    z = z1;
-    w = w1;
+    this->x = x;
+    this->y = y;
+    this->z = z;
+    this->w = w;
 }
 
-inline void Vector4f::set(const Vector4f& v4)
-{
-    x = v4.x;
-    y = v4.y;
-    z = v4.z;
-    w = v4.w;
-}
-
-inline void Vector4f::set(const Vector3f& v, float w1)
+inline void Vector4f::set(const Vector4f& v)
 {
     x = v.x;
     y = v.y;
     z = v.z;
-    w = w1;
+    w = v.w;
 }
 
-inline float Vector4f::dot(const Vector4f& vec) const
+inline void Vector4f::set(const Vector3f& v, float w)
 {
-    return (x * vec.x + y * vec.y + z * vec.z + w * vec.w);
+    x = v.x;
+    y = v.y;
+    z = v.z;
+    this->w = w;
+}
+
+inline float Vector4f::dot(const Vector4f& v) const
+{
+    return (x * v.x + y * v.y + z * v.z + w * v.w);
 }
 
