Version: 9.14.0
INTERP_KERNEL::Node Class Reference

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

 ~Node ()
 

Protected Attributes

unsigned char _cnt
 
double _coords [2]
 
char _hit
 
TypeOfLocInPolygon _loc
 

Detailed Description

Representation of a 2D point, and potentially its location relative to a polygon. As nodes can be shared between edges it is handled with ref counting.

Constructor & Destructor Documentation

◆ Node() [1/3]

Node::Node ( double  x,
double  y 
)

References _coords.

◆ Node() [2/3]

Node::Node ( const double *  coords)

References _coords.

◆ Node() [3/3]

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

References _coords.

◆ ~Node()

Node::~Node ( )
protected

Member Function Documentation

◆ incrRef()

◆ decrRef()

◆ initHitStatus()

void INTERP_KERNEL::Node::initHitStatus ( ) const

◆ getHitStatus()

char INTERP_KERNEL::Node::getHitStatus ( ) const

◆ hitMeAlone()

void INTERP_KERNEL::Node::hitMeAlone ( double  xBary,
double  yBary,
double  dimChar 
)

◆ unHitMeAlone()

void INTERP_KERNEL::Node::unHitMeAlone ( double  xBary,
double  yBary,
double  dimChar 
)

◆ hitMeAfter()

void INTERP_KERNEL::Node::hitMeAfter ( double  xBary,
double  yBary,
double  dimChar 
)

◆ unHitMeAfter()

void INTERP_KERNEL::Node::unHitMeAfter ( double  xBary,
double  yBary,
double  dimChar 
)

◆ initLocs()

void INTERP_KERNEL::Node::initLocs ( ) const

◆ setLoc()

void INTERP_KERNEL::Node::setLoc ( TypeOfLocInPolygon  loc) const

◆ getLoc()

TypeOfLocInPolygon INTERP_KERNEL::Node::getLoc ( ) const

◆ declareIn()

void INTERP_KERNEL::Node::declareIn ( ) const

◆ declareOn()

◆ declareOnLim()

◆ declareOut()

void INTERP_KERNEL::Node::declareOut ( )

◆ declareOnTangent()

◆ operator const double *()

INTERP_KERNEL::Node::operator const double * ( ) const

◆ isEqual()

◆ getSlope()

double Node::getSlope ( const Node other) const

References computeSlope().

◆ isEqualAndKeepTrack()

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().

◆ dumpInXfigFile()

void Node::dumpInXfigFile ( std::ostream &  stream,
int  resolution,
const Bounds &  box 
) const

◆ distanceWithSq()

double Node::distanceWithSq ( const Node other) const

◆ operator[]()

double INTERP_KERNEL::Node::operator[] ( int  i) const

◆ setNewCoords()

void INTERP_KERNEL::Node::setNewCoords ( double  x,
double  y 
)

use with caution

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

◆ computeSlope()

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 [0; Pi). 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().

◆ computeAngle()

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().

◆ applySimilarity()

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(), and INTERP_KERNEL::Edge::sortSubNodesAbs().

◆ unApplySimilarity()

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().

◆ dot()

static double INTERP_KERNEL::Node::dot ( const double *  vect1,
const double *  vect2 
)
static

◆ sign()

◆ norm()

static double INTERP_KERNEL::Node::norm ( const double *  vect)
static

◆ areDoubleEquals()

static bool INTERP_KERNEL::Node::areDoubleEquals ( double  a,
double  b 
)
static

◆ areDoubleEqualsWPLeft()

static bool INTERP_KERNEL::Node::areDoubleEqualsWPLeft ( double  a,
double  b,
double  k 
)
static

idem areDoubleEquals except that precision of comparison is modified.

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

◆ areDoubleEqualsWPRight()

static bool INTERP_KERNEL::Node::areDoubleEqualsWPRight ( double  a,
double  b,
double  k 
)
static

idem areDoubleEquals except that precision of comparison is modified.

◆ distanceBtw2Pt()

◆ distanceBtw2PtSq()

static double INTERP_KERNEL::Node::distanceBtw2PtSq ( const double *  a,
const double *  b 
)
static

◆ fillGlobalInfoAbs()

void Node::fillGlobalInfoAbs ( const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapThis,
const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapOther,
mcIdType  offset1,
mcIdType  offset2,
double  fact,
double  baryX,
double  baryY,
std::vector< double > &  addCoo,
std::map< INTERP_KERNEL::Node *, mcIdType > &  mapAddCoo,
mcIdType *  nodeId 
) const

◆ fillGlobalInfoAbs2()

void Node::fillGlobalInfoAbs2 ( const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapThis,
const std::map< INTERP_KERNEL::Node *, mcIdType > &  mapOther,
mcIdType  offset1,
mcIdType  offset2,
double  fact,
double  baryX,
double  baryY,
std::vector< double > &  addCoo,
std::map< INTERP_KERNEL::Node *, mcIdType > &  mapAddCoo,
std::vector< mcIdType > &  pointsOther 
) const

Member Data Documentation

◆ _hit

char INTERP_KERNEL::Node::_hit
mutableprotected

◆ _cnt

unsigned char INTERP_KERNEL::Node::_cnt
mutableprotected

Referenced by decrRef().

◆ _loc

TypeOfLocInPolygon INTERP_KERNEL::Node::_loc
mutableprotected

◆ _coords

double INTERP_KERNEL::Node::_coords[2]
protected