DGtal 2.0.0
Loading...
Searching...
No Matches
MyPointD Class Reference

Public Member Functions

 ~MyPointD ()
 
 MyPointD (const MyPointD &other)
 
 MyPointD (int x, int y)
 
 MyPointD (double x, double y)
 
MyPointD operator- (const MyPointD &other) const
 
double norm () const
 

Static Public Member Functions

static void reset ()
 

Data Fields

double _x
 
double _y
 

Static Public Attributes

static int nbCreated = 0
 
static int nbDeleted = 0
 

Detailed Description

Examples
dec/exampleDECSurface.cpp, dec/examplePropagation.cpp, doc-examples/exampleCatch.cpp, examples/tutorial-examples/polyhedralizer.cpp, geometry/curves/convex-and-concave-parts.cpp, geometry/curves/estimation/exampleLMST3DBy2D.cpp, geometry/curves/exampleArithDSS3d.cpp, geometry/curves/exampleArithmeticalDSL.cpp, geometry/curves/exampleArithmeticalDSS.cpp, geometry/curves/exampleDSLSubsegment.cpp, geometry/curves/exampleDigitalConvexity.cpp, geometry/curves/exampleGridCurve2d.cpp, geometry/curves/exampleGridCurve3d.cpp, geometry/curves/exampleRationalConvexity.cpp, geometry/curves/greedy-dss-decomposition.cpp, geometry/surfaces/dvcm-3d.cpp, geometry/surfaces/greedy-plane-segmentation-ex2.cpp, geometry/surfaces/greedy-plane-segmentation.cpp, geometry/tools/checkLatticeBallQuickHull.cpp, geometry/tools/determinant/exampleInHalfPlane.cpp, geometry/tools/exampleAlphaShape.cpp, geometry/tools/exampleConvexHull2D.cpp, geometry/tools/exampleLatticeBallDelaunay2D.cpp, geometry/tools/exampleLatticeBallDelaunay3D.cpp, geometry/tools/exampleLatticeBallQuickHull3D.cpp, geometry/volumes/checkFullConvexityTheorems.cpp, geometry/volumes/digitalPolyhedronBuilder3D.cpp, geometry/volumes/distance/exampleFMM2D.cpp, geometry/volumes/distance/exampleFMM3D.cpp, geometry/volumes/distance/toricdomainvolumetric.cpp, geometry/volumes/exampleBoundedLatticePolytopeCount2D.cpp, geometry/volumes/exampleBoundedLatticePolytopeCount3D.cpp, geometry/volumes/exampleBoundedLatticePolytopeCount4D.cpp, geometry/volumes/fullConvexityAnalysis3D.cpp, geometry/volumes/fullConvexityLUT2D.cpp, geometry/volumes/fullConvexityShortestPaths3D.cpp, geometry/volumes/fullConvexityThinning3D.cpp, geometry/volumes/pConvexity-benchmark.cpp, geometry/volumes/standardDigitalPolyhedronBuilder3D.cpp, graph/graphTraversal.cpp, images/exampleRigidtransformation3d.cpp, io/boards/dgtalBoard2D-1-points.cpp, io/boards/dgtalBoard2D-2-sets.cpp, io/boards/dgtalBoard2D-3-custom-classes.cpp, io/boards/dgtalBoard2D-3-custom-points.cpp, io/boards/dgtalBoard2D-4-colormaps.cpp, io/boards/exampleBezierCurve.cpp, io/boards/logoDGtal.cpp, io/viewDualSurface.cpp, io/viewers/viewer3D-1-points.cpp, io/viewers/viewer3D-10-interaction.cpp, io/viewers/viewer3D-2-sets.cpp, io/viewers/viewer3D-3-objects.cpp, io/viewers/viewer3D-4-modes.cpp, io/viewers/viewer3D-5-colors.cpp, io/viewers/viewer3D-6-clipping.cpp, io/viewers/viewer3D-7-planes.cpp, io/viewers/viewer3D-7-stdplane.cpp, topology/3dBorderExtraction.cpp, topology/3dKSSurfaceExtraction.cpp, topology/area-estimation-with-digital-surface.cpp, topology/area-estimation-with-indexed-digital-surface.cpp, topology/ctopo-1-3d.cpp, topology/ctopo-1.cpp, topology/ctopo-1s-3d.cpp, topology/cubical-complex-collapse.cpp, topology/cubical-complex-illustrations.cpp, topology/frontierAndBoundary.cpp, topology/generateSimplicityTables2D.cpp, topology/homotopicThinning3D.cpp, and tutorial-examples/polyhedralizer.cpp.

Definition at line 346 of file testClone2.cpp.

Constructor & Destructor Documentation

◆ ~MyPointD()

MyPointD::~MyPointD ( )
inline

Definition at line 348 of file testClone2.cpp.

349 { nbDeleted++; }
static int nbDeleted

References nbDeleted.

◆ MyPointD() [1/3]

MyPointD::MyPointD ( const MyPointD other)
inline

Definition at line 350 of file testClone2.cpp.

351 : _x( other._x ), _y( other._y )
352 { nbCreated++; }
double _y
double _x
static int nbCreated

References nbCreated.

◆ MyPointD() [2/3]

MyPointD::MyPointD ( int  x,
int  y 
)
inline

Definition at line 353 of file testClone2.cpp.

353 : _x( x ), _y( y )
354 { nbCreated++; }

References nbCreated.

◆ MyPointD() [3/3]

MyPointD::MyPointD ( double  x,
double  y 
)
inline

Definition at line 355 of file testClone2.cpp.

355 : _x( x ), _y( y )
356 { nbCreated++; }

References nbCreated.

Member Function Documentation

◆ norm()

double MyPointD::norm ( ) const
inline

Definition at line 361 of file testClone2.cpp.

362 {
363 double dx = (double) _x;
364 double dy = (double) _y;
365 return sqrt( dx * dx + dy * dy );
366 }

References _x, and _y.

Referenced by SignedDistToCircle< Point >::operator()(), templated_signed_dist_to_unit_circle(), TEST_CASE(), and testBIGINTEGERSpace().

◆ operator-()

MyPointD MyPointD::operator- ( const MyPointD other) const
inline

Definition at line 357 of file testClone2.cpp.

358 {
359 return MyPointD( _x - other._x, _y - other._y );
360 }

References _x, and _y.

◆ reset()

static void MyPointD::reset ( )
inlinestatic

Definition at line 367 of file testClone2.cpp.

368 {
369 nbCreated = nbDeleted = 0;
370 }

References nbCreated, and nbDeleted.

Referenced by testCloneTimings().

Field Documentation

◆ _x

double MyPointD::_x

Definition at line 371 of file testClone2.cpp.

Referenced by norm(), and operator-().

◆ _y

double MyPointD::_y

Definition at line 371 of file testClone2.cpp.

Referenced by norm(), and operator-().

◆ nbCreated

int MyPointD::nbCreated = 0
static

Definition at line 373 of file testClone2.cpp.

Referenced by MyPointD(), MyPointD(), MyPointD(), reset(), and testCloneTimings().

◆ nbDeleted

int MyPointD::nbDeleted = 0
static

Definition at line 374 of file testClone2.cpp.

Referenced by reset(), testCloneTimings(), and ~MyPointD().


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