Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Point_2< T > Class Template Reference

#include <mapbasic.h>

Inheritance diagram for Point_2< T >:
Collaboration diagram for Point_2< T >:

Public Types

typedef R_ R
 
typedef R::RT RT
 
typedef R::FT FT
 
typedef R::Point_2_base RPoint_2
 
typedef R::Vector_2_base RVector_2
 

Public Member Functions

 Point_2 ()
 
 Point_2 (Origin)
 
 Point_2 (T t)
 
 Point_2 (T a, T b)
 
T & operator[] (const int i)
 
const T & operator[] (const int i) const
 
Point_2operator+= (const Vector_2< T > &v)
 Assign operators. More...
 
Point_2operator-= (const Vector_2< T > &v)
 
Point_2 operator+ (const Vector_2< T > &v) const
 Arithmatic operators. More...
 
Point_2 operator- (const Vector_2< T > &v) const
 
Vector_2< T > operator- (const Point_2 &v) const
 
bool operator== (const Point_2 &p) const
 
bool operator!= (const Point_2 &p) const
 
bool operator< (const Point_2 &v) const
 
bool is_origin () const
 
 Point_2 ()
 
 Point_2 (const Origin &o)
 
 Point_2 (const CGAL::Point_2< R > &p)
 
 Point_2 (const RPoint_2 &p)
 
 Point_2 (const RT &hx, const RT &hy)
 
 Point_2 (const RT &hx, const RT &hy, const RT &hw)
 
bool operator== (const CGAL::Point_2< R > &p) const
 
bool operator!= (const CGAL::Point_2< R > &p) const
 
RT hx () const
 
RT hy () const
 
RT hw () const
 
FT x () const
 
FT y () const
 
RT homogeneous (int i) const
 
FT cartesian (int i) const
 
FT operator[] (int i) const
 
int dimension () const
 
Bbox_2 bbox () const
 
CGAL::Point_2< Rtransform (const CGAL::Aff_transformation_2< R > &t) const
 

Private Member Functions

 Point_2 (const RVector_2 &v)
 

Friends

CGAL_FRIEND_INLINE
CGAL::Point_2< R > CGAL_SCOPE
vector_to_point_conversion 
CGAL_NULL_TMPL_ARGS (const CGAL::Vector_2< R > &v)
 

Additional Inherited Members

- Protected Types inherited from Vector_2< T >
typedef R_ R
 
typedef R::RT RT
 
typedef R::FT FT
 
typedef R::Vector_2_base RVector_2
 
- Protected Member Functions inherited from Vector_2< T >
 Vector_2 ()
 
 Vector_2 (Tt)
 
 Vector_2 (Null_vector)
 
 Vector_2 (Ta, Tb)
 
 Vector_2 ()
 
 Vector_2 (const CGAL::Vector_2< R > &v)
 
 Vector_2 (const RVector_2 &v)
 
 Vector_2 (const Null_vector &v)
 
 Vector_2 (const RT &x, const RT &y)
 
 Vector_2 (const RT &x, const RT &y, const RT &w)
 
T & operator[] (const int i)
 
const T & operator[] (const int &i) const
 
FT operator[] (int i) const
 
x () const
 
FT x () const
 
y () const
 
FT y () const
 
Vector_2operator+= (const Vector_2 &v)
 Assign operators. More...
 
Vector_2operator-= (const Vector_2 &v)
 
Vector_2operator*= (const Tt)
 
Vector_2operator/= (const Tt)
 
Vector_2 operator+ (const Vector_2 &v) const
 Arithmatic operators. More...
 
CGAL::Vector_2< Roperator+ (const CGAL::Vector_2< R > &w) const
 
Vector_2 operator- (const Vector_2 &v) const
 
Vector_2 operator- () const
 
CGAL::Vector_2< Roperator- (const CGAL::Vector_2< R > &w) const
 
CGAL::Vector_2< Roperator- () const
 
Vector_2 operator* (const Tt) const
 
operator* (const Vector_2 &v) const
 
FT operator* (const CGAL::Vector_2< R > &w) const
 
CGAL::Vector_2< Roperator* (const RT &c) const
 
CGAL::Vector_2< Roperator* (const Quotient< RT > &q) const
 
Vector_2 operator/ (const Tt) const
 
CGAL::Vector_2< Roperator/ (const Quotient< RT > &q) const
 
CGAL::Vector_2< Roperator/ (const RT &c) const
 
squared_norm () const
 
norm () const
 
Vector_2normalize ()
 
Vector_2neg ()
 
bool operator== (const Vector_2 &p) const
 
bool operator== (const CGAL::Vector_2< R > &v) const
 
bool operator== (const Null_vector &v) const
 
bool operator!= (const Vector_2 &p) const
 
bool operator!= (const CGAL::Vector_2< R > &v) const
 
bool operator!= (const Null_vector &v) const
 
bool operator< (const Vector_2 &v) const
 
bool is_null () const
 
RT hx () const
 
RT hy () const
 
RT hw () const
 
RT homogeneous (int i) const
 
FT cartesian (int i) const
 
int dimension () const
 
CGAL::Direction_2< Rdirection () const
 
CGAL::Vector_2< Rperpendicular (const Orientation &o) const
 
CGAL::Vector_2< Rtransform (const CGAL::Aff_transformation_2< R > &t) const
 
- Protected Attributes inherited from Vector_2< T >
_x
 
_y
 

Detailed Description

template<class T>
class Point_2< T >

Definition at line 274 of file mapbasic.h.

Member Typedef Documentation

typedef R::FT FT

Definition at line 81 of file Point_2.h.

typedef R_ R

Definition at line 79 of file Point_2.h.

typedef R::Point_2_base RPoint_2

Definition at line 82 of file Point_2.h.

typedef R::RT RT

Definition at line 80 of file Point_2.h.

typedef R::Vector_2_base RVector_2

Definition at line 83 of file Point_2.h.

Constructor & Destructor Documentation

Point_2 ( )
inline

Definition at line 276 of file mapbasic.h.

Referenced by Point_2< R >::operator+(), and Point_2< R >::operator-().

276 {}

Here is the caller graph for this function:

Point_2 ( Origin  )
inline

Definition at line 277 of file mapbasic.h.

277 : Vector_2<T>( 0, 0) {}
Point_2 ( t)
inlineexplicit

Definition at line 278 of file mapbasic.h.

278 : Vector_2<T>(t) {}
Point_2 ( a,
b 
)
inline

Definition at line 279 of file mapbasic.h.

279 : Vector_2<T>(a, b) {}
Point_2 ( )
inline

Definition at line 91 of file Point_2.h.

92  {}
Point_2 ( const Origin o)
inline

Definition at line 94 of file Point_2.h.

95  : RPoint_2(o)
96  {}
R::Point_2_base RPoint_2
Definition: Point_2.h:82
Point_2 ( const CGAL::Point_2< R > &  p)
inline

Definition at line 98 of file Point_2.h.

99  : RPoint_2((RPoint_2&)p)
100  {}
R::Point_2_base RPoint_2
Definition: Point_2.h:82
Point_2 ( const RPoint_2< T > &  p)
inline

Definition at line 102 of file Point_2.h.

103  : RPoint_2(p)
104  {}
R::Point_2_base RPoint_2
Definition: Point_2.h:82
Point_2 ( const RT hx,
const RT hy 
)
inline

Definition at line 106 of file Point_2.h.

107  : RPoint_2(hx, hy)
108  {}
RT hy() const
Definition: Point_2.h:130
R::Point_2_base RPoint_2
Definition: Point_2.h:82
RT hx() const
Definition: Point_2.h:125
Point_2 ( const RT hx,
const RT hy,
const RT hw 
)
inline

Definition at line 110 of file Point_2.h.

111  : RPoint_2(hx, hy, hw)
112  {}
RT hy() const
Definition: Point_2.h:130
RT hw() const
Definition: Point_2.h:135
R::Point_2_base RPoint_2
Definition: Point_2.h:82
RT hx() const
Definition: Point_2.h:125
Point_2 ( const RVector_2 v)
inlineprivate

Definition at line 181 of file Point_2.h.

182  : RPoint_2(v)
183  {}
*********************************************************************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
Definition: roccomf90.h:20
R::Point_2_base RPoint_2
Definition: Point_2.h:82

Member Function Documentation

Bbox_2 bbox ( ) const
inline

Definition at line 169 of file Point_2.h.

170  {
171  return RPoint_2::bbox();
172  }
FT cartesian ( int  i) const
inline

Definition at line 154 of file Point_2.h.

Referenced by Point_2< R >::operator[]().

155  {
156  return RPoint_2::cartesian(i);
157  }
blockLoc i
Definition: read.cpp:79

Here is the caller graph for this function:

int dimension ( ) const
inline

Definition at line 164 of file Point_2.h.

165  {
166  return 2;
167  }
RT homogeneous ( int  i) const
inline

Definition at line 149 of file Point_2.h.

150  {
151  return RPoint_2::homogeneous(i);
152  }
blockLoc i
Definition: read.cpp:79
RT hw ( ) const
inline

Definition at line 135 of file Point_2.h.

136  {
137  return RPoint_2::hw();
138  }
RT hx ( ) const
inline

Definition at line 125 of file Point_2.h.

126  {
127  return RPoint_2::hx();
128  }
RT hy ( ) const
inline

Definition at line 130 of file Point_2.h.

131  {
132  return RPoint_2::hy();
133  }
bool is_origin ( ) const
inline

Definition at line 308 of file mapbasic.h.

308 { return _x==0&&_y==0; }
bool operator!= ( const CGAL::Point_2< R > &  p) const
inline

Definition at line 120 of file Point_2.h.

121  {
122  return !(*this == p);
123  }
bool operator!= ( const Point_2< T > &  p) const
inline

Definition at line 302 of file mapbasic.h.

303  { return x()!=p.x() || y()!=p.y(); }
FT y() const
Definition: Point_2.h:144
FT x() const
Definition: Point_2.h:139
Point_2 operator+ ( const Vector_2< T > &  v) const
inline

Arithmatic operators.

Definition at line 292 of file mapbasic.h.

293  { return Point_2(_x+v.x(), _y+v.y()); }
Type x() const
Definition: mapbasic.h:208
Type y() const
Definition: mapbasic.h:209
Point_2()
Definition: mapbasic.h:276
Point_2& operator+= ( const Vector_2< T > &  v)
inline

Assign operators.

Definition at line 286 of file mapbasic.h.

287  { _x+=v.x(); _y+=v.y(); return *this; }
Type x() const
Definition: mapbasic.h:208
Type y() const
Definition: mapbasic.h:209
Point_2 operator- ( const Vector_2< T > &  v) const
inline

Definition at line 294 of file mapbasic.h.

295  { return Point_2(_x-v.x(), _y-v.y()); }
Type x() const
Definition: mapbasic.h:208
Type y() const
Definition: mapbasic.h:209
Point_2()
Definition: mapbasic.h:276
Vector_2<T> operator- ( const Point_2< T > &  v) const
inline

Definition at line 296 of file mapbasic.h.

297  { return Vector_2<T>(_x-v.x(), _y-v.y()); }
FT y() const
Definition: Point_2.h:144
FT x() const
Definition: Point_2.h:139
Point_2& operator-= ( const Vector_2< T > &  v)
inline

Definition at line 288 of file mapbasic.h.

289  { _x-=v.x(); _y-=v.y(); return *this; }
Type x() const
Definition: mapbasic.h:208
Type y() const
Definition: mapbasic.h:209
bool operator< ( const Point_2< T > &  v) const
inline

Definition at line 305 of file mapbasic.h.

306  { return Vector_2<T>::operator<(v); }
bool operator<(const Vector_2 &v) const
Definition: mapbasic.h:256
bool operator== ( const CGAL::Point_2< R > &  p) const
inline

Definition at line 115 of file Point_2.h.

116  {
117  return RPoint_2::operator==(p);
118  }
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
Definition: Point_2.h:239
bool operator== ( const Point_2< T > &  p) const
inline

Definition at line 299 of file mapbasic.h.

300  { return x()==p.x() && y()==p.y(); }
FT y() const
Definition: Point_2.h:144
FT x() const
Definition: Point_2.h:139
FT operator[] ( int  i) const
inline

Definition at line 159 of file Point_2.h.

160  {
161  return cartesian(i);
162  }
FT cartesian(int i) const
Definition: Point_2.h:154
blockLoc i
Definition: read.cpp:79
T& operator[] ( const int  i)
inline

Definition at line 280 of file mapbasic.h.

280 { return (&_x)[i]; }
blockLoc i
Definition: read.cpp:79
const T& operator[] ( const int  i) const
inline

Definition at line 281 of file mapbasic.h.

281 { return (&_x)[i]; }
blockLoc i
Definition: read.cpp:79
CGAL::Point_2<R> transform ( const CGAL::Aff_transformation_2< R > &  t) const
inline

Definition at line 174 of file Point_2.h.

175  {
176  return RPoint_2::transform(t);
177  }
FT x ( ) const
inline

Definition at line 139 of file Point_2.h.

Referenced by Segment_2_Segment_2_pair< R >::intersection_type(), Point_2< R >::operator!=(), Point_2< R >::operator-(), and Point_2< R >::operator==().

140  {
141  return RPoint_2::x();
142  }
void int int REAL * x
Definition: read.cpp:74

Here is the caller graph for this function:

FT y ( ) const
inline

Definition at line 144 of file Point_2.h.

Referenced by Segment_2_Segment_2_pair< R >::intersection_type(), Point_2< R >::operator!=(), Point_2< R >::operator-(), and Point_2< R >::operator==().

145  {
146  return RPoint_2::y();
147  }
void int int REAL REAL * y
Definition: read.cpp:74

Here is the caller graph for this function:

Friends And Related Function Documentation


The documentation for this class was generated from the following files: