cmake Win32 fixes

fixed some more warnings
added alignment macros to some classes
btPersistentManifold from 128 to 16 bytes aligned
prepare command to select collision filter mode (SIM_PARAM_UPDATE_COLLISION_FILTER_MODE)
This commit is contained in:
Erwin Coumans
2017-01-16 13:05:26 -08:00
parent 3dfcd27147
commit 93471a1c31
14 changed files with 50 additions and 28 deletions

View File

@@ -1015,7 +1015,7 @@ bool BulletMJCFImporter::loadMJCF(const char* fileName, MJCFErrorLogger* logger,
b3FileUtils fu;
//bool fileFound = fu.findFile(fileName, relativeFileName, 1024);
bool fileFound = b3ResourcePath::findResourcePath(fileName,relativeFileName,1024);
bool fileFound = (b3ResourcePath::findResourcePath(fileName,relativeFileName,1024)>0);
std::string xml_string;
m_data->m_pathPrefix[0] = 0;
@@ -1334,7 +1334,8 @@ class btCompoundShape* BulletMJCFImporter::convertLinkCollisionShapes(int linkIn
//f-=c;
//t-=c;
btVector3 fromto[2] = {f,t};
btScalar radii[2] = {col->m_geometry.m_capsuleRadius,col->m_geometry.m_capsuleRadius};
btScalar radii[2] = {btScalar(col->m_geometry.m_capsuleRadius)
,btScalar(col->m_geometry.m_capsuleRadius)};
btMultiSphereShape* ms = new btMultiSphereShape(fromto,radii,2);
childShape = ms;

View File

@@ -33,7 +33,7 @@ GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(std::vector<tiny
int vtxBaseIndex = vertices->size();
if (f<0 && f>=shape.mesh.indices.size())
if (f<0 && f>=int(shape.mesh.indices.size()))
{
continue;
}
@@ -49,7 +49,7 @@ GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(std::vector<tiny
{
int uv0Index = shape.mesh.indices[f]*2+0;
int uv1Index = shape.mesh.indices[f]*2+1;
if (uv0Index>=0 && uv1Index>=0 && (uv0Index < shape.mesh.texcoords.size()) && (uv1Index < shape.mesh.texcoords.size()))
if (uv0Index>=0 && uv1Index>=0 && (uv0Index < int(shape.mesh.texcoords.size()) && (uv1Index < shape.mesh.texcoords.size())))
{
vtx0.uv[0] = shape.mesh.texcoords[uv0Index];
vtx0.uv[1] = shape.mesh.texcoords[uv1Index];

View File

@@ -41,8 +41,10 @@ struct MyTexture
unsigned char* textureData;
};
struct BulletURDFInternalData
ATTRIBUTE_ALIGNED16(struct) BulletURDFInternalData
{
BT_DECLARE_ALIGNED_ALLOCATOR();
UrdfParser m_urdfParser;
struct GUIHelperInterface* m_guiHelper;
char m_pathPrefix[1024];
@@ -119,7 +121,7 @@ bool BulletURDFImporter::loadURDF(const char* fileName, bool forceFixedBase)
b3FileUtils fu;
//bool fileFound = fu.findFile(fileName, relativeFileName, 1024);
bool fileFound = b3ResourcePath::findResourcePath(fileName,relativeFileName,1024);
bool fileFound = (b3ResourcePath::findResourcePath(fileName,relativeFileName,1024))>0;
std::string xml_string;
m_data->m_pathPrefix[0] = 0;
@@ -171,7 +173,7 @@ bool BulletURDFImporter::loadSDF(const char* fileName, bool forceFixedBase)
b3FileUtils fu;
//bool fileFound = fu.findFile(fileName, relativeFileName, 1024);
bool fileFound = b3ResourcePath::findResourcePath(fileName,relativeFileName,1024);
bool fileFound = (b3ResourcePath::findResourcePath(fileName,relativeFileName,1024))>0;
std::string xml_string;
m_data->m_pathPrefix[0] = 0;