Digital Art Zone

 
     
Incorrect bounding box of selected facets.
Posted: 02 February 2013 07:55 AM   [ Ignore ]
Member
Avatar
Rank
Total Posts:  124
Joined  2007-09-12

Hi everybody,
I am atually using this code to retrieve the geometry of a particoular part of a figure and convert it to type readable by Bullet:

btTriangleMeshDazRayCaster::buildTriangleMeshFromBones(DzFacetMesh *facetMeshQList<QStringavailableBones)
{
 int f1 
facetMesh->getNumFacets();

 for(
int i 0facetMesh->getNumFaceGroups(); i++)
 
{
  DzFaceGroup 
*faceGroup facetMesh->getFaceGroup(i);
  
//If not in the list of what we want to display remove it
  
if(!availableBones.contains(faceGroup->getName()))
  
{
   facetMesh
->removeFacets(faceGrouptrue);
  
}
  
else
  
{
   qDebug
(faceGroup->getName());
   
facetMesh->selectFacets(faceGroup);
  
}
 }

 int f2 
facetMesh->getNumFacets();

 
DzBox3 bb facetMesh->getSelectedFacetBoundingBox();
 
facetMesh->deselectAllFacets();

 return 
buildFromFacetMesh(facetMesh);

Where available bones is a list containing all the facegroup that are needed for building that figure (in case of head they are “head”, “neck”, “lEye”, “rEye”, with the tongue ignored for simplicity).
The problem I have is that when i need to get the bounding box of what remained (after removing the facegroups not needed) I continue to get a bounding box covering the Whole figure (or almost it).

Fo example: genesis height, without any morphs, is almost 187cm and the head is 30cms (random number). So as bbmin i should get 157cm and as bbmax 187. But I Always get the full figure height. Am I doing something wrong or is this the correct behaviour to do this?

 Signature 

Favourite Figure: Olympia 6
My website: http://mattiascibien.net
My Art Gallery: http://mattiascibien.deviantart.com/
Developer of AutoCam (commercial follow-up of my thesis project, currently on hold).

Profile