+ rework BoundingBox class and its Python binding

This commit is contained in:
wmayer
2015-10-11 00:18:53 +02:00
parent 2d7066f7d4
commit f6023d36d2
39 changed files with 1167 additions and 842 deletions

View File

@@ -1096,7 +1096,7 @@ void SoFCMeshObjectShape::computeBBox(SoAction *action, SbBox3f &box, SbVec3f &c
Base::BoundBox3f cBox = mesh->getKernel().GetBoundBox();
box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ),
SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ));
Base::Vector3f mid = cBox.CalcCenter();
Base::Vector3f mid = cBox.GetCenter();
center.setValue(mid.x,mid.y,mid.z);
}
else {
@@ -1503,14 +1503,14 @@ void SoFCMeshSegmentShape::computeBBox(SoAction *action, SbBox3f &box, SbVec3f &
for (std::vector<unsigned long>::const_iterator it = indices.begin();
it != indices.end(); ++it) {
const MeshCore::MeshFacet& face = rFaces[*it];
cBox &= rPoint[face._aulPoints[0]];
cBox &= rPoint[face._aulPoints[1]];
cBox &= rPoint[face._aulPoints[2]];
cBox.Add(rPoint[face._aulPoints[0]]);
cBox.Add(rPoint[face._aulPoints[1]]);
cBox.Add(rPoint[face._aulPoints[2]]);
}
box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ),
SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ));
Base::Vector3f mid = cBox.CalcCenter();
Base::Vector3f mid = cBox.GetCenter();
center.setValue(mid.x,mid.y,mid.z);
}
}
@@ -1653,10 +1653,10 @@ void SoFCMeshObjectBoundary::computeBBox(SoAction *action, SbBox3f &box, SbVec3f
if (rPoints.size() > 0) {
Base::BoundBox3f cBox;
for (MeshCore::MeshPointArray::_TConstIterator it = rPoints.begin(); it != rPoints.end(); ++it)
cBox &= (*it);
cBox.Add(*it);
box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ),
SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ));
Base::Vector3f mid = cBox.CalcCenter();
Base::Vector3f mid = cBox.GetCenter();
center.setValue(mid.x,mid.y,mid.z);
}
else {