minor warning fixes, issue with "direction[i] = direction[i];" on OSX
This commit is contained in:
@@ -86,7 +86,7 @@ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
|||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
TARGET AppAllBulletDemos
|
TARGET AppAllBulletDemos
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/testFileOriginal.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile32Single.bullet
|
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/SerializeDemo/testFile.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile.bullet
|
||||||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR}
|
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
||||||
|
|||||||
@@ -118,15 +118,14 @@ public:
|
|||||||
this->min_y = min_y;
|
this->min_y = min_y;
|
||||||
this->max_y = max_y;
|
this->max_y = max_y;
|
||||||
sign = 1.0;
|
sign = 1.0;
|
||||||
btScalar dalpha = 2*SIMD_2_PI/NUMRAYS_IN_BAR;
|
btScalar dalpha = btScalar(2)*SIMD_2_PI/btScalar(NUMRAYS_IN_BAR);
|
||||||
for (int i = 0; i < NUMRAYS_IN_BAR; i++)
|
for (int i = 0; i < NUMRAYS_IN_BAR; i++)
|
||||||
{
|
{
|
||||||
btScalar alpha = dalpha * i;
|
btScalar alpha = dalpha * btScalar(i);
|
||||||
// rotate around by alpha degrees y
|
// rotate around by alpha degrees y
|
||||||
btTransform tr(btQuaternion(btVector3(0.0, 1.0, 0.0), alpha));
|
btTransform tr(btQuaternion(btVector3(0.0, 1.0, 0.0), alpha));
|
||||||
direction[i] = btVector3(1.0, 0.0, 0.0);
|
direction[i] = btVector3(1.0, 0.0, 0.0);
|
||||||
direction[i] = tr * direction[i];
|
direction[i] = tr * direction[i];
|
||||||
direction[i] = direction[i];
|
|
||||||
source[i] = btVector3(min_x, max_y, z);
|
source[i] = btVector3(min_x, max_y, z);
|
||||||
dest[i] = source[i] + direction[i] * ray_length;
|
dest[i] = source[i] + direction[i] * ray_length;
|
||||||
dest[i][1] = min_y;
|
dest[i][1] = min_y;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public:
|
|||||||
btScalar dalpha = 2*SIMD_2_PI/NUMRAYS_IN_BAR;
|
btScalar dalpha = 2*SIMD_2_PI/NUMRAYS_IN_BAR;
|
||||||
for (int i = 0; i < NUMRAYS_IN_BAR; i++)
|
for (int i = 0; i < NUMRAYS_IN_BAR; i++)
|
||||||
{
|
{
|
||||||
btScalar z = (max_z-min_z)/NUMRAYS_IN_BAR * i + min_z;
|
btScalar z = (max_z-min_z)/btScalar(NUMRAYS_IN_BAR) * btScalar(i) + min_z;
|
||||||
source[i] = btVector3(min_x, max_y, z);
|
source[i] = btVector3(min_x, max_y, z);
|
||||||
dest[i] = btVector3(min_x + ray_length, min_y, z);
|
dest[i] = btVector3(min_x + ray_length, min_y, z);
|
||||||
normal[i] = btVector3(1.0, 0.0, 0.0);
|
normal[i] = btVector3(1.0, 0.0, 0.0);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
|||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
TARGET AppConvexDecompositionDemo
|
TARGET AppConvexDecompositionDemo
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/testFileOriginal.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile32Single.bullet
|
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/SerializeDemo/testFile.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile.bullet
|
||||||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR}
|
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ void computeBestFitOBB(unsigned int vcount,const float *points,unsigned int pstr
|
|||||||
float steps = 8.0f; // 16 steps on each axis.
|
float steps = 8.0f; // 16 steps on each axis.
|
||||||
|
|
||||||
float bestVolume = 1e9;
|
float bestVolume = 1e9;
|
||||||
float angle[3];
|
float angle[3]={0.f,0.f,0.f};
|
||||||
|
|
||||||
while ( sweep >= 1 )
|
while ( sweep >= 1 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1058,7 +1058,8 @@ void bFile::writeChunks(FILE* fp, bool fixupPointers)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
short int* curStruct1 = mMemoryDNA->getStruct(dataChunk.dna_nr);
|
short int* curStruct1;
|
||||||
|
curStruct1 = mMemoryDNA->getStruct(dataChunk.dna_nr);
|
||||||
assert(curStruct1 == curStruct);
|
assert(curStruct1 == curStruct);
|
||||||
|
|
||||||
char* cur = fixupPointers ? (char*)findLibPointer(dataChunk.oldPtr) : (char*)dataChunk.oldPtr;
|
char* cur = fixupPointers ? (char*)findLibPointer(dataChunk.oldPtr) : (char*)dataChunk.oldPtr;
|
||||||
|
|||||||
@@ -364,7 +364,8 @@ void btBulletFile::addStruct(const char* structType,void* data, int len, void* o
|
|||||||
|
|
||||||
///Perform structure size validation
|
///Perform structure size validation
|
||||||
short* structInfo= mMemoryDNA->getStruct(dataChunk.dna_nr);
|
short* structInfo= mMemoryDNA->getStruct(dataChunk.dna_nr);
|
||||||
int elemBytes = mMemoryDNA->getLength(structInfo[0]);
|
int elemBytes;
|
||||||
|
elemBytes= mMemoryDNA->getLength(structInfo[0]);
|
||||||
// int elemBytes = mMemoryDNA->getElementSize(structInfo[0],structInfo[1]);
|
// int elemBytes = mMemoryDNA->getElementSize(structInfo[0],structInfo[1]);
|
||||||
assert(len==elemBytes);
|
assert(len==elemBytes);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user