示例#1
0
inline bool StandardAdmissibility::operator()(const BoundingBox &box1,
                                              const BoundingBox &box2) const {
  double diam1 = box1.diameter();
  double diam2 = box2.diameter();

  double dist = box1.distance(box2);

  return std::min(diam1, diam2) < m_eta * dist;
}
示例#2
0
文件: ViewCull.cpp 项目: spinos/aphid
void BaseView::frameAll(const BoundingBox & b)
{
	Vector3F eye = b.center();
	eye.z = b.getMax(2) + b.distance(0) / hfov() * .55f + 120.f;
	setEyePosition(eye);
	
	Matrix44F m;
	m.setTranslation(eye);
	*cameraSpaceR() = m;
	m.inverse();
	*cameraInvSpaceR() = m;
	setFrustum(1.33f, 1.f, 26.2f, -1.f, -1000.f);
}
示例#3
0
inline bool WeakAdmissibility::operator()(const BoundingBox &box1,
                                          const BoundingBox &box2) const {

  return box1.distance(box2) > 0;
}