Adding tessellation support for new Blender 2.6 polygons

- Added BlenderBMesh.cpp/h which contains a class to convert a BMesh to an old style tri/quad mesh
- Added BlenderTessellator.cpp/h which contains a class to tessellate the poly loops contained within a BMesh
This commit is contained in:
Alice
2013-10-27 14:56:01 +00:00
committed by acgessler
parent 896d1b3f7e
commit 01a6ec9059
6 changed files with 1008 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BlenderIntermediate.h"
#include "BlenderModifier.h"
#include "BlenderBMesh.h"
#include "StreamReader.h"
#include "MemoryIOWrapper.h"
@@ -658,6 +659,12 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
ConversionData& conv_data, TempArray<std::vector,aiMesh>& temp
)
{
BlenderBMeshConverter BMeshConverter( mesh );
if ( BMeshConverter.ContainsBMesh( ) )
{
mesh = BMeshConverter.TriangulateBMesh( );
}
typedef std::pair<const int,size_t> MyPair;
if ((!mesh->totface && !mesh->totloop) || !mesh->totvert) {
return;