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() );
71template<
typename To,
typename From>
75 res.reserve( from.size() );
76 for (
const auto & p : from )
77 res.emplace_back( p );
84template<
typename To,
typename From>
88 res.reserve( from.size() );
89 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
MR_BIND_IGNORE To convertContour(const From &from)
Definition MRContour.h:72
MR_BIND_IGNORE To convertContours(const From &from)
Definition MRContour.h:85
R calcOrientedArea(const Contour2< T > &contour)
Definition MRContour.h:17
Definition MRCameraOrientationPlugin.h:8
float area(const MeshTopology &topology, const VertCoords &points, FaceId f)
returns the area of given face
Definition MRMeshMath.h:166
Contour3< double > Contour3d
Definition MRMesh/MRMeshFwd.h:316
Contour2f convertContourTo2f(const From &from)
Definition MRContour.h:107
Contour2< double > Contour2d
Definition MRMesh/MRMeshFwd.h:314
Contours2d convertContoursTo2d(const From &from)
Definition MRContour.h:114
Contour2< float > Contour2f
Definition MRMesh/MRMeshFwd.h:315
Contours2< double > Contours2d
Definition MRMesh/MRMeshFwd.h:322
Contours2f convertContoursTo2f(const From &from)
Definition MRContour.h:112
Contours2< float > Contours2f
Definition MRMesh/MRMeshFwd.h:323
Contour< Vector2< T > > Contour2
Definition MRMesh/MRMeshFwd.h:312
Contour< Vector3< T > > Contour3
Definition MRMesh/MRMeshFwd.h:313
Contours3f convertContoursTo3f(const From &from)
Definition MRContour.h:113
Contour3f convertContourTo3f(const From &from)
Definition MRContour.h:108
Contour2d convertContourTo2d(const From &from)
Definition MRContour.h:109
MRMESH_CLASS Vector3
Definition MRMesh/MRMeshFwd.h:177
Contours3< float > Contours3f
Definition MRMesh/MRMeshFwd.h:325
Contour3d convertContourTo3d(const From &from)
Definition MRContour.h:110
Contour3< float > Contour3f
Definition MRMesh/MRMeshFwd.h:317
Contours3d convertContoursTo3d(const From &from)
Definition MRContour.h:115
Contours3< double > Contours3d
Definition MRMesh/MRMeshFwd.h:324
Definition MRVector2.h:25
Definition MRMesh/MRVector3.h:26