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

Class XFormComponent

pdal/pdal_types.hpp:138–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136struct XForm
137{
138 struct XFormComponent
139 {
140 XFormComponent() : m_val(0.0), m_auto(false)
141 {}
142
143 XFormComponent(double val) : m_val(val), m_auto(false)
144 {}
145
146 double m_val;
147 bool m_auto;
148
149 bool set(const std::string& sval)
150 {
151 if (sval == "auto")
152 m_auto = true;
153 else
154 {
155 bool failed = false;
156 try
157 {
158 failed = !Utils::fromString(sval, m_val);
159 }
160 catch (...)
161 {
162 failed = true;
163 }
164 if (failed)
165 {
166 m_val = 0;
167 return false;
168 }
169 }
170 return true;
171 }
172
173 friend std::istream& operator>>(std::istream& in, XFormComponent& xfc);
174 friend std::ostream& operator<<(std::ostream& in,
175 const XFormComponent& xfc);
176 };
177
178 XForm() : m_scale(1.0), m_offset(0.0)
179 {}

Callers 2

writeMethod · 0.85
addArgsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected