Skip to content

Commit 1d2377a

Browse files
committed
Fix alignment in btSoftBody_getTetraVertexNormalData
1 parent 22261cf commit 1d2377a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

BulletSharp/UnsafeNativeMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public static extern IntPtr btIDebugDrawWrapper_new(IntPtr debugDrawGCHandle, In
308308
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
309309
public static extern IntPtr btSoftBodyNodePtrArray_at(IntPtr obj, int index);
310310
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
311-
public static extern IntPtr btSoftBodyNodePtrArray_set(IntPtr obj, IntPtr value, int index);
311+
public static extern void btSoftBodyNodePtrArray_set(IntPtr obj, IntPtr value, int index);
312312

313313
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
314314
public static extern IntPtr btAlignedObjectArray_btVector3_new();

libbulletc/src/btSoftBody_wrap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3146,7 +3146,7 @@ int btSoftBody_getTetraVertexNormalData(btSoftBody* obj, btScalar* vertices)
31463146
int vertexCount = tetraCount * 12;
31473147

31483148
int i;
3149-
btVector3 c1, c2, c3, normal;
3149+
ATTRIBUTE_ALIGNED16(btVector3) c1, c2, c3, normal;
31503150
for (i = 0; i < tetraCount; i++) {
31513151
btSoftBody_Tetra* t = &tetraArray->at(i);
31523152
c1 = t->m_n[1]->m_x - t->m_n[0]->m_x;
@@ -3205,7 +3205,7 @@ int btSoftBody_getTetraVertexNormalData2(btSoftBody* obj, btScalar* vertices, bt
32053205
int vertexCount = tetraCount * 12;
32063206

32073207
int i;
3208-
btVector3 c1, c2, c3, normal;
3208+
ATTRIBUTE_ALIGNED16(btVector3) c1, c2, c3, normal;
32093209
for (i = 0; i < tetraCount; i++) {
32103210
btSoftBody_Tetra* t = &tetraArray->at(i);
32113211
c1 = t->m_n[1]->m_x - t->m_n[0]->m_x;

0 commit comments

Comments
 (0)