MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / logPoly

Method logPoly

source/core/StarLogging.cpp:122–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120size_t const SpatialLogger::MaximumText;
121
122void SpatialLogger::logPoly(char const* space, PolyF const& poly, Vec4B const& color) {
123 if (!observed()) return;
124
125 MutexLocker locker(s_mutex);
126 auto& lines = s_lines[space];
127
128 for (size_t i = 0; i < poly.sides(); ++i) {
129 auto side = poly.side(i);
130 lines.append(Line{side.min(), side.max(), color});
131 }
132
133 while (lines.size() > MaximumLines)
134 lines.removeFirst();
135}
136
137void SpatialLogger::logLine(char const* space, Line2F const& line, Vec4B const& color) {
138 if (!observed()) return;

Callers

nothing calls this directly

Calls 7

sidesMethod · 0.80
sideMethod · 0.80
appendMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
sizeMethod · 0.45
removeFirstMethod · 0.45

Tested by

no test coverage detected