Jump to content

ObjectMeshDynamic::removeSurface


photo

Recommended Posts

Hi Sergey!

 

Could you please give us an example how you're going to use that feature? I do believe it's useful though I can't guarantee it'll be in the next SDK release as we have other high priority tasks now.

Link to comment
ObjectMeshDynamicPtr mesh = ObjectMeshDynamic::create(0);
mesh->addVertex()
mesh->addIndex()
...
mesh->addSurface()
mesh->addVertex()
mesh->addIndex()
...
mesh->addSurface()

//2 surfaces, need remove last surface:
//variant 1
mesh->removeVertex()  //with indices
...
mesh->setSurfaceEnd(n,1) //n - last index of surface0
//variant 2
mesh->removeSurface(1)

in variant 1, will be empty surface, without vertex, and user have to change surface bounds (mesh->setSurfaceEnd) for triangle manipulation with surface 0, and surface1 will be excess all time

in variant 2, surface1 is no more, and all manipulations will be with surface0, and its bounds will be calculated automatically

 

by the way, there is will be very helpful function "setCurrentSurface"

mesh->setCurrentSurface(0)
mesh->addVertex()
mesh->addIndex()
mesh->addIndicesArray()

//index bounds will be automatically recalced, it is very nice
Link to comment
  • 2 weeks later...
  • 5 months later...
×
×
  • Create New...