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:
authorNick Samarin <nicks1987@bigmir.net>2011-05-17 00:30:59 +0400
committerNick Samarin <nicks1987@bigmir.net>2011-05-17 00:30:59 +0400
commita918040902bdeb7c9793168710871e4a3b7777a3 (patch)
tree7380f00bce5448d777d09f4be4d7127e8eecec49 /extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h
parentdaeca2f8262884c436c5678225704b594ce5347b (diff)
parent99ee18c684da65ba774175c0b57a086e8222464a (diff)
synched with trunk at revision 36569
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h70
1 files changed, 68 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h
index e61b11499d4..9e3e2ab0f59 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -22,6 +22,8 @@ subject to the following restrictions:
+
+
/// The btStridingMeshInterface is the interface class for high performance generic access to triangle meshes, used in combination with btBvhTriangleMeshShape and some other collision shapes.
/// Using index striding of 3*sizeof(integer) it can use triangle arrays, using index striding of 1*sizeof(integer) it can handle triangle strips.
/// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory.
@@ -89,8 +91,72 @@ class btStridingMeshInterface
m_scaling = scaling;
}
-
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+struct btIntIndexData
+{
+ int m_value;
+};
+struct btShortIntIndexData
+{
+ short m_value;
+ char m_pad[2];
+};
+
+struct btShortIntIndexTripletData
+{
+ short m_values[3];
+ char m_pad[2];
};
+struct btCharIndexTripletData
+{
+ unsigned char m_values[3];
+ char m_pad;
+};
+
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btMeshPartData
+{
+ btVector3FloatData *m_vertices3f;
+ btVector3DoubleData *m_vertices3d;
+
+ btIntIndexData *m_indices32;
+ btShortIntIndexTripletData *m_3indices16;
+ btCharIndexTripletData *m_3indices8;
+
+ btShortIntIndexData *m_indices16;//backwards compatibility
+
+ int m_numTriangles;//length of m_indices = m_numTriangles
+ int m_numVertices;
+};
+
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btStridingMeshInterfaceData
+{
+ btMeshPartData *m_meshPartsPtr;
+ btVector3FloatData m_scaling;
+ int m_numMeshParts;
+ char m_padding[4];
+};
+
+
+
+
+SIMD_FORCE_INLINE int btStridingMeshInterface::calculateSerializeBufferSize() const
+{
+ return sizeof(btStridingMeshInterfaceData);
+}
+
+
+
#endif //STRIDING_MESHINTERFACE_H