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

Method generateColor

gpu/features/test/data_source.hpp:95–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 }
94
95 void generateColor()
96 {
97 for (auto& p: *cloud)
98 {
99 int r = std::max(1, std::min(255, static_cast<int>((double(rand())/RAND_MAX)*255)));
100 int g = std::max(1, std::min(255, static_cast<int>((double(rand())/RAND_MAX)*255)));
101 int b = std::max(1, std::min(255, static_cast<int>((double(rand())/RAND_MAX)*255)));
102
103 *reinterpret_cast<int*>(&p.data[3]) = (b << 16) + (g << 8) + r;
104 }
105 }
106
107 void estimateNormals()
108 {

Callers 2

TESTFunction · 0.80
TESTFunction · 0.80

Calls 2

maxFunction · 0.50
minFunction · 0.50

Tested by

no test coverage detected