MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / barycenter

Method barycenter

src/geode/geometry/basic_objects/polygon.cpp:123–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121
122 template < typename PointType, index_t dimension >
123 Point< dimension >
124 GenericPolygon< PointType, dimension >::barycenter() const
125 {
126 Point< dimension > barycenter;
127 for( const auto& point : vertices_ )
128 {
129 barycenter += point;
130 }
131 return barycenter / nb_vertices();
132 }
133
134 template < typename PointType, index_t dimension >
135 template < index_t T >

Callers 10

rasterize_segmentFunction · 0.45
segment_quick_skipFunction · 0.45
point_segment_projectionFunction · 0.45
test_segmentFunction · 0.45
test_triangleFunction · 0.45
test_tetrahedronFunction · 0.45

Calls

no outgoing calls

Tested by 3

test_segmentFunction · 0.36
test_triangleFunction · 0.36
test_tetrahedronFunction · 0.36