Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SFPoint3f.h

Go to the documentation of this file.
00001 
00002 //                            SFPoint.h                                       //
00004 
00005 #ifndef POINT3F_H
00006 #define POINT3F_H
00007 
00008 #include "SFVec3f.h"
00009 
00010 #include <math.h>
00011 #include <iostream>
00012 
00013 namespace X3DTK {
00014 
00015 class SFString;
00016 
00020 
00021 class SFPoint3f
00022 {
00023 public:
00025   float x;
00027   float y;
00029   float z;
00030 
00032   SFPoint3f();
00034   SFPoint3f(float x, float y, float z);
00036   SFPoint3f(const SFPoint3f &p);
00038   SFPoint3f &operator= (const SFPoint3f &v);
00040   SFPoint3f &operator+= (const SFVec3f &v);
00042   SFPoint3f &operator-= (const SFVec3f &v);
00044   explicit SFPoint3f(const SFString &s);
00045   // Conversion from vector to point.
00046   explicit SFPoint3f(const SFVec3f &V);
00047 
00049   friend SFPoint3f operator+ (const SFPoint3f &v1, const SFVec3f &v2);
00051   friend SFPoint3f operator- (const SFPoint3f &v1, const SFVec3f &v2);
00053   friend SFVec3f operator- (const SFPoint3f &v1, const SFPoint3f &v2);
00055   friend SFPoint3f operator* (const float a, const SFPoint3f &v);
00057   friend float distance(const SFPoint3f &A, const SFPoint3f &B);
00059   inline float *f_data() {return &x;};
00061   inline const float *f_data() const {return &x;};
00063   static const SFPoint3f null;
00064 };
00065 
00066 }
00067 
00068 #endif

Generated on Thu Dec 4 13:25:47 2003 for X3DToolKit by doxygen1.2.18