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
@@ -472,7 +472,7 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n)
|
||||
else {
|
||||
// the nearest picked point was not part of the view provider
|
||||
SoRayPickAction action(view->getSoRenderManager()->getViewportRegion());
|
||||
action.setPickAll(TRUE);
|
||||
action.setPickAll(true);
|
||||
action.setPoint(mbe->getPosition());
|
||||
action.apply(view->getSoRenderManager()->getSceneGraph());
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -172,8 +172,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore:
|
||||
GtsSurface * s1, * s2, * s3;
|
||||
GtsSurfaceInter * si;
|
||||
GNode * tree1, * tree2;
|
||||
gboolean check_self_intersection = FALSE;
|
||||
gboolean closed = TRUE, is_open1, is_open2;
|
||||
gboolean check_self_intersection = false;
|
||||
gboolean closed = true, is_open1, is_open2;
|
||||
|
||||
|
||||
// create a GTS surface
|
||||
@@ -224,11 +224,11 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore:
|
||||
|
||||
/* build bounding box tree for first surface */
|
||||
tree1 = gts_bb_tree_surface (s1);
|
||||
is_open1 = gts_surface_volume (s1) < 0. ? TRUE : FALSE;
|
||||
is_open1 = gts_surface_volume (s1) < 0. ? true : false;
|
||||
|
||||
/* build bounding box tree for second surface */
|
||||
tree2 = gts_bb_tree_surface (s2);
|
||||
is_open2 = gts_surface_volume (s2) < 0. ? TRUE : FALSE;
|
||||
is_open2 = gts_surface_volume (s2) < 0. ? true : false;
|
||||
|
||||
si = gts_surface_inter_new (gts_surface_inter_class (),
|
||||
s1, s2, tree1, tree2, is_open1, is_open2);
|
||||
@@ -236,8 +236,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore:
|
||||
if (!closed) {
|
||||
gts_object_destroy (GTS_OBJECT (s1));
|
||||
gts_object_destroy (GTS_OBJECT (s2));
|
||||
gts_bb_tree_destroy (tree1, TRUE);
|
||||
gts_bb_tree_destroy (tree2, TRUE);
|
||||
gts_bb_tree_destroy (tree1, true);
|
||||
gts_bb_tree_destroy (tree2, true);
|
||||
throw"the intersection of 1 and 2 is not a closed curve\n";
|
||||
}
|
||||
|
||||
@@ -280,8 +280,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore:
|
||||
gts_object_destroy (GTS_OBJECT (s2));
|
||||
gts_object_destroy (GTS_OBJECT (s3));
|
||||
gts_object_destroy (GTS_OBJECT (si));
|
||||
gts_bb_tree_destroy (tree1, TRUE);
|
||||
gts_bb_tree_destroy (tree2, TRUE);
|
||||
gts_bb_tree_destroy (tree1, true);
|
||||
gts_bb_tree_destroy (tree2, true);
|
||||
throw "the resulting surface is self-intersecting\n";
|
||||
}
|
||||
}
|
||||
@@ -301,8 +301,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore:
|
||||
// gts_object_destroy (GTS_OBJECT (si));
|
||||
|
||||
// destroy bounding box trees (including bounding boxes)
|
||||
// gts_bb_tree_destroy (tree1, TRUE);
|
||||
// gts_bb_tree_destroy (tree2, TRUE);
|
||||
// gts_bb_tree_destroy (tree1, true);
|
||||
// gts_bb_tree_destroy (tree2, true);
|
||||
|
||||
#endif
|
||||
return pMesh1;
|
||||
|
||||
@@ -34,7 +34,7 @@ using namespace PartGui;
|
||||
* 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.
|
||||
*/
|
||||
DlgPartBoxImp::DlgPartBoxImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
: Gui::LocationInterface<Ui_DlgPartBox>(parent, fl)
|
||||
|
||||
@@ -34,7 +34,7 @@ using namespace PartGui;
|
||||
* 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.
|
||||
*/
|
||||
DlgPartCylinderImp::DlgPartCylinderImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
: Gui::LocationInterface<Ui_DlgPartCylinder>(parent, fl)
|
||||
|
||||
@@ -40,7 +40,7 @@ using namespace PartGui;
|
||||
* 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.
|
||||
*/
|
||||
DlgPartImportIgesImp::DlgPartImportIgesImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
: QDialog(parent, fl)
|
||||
|
||||
@@ -39,7 +39,7 @@ using namespace PartGui;
|
||||
* 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.
|
||||
*/
|
||||
DlgPartImportStepImp::DlgPartImportStepImp( QWidget* parent, Qt::WindowFlags fl )
|
||||
: QDialog( parent, fl )
|
||||
|
||||
@@ -131,9 +131,9 @@ void SoBrepEdgeSet::renderHighlight(SoGLRenderAction *action)
|
||||
//SoLineWidthElement::set(state, this, 4.0f);
|
||||
|
||||
SoLazyElement::setEmissive(state, &this->highlightColor);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, true);
|
||||
SoLazyElement::setDiffuse(state, this,1, &this->highlightColor,&this->colorpacker1);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, true);
|
||||
SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR);
|
||||
|
||||
const SoCoordinateElement * coords;
|
||||
@@ -146,7 +146,7 @@ void SoBrepEdgeSet::renderHighlight(SoGLRenderAction *action)
|
||||
SbBool normalCacheUsed;
|
||||
|
||||
this->getVertexData(state, coords, normals, cindices, nindices,
|
||||
tindices, mindices, numcindices, FALSE, normalCacheUsed);
|
||||
tindices, mindices, numcindices, false, normalCacheUsed);
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
@@ -174,9 +174,9 @@ void SoBrepEdgeSet::renderSelection(SoGLRenderAction *action)
|
||||
//SoLineWidthElement::set(state, this, 4.0f);
|
||||
|
||||
SoLazyElement::setEmissive(state, &this->selectionColor);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, true);
|
||||
SoLazyElement::setDiffuse(state, this,1, &this->selectionColor,&this->colorpacker2);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, true);
|
||||
SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR);
|
||||
|
||||
const SoCoordinateElement * coords;
|
||||
@@ -189,7 +189,7 @@ void SoBrepEdgeSet::renderSelection(SoGLRenderAction *action)
|
||||
SbBool normalCacheUsed;
|
||||
|
||||
this->getVertexData(state, coords, normals, cindices, nindices,
|
||||
tindices, mindices, numcindices, FALSE, normalCacheUsed);
|
||||
tindices, mindices, numcindices, false, normalCacheUsed);
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
|
||||
@@ -194,7 +194,7 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action)
|
||||
SoMaterialBundle mb(action);
|
||||
Binding mbind = this->findMaterialBinding(state);
|
||||
|
||||
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, true, false);
|
||||
SbBool doTextures = tb.needCoordinates();
|
||||
|
||||
int32_t hl_idx = this->highlightIndex.getValue();
|
||||
@@ -320,7 +320,7 @@ void SoBrepFaceSet::renderColoredArray(SoMaterialBundle *const materials)
|
||||
int tris = partIndex[part_id];
|
||||
|
||||
if (tris > 0) {
|
||||
materials->send(part_id, TRUE);
|
||||
materials->send(part_id, true);
|
||||
glDrawElements(GL_TRIANGLES, 3 * tris, GL_UNSIGNED_INT, ptr);
|
||||
ptr += 3 * tris;
|
||||
}
|
||||
@@ -363,7 +363,7 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action)
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
|
||||
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, true, false);
|
||||
doTextures = tb.needCoordinates();
|
||||
SbBool sendNormals = !mb.isColorOnly() || tb.isFunction();
|
||||
|
||||
@@ -461,13 +461,13 @@ void SoBrepFaceSet::generatePrimitives(SoAction * action)
|
||||
SbBool sendNormals;
|
||||
SbBool normalCacheUsed;
|
||||
|
||||
sendNormals = TRUE; // always generate normals
|
||||
sendNormals = true; // always generate normals
|
||||
|
||||
this->getVertexData(state, coords, normals, cindices,
|
||||
nindices, tindices, mindices, numindices,
|
||||
sendNormals, normalCacheUsed);
|
||||
|
||||
SoTextureCoordinateBundle tb(action, FALSE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, false, false);
|
||||
doTextures = tb.needCoordinates();
|
||||
|
||||
if (!sendNormals) nbind = OVERALL;
|
||||
@@ -674,11 +674,11 @@ void SoBrepFaceSet::renderHighlight(SoGLRenderAction *action)
|
||||
state->push();
|
||||
|
||||
SoLazyElement::setEmissive(state, &this->highlightColor);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, true);
|
||||
#if 0 // disables shading effect
|
||||
// sendNormals will be FALSE
|
||||
// sendNormals will be false
|
||||
SoLazyElement::setDiffuse(state, this,1, &this->highlightColor,&this->colorpacker);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, true);
|
||||
SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR);
|
||||
#endif
|
||||
|
||||
@@ -697,7 +697,7 @@ void SoBrepFaceSet::renderHighlight(SoGLRenderAction *action)
|
||||
SbBool normalCacheUsed;
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, true, false);
|
||||
doTextures = tb.needCoordinates();
|
||||
SbBool sendNormals = !mb.isColorOnly() || tb.isFunction();
|
||||
|
||||
@@ -734,7 +734,7 @@ void SoBrepFaceSet::renderHighlight(SoGLRenderAction *action)
|
||||
|
||||
// materials
|
||||
mbind = OVERALL;
|
||||
doTextures = FALSE;
|
||||
doTextures = false;
|
||||
|
||||
renderShape(static_cast<const SoGLCoordinateElement*>(coords), &(cindices[start]), length,
|
||||
&(pindices[id]), 1, normals, nindices, &mb, mindices, &tb, tindices, nbind, mbind, doTextures?1:0);
|
||||
@@ -752,10 +752,10 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action)
|
||||
state->push();
|
||||
|
||||
SoLazyElement::setEmissive(state, &this->selectionColor);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, true);
|
||||
#if 0 // disables shading effect
|
||||
SoLazyElement::setDiffuse(state, this,1, &this->selectionColor,&this->colorpacker);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, true);
|
||||
SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR);
|
||||
#endif
|
||||
|
||||
@@ -774,7 +774,7 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action)
|
||||
SbBool normalCacheUsed;
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
|
||||
SoTextureCoordinateBundle tb(action, true, false);
|
||||
doTextures = tb.needCoordinates();
|
||||
SbBool sendNormals = !mb.isColorOnly() || tb.isFunction();
|
||||
|
||||
@@ -791,7 +791,7 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action)
|
||||
|
||||
// materials
|
||||
mbind = OVERALL;
|
||||
doTextures = FALSE;
|
||||
doTextures = false;
|
||||
|
||||
for (int i=0; i<numSelected; i++) {
|
||||
int id = selected[i];
|
||||
@@ -883,17 +883,17 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist,
|
||||
/* vertex 1 *********************************************************/
|
||||
if (mbind == PER_PART) {
|
||||
if (trinr == 0)
|
||||
materials->send(matnr++, TRUE);
|
||||
materials->send(matnr++, true);
|
||||
}
|
||||
else if (mbind == PER_PART_INDEXED) {
|
||||
if (trinr == 0)
|
||||
materials->send(*matindices++, TRUE);
|
||||
materials->send(*matindices++, true);
|
||||
}
|
||||
else if (mbind == PER_VERTEX || mbind == PER_FACE) {
|
||||
materials->send(matnr++, TRUE);
|
||||
materials->send(matnr++, true);
|
||||
}
|
||||
else if (mbind == PER_VERTEX_INDEXED || mbind == PER_FACE_INDEXED) {
|
||||
materials->send(*matindices++, TRUE);
|
||||
materials->send(*matindices++, true);
|
||||
}
|
||||
|
||||
if (normals) {
|
||||
@@ -917,9 +917,9 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist,
|
||||
|
||||
/* vertex 2 *********************************************************/
|
||||
if (mbind == PER_VERTEX)
|
||||
materials->send(matnr++, TRUE);
|
||||
materials->send(matnr++, true);
|
||||
else if (mbind == PER_VERTEX_INDEXED)
|
||||
materials->send(*matindices++, TRUE);
|
||||
materials->send(*matindices++, true);
|
||||
|
||||
if (normals) {
|
||||
if (nbind == PER_VERTEX) {
|
||||
@@ -942,9 +942,9 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist,
|
||||
|
||||
/* vertex 3 *********************************************************/
|
||||
if (mbind == PER_VERTEX)
|
||||
materials->send(matnr++, TRUE);
|
||||
materials->send(matnr++, true);
|
||||
else if (mbind == PER_VERTEX_INDEXED)
|
||||
materials->send(*matindices++, TRUE);
|
||||
materials->send(*matindices++, true);
|
||||
|
||||
if (normals) {
|
||||
if (nbind == PER_VERTEX) {
|
||||
|
||||
@@ -131,14 +131,14 @@ void SoBrepPointSet::renderHighlight(SoGLRenderAction *action)
|
||||
if (ps < 4.0f) SoPointSizeElement::set(state, this, 4.0f);
|
||||
|
||||
SoLazyElement::setEmissive(state, &this->highlightColor);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, true);
|
||||
SoLazyElement::setDiffuse(state, this,1, &this->highlightColor,&this->colorpacker);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, true);
|
||||
|
||||
const SoCoordinateElement * coords;
|
||||
const SbVec3f * normals;
|
||||
|
||||
this->getVertexData(state, coords, normals, FALSE);
|
||||
this->getVertexData(state, coords, normals, false);
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
@@ -161,16 +161,16 @@ void SoBrepPointSet::renderSelection(SoGLRenderAction *action)
|
||||
if (ps < 4.0f) SoPointSizeElement::set(state, this, 4.0f);
|
||||
|
||||
SoLazyElement::setEmissive(state, &this->selectionColor);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setEmissiveColorOverride(state, this, true);
|
||||
SoLazyElement::setDiffuse(state, this,1, &this->selectionColor,&this->colorpacker);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, TRUE);
|
||||
SoOverrideElement::setDiffuseColorOverride(state, this, true);
|
||||
|
||||
const SoCoordinateElement * coords;
|
||||
const SbVec3f * normals;
|
||||
const int32_t * cindices;
|
||||
int numcindices;
|
||||
|
||||
this->getVertexData(state, coords, normals, FALSE);
|
||||
this->getVertexData(state, coords, normals, false);
|
||||
|
||||
SoMaterialBundle mb(action);
|
||||
mb.sendFirst(); // make sure we have the correct material
|
||||
|
||||
@@ -86,7 +86,7 @@ void SoFCControlPoints::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
|
||||
|
||||
|
||||
@@ -322,12 +322,12 @@ PartGui::DimensionLinear::DimensionLinear()
|
||||
{
|
||||
SO_KIT_CONSTRUCTOR(PartGui::DimensionLinear);
|
||||
|
||||
SO_KIT_ADD_CATALOG_ENTRY(transformation, SoTransform, TRUE, topSeparator,"" , TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, TRUE, topSeparator,"" , TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(leftArrow, SoShapeKit, TRUE, topSeparator,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(rightArrow, SoShapeKit, TRUE, topSeparator,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(line, SoShapeKit, TRUE, annotate,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, TRUE, annotate,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(transformation, SoTransform, true, topSeparator,"" , true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, true, topSeparator,"" , true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(leftArrow, SoShapeKit, true, topSeparator,"" ,true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(rightArrow, SoShapeKit, true, topSeparator,"" ,true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(line, SoShapeKit, true, annotate,"" ,true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, true, annotate,"" ,true);
|
||||
|
||||
SO_KIT_INIT_INSTANCE();
|
||||
|
||||
@@ -350,13 +350,13 @@ PartGui::DimensionLinear::~DimensionLinear()
|
||||
|
||||
SbBool PartGui::DimensionLinear::affectsState() const
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void PartGui::DimensionLinear::setupDimension()
|
||||
{
|
||||
//transformation
|
||||
SoTransform *trans = static_cast<SoTransform *>(getPart("transformation", TRUE));
|
||||
SoTransform *trans = static_cast<SoTransform *>(getPart("transformation", true));
|
||||
trans->translation.connectFrom(&point1);
|
||||
//build engine for vector subtraction and length.
|
||||
SoCalculator *hyp = new SoCalculator();
|
||||
@@ -389,7 +389,7 @@ void PartGui::DimensionLinear::setupDimension()
|
||||
//have use local here to do the offset because the main is wired up to length of dimension.
|
||||
set("rightArrow.localTransform", "translation 0.0 -0.25 0.0"); //half cone height.
|
||||
|
||||
SoTransform *transform = static_cast<SoTransform *>(getPart("rightArrow.transform", FALSE));
|
||||
SoTransform *transform = static_cast<SoTransform *>(getPart("rightArrow.transform", false));
|
||||
if (!transform)
|
||||
return;//what to do here?
|
||||
SoComposeVec3f *vec = new SoComposeVec3f;
|
||||
@@ -420,7 +420,7 @@ void PartGui::DimensionLinear::setupDimension()
|
||||
setPart("line.material", material);
|
||||
|
||||
//text
|
||||
SoSeparator *textSep = static_cast<SoSeparator *>(getPart("textSep", TRUE));
|
||||
SoSeparator *textSep = static_cast<SoSeparator *>(getPart("textSep", true));
|
||||
if (!textSep)
|
||||
return;
|
||||
|
||||
@@ -1014,12 +1014,12 @@ PartGui::DimensionAngular::DimensionAngular()
|
||||
{
|
||||
SO_KIT_CONSTRUCTOR(PartGui::DimensionAngular);
|
||||
|
||||
SO_KIT_ADD_CATALOG_ENTRY(transformation, SoMatrixTransform, TRUE, topSeparator,"" , TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, TRUE, topSeparator,"" , TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(arrow1, SoShapeKit, TRUE, topSeparator,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(arrow2, SoShapeKit, TRUE, topSeparator,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(arcSep, SoSeparator, TRUE, annotate,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, TRUE, annotate,"" ,TRUE);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(transformation, SoMatrixTransform, true, topSeparator,"" , true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, true, topSeparator,"" , true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(arrow1, SoShapeKit, true, topSeparator,"" ,true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(arrow2, SoShapeKit, true, topSeparator,"" ,true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(arcSep, SoSeparator, true, annotate,"" ,true);
|
||||
SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, true, annotate,"" ,true);
|
||||
|
||||
SO_KIT_INIT_INSTANCE();
|
||||
|
||||
@@ -1042,14 +1042,14 @@ PartGui::DimensionAngular::~DimensionAngular()
|
||||
|
||||
SbBool PartGui::DimensionAngular::affectsState() const
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void PartGui::DimensionAngular::setupDimension()
|
||||
{
|
||||
//transformation
|
||||
SoMatrixTransform *trans = static_cast<SoMatrixTransform *>(getPart("transformation", TRUE));
|
||||
SoMatrixTransform *trans = static_cast<SoMatrixTransform *>(getPart("transformation", true));
|
||||
trans->matrix.connectFrom(&matrix);
|
||||
|
||||
//color
|
||||
@@ -1110,14 +1110,14 @@ void PartGui::DimensionAngular::setupDimension()
|
||||
lineSet->numVertices.connectFrom(&arcEngine->pointCount);
|
||||
lineSet->startIndex.setValue(0);
|
||||
|
||||
SoSeparator *arcSep = static_cast<SoSeparator *>(getPart("arcSep", TRUE));
|
||||
SoSeparator *arcSep = static_cast<SoSeparator *>(getPart("arcSep", true));
|
||||
if (!arcSep)
|
||||
return;
|
||||
arcSep->addChild(material);
|
||||
arcSep->addChild(lineSet);
|
||||
|
||||
//text
|
||||
SoSeparator *textSep = static_cast<SoSeparator *>(getPart("textSep", TRUE));
|
||||
SoSeparator *textSep = static_cast<SoSeparator *>(getPart("textSep", true));
|
||||
if (!textSep)
|
||||
return;
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
Gui::View3DInventorViewer* view = reinterpret_cast<Gui::View3DInventorViewer*>(cb->getUserData());
|
||||
view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), selectionCallback, ud);
|
||||
SoNode* root = view->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(TRUE);
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(true);
|
||||
|
||||
std::vector<SbVec2f> picked = view->getGLPolygon();
|
||||
SoCamera* cam = view->getSoRenderManager()->getCamera();
|
||||
@@ -277,7 +277,7 @@ FaceColors::~FaceColors()
|
||||
d->view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(),
|
||||
Private::selectionCallback, this);
|
||||
SoNode* root = d->view->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(TRUE);
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(true);
|
||||
}
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
d->connectDelDoc.disconnect();
|
||||
@@ -308,7 +308,7 @@ void FaceColors::on_boxSelection_clicked()
|
||||
// avoid that the selection node handles the event otherwise the callback function won't be
|
||||
// called immediately
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(FALSE);
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(false);
|
||||
d->view = viewer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ bool ViewProviderCurveNet::handleEvent(const SoEvent * const ev, Gui::View3DInve
|
||||
if (ev->getTypeId().isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) {
|
||||
const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev;
|
||||
const int button = event->getButton();
|
||||
const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE;
|
||||
const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false;
|
||||
|
||||
// which button pressed?
|
||||
switch (button) {
|
||||
|
||||
@@ -119,7 +119,7 @@ bool ViewProviderMirror::setEdit(int ModNum)
|
||||
// translation and center fields are overridden.
|
||||
SoSearchAction sa;
|
||||
sa.setInterest(SoSearchAction::FIRST);
|
||||
sa.setSearchingAll(FALSE);
|
||||
sa.setSearchingAll(false);
|
||||
sa.setNode(trans);
|
||||
sa.apply(pcEditNode);
|
||||
SoPath * path = sa.getPath();
|
||||
|
||||
@@ -273,7 +273,7 @@ namespace geoff_geometry {
|
||||
two lines P1P2 and P3P4. Calculate also the values of mua and mub where
|
||||
Pa = P1 + t1 (P2 - P1)
|
||||
Pb = P3 + t2 (P4 - P3)
|
||||
Return FALSE if no solution exists. P Bourke method.
|
||||
Return false if no solution exists. P Bourke method.
|
||||
Input this 1st line
|
||||
Input l2 2nd line
|
||||
Output lshort shortest line between lines (if lshort.ok == false, the line intersect at a point lshort.p0)
|
||||
|
||||
@@ -201,7 +201,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
|
||||
// Axis 1
|
||||
searchAction.setName("FREECAD_AXIS1");
|
||||
searchAction.setInterest(SoSearchAction::FIRST);
|
||||
searchAction.setSearchingAll(FALSE);
|
||||
searchAction.setSearchingAll(false);
|
||||
searchAction.apply(pcRobotRoot);
|
||||
path = searchAction.getPath();
|
||||
if(path){
|
||||
@@ -214,7 +214,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
|
||||
// Axis 2
|
||||
searchAction.setName("FREECAD_AXIS2");
|
||||
searchAction.setInterest(SoSearchAction::FIRST);
|
||||
searchAction.setSearchingAll(FALSE);
|
||||
searchAction.setSearchingAll(false);
|
||||
searchAction.apply(pcRobotRoot);
|
||||
path = searchAction.getPath();
|
||||
if(path){
|
||||
@@ -227,7 +227,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
|
||||
// Axis 3
|
||||
searchAction.setName("FREECAD_AXIS3");
|
||||
searchAction.setInterest(SoSearchAction::FIRST);
|
||||
searchAction.setSearchingAll(FALSE);
|
||||
searchAction.setSearchingAll(false);
|
||||
searchAction.apply(pcRobotRoot);
|
||||
path = searchAction.getPath();
|
||||
if(path){
|
||||
@@ -240,7 +240,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
|
||||
// Axis 4
|
||||
searchAction.setName("FREECAD_AXIS4");
|
||||
searchAction.setInterest(SoSearchAction::FIRST);
|
||||
searchAction.setSearchingAll(FALSE);
|
||||
searchAction.setSearchingAll(false);
|
||||
searchAction.apply(pcRobotRoot);
|
||||
path = searchAction.getPath();
|
||||
if(path){
|
||||
@@ -253,7 +253,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
|
||||
// Axis 5
|
||||
searchAction.setName("FREECAD_AXIS5");
|
||||
searchAction.setInterest(SoSearchAction::FIRST);
|
||||
searchAction.setSearchingAll(FALSE);
|
||||
searchAction.setSearchingAll(false);
|
||||
searchAction.apply(pcRobotRoot);
|
||||
path = searchAction.getPath();
|
||||
if(path){
|
||||
@@ -266,7 +266,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
|
||||
// Axis 6
|
||||
searchAction.setName("FREECAD_AXIS6");
|
||||
searchAction.setInterest(SoSearchAction::FIRST);
|
||||
searchAction.setSearchingAll(FALSE);
|
||||
searchAction.setSearchingAll(false);
|
||||
searchAction.apply(pcRobotRoot);
|
||||
path = searchAction.getPath();
|
||||
if(path){
|
||||
|
||||
@@ -4545,7 +4545,7 @@ public:
|
||||
viewer = static_cast<Gui::View3DInventor *>(mdi)->getViewer();
|
||||
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(TRUE);
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(true);
|
||||
|
||||
Gui::Selection().clearSelection();
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
|
||||
@@ -351,7 +351,7 @@ void ViewProviderSketch::purgeHandler(void)
|
||||
viewer = static_cast<Gui::View3DInventor *>(mdi)->getViewer();
|
||||
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(FALSE);
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(false);
|
||||
}
|
||||
|
||||
void ViewProviderSketch::setAxisPickStyle(bool on)
|
||||
@@ -4612,9 +4612,9 @@ void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int Mo
|
||||
|
||||
viewer->setCameraOrientation(rot);
|
||||
|
||||
viewer->setEditing(TRUE);
|
||||
viewer->setEditing(true);
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(FALSE);
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(false);
|
||||
|
||||
viewer->addGraphicsItem(rubberband);
|
||||
rubberband->setViewer(viewer);
|
||||
@@ -4623,9 +4623,9 @@ void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int Mo
|
||||
void ViewProviderSketch::unsetEditViewer(Gui::View3DInventorViewer* viewer)
|
||||
{
|
||||
viewer->removeGraphicsItem(rubberband);
|
||||
viewer->setEditing(FALSE);
|
||||
viewer->setEditing(false);
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(TRUE);
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(true);
|
||||
}
|
||||
|
||||
void ViewProviderSketch::setPositionText(const Base::Vector2D &Pos, const SbString &text)
|
||||
|
||||
@@ -480,7 +480,7 @@ void QtColorPicker::insertColor(const QColor &color, const QString &text, int in
|
||||
/*! \property QtColorPicker::colorDialog
|
||||
\brief Whether the ellipsis "..." (more) button is available.
|
||||
|
||||
If this property is set to TRUE, the color grid popup will include
|
||||
If this property is set to true, the color grid popup will include
|
||||
a "More" button (signified by an ellipsis, "...") which pops up a
|
||||
QColorDialog when clicked. The user will then be able to select
|
||||
any custom color they like.
|
||||
|
||||
@@ -77,7 +77,7 @@ bool UnitTestDialog::hasInstance()
|
||||
* 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.
|
||||
*/
|
||||
UnitTestDialog::UnitTestDialog(QWidget* parent, Qt::WindowFlags f)
|
||||
: QDialog(parent, f)
|
||||
|
||||
Reference in New Issue
Block a user