From eae83a1cb990eb0bdc9dd796142c2c3d0b64f5d2 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 14 Aug 2016 11:11:17 -1000 Subject: [PATCH] Blender's not ideal for transforming AABBs --- hecl/blender/BlenderConnection.cpp | 1 - hecl/blender/BlenderConnection.hpp | 7 ------- hecl/blender/hecl/hmdl/__init__.py | 8 ++++---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/hecl/blender/BlenderConnection.cpp b/hecl/blender/BlenderConnection.cpp index 95a73c514..99e58846e 100644 --- a/hecl/blender/BlenderConnection.cpp +++ b/hecl/blender/BlenderConnection.cpp @@ -875,7 +875,6 @@ uint32_t BlenderConnection::DataStream::Mesh::SkinBanks::addSurface } BlenderConnection::DataStream::ColMesh::ColMesh(BlenderConnection& conn) -: aabbMin(conn), aabbMax(conn) { uint32_t matCount; conn._readBuf(&matCount, 4); diff --git a/hecl/blender/BlenderConnection.hpp b/hecl/blender/BlenderConnection.hpp index 29ad3eb2e..4570c7a95 100644 --- a/hecl/blender/BlenderConnection.hpp +++ b/hecl/blender/BlenderConnection.hpp @@ -531,13 +531,6 @@ public: /** Intermediate collision mesh representation prepared by blender from a single mesh object */ struct ColMesh { - /* Object transform in scene */ - //Matrix4f sceneXf; - - /* Cumulative AABB */ - Vector3f aabbMin; - Vector3f aabbMax; - /** HECL source and metadata of each material */ struct Material { diff --git a/hecl/blender/hecl/hmdl/__init__.py b/hecl/blender/hecl/hmdl/__init__.py index 44ac7b3c6..156650fb9 100644 --- a/hecl/blender/hecl/hmdl/__init__.py +++ b/hecl/blender/hecl/hmdl/__init__.py @@ -239,10 +239,10 @@ def cookcol(writebuf, mesh_obj): #wmtx[3][0], wmtx[3][1], wmtx[3][2], wmtx[3][3])) # Filter out useless AABB points and send data - pt = wmtx * Vector(copy_obj.bound_box[0]) - writebuf(struct.pack('fff', pt[0], pt[1], pt[2])) - pt = wmtx * Vector(copy_obj.bound_box[6]) - writebuf(struct.pack('fff', pt[0], pt[1], pt[2])) + #pt = wmtx * Vector(copy_obj.bound_box[0]) + #writebuf(struct.pack('fff', pt[0], pt[1], pt[2])) + #pt = wmtx * Vector(copy_obj.bound_box[6]) + #writebuf(struct.pack('fff', pt[0], pt[1], pt[2])) # Send materials writebuf(struct.pack('I', len(copy_mesh.materials)))