3#include "MRPch/MRBindingMacros.h"
16template<
typename T,
typename R = T>
19 if ( contour.size() < 3 )
25 for (
int i = 2; i < contour.size(); ++i )
29 area += cross( p2 - p0, p1 - p0 );
38template<
typename T,
typename R = T>
41 if ( contour.size() < 3 )
47 for (
int i = 2; i < contour.size(); ++i )
51 area += cross( p1 - p0, p2 - p0 );
59template<
typename V,
typename R =
typename V::ValueType>
63 for (
int i = 1; i < contour.size(); ++i )
64 l += R( ( contour[i] - contour[i - 1] ).
length() );
69template<
typename To,
typename From>
73 res.reserve( from.size() );
74 for (
const auto & p : from )
75 res.emplace_back( p );
80template<
typename To,
typename From>
84 res.reserve( from.size() );
85 for (
const auto & c : from )
length
Definition MRObjectDimensionsEnum.h:14
Contour
Definition MRObjectLabel.h:16
R calcLength(const Contour< V > &contour)
Definition MRContour.h:60
To copyContours(const From &from)
copy double-contours to float-contours, or vice versa
Definition MRContour.h:81
R calcOrientedArea(const Contour2< T > &contour)
Definition MRContour.h:17
To copyContour(const From &from)
copy double-contour to float-contour, or vice versa
Definition MRContour.h:70
Contour< Vector2< T > > Contour2
Definition MRMesh/MRMeshFwd.h:294
Contour< Vector3< T > > Contour3
Definition MRMesh/MRMeshFwd.h:295
MRMESH_CLASS Vector3
Definition MRMesh/MRMeshFwd.h:159
T area(const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
computes twice the area of given triangle
Definition MRTriMath.h:160
Definition MRVector2.h:18
Definition MRMesh/MRVector3.h:19