Back to index

salome-smesh  6.5.0
Public Member Functions | Public Attributes | Friends
R2 Class Reference

#include <Rn.h>

List of all members.

Public Member Functions

 R2 ()
 R2 (R a, R b)
 R2 (R2 A, R2 B)
R2 operator+ (R2 P) const
R2 operator+= (R2 P)
R2 operator- (R2 P) const
R2 operator-= (R2 P)
R2 operator- () const
R2 operator+ () const
R operator, (R2 P) const
R operator^ (R2 P) const
R2 operator* (R c) const
R2 operator*= (R c)
R2 operator/ (R c) const
R2 operator/= (R c)
Roperator[] (int i)
R2 orthogonal ()

Public Attributes

R x
R y

Friends

std::ostream & operator<< (std::ostream &f, const R2 &P)
std::istream & operator>> (std::istream &f, R2 &P)
std::ostream & operator<< (std::ostream &f, const R2 *P)
std::istream & operator>> (std::istream &f, R2 *P)
R2 operator* (R c, R2 P)

Detailed Description

Definition at line 87 of file Rn.h.


Constructor & Destructor Documentation

R2::R2 ( ) [inline]

Definition at line 102 of file Rn.h.

:x(0),y(0) {}              //les constructeurs

Here is the caller graph for this function:

R2::R2 ( R  a,
R  b 
) [inline]

Definition at line 103 of file Rn.h.

:x(a),y(b)  {}
R2::R2 ( R2  A,
R2  B 
) [inline]

Definition at line 104 of file Rn.h.

:x(B.x-A.x),y(B.y-A.y)  {} //vecteur defini par 2 points

Member Function Documentation

R2 R2::operator* ( R  c) const [inline]

Definition at line 114 of file Rn.h.

{return R2(x*c,y*c);}  // produit a droite  P*c

Here is the call graph for this function:

R2 R2::operator*= ( R  c) [inline]

Definition at line 115 of file Rn.h.

{x *= c; y *= c; return *this;}
R2 R2::operator+ ( R2  P) const [inline]

Definition at line 106 of file Rn.h.

{return R2(x+P.x,y+P.y);}     // Q+P possible

Here is the call graph for this function:

R2 R2::operator+ ( ) const [inline]

Definition at line 111 of file Rn.h.

{return *this;}                   // +Q
R2 R2::operator+= ( R2  P) [inline]

Definition at line 107 of file Rn.h.

{x += P.x;y += P.y; return *this;}// Q+=P;
R R2::operator, ( R2  P) const [inline]

Definition at line 112 of file Rn.h.

{return x*P.x+y*P.y;} // produit scalaire (Q,P)
R2 R2::operator- ( R2  P) const [inline]

Definition at line 108 of file Rn.h.

{return R2(x-P.x,y-P.y);}     // Q-P

Here is the call graph for this function:

R2 R2::operator- ( ) const [inline]

Definition at line 110 of file Rn.h.

{return R2(-x,-y);}               // -Q

Here is the call graph for this function:

R2 R2::operator-= ( R2  P) [inline]

Definition at line 109 of file Rn.h.

{x -= P.x;y -= P.y; return *this;} // Q-=P;
R2 R2::operator/ ( R  c) const [inline]

Definition at line 116 of file Rn.h.

{return R2(x/c,y/c);}  // division par un reel

Here is the call graph for this function:

R2 R2::operator/= ( R  c) [inline]

Definition at line 117 of file Rn.h.

{x /= c; y /= c; return *this;}
R& R2::operator[] ( int  i) [inline]

Definition at line 118 of file Rn.h.

{return (&x)[i];}        // la coordonnee i
R R2::operator^ ( R2  P) const [inline]

Definition at line 113 of file Rn.h.

{return x*P.y-y*P.x;} // produit vectoriel Q^P
R2 R2::orthogonal ( ) [inline]

Definition at line 119 of file Rn.h.

{return R2(-y,x);}    //le vecteur orthogonal dans R2

Here is the call graph for this function:


Friends And Related Function Documentation

R2 operator* ( R  c,
R2  P 
) [friend]

Definition at line 120 of file Rn.h.

{return P*c;}    // produit a gauche c*P
std::ostream& operator<< ( std::ostream &  f,
const R2 P 
) [friend]

Definition at line 89 of file Rn.h.

  { f << P.x << ' ' << P.y ; return f; }
std::ostream& operator<< ( std::ostream &  f,
const R2 P 
) [friend]

Definition at line 94 of file Rn.h.

  { f << P->x << ' ' << P->y ; return f; }
std::istream& operator>> ( std::istream &  f,
R2 P 
) [friend]

Definition at line 91 of file Rn.h.

  { f >> P.x >> P.y ; return f; }
std::istream& operator>> ( std::istream &  f,
R2 P 
) [friend]

Definition at line 96 of file Rn.h.

  { f >> P->x >> P->y ; return f; }

Member Data Documentation

Definition at line 100 of file Rn.h.

Definition at line 100 of file Rn.h.


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