minor warning fixes, issue with "direction[i] = direction[i];" on OSX

This commit is contained in:
erwin.coumans 2010-02-23 18:08:44 +00:00
parent 621eddb769
commit 1425feec26
7 changed files with 11 additions and 10 deletions

View File

@ -86,7 +86,7 @@ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
ADD_CUSTOM_COMMAND(
TARGET AppAllBulletDemos
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}
)
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)

View File

@ -118,15 +118,14 @@ public:
this->min_y = min_y;
this->max_y = max_y;
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++)
{
btScalar alpha = dalpha * i;
btScalar alpha = dalpha * btScalar(i);
// rotate around by alpha degrees y
btTransform tr(btQuaternion(btVector3(0.0, 1.0, 0.0), alpha));
direction[i] = btVector3(1.0, 0.0, 0.0);
direction[i] = tr * direction[i];
direction[i] = direction[i];
source[i] = btVector3(min_x, max_y, z);
dest[i] = source[i] + direction[i] * ray_length;
dest[i][1] = min_y;

View File

@ -100,7 +100,7 @@ public:
btScalar dalpha = 2*SIMD_2_PI/NUMRAYS_IN_BAR;
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);
dest[i] = btVector3(min_x + ray_length, min_y, z);
normal[i] = btVector3(1.0, 0.0, 0.0);

View File

@ -68,7 +68,7 @@ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
ADD_CUSTOM_COMMAND(
TARGET AppConvexDecompositionDemo
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}
)
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
@ -79,4 +79,4 @@ IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
SET_TARGET_PROPERTIES(AppConvexDecompositionDemo PROPERTIES DEBUG_POSTFIX "_Debug")
SET_TARGET_PROPERTIES(AppConvexDecompositionDemo PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
SET_TARGET_PROPERTIES(AppConvexDecompositionDemo PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)

View File

@ -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 bestVolume = 1e9;
float angle[3];
float angle[3]={0.f,0.f,0.f};
while ( sweep >= 1 )
{

View File

@ -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);
char* cur = fixupPointers ? (char*)findLibPointer(dataChunk.oldPtr) : (char*)dataChunk.oldPtr;

View File

@ -364,7 +364,8 @@ void btBulletFile::addStruct(const char* structType,void* data, int len, void* o
///Perform structure size validation
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]);
assert(len==elemBytes);