Version: 6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
INTERP_KERNEL::Node Class Reference

Public Member Functions

 Node (double x, double y)
 Node (const double *coords)
 Node (std::istream &stream)
void incrRef () const
bool decrRef ()
void initLocs () const
void setLoc (TypeOfLocInPolygon loc) const
TypeOfLocInPolygon getLoc () const
void declareIn () const
void declareOn () const
void declareOnLim () const
void declareOut ()
void declareOnTangent ()
 operator const double * () const
bool isEqual (const Node &other) const
double getSlope (const Node &other) const
bool isEqualAndKeepTrack (const Node &other, std::vector< Node * > &track) const
void dumpInXfigFile (std::ostream &stream, int resolution, const Bounds &box) const
double distanceWithSq (const Node &other) const
double operator[] (int i) const
void setNewCoords (double x, double y)
void applySimilarity (double xBary, double yBary, double dimChar)
void unApplySimilarity (double xBary, double yBary, double dimChar)
void fillGlobalInfoAbs (const std::map< INTERP_KERNEL::Node *, int > &mapThis, const std::map< INTERP_KERNEL::Node *, int > &mapOther, int offset1, int offset2, double fact, double baryX, double baryY, std::vector< double > &addCoo, std::map< INTERP_KERNEL::Node *, int > &mapAddCoo, int *nodeId) const
void fillGlobalInfoAbs2 (const std::map< INTERP_KERNEL::Node *, int > &mapThis, const std::map< INTERP_KERNEL::Node *, int > &mapOther, int offset1, int offset2, double fact, double baryX, double baryY, std::vector< double > &addCoo, std::map< INTERP_KERNEL::Node *, int > &mapAddCoo, std::vector< int > &pointsOther) const

Static Public Member Functions

static double computeSlope (const double *pt1, const double *pt2)
static double computeAngle (const double *pt1, const double *pt2)
static double dot (const double *vect1, const double *vect2)
static double sign (double val)
static double norm (const double *vect)
static bool areDoubleEquals (double a, double b)
static bool areDoubleEqualsWP (double a, double b, double k)
static double distanceBtw2Pt (const double *a, const double *b)
static double distanceBtw2PtSq (const double *a, const double *b)

Protected Member Functions

 ~Node ()

Protected Attributes

unsigned char _cnt
TypeOfLocInPolygon _loc
double _coords [2]

Detailed Description

As nodes can be shared between edges it is dealed with ref counting.

Constructor & Destructor Documentation

Node::Node ( double  x,
double  y 
)

References _coords.

Node::Node ( const double *  coords)

References _coords.

Node::Node ( std::istream &  stream)

References _coords.

Node::~Node ( )
protected

Member Function Documentation

void INTERP_KERNEL::Node::incrRef ( ) const
bool Node::decrRef ( )
void INTERP_KERNEL::Node::initLocs ( ) const
void INTERP_KERNEL::Node::setLoc ( TypeOfLocInPolygon  loc) const
TypeOfLocInPolygon INTERP_KERNEL::Node::getLoc ( ) const
void INTERP_KERNEL::Node::declareIn ( ) const
void INTERP_KERNEL::Node::declareOn ( ) const
void INTERP_KERNEL::Node::declareOnLim ( ) const
void INTERP_KERNEL::Node::declareOut ( )
void INTERP_KERNEL::Node::declareOnTangent ( )
INTERP_KERNEL::Node::operator const double * ( ) const
bool Node::isEqual ( const Node other) const
double Node::getSlope ( const Node other) const
bool Node::isEqualAndKeepTrack ( const Node other,
std::vector< Node * > &  track 
) const

Convenient method. Equivalent to isEqual method. In case of true is returned, '&other' is added in 'track' container.

References isEqual().

Referenced by INTERP_KERNEL::Edge::changeEndNodeWithAndKeepTrack(), and INTERP_KERNEL::Edge::changeStartNodeWithAndKeepTrack().

void Node::dumpInXfigFile ( std::ostream &  stream,
int  resolution,
const Bounds &  box 
) const
double Node::distanceWithSq ( const Node other) const
double INTERP_KERNEL::Node::operator[] ( int  i) const
void INTERP_KERNEL::Node::setNewCoords ( double  x,
double  y 
)

use with caution

Referenced by INTERP_KERNEL::Edge::Interpolate1DLin().

double Node::computeSlope ( const double *  pt1,
const double *  pt2 
)
static

WARNING different from 'computeAngle' method ! The returned value are not in the same interval ! Here in -Pi/2; Pi/2. Typically this method returns the same value by exchanging pt1 and pt2. Use in process of detection of a point in or not in polygon.

References norm(), and INTERP_KERNEL::EdgeArcCircle::SafeAcos().

Referenced by getSlope().

double Node::computeAngle ( const double *  pt1,
const double *  pt2 
)
static

WARNING different from 'computeSlope' method. Here angle in -Pi;Pi is returned. This method is anti-symetric.

References INTERP_KERNEL::EdgeArcCircle::GetAbsoluteAngleOfNormalizedVect(), and norm().

Referenced by INTERP_KERNEL::EdgeArcCircle::getDistanceToPoint(), and INTERP_KERNEL::EdgeArcCircle::isNodeLyingOn().

void Node::applySimilarity ( double  xBary,
double  yBary,
double  dimChar 
)

apply a Similarity transformation on this.

Parameters
xBaryis the opposite of the X translation to do.
yBaryis the opposite of the Y translation to do.
dimCharis the reduction factor.

References _coords.

Referenced by INTERP_KERNEL::Edge::sortIdsAbs().

void Node::unApplySimilarity ( double  xBary,
double  yBary,
double  dimChar 
)

apply the reverse Similarity transformation on this. This method is the opposite of Node::applySimilarity method to retrieve the initial state.

Parameters
xBaryis the opposite of the X translation to do.
yBaryis the opposite of the Y translation to do.
dimCharis the reduction factor.

References _coords.

Referenced by INTERP_KERNEL::QuadraticPolygon::appendCrudeData().

static double INTERP_KERNEL::Node::dot ( const double *  vect1,
const double *  vect2 
)
static
static double INTERP_KERNEL::Node::sign ( double  val)
static
static double INTERP_KERNEL::Node::norm ( const double *  vect)
static
static bool INTERP_KERNEL::Node::areDoubleEquals ( double  a,
double  b 
)
static
static bool INTERP_KERNEL::Node::areDoubleEqualsWP ( double  a,
double  b,
double  k 
)
static

idem areDoubleEquals except that precision of comparison is modified.

Referenced by INTERP_KERNEL::ArcCArcCIntersector::getIntersectionsCharacteristicVal().

static double INTERP_KERNEL::Node::distanceBtw2Pt ( const double *  a,
const double *  b 
)
static
static double INTERP_KERNEL::Node::distanceBtw2PtSq ( const double *  a,
const double *  b 
)
static
void Node::fillGlobalInfoAbs ( const std::map< INTERP_KERNEL::Node *, int > &  mapThis,
const std::map< INTERP_KERNEL::Node *, int > &  mapOther,
int  offset1,
int  offset2,
double  fact,
double  baryX,
double  baryY,
std::vector< double > &  addCoo,
std::map< INTERP_KERNEL::Node *, int > &  mapAddCoo,
int *  nodeId 
) const
void Node::fillGlobalInfoAbs2 ( const std::map< INTERP_KERNEL::Node *, int > &  mapThis,
const std::map< INTERP_KERNEL::Node *, int > &  mapOther,
int  offset1,
int  offset2,
double  fact,
double  baryX,
double  baryY,
std::vector< double > &  addCoo,
std::map< INTERP_KERNEL::Node *, int > &  mapAddCoo,
std::vector< int > &  pointsOther 
) const

Member Data Documentation

unsigned char INTERP_KERNEL::Node::_cnt
mutableprotected

Referenced by decrRef().

TypeOfLocInPolygon INTERP_KERNEL::Node::_loc
mutableprotected
double INTERP_KERNEL::Node::_coords[2]
protected
Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS