PAL13460 (force the mesh to go through a point)

improve getBox() and setBox()
This commit is contained in:
eap 2007-02-28 09:39:33 +00:00
parent c9b555c251
commit f79cff562c

View File

@ -71,8 +71,9 @@ SMESH_Octree::~SMESH_Octree ()
//=========================================================================== //===========================================================================
void SMESH_Octree::setBox(const Bnd_B3d* box) void SMESH_Octree::setBox(const Bnd_B3d* box)
{ {
delete myBox; // delete myBox;
myBox=new Bnd_B3d(*box); // myBox=new Bnd_B3d(*box);
*myBox = *box;
} }
//=========================================================================== //===========================================================================
@ -81,11 +82,12 @@ void SMESH_Octree::setBox(const Bnd_B3d* box)
* \param box - Set box to the 3d Bounding Box of the Octree * \param box - Set box to the 3d Bounding Box of the Octree
*/ */
//=========================================================================== //===========================================================================
void SMESH_Octree::getBox(Bnd_B3d* box) void SMESH_Octree::getBox(Bnd_B3d& box)
{ {
if(box != NULL) // if(box != NULL)
delete box; // delete box;
box = new Bnd_B3d (*myBox); // box = new Bnd_B3d (*myBox);
box = *myBox;
} }
//=========================================================================== //===========================================================================