Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78
This change is Qt4/Qt5 neutral.
This commit is contained in:
committed by
wmayer
parent
db345cb624
commit
7d0e892d36
@@ -459,7 +459,7 @@ inline void MeshFacetGrid::AddFacet (const MeshGeomFacet &rclFacet, unsigned lon
|
||||
{
|
||||
for (ulZ = ulZ1; ulZ <= ulZ2; ulZ++)
|
||||
{
|
||||
if (CMeshFacetFunc::BBoxContainFacet(GetBoundBox(ulX, ulY, ulZ), rclFacet) == TRUE)
|
||||
if (CMeshFacetFunc::BBoxContainFacet(GetBoundBox(ulX, ulY, ulZ), rclFacet) == true)
|
||||
_aulGrid[ulX][ulY][ulZ].insert(ulFacetIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ inline bool MeshHelpPoint::operator < (const MeshHelpPoint &rclObj) const
|
||||
// if (fabs(_clPt.y - rclObj._clPt.y) < MeshDefinitions::_fMinPointDistanceD1)
|
||||
// {
|
||||
// if (fabs(_clPt.z - rclObj._clPt.z) < MeshDefinitions::_fMinPointDistanceD1)
|
||||
// return FALSE;
|
||||
// return false;
|
||||
// else
|
||||
// return _clPt.z < rclObj._clPt.z;
|
||||
// }
|
||||
@@ -136,15 +136,15 @@ inline bool MeshHelpPoint::operator == (const MeshHelpPoint &rclObj) const
|
||||
if (fabs(_clPt.y - rclObj._clPt.y) < (MeshDefinitions::_fMinPointDistanceD1 + 1.0e-2f))
|
||||
{
|
||||
if (fabs(_clPt.z - rclObj._clPt.z) < (MeshDefinitions::_fMinPointDistanceD1 + 1.0e-2f))
|
||||
return TRUE;
|
||||
return true;
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -2422,9 +2422,9 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const
|
||||
|
||||
rstrOut << " ]\n }\n";
|
||||
if (_material->binding == MeshIO::PER_VERTEX)
|
||||
rstrOut << " colorPerVertex TRUE\n";
|
||||
rstrOut << " colorPerVertex true\n";
|
||||
else
|
||||
rstrOut << " colorPerVertex FALSE\n";
|
||||
rstrOut << " colorPerVertex false\n";
|
||||
}
|
||||
|
||||
// write face index
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if |dv|<EPSILON then dv=0.0;
|
||||
else no check is done (which is less robust)
|
||||
*/
|
||||
#define USE_EPSILON_TEST TRUE
|
||||
#define USE_EPSILON_TEST 1
|
||||
#define EPSILON 0.000001
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ int tri_tri_intersect(float V0[3],float V1[3],float V2[3],
|
||||
du2=DOT(N1,U2)+d1;
|
||||
|
||||
/* coplanarity robustness check */
|
||||
#if USE_EPSILON_TEST==TRUE
|
||||
#if USE_EPSILON_TEST
|
||||
if(fabs(du0)<EPSILON) du0=0.0;
|
||||
if(fabs(du1)<EPSILON) du1=0.0;
|
||||
if(fabs(du2)<EPSILON) du2=0.0;
|
||||
@@ -260,7 +260,7 @@ int tri_tri_intersect(float V0[3],float V1[3],float V2[3],
|
||||
dv1=DOT(N2,V1)+d2;
|
||||
dv2=DOT(N2,V2)+d2;
|
||||
|
||||
#if USE_EPSILON_TEST==TRUE
|
||||
#if USE_EPSILON_TEST
|
||||
if(fabs(dv0)<EPSILON) dv0=0.0;
|
||||
if(fabs(dv1)<EPSILON) dv1=0.0;
|
||||
if(fabs(dv2)<EPSILON) dv2=0.0;
|
||||
@@ -371,7 +371,7 @@ int NoDivTriTriIsect(float V0[3],float V1[3],float V2[3],
|
||||
du2=DOT(N1,U2)+d1;
|
||||
|
||||
/* coplanarity robustness check */
|
||||
#if USE_EPSILON_TEST==TRUE
|
||||
#if USE_EPSILON_TEST
|
||||
if(FABS(du0)<EPSILON) du0=0.0;
|
||||
if(FABS(du1)<EPSILON) du1=0.0;
|
||||
if(FABS(du2)<EPSILON) du2=0.0;
|
||||
@@ -394,7 +394,7 @@ int NoDivTriTriIsect(float V0[3],float V1[3],float V2[3],
|
||||
dv1=DOT(N2,V1)+d2;
|
||||
dv2=DOT(N2,V2)+d2;
|
||||
|
||||
#if USE_EPSILON_TEST==TRUE
|
||||
#if USE_EPSILON_TEST
|
||||
if(FABS(dv0)<EPSILON) dv0=0.0;
|
||||
if(FABS(dv1)<EPSILON) dv1=0.0;
|
||||
if(FABS(dv2)<EPSILON) dv2=0.0;
|
||||
@@ -597,7 +597,7 @@ int tri_tri_intersect_with_isectline(float V0[3],float V1[3],float V2[3],
|
||||
du2=DOT(N1,U2)+d1;
|
||||
|
||||
/* coplanarity robustness check */
|
||||
#if USE_EPSILON_TEST==TRUE
|
||||
#if USE_EPSILON_TEST
|
||||
if(fabs(du0)<EPSILON) du0=0.0;
|
||||
if(fabs(du1)<EPSILON) du1=0.0;
|
||||
if(fabs(du2)<EPSILON) du2=0.0;
|
||||
@@ -620,7 +620,7 @@ int tri_tri_intersect_with_isectline(float V0[3],float V1[3],float V2[3],
|
||||
dv1=DOT(N2,V1)+d2;
|
||||
dv2=DOT(N2,V2)+d2;
|
||||
|
||||
#if USE_EPSILON_TEST==TRUE
|
||||
#if USE_EPSILON_TEST
|
||||
if(fabs(dv0)<EPSILON) dv0=0.0;
|
||||
if(fabs(dv1)<EPSILON) dv1=0.0;
|
||||
if(fabs(dv2)<EPSILON) dv2=0.0;
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
// Input:
|
||||
// A[iSize][iSize], entries are A[row][col]
|
||||
// Output:
|
||||
// return value is TRUE if successful, FALSE if pivoting failed
|
||||
// return value is true if successful, false if pivoting failed
|
||||
// InvA[iSize][iSize], inverse matrix
|
||||
bool Inverse (const GMatrix<Real>& rkA, GMatrix<Real>& rkInvA);
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
// A[iSize][iSize] coefficient matrix, entries are A[row][col]
|
||||
// B[iSize] vector, entries are B[row]
|
||||
// Output:
|
||||
// return value is TRUE if successful, FALSE if pivoting failed
|
||||
// return value is true if successful, false if pivoting failed
|
||||
// X[iSize] is solution X to AX = B
|
||||
bool Solve (const GMatrix<Real>& rkA, const Real* afB, Real* afX);
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
// Upper diagonal C[iSize-1]
|
||||
// Right-hand side R[iSize]
|
||||
// Output:
|
||||
// return value is TRUE if successful, FALSE if pivoting failed
|
||||
// return value is true if successful, false if pivoting failed
|
||||
// U[iSize] is solution
|
||||
bool SolveTri (int iSize, Real* afA, Real* afB, Real* afC, Real* afR,
|
||||
Real* afU);
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
// Upper diagonal is constant, C
|
||||
// Right-hand side Rr[iSize]
|
||||
// Output:
|
||||
// return value is TRUE if successful, FALSE if pivoting failed
|
||||
// return value is true if successful, false if pivoting failed
|
||||
// U[iSize] is solution
|
||||
bool SolveConstTri (int iSize, Real fA, Real fB, Real fC, Real* afR,
|
||||
Real* afU);
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
// A, a banded matrix
|
||||
// B[iSize] vector, entries are B[row]
|
||||
// Output:
|
||||
// return value is TRUE if successful, FALSE if pivoting failed
|
||||
// return value is true if successful, false if pivoting failed
|
||||
// X[iSize] is solution X to AX = B
|
||||
bool SolveBanded (const BandedMatrix<Real>& rkA, const Real* afB,
|
||||
Real* afX);
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
// Input:
|
||||
// A, a banded matrix
|
||||
// Output:
|
||||
// return value is TRUE if the inverse exists, FALSE otherwise
|
||||
// return value is true if the inverse exists, false otherwise
|
||||
// InvA, the inverse of A
|
||||
bool Invert (const BandedMatrix<Real>& rkA, GMatrix<Real>& rkInvA);
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ void DlgEvaluateMeshImp::slotDeletedDocument(const App::Document& Doc)
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*
|
||||
* The dialog will by default be modeless, unless you set 'modal' to
|
||||
* TRUE to construct a modal dialog.
|
||||
* true to construct a modal dialog.
|
||||
*/
|
||||
DlgEvaluateMeshImp::DlgEvaluateMeshImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
: QDialog(parent, fl), d(new Private())
|
||||
|
||||
@@ -49,7 +49,7 @@ using namespace MeshGui;
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*
|
||||
* The dialog will by default be modeless, unless you set 'modal' to
|
||||
* TRUE to construct a modal dialog.
|
||||
* true to construct a modal dialog.
|
||||
*/
|
||||
MeshGui::DlgRegularSolidImp::DlgRegularSolidImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
: QDialog( parent, fl )
|
||||
|
||||
@@ -95,7 +95,7 @@ void SoFCIndexedFaceSet::GLRender(SoGLRenderAction *action)
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
|
||||
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, true, false);
|
||||
SbBool sendNormals = !mb.isColorOnly() || tb.isFunction();
|
||||
|
||||
this->getVertexData(state, coords, normals, cindices,
|
||||
@@ -129,14 +129,14 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli
|
||||
float size = std::min<float>((float)mod,3.0f);
|
||||
glPointSize(size);
|
||||
|
||||
SbBool per_face = FALSE;
|
||||
SbBool per_vert = FALSE;
|
||||
SbBool per_face = false;
|
||||
SbBool per_vert = false;
|
||||
switch (binding) {
|
||||
case SoMaterialBindingElement::PER_FACE:
|
||||
per_face = TRUE;
|
||||
per_face = true;
|
||||
break;
|
||||
case SoMaterialBindingElement::PER_VERTEX:
|
||||
per_vert = TRUE;
|
||||
per_vert = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -153,10 +153,10 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli
|
||||
for (int index=0; index<numindices; ct++) {
|
||||
if (ct%mod==0) {
|
||||
if (per_face)
|
||||
materials->send(ct, TRUE);
|
||||
materials->send(ct, true);
|
||||
v1 = *viptr++; index++;
|
||||
if (per_vert)
|
||||
materials->send(v1, TRUE);
|
||||
materials->send(v1, true);
|
||||
if (normals)
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
@@ -164,7 +164,7 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli
|
||||
|
||||
v2 = *viptr++; index++;
|
||||
if (per_vert)
|
||||
materials->send(v2, TRUE);
|
||||
materials->send(v2, true);
|
||||
if (normals)
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
@@ -172,7 +172,7 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli
|
||||
|
||||
v3 = *viptr++; index++;
|
||||
if (per_vert)
|
||||
materials->send(v3, TRUE);
|
||||
materials->send(v3, true);
|
||||
if (normals)
|
||||
currnormal = &normals[*normalindices++];
|
||||
glNormal3fv((const GLfloat*)currnormal);
|
||||
@@ -199,7 +199,7 @@ void SoFCIndexedFaceSet::doAction(SoAction * action)
|
||||
// thus we search there for it.
|
||||
SoSearchAction sa;
|
||||
sa.setInterest(SoSearchAction::FIRST);
|
||||
sa.setSearchingAll(FALSE);
|
||||
sa.setSearchingAll(false);
|
||||
sa.setType(SoCoordinate3::getClassTypeId(), 1);
|
||||
sa.apply(node);
|
||||
SoPath * path = sa.getPath();
|
||||
@@ -221,7 +221,7 @@ void SoFCIndexedFaceSet::doAction(SoAction * action)
|
||||
// thus we search there for it.
|
||||
SoSearchAction sa;
|
||||
sa.setInterest(SoSearchAction::FIRST);
|
||||
sa.setSearchingAll(FALSE);
|
||||
sa.setSearchingAll(false);
|
||||
sa.setType(SoCoordinate3::getClassTypeId(), 1);
|
||||
sa.apply(node);
|
||||
SoPath * path = sa.getPath();
|
||||
|
||||
@@ -176,7 +176,7 @@ void SoSFMeshObject::initClass()
|
||||
SO_SFIELD_INIT_CLASS(SoSFMeshObject, SoSField);
|
||||
}
|
||||
|
||||
// This reads the value of a field from a file. It returns FALSE if the value could not be read
|
||||
// This reads the value of a field from a file. It returns false if the value could not be read
|
||||
// successfully.
|
||||
SbBool SoSFMeshObject::readValue(SoInput *in)
|
||||
{
|
||||
@@ -191,7 +191,7 @@ SbBool SoSFMeshObject::readValue(SoInput *in)
|
||||
// during initial scene graph import.
|
||||
this->valueChanged();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int32_t countPt;
|
||||
@@ -235,7 +235,7 @@ SbBool SoSFMeshObject::readValue(SoInput *in)
|
||||
// during initial scene graph import.
|
||||
this->valueChanged();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// This writes the value of a field to a file.
|
||||
@@ -626,9 +626,9 @@ void SoFCMeshObjectShape::GLRender(SoGLRenderAction *action)
|
||||
SbBool needNormals = !mb.isColorOnly()/* || tb.isFunction()*/;
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
|
||||
SbBool ccw = TRUE;
|
||||
SbBool ccw = true;
|
||||
if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE)
|
||||
ccw = FALSE;
|
||||
ccw = false;
|
||||
|
||||
if (mode == false || mesh->countFacets() <= this->renderTriangleLimit) {
|
||||
if (mbind != OVERALL)
|
||||
@@ -708,16 +708,16 @@ void SoFCMeshObjectShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBun
|
||||
n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x);
|
||||
|
||||
if(perFace)
|
||||
mb->send(it-rFacets.begin(), TRUE);
|
||||
mb->send(it-rFacets.begin(), true);
|
||||
glNormal(n);
|
||||
if(perVertex)
|
||||
mb->send(it->_aulPoints[0], TRUE);
|
||||
mb->send(it->_aulPoints[0], true);
|
||||
glVertex(v0);
|
||||
if(perVertex)
|
||||
mb->send(it->_aulPoints[1], TRUE);
|
||||
mb->send(it->_aulPoints[1], true);
|
||||
glVertex(v1);
|
||||
if(perVertex)
|
||||
mb->send(it->_aulPoints[2], TRUE);
|
||||
mb->send(it->_aulPoints[2], true);
|
||||
glVertex(v2);
|
||||
}
|
||||
}
|
||||
@@ -852,7 +852,7 @@ void SoFCMeshObjectShape::doAction(SoAction * action)
|
||||
// thus we search there for it.
|
||||
SoSearchAction sa;
|
||||
sa.setInterest(SoSearchAction::FIRST);
|
||||
sa.setSearchingAll(FALSE);
|
||||
sa.setSearchingAll(false);
|
||||
sa.setType(SoFCMeshObjectNode::getClassTypeId(), 1);
|
||||
sa.apply(node);
|
||||
SoPath * path = sa.getPath();
|
||||
@@ -961,8 +961,8 @@ void SoFCMeshObjectShape::renderSelectionGeometry(const Mesh::MeshObject* mesh)
|
||||
//static SbBool
|
||||
//SoFCMeshObjectShape_ray_intersect(SoRayPickAction * action, const SbBox3f & box)
|
||||
//{
|
||||
// if (box.isEmpty()) return FALSE;
|
||||
// return action->intersect(box, TRUE);
|
||||
// if (box.isEmpty()) return false;
|
||||
// return action->intersect(box, true);
|
||||
//}
|
||||
|
||||
/**
|
||||
@@ -1163,9 +1163,9 @@ void SoFCMeshSegmentShape::GLRender(SoGLRenderAction *action)
|
||||
SbBool needNormals = !mb.isColorOnly()/* || tb.isFunction()*/;
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
|
||||
SbBool ccw = TRUE;
|
||||
SbBool ccw = true;
|
||||
if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE)
|
||||
ccw = FALSE;
|
||||
ccw = false;
|
||||
|
||||
if (mode == false || mesh->countFacets() <= this->renderTriangleLimit) {
|
||||
if (mbind != OVERALL)
|
||||
@@ -1250,16 +1250,16 @@ void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBu
|
||||
n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x);
|
||||
|
||||
if(perFace)
|
||||
mb->send(*it, TRUE);
|
||||
mb->send(*it, true);
|
||||
glNormal(n);
|
||||
if(perVertex)
|
||||
mb->send(f._aulPoints[0], TRUE);
|
||||
mb->send(f._aulPoints[0], true);
|
||||
glVertex(v0);
|
||||
if(perVertex)
|
||||
mb->send(f._aulPoints[1], TRUE);
|
||||
mb->send(f._aulPoints[1], true);
|
||||
glVertex(v1);
|
||||
if(perVertex)
|
||||
mb->send(f._aulPoints[2], TRUE);
|
||||
mb->send(f._aulPoints[2], true);
|
||||
glVertex(v2);
|
||||
}
|
||||
}
|
||||
@@ -1556,7 +1556,7 @@ void SoFCMeshObjectBoundary::GLRender(SoGLRenderAction *action)
|
||||
if (!mesh) return;
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, true, false);
|
||||
SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR);
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
|
||||
|
||||
@@ -68,8 +68,8 @@ SoPolygon::SoPolygon()
|
||||
|
||||
SO_NODE_ADD_FIELD(startIndex, (0));
|
||||
SO_NODE_ADD_FIELD(numVertices, (0));
|
||||
SO_NODE_ADD_FIELD(highlight, (FALSE));
|
||||
SO_NODE_ADD_FIELD(render, (TRUE));
|
||||
SO_NODE_ADD_FIELD(highlight, (false));
|
||||
SO_NODE_ADD_FIELD(render, (true));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,7 +86,7 @@ void SoPolygon::GLRender(SoGLRenderAction *action)
|
||||
if (!points) return;
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, true, false);
|
||||
SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR);
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
|
||||
|
||||
Reference in New Issue
Block a user