25 #ifndef __MAP_BASIC_H_
26 #define __MAP_BASIC_H_
28 #define MAP_BEGIN_NAMESPACE namespace MAP {
29 #define MAP_END_NAMESPACE }
30 #define USE_MAP_NAMESPACE using namespace MAP;
40 using COM::Element_node_enumerator;
41 using COM::Element_node_enumerator_str_2;
42 using COM::Element_node_enumerator_uns;
43 using COM::Facet_node_enumerator;
44 using COM::Element_vectors_k_const;
45 using COM::Element_vectors_k;
46 using COM::Element_node_vectors_k_const;
47 using COM::Element_node_vectors_k;
63 Type
x()
const {
return _x; }
64 Type
y()
const {
return _y; }
65 Type
z()
const {
return _z; }
69 {
_x+=t;
_y+=t;
_z+=t;
return *
this; }
73 {
_x-=t;
_y-=t;
_z-=t;
return *
this; }
77 {
_x*=t;
_y*=t;
_z*=t;
return *
this; }
81 {
_x/=t;
_y/=t;
_z/=t;
return *
this; }
125 {
return x()==p.
x() &&
y()==p.
y() &&
z()==p.
z(); }
127 {
return x()!=p.
x() ||
y()!=p.
y() ||
z()!=p.
z(); }
141 template <
class Type>
142 std::ostream &operator<<( std::ostream &os, const Vector_3<Type> &p) {
143 return os <<
'(' << p.
x() <<
',' << p.y() <<
',' << p.z() <<
')';
162 {
_x+=v.
x();
_y+=v.
y();
_z+=v.
z();
return *
this; }
164 {
_x-=v.
x();
_y-=v.
y();
_z-=v.
z();
return *
this; }
175 {
return x()==p.
x() &&
y()==p.
y() &&
z()==p.
z(); }
178 {
return x()!=p.
x() ||
y()!=p.
y() ||
z()!=p.
z(); }
193 template <
class Type>
194 std::ostream &operator<<( std::ostream &os, const Point_3<Type> &p) {
195 return os <<
'(' << p.
x() <<
',' << p.y() <<
',' << p.z() <<
')';
198 template <
class Type>
208 Type
x()
const {
return _x; }
209 Type
y()
const {
return _y; }
213 {
_x+=v.
_x;
_y+=v.
_y;
return *
this; }
215 {
_x-=v.
_x;
_y-=v.
_y;
return *
this; }
217 {
_x*=t;
_y*=t;
return *
this; }
219 {
_x/=t;
_y/=t;
return *
this; }
251 {
return x()==p.
x() &&
y()==p.
y(); }
254 {
return x()!=p.
x() ||
y()!=p.
y(); }
268 template <
class Type>
269 std::ostream &operator<<( std::ostream &os, const Vector_2<Type> &p) {
270 return os <<
'(' << p.
x() <<
',' << p.y() <<
')';
287 {
_x+=v.
x();
_y+=v.
y();
return *
this; }
289 {
_x-=v.
x();
_y-=v.
y();
return *
this; }
300 {
return x()==p.
x() &&
y()==p.
y(); }
303 {
return x()!=p.
x() ||
y()!=p.
y(); }
317 template <
class Type>
318 std::ostream &operator<<( std::ostream &os, const Point_2<Type> &p) {
319 return os <<
'(' << p.
x() <<
',' << p.y() <<
')';
const Type & operator[](const int &i) const
Point_3 operator+(const Vector_3< T > &v) const
Arithmatic operators.
bool operator==(const Vector_2 &p) const
#define MAP_END_NAMESPACE
bool operator!=(const Vector_3 &p) const
Vector_2 operator+(const Vector_2 &v) const
Arithmatic operators.
Vector_3 operator-() const
Point_2 operator-(const Vector_2< T > &v) const
Point_2 & operator-=(const Vector_2< T > &v)
T & operator[](const int i)
Vector_2 & operator/=(const Type t)
Vector_3< T > operator*(T t, const Vector_3< T > &v)
Vector_3 & operator/=(const Vector_3 &v)
Vector_3 operator+(const Type t) const
Arithmatic operators.
Vector_3 operator-(const Vector_3 &v) const
bool operator<(const Vector_3 &v) const
Vector_3 & operator-=(const Vector_3 &v)
Vector_2 & operator+=(const Vector_2 &v)
Assign operators.
const Type & operator[](const int i) const
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Vector_2 operator-() const
const T & operator[](const int i) const
bool operator==(const Point_2 &p) const
Vector_3 & operator*=(const Type t)
bool operator!=(const Point_3 &p) const
Type squared_norm() const
T & operator[](const int i)
Point_3 operator-(const Vector_3< T > &v) const
Vector_2< T > operator-(const Point_2 &v) const
Vector_2 operator/(const Type t) const
Vector_3 operator+(const Vector_3 &v) const
Vector_2 & operator-=(const Vector_2 &v)
Vector_3(Type a, Type b, Type c)
Vector_2 operator*(const Type t) const
Type squared_norm() const
static Vector_3 cross_product(const Vector_3 &v, const Vector_3 &w)
Vector_3 & operator+=(const Type t)
Assign operators.
bool operator<(const Vector_2 &v) const
bool operator<(const Point_2 &v) const
bool operator<(const Point_3 &v) const
Type operator*(const Vector_2 &v) const
Vector_3 operator/(const Type t) const
Type operator*(const Vector_3 &v) const
Vector_3 & operator/=(const Type t)
Vector_2 & operator*=(const Type t)
Point_2 operator+(const Vector_2< T > &v) const
Arithmatic operators.
Point_2 & operator+=(const Vector_2< T > &v)
Assign operators.
Vector_3 & operator-=(const Type t)
bool operator==(const Vector_3 &p) const
Vector_2 operator-(const Vector_2 &v) const
#define MAP_BEGIN_NAMESPACE
bool operator!=(const Vector_2 &p) const
Point_3 & operator+=(const Vector_3< T > &v)
Assign operators.
Vector_3 operator*(const Type t) const
Some basic geometric data types.
bool operator==(const Point_3 &p) const
Vector_3 & operator+=(const Vector_3 &v)
Type & operator[](const int i)
Vector_3 operator-(const Type t) const
bool operator!=(const Point_2 &p) const
Type & operator[](const int i)
Vector_3< T > operator-(const Point_3 &v) const
const T & operator[](const int i) const
Vector_3 & operator*=(const Vector_3 &v)
Point_3 & operator-=(const Vector_3< T > &v)