DGtal 2.0.0
Loading...
Searching...
No Matches
TriangleByConstReference Struct Reference

Public Member Functions

 TriangleByConstReference (const Point &a, const Point &b, const Point &c)
double perimeter () const
 TriangleByConstReference (const Point &a, const Point &b, const Point &c)
double perimeter () const

Data Fields

Point _a
Point _b
Point _c

Detailed Description

Definition at line 384 of file testClone2.cpp.

Constructor & Destructor Documentation

◆ TriangleByConstReference() [1/2]

TriangleByConstReference::TriangleByConstReference ( const Point & a,
const Point & b,
const Point & c )
inline

Definition at line 385 of file testClone2.cpp.

References _a, _b, and _c.

◆ TriangleByConstReference() [2/2]

TriangleByConstReference::TriangleByConstReference ( const Point & a,
const Point & b,
const Point & c )
inline

Definition at line 188 of file testCloneAndAliases.cpp.

189 : _a( a ), _b( b ), _c( c ) {}

References _a, _b, and _c.

Member Function Documentation

◆ perimeter() [1/2]

double TriangleByConstReference::perimeter ( ) const
inline

Definition at line 387 of file testClone2.cpp.

388 {
389 return (_a - _b).norm() + (_b - _c).norm() + (_c - _a).norm();
390 }

References _a, _b, and _c.

◆ perimeter() [2/2]

double TriangleByConstReference::perimeter ( ) const
inline

Definition at line 190 of file testCloneAndAliases.cpp.

191 {
192 return (_a - _b).norm() + (_b - _c).norm() + (_c - _a).norm();
193 }

References _a, _b, and _c.

Field Documentation

◆ _a

Point TriangleByConstReference::_a

Definition at line 391 of file testClone2.cpp.

Referenced by perimeter(), and TriangleByConstReference().

◆ _b

Point TriangleByConstReference::_b

Definition at line 391 of file testClone2.cpp.

Referenced by perimeter(), and TriangleByConstReference().

◆ _c

Point TriangleByConstReference::_c

Definition at line 391 of file testClone2.cpp.

Referenced by perimeter(), and TriangleByConstReference().


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