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 );
58template<
typename To,
typename From>
62 res.reserve( from.size() );
63 for (
const auto & p : from )
64 res.emplace_back( p );
69template<
typename To,
typename From>
73 res.reserve( from.size() );
74 for (
const auto & c : from )
To copyContours(const From &from)
copy double-contours to float-contours, or vice versa
Definition MRContour.h:70
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:59
Definition MRCameraOrientationPlugin.h:8
Contour< Vector2< T > > Contour2
Definition MRMesh/MRMeshFwd.h:272
Contour< Vector3< T > > Contour3
Definition MRMesh/MRMeshFwd.h:273
MRMESH_CLASS Vector3
Definition MRMesh/MRMeshFwd.h:137
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