Skip to content
Snippets Groups Projects
Commit da596e09 authored by Harry Jeffery's avatar Harry Jeffery
Browse files

Refs #11020 Require coplanarity

parent 8b34435c
No related branches found
No related tags found
No related merge requests found
...@@ -19,15 +19,16 @@ Projection::Projection(const V3D &u, const V3D &v) { ...@@ -19,15 +19,16 @@ Projection::Projection(const V3D &u, const V3D &v) {
m_dimensions[0] = u; m_dimensions[0] = u;
m_dimensions[1] = v; m_dimensions[1] = v;
m_dimensions[2] = u.cross_prod(v); m_dimensions[2] = u.cross_prod(v);
m_offsets[0] = 0.0; for (size_t i = 0; i < 3; ++i) {
m_offsets[1] = 0.0; m_offsets[i] = 0.0;
m_offsets[2] = 0.0; m_units[i] = RLU;
m_units[0] = RLU; }
m_units[1] = RLU;
m_units[2] = RLU;
} }
Projection::Projection(const V3D &u, const V3D &v, const V3D &w) { Projection::Projection(const V3D &u, const V3D &v, const V3D &w) {
if (w.scalar_prod(u.cross_prod(v)) <= 0.00001)
throw std::runtime_error("u, v, and w must be coplanar!");
m_dimensions[0] = u; m_dimensions[0] = u;
m_dimensions[1] = v; m_dimensions[1] = v;
m_dimensions[2] = w; m_dimensions[2] = w;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment