Use uint shortcut.
git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@312 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
bbe85ebced
commit
4018a12c56
|
@ -24,7 +24,7 @@
|
||||||
using namespace reactphysics3d;
|
using namespace reactphysics3d;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Constraint::Constraint(Body* const body1, Body* const body2, unsigned int nbAuxConstraints, bool active)
|
Constraint::Constraint(Body* const body1, Body* const body2, uint nbAuxConstraints, bool active)
|
||||||
:body1(body1), body2(body2), active(active), nbAuxConstraints(nbAuxConstraints),
|
:body1(body1), body2(body2), active(active), nbAuxConstraints(nbAuxConstraints),
|
||||||
lowerBound(lowerBound), upperBound(upperBound) {
|
lowerBound(lowerBound), upperBound(upperBound) {
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ class Constraint {
|
||||||
Matrix body2Jacobian; // Jacobian matrix of the constraint for body2 (dimension 1x6)
|
Matrix body2Jacobian; // Jacobian matrix of the constraint for body2 (dimension 1x6)
|
||||||
Matrix auxJacobian; // Jacobian matrix for all the auxiliary constraints jacobian associated with this constraint
|
Matrix auxJacobian; // Jacobian matrix for all the auxiliary constraints jacobian associated with this constraint
|
||||||
// (dimension nx12 where n is the number of auxiliary constraints)
|
// (dimension nx12 where n is the number of auxiliary constraints)
|
||||||
unsigned int nbAuxConstraints; // Number of auxiliary constraints associated with this constraint
|
uint nbAuxConstraints; // Number of auxiliary constraints associated with this constraint
|
||||||
double lowerBound; // Lower bound of the constraint
|
double lowerBound; // Lower bound of the constraint
|
||||||
double upperBound; // Upper bound of the constraint
|
double upperBound; // Upper bound of the constraint
|
||||||
Vector auxLowerBounds; // Vector that contains all the lower bounds of the auxiliary constraints
|
Vector auxLowerBounds; // Vector that contains all the lower bounds of the auxiliary constraints
|
||||||
|
@ -60,7 +60,7 @@ class Constraint {
|
||||||
Vector auxErrorValues; // Error values for the auxiliary constraints
|
Vector auxErrorValues; // Error values for the auxiliary constraints
|
||||||
|
|
||||||
public :
|
public :
|
||||||
Constraint(Body* const body1, Body* const body2, unsigned int nbAuxConstraints, bool active); // Constructor // Constructor
|
Constraint(Body* const body1, Body* const body2, uint nbAuxConstraints, bool active); // Constructor // Constructor
|
||||||
virtual ~Constraint(); // Destructor
|
virtual ~Constraint(); // Destructor
|
||||||
Body* const getBody1() const; // Return the reference to the body 1
|
Body* const getBody1() const; // Return the reference to the body 1
|
||||||
Body* const getBody2() const; // Return the reference to the body 2
|
Body* const getBody2() const; // Return the reference to the body 2
|
||||||
|
@ -104,13 +104,13 @@ inline const Matrix& Constraint::getBody2Jacobian() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the number auxiliary constraints
|
// Return the number auxiliary constraints
|
||||||
inline unsigned int Constraint::getNbAuxConstraints() const {
|
inline uint Constraint::getNbAuxConstraints() const {
|
||||||
return nbAuxConstraints;
|
return nbAuxConstraints;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the auxiliary jacobian matrix
|
// Return the auxiliary jacobian matrix
|
||||||
inline const Matrix& Constraint::getAuxJacobian() const {
|
inline const Matrix& Constraint::getAuxJacobian() const {
|
||||||
auxJacobian = this->auxJacobian;
|
return auxJacobian;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the lower bound value of the constraint
|
// Return the lower bound value of the constraint
|
||||||
|
@ -125,12 +125,12 @@ inline double Constraint::getUpperBound() const {
|
||||||
|
|
||||||
// Return the vector of lower bounds values
|
// Return the vector of lower bounds values
|
||||||
inline const Vector& Constraint::getAuxLowerBounds() const {
|
inline const Vector& Constraint::getAuxLowerBounds() const {
|
||||||
auxLowerBounds = this->auxLowerBounds;
|
return auxLowerBounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the vector of the upper bounds values
|
// Return the vector of the upper bounds values
|
||||||
inline const Vector& Constraint::getAuxUpperBounds() const {
|
inline const Vector& Constraint::getAuxUpperBounds() const {
|
||||||
auxUpperBounds = this->auxUpperBounds;
|
return auxUpperBounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the error value (bias) of the constraint
|
// Return the error value (bias) of the constraint
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#define CONTACT_H
|
#define CONTACT_H
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
|
#include "../typeDefinitions.h"
|
||||||
#include "Constraint.h"
|
#include "Constraint.h"
|
||||||
#include "../mathematics/mathematics.h"
|
#include "../mathematics/mathematics.h"
|
||||||
|
|
||||||
|
@ -59,7 +60,7 @@ class Contact : public Constraint {
|
||||||
Vector3D getNormal() const; // Return the normal vector of the contact
|
Vector3D getNormal() const; // Return the normal vector of the contact
|
||||||
Vector3D getPoint() const; // Return the contact point
|
Vector3D getPoint() const; // Return the contact point
|
||||||
virtual void evaluate(); // Evaluate the constraint
|
virtual void evaluate(); // Evaluate the constraint
|
||||||
unsigned int getNbAuxConstraints() const; // Return the number of auxiliary constraints
|
uint getNbAuxConstraints() const; // Return the number of auxiliary constraints
|
||||||
|
|
||||||
void draw() const; // TODO : Delete this (Used to debug collision detection)
|
void draw() const; // TODO : Delete this (Used to debug collision detection)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user