From 26d4c363877dd5f578415c70bf809bc690accd63 Mon Sep 17 00:00:00 2001 From: Shlainn Date: Thu, 16 Feb 2012 19:02:31 +0100 Subject: [PATCH] * Add capability to switch single submeshes on and off for debug purposes --- src/Client/GUI/CM2Mesh.cpp | 10 ++++++++++ src/Client/GUI/CM2Mesh.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/Client/GUI/CM2Mesh.cpp b/src/Client/GUI/CM2Mesh.cpp index 62324fe..e2a6692 100755 --- a/src/Client/GUI/CM2Mesh.cpp +++ b/src/Client/GUI/CM2Mesh.cpp @@ -1424,6 +1424,7 @@ void CM2Mesh::newAnimation(u32 id, s32 start, s32 end, f32 probability) Animations.push_back(a); } +// Switch Geosets on and off void CM2Mesh::setGeoSetRender(u32 id, bool render)//this sets the render status for a geoset ID { for(u16 i = 0; i < GeoSetID.size(); i++) @@ -1435,6 +1436,15 @@ void CM2Mesh::setGeoSetRender(u32 id, bool render)//this sets the render status } }; +//DEBUG FUNCTION: Switch submeshes on and off +void CM2Mesh::setMBRender(u32 id, bool render)//this sets the render status for a geoset ID +{ + if(GeoSetRender.size()>id) + { + GeoSetRender[id]=render; + } +}; + bool CM2Mesh::getGeoSetRender(u32 meshbufferNumber)//This gets the render status for a specific mesh buffer diff --git a/src/Client/GUI/CM2Mesh.h b/src/Client/GUI/CM2Mesh.h index 90630ff..99552e4 100755 --- a/src/Client/GUI/CM2Mesh.h +++ b/src/Client/GUI/CM2Mesh.h @@ -153,6 +153,7 @@ namespace scene void newAnimation(u32 id, s32 start, s32 end, f32 probability); //Retrieve geoset rendering information void setGeoSetRender(u32 id, bool render); + void setMBRender(u32 id, bool render); bool getGeoSetRender(u32 meshbufferNumber); private: