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

Method initialize

plugins/tiledb/test/XYZTmUtils.cpp:75–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void XYZTimeFauxReader::initialize()
76{
77
78 m_generator.seed((uint32_t)std::time(NULL));
79
80 if (m_xyz_mode == Mode::Uniform)
81 {
82 m_uniformX.reset(new urd(m_bounds.minX(), m_bounds.maxX()));
83 m_uniformY.reset(new urd(m_bounds.minY(), m_bounds.maxY()));
84 m_uniformZ.reset(new urd(m_bounds.minZ(), m_bounds.maxZ()));
85 }
86 else if (m_xyz_mode == Mode::Ramp)
87 {
88 if (m_count > 1)
89 {
90 m_delX = (m_bounds.maxX() - m_bounds.minX()) / (m_count - 1);
91 m_delY = (m_bounds.maxY() - m_bounds.minY()) / (m_count - 1);
92 m_delZ = (m_bounds.maxZ() - m_bounds.minZ()) / (m_count - 1);
93 }
94 else
95 {
96 m_delX = 0;
97 m_delY = 0;
98 m_delZ = 0;
99 }
100 }
101
102 if (m_use_time)
103 {
104 if (m_tm_mode == Mode::Uniform)
105 {
106 m_uniformTm.reset(
107 new urd(m_bounds.minGpsTime(), m_bounds.maxGpsTime()));
108 }
109 else if (m_tm_mode == Mode::Ramp)
110 {
111 if (m_count > 1)
112 {
113 m_delTm = (m_bounds.maxGpsTime() - m_bounds.minGpsTime()) /
114 (m_count - 1);
115 }
116 else
117 {
118 m_delTm = 0;
119 }
120 }
121 }
122}
123
124void XYZTimeFauxReader::addDimensions(PointLayoutPtr layout)
125{

Callers

nothing calls this directly

Calls 9

minGpsTimeMethod · 0.80
maxGpsTimeMethod · 0.80
resetMethod · 0.45
minXMethod · 0.45
maxXMethod · 0.45
minYMethod · 0.45
maxYMethod · 0.45
minZMethod · 0.45
maxZMethod · 0.45

Tested by

no test coverage detected