示例#1
0
Tetrahedron4D NodeLin::TetraFromBox(const Box& box, uint32_t i,
    uint32_t j, uint32_t k, uint32_t l) const {
  Eigen::Vector3d a;
  box.GetCorner(i,a);
  Eigen::Vector3d b;
  box.GetCorner(j,b);
  Eigen::Vector3d c;
  box.GetCorner(k,c);
  Eigen::Vector3d d;
  box.GetCorner(l,d);
  return Tetrahedron4D(QuaternionToVec(Project(a)),
      QuaternionToVec(Project(b)),
      QuaternionToVec(Project(c)),
      QuaternionToVec(Project(d)));
}
示例#2
0
void NodeLin::Linearize(const Box& box) {
  qs_.reserve(8);
  for (uint32_t i=0; i<8; ++i) {
    Eigen::Vector3d c;
    box.GetCorner(i,c);
    qs_.push_back(Project(c));
  }
}