mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-15 14:10:11 +00:00
cast vertex data (btScalar) to float
This commit is contained in:
parent
41c5a2e972
commit
3052477c67
@ -100,9 +100,9 @@ void btDefaultSoftBodySolver::copySoftBodyToVertexBuffer( const btSoftBody *cons
|
|||||||
for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
|
for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
|
||||||
{
|
{
|
||||||
btVector3 position = clothVertices[vertexIndex].m_x;
|
btVector3 position = clothVertices[vertexIndex].m_x;
|
||||||
*(vertexPointer + 0) = position.getX();
|
*(vertexPointer + 0) = (float)position.getX();
|
||||||
*(vertexPointer + 1) = position.getY();
|
*(vertexPointer + 1) = (float)position.getY();
|
||||||
*(vertexPointer + 2) = position.getZ();
|
*(vertexPointer + 2) = (float)position.getZ();
|
||||||
vertexPointer += vertexStride;
|
vertexPointer += vertexStride;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -115,9 +115,9 @@ void btDefaultSoftBodySolver::copySoftBodyToVertexBuffer( const btSoftBody *cons
|
|||||||
for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
|
for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
|
||||||
{
|
{
|
||||||
btVector3 normal = clothVertices[vertexIndex].m_n;
|
btVector3 normal = clothVertices[vertexIndex].m_n;
|
||||||
*(normalPointer + 0) = normal.getX();
|
*(normalPointer + 0) = (float)normal.getX();
|
||||||
*(normalPointer + 1) = normal.getY();
|
*(normalPointer + 1) = (float)normal.getY();
|
||||||
*(normalPointer + 2) = normal.getZ();
|
*(normalPointer + 2) = (float)normal.getZ();
|
||||||
normalPointer += normalStride;
|
normalPointer += normalStride;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user