MCPcopy Create free account
hub / github.com/PDAL/PDAL / NrmVecFillLookups

Function NrmVecFillLookups

io/FbiReader.cpp:240–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238// ==================================================================
239
240void NrmVecFillLookups( void)
241{
242 double Hml = fbi::hc_2pi / 32767.0 ;
243 double Vml = fbi::hc_pi / 32767.0 ;
244 double Ang ;
245 double Xml ;
246 double Zvl ;
247
248 // Fill horizontal angle tables
249 for( int K(0) ; K < 32768 ; K++)
250 {
251 Ang = Hml * K ;
252 NrmHcos[K] = cos(Ang) ;
253 NrmHsin[K] = sin(Ang) ;
254 }
255
256 // Fill vertical angle tables
257 for( int K(0) ; K < 32768 ; K++)
258 {
259 Ang = (Vml * K) - fbi::hc_piover2 ;
260 Zvl = sin(Ang) ;
261 Xml = sqrt( 1.0 - (Zvl * Zvl)) ;
262 NrmVsin[K] = Zvl ;
263 NrmVxml[K] = Xml ;
264 }
265}
266
267// ==================================================================
268// Get normalized direction vector from NrmVec structure.

Callers 1

NrmVecGetVectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected