Skip to content
Snippets Groups Projects
Commit 71b15288 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Changed the order in which we compute the bounding box of a scene: look
for mesh vertices first, then look for geometry points. I think this is better,
since more and more people use the code just to visualize meshes (without
geometries); as soon as there was one physical point in the mesh, the resulting
bb could seem strange (as the physical points create geometrical points).
parent 78cbedbb
No related branches found
No related tags found
No related merge requests found
// $Id: OpenFile.cpp,v 1.61 2004-08-06 14:48:33 remacle Exp $ // $Id: OpenFile.cpp,v 1.62 2004-09-13 18:02:52 geuzaine Exp $
// //
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// //
...@@ -71,14 +71,14 @@ void SetBoundingBox(void) ...@@ -71,14 +71,14 @@ void SetBoundingBox(void)
if(!THEM) if(!THEM)
return; return;
if(Tree_Nbr(THEM->Points)) { if(Tree_Nbr(THEM->Vertices)) {
// if we have a geometry, use it // if we have mesh vertices, use them
CalculateMinMax(THEM->Points, NULL);
}
else if(Tree_Nbr(THEM->Vertices)) {
// else, if we have a mesh, use it
CalculateMinMax(THEM->Vertices, NULL); CalculateMinMax(THEM->Vertices, NULL);
} }
else if(Tree_Nbr(THEM->Points)) {
// else, if we have geometry points, use them
CalculateMinMax(THEM->Points, NULL);
}
else if(List_Nbr(CTX.post.list)) { else if(List_Nbr(CTX.post.list)) {
// else, if we have views, use the last one // else, if we have views, use the last one
CalculateMinMax(NULL, ((Post_View *) List_Pointer CalculateMinMax(NULL, ((Post_View *) List_Pointer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment