more fixes in serialization/BVH/endianness

This commit is contained in:
ejcoumans
2007-09-19 23:04:37 +00:00
parent 287f11de01
commit a0e92efebb
3 changed files with 13 additions and 5 deletions

View File

@@ -898,10 +898,14 @@ static const unsigned BVH_ALIGNMENT_BLOCKS = 2;
unsigned int btOptimizedBvh::getAlignmentSerializationPadding()
{
return BVH_ALIGNMENT_BLOCKS * BVH_ALIGNMENT;
}
unsigned btOptimizedBvh::calculateSerializeBufferSize()
{
unsigned baseSize = sizeof(btOptimizedBvh) + BVH_ALIGNMENT_BLOCKS * BVH_ALIGNMENT;
unsigned baseSize = sizeof(btOptimizedBvh) + getAlignmentSerializationPadding();
baseSize += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount;
if (m_useQuantization)
{