
Kuzy wrote:Does anyone have the actual source of the mesh combiner. The newest link is dead...
irr::core::stringc textureName = "PackedTexture";
newTexture = driver->addTexture(textureName, packedImage);
newTexture->regenerateMipMapLevels();
textureName += globalPackedTextureCount;
globalPackedTextureCount++;
return newTexture;irr::core::stringc textureName = "PT";
for (int i = 0; i < textures.size(); i++)
{
irr::io::SNamedPath s = textures[i]->getName();
textureName += textures[i]->getName();
}
newTexture = driver->getTexture(textureName);
if (newTexture == NULL)
{
newTexture = driver->addTexture(textureName, packedImage);
}


static IMesh *createPlaneMesh(float size)
{
SMeshBuffer *buffer = new SMeshBuffer();
// Create indices
const u16 u[6] = { 0,2,1, 0,3,2 };
buffer->Indices.set_used(6);
for (u32 i=0; i<6; ++i)
buffer->Indices[i] = u[i];
// Create vertices
video::SColor clr(255,255,255,255);
buffer->Vertices.reallocate(4);
buffer->Vertices.push_back(video::S3DVertex(0,0,0,
0, 0,-1, clr, 0.0, 1.0));
buffer->Vertices.push_back(video::S3DVertex(1,0,0,
0, 0,-1, clr, 1.0, 1.0));
buffer->Vertices.push_back(video::S3DVertex(1,1,0,
0, 0,-1, clr, 1.0, 0.0));
buffer->Vertices.push_back(video::S3DVertex(0,1,0,
0, 0,-1, clr, 0.0, 0.0));
// Recalculate bounding box
buffer->BoundingBox.reset(0,0,0);
for (u32 i=0; i<4; ++i)
{
buffer->Vertices[i].Pos -= core::vector3df(0.5f, 0.5f, 0.0f);
buffer->Vertices[i].Pos *= size;
buffer->BoundingBox.addInternalPoint(buffer->Vertices[i].Pos);
}
SMesh* mesh = new SMesh;
mesh->addMeshBuffer(buffer);
buffer->drop();
mesh->recalculateBoundingBox();
return mesh;
}sievi1 wrote:Im new to irrlicht and have just got the mesh combiner to work. however i was wondering if there is any way to delete a part of the newly created mesh. lets say that i combine 10 cubes into one mesh but want to delete the central cube. is that possible?


sievi1 wrote:Im new to irrlicht and have just got the mesh combiner to work. however i was wondering if there is any way to delete a part of the newly created mesh. lets say that i combine 10 cubes into one mesh but want to delete the central cube. is that possible?
Return to Project Announcements
Users browsing this forum: No registered users and 1 guest