Fix compilation errors on Visual Studio and warnings
This commit is contained in:
parent
101964a427
commit
4ae8d446be
|
@ -375,8 +375,10 @@ void CollisionDetection::broadPhaseNotifyOverlappingPair(ProxyShape* shape1, Pro
|
|||
OverlappingPair(shape1, shape2, nbMaxManifolds, mWorld->mMemoryAllocator);
|
||||
assert(newPair != NULL);
|
||||
|
||||
#ifndef NDEBUG
|
||||
std::pair<map<overlappingpairid, OverlappingPair*>::iterator, bool> check =
|
||||
mOverlappingPairs.insert(make_pair(pairID, newPair));
|
||||
#endif
|
||||
mOverlappingPairs.insert(make_pair(pairID, newPair));
|
||||
assert(check.second);
|
||||
|
||||
// Wake up the two bodies
|
||||
|
|
|
@ -106,7 +106,10 @@ void HeightFieldShape::testAllTriangles(TriangleCallback& callback, const AABB&
|
|||
computeMinMaxGridCoordinates(minGridCoords, maxGridCoords, aabb);
|
||||
|
||||
// Compute the starting and ending coords of the sub-grid according to the up axis
|
||||
int iMin, iMax, jMin, jMax;
|
||||
int iMin = 0;
|
||||
int iMax = 0;
|
||||
int jMin = 0;
|
||||
int jMax = 0;
|
||||
switch(mUpAxis) {
|
||||
case 0 : iMin = clamp(minGridCoords[1], 0, mNbColumns - 1);
|
||||
iMax = clamp(maxGridCoords[1], 0, mNbColumns - 1);
|
||||
|
|
|
@ -47,7 +47,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position,
|
|||
mScalingMatrix = openglframework::Matrix4::identity();
|
||||
|
||||
// For each subpart of the mesh
|
||||
for (uint i=0; i<getNbParts(); i++) {
|
||||
for (unsigned int i=0; i<getNbParts(); i++) {
|
||||
|
||||
// Vertex and Indices array for the triangle mesh (data in shared and not copied)
|
||||
rp3d::TriangleVertexArray* vertexArray =
|
||||
|
@ -104,7 +104,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position, float mass,
|
|||
mScalingMatrix = openglframework::Matrix4::identity();
|
||||
|
||||
// For each subpart of the mesh
|
||||
for (uint i=0; i<getNbParts(); i++) {
|
||||
for (unsigned int i=0; i<getNbParts(); i++) {
|
||||
|
||||
// Vertex and Indices array for the triangle mesh (data in shared and not copied)
|
||||
rp3d::TriangleVertexArray* vertexArray =
|
||||
|
@ -146,7 +146,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position, float mass,
|
|||
ConcaveMesh::~ConcaveMesh() {
|
||||
|
||||
// Destroy the triangle mesh data for the physics engine
|
||||
for (uint i=0; i<mPhysicsTriangleMesh.getNbSubparts(); i++) {
|
||||
for (unsigned int i=0; i<mPhysicsTriangleMesh.getNbSubparts(); i++) {
|
||||
delete mPhysicsTriangleMesh.getSubpart(i);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,15 +30,15 @@
|
|||
using namespace openglframework;
|
||||
|
||||
// Constructor
|
||||
Light::Light(GLuint id)
|
||||
: mLightID(id), mDiffuseColor(Color::white()),
|
||||
Light::Light()
|
||||
: mDiffuseColor(Color::white()),
|
||||
mSpecularColor(Color::white()), mIsActive(false) {
|
||||
|
||||
}
|
||||
|
||||
// Constructor
|
||||
Light::Light(GLuint id, Color diffuseColor, Color specularColor)
|
||||
: mLightID(id), mDiffuseColor(diffuseColor),
|
||||
Light::Light(Color diffuseColor, Color specularColor)
|
||||
: mDiffuseColor(diffuseColor),
|
||||
mSpecularColor(specularColor), mIsActive(false) {
|
||||
|
||||
}
|
||||
|
|
|
@ -43,9 +43,6 @@ class Light : public Object3D {
|
|||
|
||||
// -------------------- Attributes -------------------- //
|
||||
|
||||
// OpenGL light ID
|
||||
GLuint mLightID;
|
||||
|
||||
// Diffuse color of the light
|
||||
Color mDiffuseColor;
|
||||
|
||||
|
@ -60,10 +57,10 @@ class Light : public Object3D {
|
|||
// -------------------- Methods -------------------- //
|
||||
|
||||
// Constructor
|
||||
Light(GLuint id);
|
||||
Light();
|
||||
|
||||
// Constructor
|
||||
Light(GLuint id, Color diffuseColor, Color specularColor);
|
||||
Light(Color diffuseColor, Color specularColor);
|
||||
|
||||
// Destructor
|
||||
virtual ~Light();
|
||||
|
|
|
@ -92,9 +92,6 @@ class CollisionShapesScene : public SceneDemo {
|
|||
/// All the dumbbell of the scene
|
||||
std::vector<Dumbbell*> mDumbbells;
|
||||
|
||||
/// Concave triangles mesh
|
||||
ConcaveMesh* mConcaveMesh;
|
||||
|
||||
/// Box for the floor
|
||||
Box* mFloor;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
namespace trianglemeshscene {
|
||||
|
||||
// Constants
|
||||
const float SCENE_RADIUS = 30.0f; // Radius of the scene in meters
|
||||
const float SCENE_RADIUS = 70.0f; // Radius of the scene in meters
|
||||
const int NB_BOXES_X = 8;
|
||||
const int NB_BOXES_Z = 8;
|
||||
const float BOX_SIZE = 3.0f;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
namespace heightfieldscene {
|
||||
|
||||
// Constants
|
||||
const float SCENE_RADIUS = 30.0f;
|
||||
const float SCENE_RADIUS = 50.0f;
|
||||
|
||||
// Class HeightFieldScene
|
||||
class HeightFieldScene : public SceneDemo {
|
||||
|
|
|
@ -97,7 +97,7 @@ void Gui::createSimulationPanel() {
|
|||
mSimulationPanel->setFixedWidth(220);
|
||||
|
||||
// Scenes/Physics/Rendering buttons
|
||||
Label* labelControls = new Label(mSimulationPanel, "Controls","sans-bold");
|
||||
new Label(mSimulationPanel, "Controls","sans-bold");
|
||||
Widget* panelControls = new Widget(mSimulationPanel);
|
||||
panelControls->setLayout(new BoxLayout(Orientation::Horizontal, Alignment::Middle, 0, 5));
|
||||
ToolButton* buttonPlay = new ToolButton(panelControls, ENTYPO_ICON_PLAY);
|
||||
|
@ -127,7 +127,7 @@ void Gui::createSimulationPanel() {
|
|||
for (uint i=0; i<scenes.size(); i++) {
|
||||
scenesNames.push_back(scenes[i]->getName().c_str());
|
||||
}
|
||||
Label* labelScenes = new Label(mSimulationPanel, "Scene","sans-bold");
|
||||
new Label(mSimulationPanel, "Scene","sans-bold");
|
||||
ComboBox* comboBoxScenes = new ComboBox(mSimulationPanel, scenesNames, [&, scenes](int index) {
|
||||
mApp->switchScene(scenes[index]);
|
||||
});
|
||||
|
|
|
@ -42,8 +42,7 @@ openglframework::Color SceneDemo::mDemoColors[] = {SceneDemo::mYellowColorDemo,
|
|||
|
||||
// Constructor
|
||||
SceneDemo::SceneDemo(const std::string& name, float sceneRadius, bool isShadowMappingEnabled)
|
||||
: Scene(name, isShadowMappingEnabled),
|
||||
mLight0(0), mIsShadowMappingInitialized(false),
|
||||
: Scene(name, isShadowMappingEnabled), mIsShadowMappingInitialized(false),
|
||||
mDepthShader("shaders/depth.vert", "shaders/depth.frag"),
|
||||
mPhongShader("shaders/phong.vert", "shaders/phong.frag"),
|
||||
mQuadShader("shaders/quad.vert", "shaders/quad.frag"),
|
||||
|
|
Loading…
Reference in New Issue
Block a user