Use uint shortcut.

git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@312 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
chappuis.daniel 2010-05-03 22:40:32 +00:00
parent bbe85ebced
commit 4018a12c56
3 changed files with 9 additions and 8 deletions

View File

@ -24,7 +24,7 @@
using namespace reactphysics3d;
// 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),
lowerBound(lowerBound), upperBound(upperBound) {

View File

@ -51,7 +51,7 @@ class Constraint {
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
// (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 upperBound; // Upper bound of the constraint
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
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
Body* const getBody1() const; // Return the reference to the body 1
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
inline unsigned int Constraint::getNbAuxConstraints() const {
inline uint Constraint::getNbAuxConstraints() const {
return nbAuxConstraints;
}
// Return the auxiliary jacobian matrix
inline const Matrix& Constraint::getAuxJacobian() const {
auxJacobian = this->auxJacobian;
return auxJacobian;
}
// Return the lower bound value of the constraint
@ -125,12 +125,12 @@ inline double Constraint::getUpperBound() const {
// Return the vector of lower bounds values
inline const Vector& Constraint::getAuxLowerBounds() const {
auxLowerBounds = this->auxLowerBounds;
return auxLowerBounds;
}
// Return the vector of the upper bounds values
inline const Vector& Constraint::getAuxUpperBounds() const {
auxUpperBounds = this->auxUpperBounds;
return auxUpperBounds;
}
// Return the error value (bias) of the constraint

View File

@ -21,6 +21,7 @@
#define CONTACT_H
// Libraries
#include "../typeDefinitions.h"
#include "Constraint.h"
#include "../mathematics/mathematics.h"
@ -59,7 +60,7 @@ class Contact : public Constraint {
Vector3D getNormal() const; // Return the normal vector of the contact
Vector3D getPoint() const; // Return the contact point
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)
};