MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / getColorChannels

Function getColorChannels

source/MRIOExtras/MRLas.cpp:206–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206std::optional<ColorChannels> getColorChannels( const char* buf, int format )
207{
208 // TODO: fix endianness
209 switch ( format )
210 {
211 case 0:
212 case 1:
213 case 4:
214 case 6:
215 case 9:
216 return std::nullopt;
217 case 2:
218 return *reinterpret_cast<const LasPoint2*>( buf );
219 case 3:
220 case 5:
221 return *reinterpret_cast<const LasPoint3*>( buf );
222 case 7:
223 case 8:
224 case 10:
225 return *reinterpret_cast<const LasPoint7*>( buf );
226 default:
227 return std::nullopt;
228 }
229}
230
231using namespace MR;
232

Callers 1

processFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected