Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-03-23 09:00:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-03-23 09:00:21 +0300
commit4a078765623b72641164a25291e925bb4e64bcba (patch)
tree201f0c96b61d968eaead5032719bc43d58ffac83 /source/gameengine/Rasterizer/RAS_MeshObject.h
parentbd13f302240ec3347df73cab9ff06e4845223923 (diff)
Speedup for bullet physics mesh conversion
Was adding each face with a remove doubles option that made conversion increasingly slower for larger meshes, this would often hang blender when starting with the BGE with larger meshes. Replace btTriangleMesh()->addTriangle() with btTriangleIndexVertexArray() YoFrankie level_1_home.blend starts a third faster, level_nut about twice as fast. - previous commit was also incorrect using the original meshes vert locations rather then the vert locations that came from the derived mesh. - Softbody is relying on removing doubles at 0.01 to give stable results, this no longer works but seems a bit dodgy anyway. Maybe some post-processing filter could fix up a mesh for bullet softbody.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MeshObject.h')
-rw-r--r--source/gameengine/Rasterizer/RAS_MeshObject.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h
index 0d35a2f402b..404b7f16a59 100644
--- a/source/gameengine/Rasterizer/RAS_MeshObject.h
+++ b/source/gameengine/Rasterizer/RAS_MeshObject.h
@@ -147,6 +147,16 @@ public:
/* polygon sorting by Z for alpha */
void SortPolygons(RAS_MeshSlot& ms, const MT_Transform &transform);
+
+ bool HasColliderPolygon() {
+ int numpolys= NumPolygons();
+ for (int p=0; p<numpolys; p++)
+ if (m_Polygons[p]->IsCollider())
+ return true;
+
+ return false;
+ }
+
/* for construction to find shared vertices */
struct SharedVertex {
RAS_DisplayArray *m_darray;