MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / randomPointTriangle

Function randomPointTriangle

tools/mesh_sampling.cpp:59–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59inline void
60randomPointTriangle (float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3,
61 float r1, float r2, Eigen::Vector3f& p)
62{
63 float r1sqr = std::sqrt (r1);
64 float OneMinR1Sqr = (1 - r1sqr);
65 float OneMinR2 = (1 - r2);
66 a1 *= OneMinR1Sqr;
67 a2 *= OneMinR1Sqr;
68 a3 *= OneMinR1Sqr;
69 b1 *= OneMinR2;
70 b2 *= OneMinR2;
71 b3 *= OneMinR2;
72 c1 = r1sqr * (r2 * c1 + b1) + a1;
73 c2 = r1sqr * (r2 * c2 + b2) + a2;
74 c3 = r1sqr * (r2 * c3 + b3) + a3;
75 p[0] = c1;
76 p[1] = c2;
77 p[2] = c3;
78}
79
80inline void
81randPSurface (vtkPolyData * polydata, std::vector<double> * cumulativeAreas, double totalArea, Eigen::Vector3f& p, bool calcNormal, Eigen::Vector3f& n, bool calcColor, Eigen::Vector3f& c)

Callers 1

randPSurfaceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected