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

Method initialize

tools/Wires/Inflator/WireProfile.cpp:168–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void WireProfile::initialize(const MatrixFr& loop) {
169 m_loop = loop;
170 m_dim = m_loop.cols();
171 if (m_dim == 2) {
172 m_offset_dir = Vector2F(0, 1);
173 } else if (m_dim == 3) {
174 m_offset_dir = Vector3F(0, 0, 1);
175 }
176
177 VectorF center = 0.5 * (m_loop.colwise().minCoeff() +
178 m_loop.colwise().maxCoeff());
179 m_loop.rowwise() -= center.transpose();
180 m_radius = m_loop.rowwise().norm().maxCoeff();
181}
182
183MatrixFr WireProfile::place(const VectorF& end_1, const VectorF& end_2,
184 Float offset, Float thickness,

Callers 3

createMethod · 0.45
create_isotropicMethod · 0.45
create_2DMethod · 0.45

Calls 1

normMethod · 0.80

Tested by

no test coverage detected