Fixed warnings in Bullet/src core library
Thanks Martijn Reuvers from Two Tribes B.V. (www.twotribes.com) for the patch To make this work more visible, suppress warnings in external libraries in Extras (COLLADA_DOM, libxml and glui contain many warnings) Added PreprocessorDefinitions: _CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE to vcproj files
This commit is contained in:
@@ -623,7 +623,7 @@ struct RayCaster : public btDbvt::ICollide
|
||||
tests = 0;
|
||||
}
|
||||
|
||||
virtual void Process(const btDbvt::Node* a,const btDbvt::Node* b)
|
||||
virtual void Process(const btDbvt::Node* /*a*/,const btDbvt::Node* /*b*/)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1892,11 +1892,11 @@ void btSoftBody::randomizeConstraints()
|
||||
{
|
||||
for(int i=0,ni=m_links.size();i<ni;++i)
|
||||
{
|
||||
btSwap(m_links[i],m_links[rand()%ni]);
|
||||
btSwap(m_links[i],m_links[std::rand()%ni]);
|
||||
}
|
||||
for(int i=0,ni=m_faces.size();i<ni;++i)
|
||||
{
|
||||
btSwap(m_faces[i],m_faces[rand()%ni]);
|
||||
btSwap(m_faces[i],m_faces[std::rand()%ni]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2540,7 +2540,7 @@ switch(m_cfg.collisions&fCollision::RVSmask)
|
||||
struct DoCollide : btDbvt::ICollide
|
||||
{
|
||||
|
||||
virtual void Process(const btDbvt::Node* a,const btDbvt::Node* b)
|
||||
virtual void Process(const btDbvt::Node* /*a*/,const btDbvt::Node* /*b*/)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -2628,7 +2628,7 @@ switch(cf&fCollision::SVSmask)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual void Process(const btDbvt::Node* leaf)
|
||||
virtual void Process(const btDbvt::Node* /*leaf*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ public:
|
||||
V_TwoSided, ///Vertex normals are fliped to match velocity
|
||||
V_OneSided, ///Vertex normals are taken as it is
|
||||
F_TwoSided, ///Face normals are fliped to match velocity
|
||||
F_OneSided, ///Face normals are taken as it is
|
||||
F_OneSided ///Face normals are taken as it is
|
||||
};};
|
||||
|
||||
///eVSolver : velocities solvers
|
||||
struct eVSolver { enum _ {
|
||||
Linear, ///Linear solver
|
||||
Volume, ///Volume solver
|
||||
Volume ///Volume solver
|
||||
};};
|
||||
|
||||
///ePSolver : positions solvers
|
||||
@@ -60,14 +60,14 @@ public:
|
||||
Volume, ///Volume solver
|
||||
Anchors, ///Anchor solver
|
||||
RContacts, ///Rigid contacts solver
|
||||
SContacts, ///Soft contacts solver
|
||||
SContacts ///Soft contacts solver
|
||||
};};
|
||||
|
||||
///eSolverPresets
|
||||
struct eSolverPresets { enum _ {
|
||||
Positions,
|
||||
Velocities,
|
||||
Default = Positions,
|
||||
Default = Positions
|
||||
};};
|
||||
|
||||
///eFeature
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
Node,
|
||||
Link,
|
||||
Face,
|
||||
Tetra,
|
||||
Tetra
|
||||
};};
|
||||
|
||||
typedef btAlignedObjectArray<eVSolver::_> tVSolverArray;
|
||||
@@ -94,14 +94,14 @@ public:
|
||||
SVSmask = 0x00f0, ///Rigid versus soft mask
|
||||
VF_SS = 0x0010, ///Vertex vs face soft vs soft handling
|
||||
/* presets */
|
||||
Default = SDF_RS,
|
||||
Default = SDF_RS
|
||||
};};
|
||||
|
||||
///fMaterial
|
||||
struct fMaterial { enum _ {
|
||||
DebugDraw = 0x0001, /// Enable debug draw
|
||||
/* presets */
|
||||
Default = DebugDraw,
|
||||
Default = DebugDraw
|
||||
};};
|
||||
|
||||
//
|
||||
|
||||
@@ -92,6 +92,7 @@ static inline btScalar tetravolume(const btVector3& x0,
|
||||
}
|
||||
|
||||
//
|
||||
/*
|
||||
static btVector3 stresscolor(btScalar stress)
|
||||
{
|
||||
static const btVector3 spectrum[]= { btVector3(1,0,1),
|
||||
@@ -108,7 +109,7 @@ static btVector3 stresscolor(btScalar stress)
|
||||
const btScalar frc=stress-sel;
|
||||
return(spectrum[sel]+(spectrum[sel+1]-spectrum[sel])*frc);
|
||||
}
|
||||
|
||||
*/
|
||||
//
|
||||
void btSoftBodyHelpers::Draw( btSoftBody* psb,
|
||||
btIDebugDraw* idraw,
|
||||
@@ -252,6 +253,7 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb,
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
//
|
||||
void btSoftBodyHelpers::DrawInfos( btSoftBody* psb,
|
||||
btIDebugDraw* idraw,
|
||||
@@ -277,6 +279,7 @@ void btSoftBodyHelpers::DrawInfos( btSoftBody* psb,
|
||||
if(text[0]) idraw->draw3dText(n.m_x,text);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
void btSoftBodyHelpers::DrawNodeTree( btSoftBody* psb,
|
||||
@@ -501,18 +504,18 @@ btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBody::btSoftBodyWorldInf
|
||||
btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBody::btSoftBodyWorldInfo& worldInfo, const btVector3* vertices,
|
||||
int nvertices)
|
||||
{
|
||||
HullDesc hdsc(QF_TRIANGLES,nvertices,vertices);
|
||||
HullDesc hdsc(QF_TRIANGLES,static_cast<unsigned int>(nvertices),vertices);
|
||||
HullResult hres;
|
||||
HullLibrary hlib;/*??*/
|
||||
hdsc.mMaxVertices=nvertices;
|
||||
hdsc.mMaxVertices=static_cast<unsigned int>(nvertices);
|
||||
hlib.CreateConvexHull(hdsc,hres);
|
||||
btSoftBody* psb=new btSoftBody(&worldInfo,(int)hres.mNumOutputVertices,
|
||||
&hres.m_OutputVertices[0],0);
|
||||
for(int i=0;i<(int)hres.mNumFaces;++i)
|
||||
{
|
||||
const int idx[]={ hres.m_Indices[i*3+0],
|
||||
hres.m_Indices[i*3+1],
|
||||
hres.m_Indices[i*3+2]};
|
||||
const int idx[]={ static_cast<int>(hres.m_Indices[i*3+0]),
|
||||
static_cast<int>(hres.m_Indices[i*3+1]),
|
||||
static_cast<int>(hres.m_Indices[i*3+2])};
|
||||
if(idx[0]<idx[1]) psb->appendLink( idx[0],idx[1]);
|
||||
if(idx[1]<idx[2]) psb->appendLink( idx[1],idx[2]);
|
||||
if(idx[2]<idx[0]) psb->appendLink( idx[2],idx[0]);
|
||||
|
||||
@@ -37,7 +37,7 @@ struct fDrawFlags { enum _ {
|
||||
Notes = 0x0080,
|
||||
/* presets */
|
||||
Std = Links+Faces+Tetras+Anchors+Notes,
|
||||
StdTetra = Std-Faces+Tetras,
|
||||
StdTetra = Std-Faces+Tetras
|
||||
};};
|
||||
|
||||
struct btSoftBodyHelpers
|
||||
@@ -46,12 +46,14 @@ struct btSoftBodyHelpers
|
||||
static void Draw( btSoftBody* psb,
|
||||
btIDebugDraw* idraw,
|
||||
int drawflags=fDrawFlags::Std);
|
||||
#if 0
|
||||
/* Draw body infos */
|
||||
static void DrawInfos( btSoftBody* psb,
|
||||
btIDebugDraw* idraw,
|
||||
bool masses,
|
||||
bool areas,
|
||||
bool stress);
|
||||
#endif
|
||||
/* Draw node tree */
|
||||
static void DrawNodeTree( btSoftBody* psb,
|
||||
btIDebugDraw* idraw,
|
||||
|
||||
@@ -105,4 +105,4 @@ btCollisionAlgorithmCreateFunc* btSoftBodyRigidBodyCollisionConfiguration::getCo
|
||||
|
||||
///fallback to the regular rigid collision shape
|
||||
return btDefaultCollisionConfiguration::getCollisionAlgorithmCreateFunc(proxyType0,proxyType1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ struct btSparseSdf
|
||||
const IntFrac iy=Decompose(scx.y());
|
||||
const IntFrac iz=Decompose(scx.z());
|
||||
const unsigned h=Hash(ix.b,iy.b,iz.b,shape);
|
||||
Cell*& root=cells[h%cells.size()];
|
||||
Cell*& root=cells[static_cast<int>(h%cells.size())];
|
||||
Cell* c=root;
|
||||
++nqueries;
|
||||
while(c)
|
||||
|
||||
Reference in New Issue
Block a user