TColStd_Array1OfReal aCurv(thePars.Lower(), thePars.Upper());
// Arrays are allocated for max theDim = 7: 1 3d curve + 2 2d curves.
Standard_Real Val[21], Par[3], Res[21];
- Standard_Integer i, j, k, l, m, ic;
+ Standard_Integer i, j, m, ic;
Standard_Real aMaxCurv = 0.;
Standard_Integer dim = theDim;
//
i = aCurv.Lower();
for(j = 0; j < 3; ++j)
{
- k = i+j;
+ Standard_Integer k = i+j;
ic = (k - aCurv.Lower()) * dim;
- l = dim*j;
+ Standard_Integer l = dim*j;
for(m = 0; m < dim; ++m)
{
Val[l + m] = theCoords[ic + m];
{
for(j = 0; j < 3; ++j)
{
- k = i+j-1;
+ Standard_Integer k = i+j-1;
ic = (k - aCurv.Lower()) * dim;
- l = dim*j;
+ Standard_Integer l = dim*j;
for(m = 0; m < dim; ++m)
{
Val[l + m] = theCoords[ic + m];
i = aCurv.Upper();
for(j = 0; j < 3; ++j)
{
- k = i+j-2;
+ Standard_Integer k = i+j-2;
ic = (k - aCurv.Lower()) * dim;
- l = dim*j;
+ Standard_Integer l = dim*j;
for(m = 0; m < dim; ++m)
{
Val[l + m] = theCoords[ic + m];
ici1 = (anIndNext - aCurv.Lower()) * theDim,
icm = (anInd - aCurv.Lower()) * theDim;
NCollection_LocalArray<Standard_Real> V1(theDim), V2(theDim);
- Standard_Integer k,l;
Standard_Real mp = 0., m1 = 0., m2 = 0.;
Standard_Real p;
- for(k = 0; k < theDim; ++k)
+ for(Standard_Integer k = 0; k < theDim; ++k)
{
V1[k] = theCoords[icm + k] - theCoords[ici + k];
m1 += V1[k]*V1[k];
V2[k] = theCoords[ici1 + k] - theCoords[icm + k];
m2 += V2[k]*V2[k];
}
- for(k = 1; k < theDim; ++k)
+ for(Standard_Integer k = 1; k < theDim; ++k)
{
- for(l = 0; l < k; ++l)
+ for(Standard_Integer l = 0; l < k; ++l)
{
p = V1[k]*V2[l] - V1[l]*V2[k];
mp += p*p;
//! Returns true to indicate the need to copy polygon;
//! copies it if required
- Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P)
+ Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE
{
if (!myCopyMesh)
return Standard_False;
//! Returns true to indicate the need to copy polygon;
//! copies it if required
Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F,
- Handle(Poly_PolygonOnTriangulation)& P)
+ Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE
{
if (!myCopyMesh)
return Standard_False;
Standard_Boolean& bRemove,
const Standard_Boolean RemoveInvalidFaces)
{
+ bKeep = Standard_True;
+ bRemove = Standard_False;
+
Standard_Boolean bChecked;
Standard_Integer aNbEdgesChecked;
Standard_Real anAngle;
}
//
// decide whether to remove the split face or not
- bKeep = Standard_True;
- bRemove = Standard_False;
//
Standard_Integer aNb = aMEInv.Extent();
if (aNb == 0) {
{
}
-//===========================================================
-// Function : Copy constructor
-// Purpose :
-//===========================================================
-IVtkDraw_Interactor::IVtkDraw_Interactor (const IVtkDraw_Interactor& )
-{
-}
-
//===========================================================
// Function : SetShapePicker
// Purpose :
protected:
IVtkDraw_Interactor();
- IVtkDraw_Interactor (const IVtkDraw_Interactor& );
~IVtkDraw_Interactor();
-
#ifdef _WIN32
friend LRESULT CALLBACK WndProc (HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam);
friend LRESULT CALLBACK ViewerWindowProc (HWND hwnd,
void GetMousePosition (Standard_Integer *theX, Standard_Integer *theY);
#endif
+private:
+ // copying is prohibited
+ IVtkDraw_Interactor (const IVtkDraw_Interactor&);
+ void operator = (const IVtkDraw_Interactor&);
private:
//! @param [in] selection container for sensitive primitives
//! @param [in] mode Selection mode
void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
- const Standard_Integer theMode);
+ const Standard_Integer theMode) Standard_OVERRIDE;
const Bnd_Box& BoundingBox();
IVtk_IdType GetSubShapeId (const TopoDS_Shape& theSubShape) const;
//! Get ids of sub-shapes composing a sub-shape with the given id
- Standard_EXPORT IVtk_ShapeIdList GetSubIds (const IVtk_IdType) const;
+ Standard_EXPORT IVtk_ShapeIdList GetSubIds (const IVtk_IdType) const Standard_OVERRIDE;
//! @brief Get a sub-shape by its local ID.
//!
const Standard_Integer theNbVIsos = 1)
: myDevCoeff (theDevCoeff),
myDevAngle (theDevAngle),
- myDeflection (0.0),
- myPointId (0)
+ myDeflection (0.0)
{
myNbIsos[0] = theNbUIsos;
myNbIsos[1] = theNbVIsos;
protected:
//! Executes the mesh generation algorithms. To be defined in implementation class.
- Standard_EXPORT virtual void internalBuild();
+ Standard_EXPORT virtual void internalBuild() Standard_OVERRIDE;
private:
//! Internal method, generates OCCT triangulation starting from TopoDS_Shape
Standard_Real myDevCoeff;
Standard_Real myDevAngle;
mutable Standard_Real myDeflection;
- IVtk_PointId myPointId;
Standard_Integer myNbIsos[2];
};
//! Sets the picker's view interface.
//! The picker uses the view to obtain parameters of
//! the 3D view projection.
- Standard_EXPORT virtual void SetView (const IVtk_IView::Handle& theView);
+ Standard_EXPORT virtual void SetView (const IVtk_IView::Handle& theView) Standard_OVERRIDE;
//! Get number of picked entities.
- Standard_EXPORT virtual int NbPicked();
+ Standard_EXPORT virtual int NbPicked() Standard_OVERRIDE;
//! Get activated selection modes for a shape.
//! @param [in] theShape a shape with activated selection mode(s)
//! @return list of active selection modes
- Standard_EXPORT virtual IVtk_SelectionModeList GetSelectionModes (const IVtk_IShape::Handle& theShape) const;
+ Standard_EXPORT virtual IVtk_SelectionModeList
+ GetSelectionModes (const IVtk_IShape::Handle& theShape) const Standard_OVERRIDE;
public: //! @name Set selectable shapes and selection modes
//! @param [in] theIsTurnOn Flag to turn on/off the selection mode
Standard_EXPORT virtual void SetSelectionMode (const IVtk_IShape::Handle& theShape,
const IVtk_SelectionMode theMode,
- const bool theIsTurnOn = true);
+ const bool theIsTurnOn = true) Standard_OVERRIDE;
//! Activates/deactivates the given selection mode for the shape.
//! If mode == SM_None, the shape becomes non-selectable and
//! @param [in] theIsTurnOn Flag to turn on/off the selection mode
Standard_EXPORT virtual void SetSelectionMode (const IVtk_ShapePtrList& theShapes,
const IVtk_SelectionMode theMode,
- const bool theIsTurnOn = true);
+ const bool theIsTurnOn = true) Standard_OVERRIDE;
public: //! @name Picking methods
- Standard_EXPORT virtual bool Pick (const double theX, const double theY);
+ Standard_EXPORT virtual bool Pick (const double theX, const double theY) Standard_OVERRIDE;
Standard_EXPORT virtual bool Pick (const double theXMin,
const double theYMin,
const double theXMax,
- const double theYMax);
+ const double theYMax) Standard_OVERRIDE;
- Standard_EXPORT virtual bool Pick (double** thePolyLine, const int theNbPoints);
+ Standard_EXPORT virtual bool Pick (double** thePolyLine, const int theNbPoints) Standard_OVERRIDE;
public: //! @name Obtain picking results
//! @return the list of picked top-level shape IDs,
//! in the order of increasing depth (the ID of the shape closest to the eye
//! is the first in the list)
- Standard_EXPORT virtual const IVtk_ShapeIdList& ShapesPicked() const;
+ Standard_EXPORT virtual const IVtk_ShapeIdList& ShapesPicked() const Standard_OVERRIDE;
//! @param [in] theId Top-level shape ID
//! @param [out] theShapeList the list of picked sub-shape IDs for the given top-level shape ID,
//! in the order of increasing depth (the ID of the sub-shape closest to the eye
//! is the first in the list)
- Standard_EXPORT virtual void SubShapesPicked (const IVtk_IdType theId, IVtk_ShapeIdList& theShapeList) const;
+ Standard_EXPORT virtual void
+ SubShapesPicked (const IVtk_IdType theId, IVtk_ShapeIdList& theShapeList) const Standard_OVERRIDE;
public:
// Method: GetDisplayMode
// Purpose:
//============================================================================
-const IVtk_DisplayMode IVtkTools_DisplayModeFilter::GetDisplayMode () const
+IVtk_DisplayMode IVtkTools_DisplayModeFilter::GetDisplayMode () const
{
return myDisplayMode;
}
void SetDisplaySharedVertices (const bool doDisplay);
//! Get current display mode.
- const IVtk_DisplayMode GetDisplayMode() const;
+ IVtk_DisplayMode GetDisplayMode() const;
protected:
//! Filter cells according to the given set of ids.
//! @param [in] theY Y coordinate
//! @param [in] theZ Z coordinate
//! @return id of added point
- Standard_EXPORT virtual IVtk_PointId InsertCoordinate (double theX, double theY, double theZ);
+ Standard_EXPORT virtual IVtk_PointId InsertCoordinate (double theX, double theY, double theZ) Standard_OVERRIDE;
//! Insert a vertex.
//! @param [in] theShapeID id of the subshape to which the vertex belongs.
//! @param [in] theMeshType mesh type of the subshape (MT_Undefined by default)
Standard_EXPORT virtual void InsertVertex (const IVtk_IdType theShapeID,
const IVtk_PointId thePointId,
- const IVtk_MeshType theMeshType);
+ const IVtk_MeshType theMeshType) Standard_OVERRIDE;
//! Insert a line.
//! @param [in] theShapeID id of the subshape to which the line belongs.
Standard_EXPORT virtual void InsertLine (const IVtk_IdType theShapeID,
const IVtk_PointId thePointId1,
const IVtk_PointId thePointId2,
- const IVtk_MeshType theMeshType);
+ const IVtk_MeshType theMeshType) Standard_OVERRIDE;
//! Insert a poly-line.
//! @param [in] theShapeID id of the subshape to which the polyline belongs.
//! @param [in] theMeshType mesh type of the subshape (MT_Undefined by default)
Standard_EXPORT virtual void InsertLine (const IVtk_IdType theShapeID,
const IVtk_PointIdList* thePointIds,
- const IVtk_MeshType theMeshType);
+ const IVtk_MeshType theMeshType) Standard_OVERRIDE;
//! Insert a triangle
//! @param [in] theShapeID id of the subshape to which the triangle belongs.
//! @param [in] thePointId1 id of the first point
const IVtk_PointId thePointId1,
const IVtk_PointId thePointId2,
const IVtk_PointId thePointId3,
- const IVtk_MeshType theMeshType);
+ const IVtk_MeshType theMeshType) Standard_OVERRIDE;
public: //! @name Specific methods
Standard_EXPORT virtual ~IVtkVTK_View();
//! @return true if this is a perspective view, and false otherwise.
- Standard_EXPORT virtual bool IsPerspective() const;
+ Standard_EXPORT virtual bool IsPerspective() const Standard_OVERRIDE;
//! @return The focal distance of the view
- Standard_EXPORT virtual double GetDistance() const;
+ Standard_EXPORT virtual double GetDistance() const Standard_OVERRIDE;
//! @return The world coordinates of the view position
- Standard_EXPORT virtual void GetPosition (double& theX, double& theY, double& theZ) const;
+ Standard_EXPORT virtual void GetPosition (double& theX, double& theY, double& theZ) const Standard_OVERRIDE;
//! @return The "view up" direction of the view
- Standard_EXPORT virtual void GetViewUp (double& theDx, double& theDy, double& theDz) const;
+ Standard_EXPORT virtual void GetViewUp (double& theDx, double& theDy, double& theDz) const Standard_OVERRIDE;
//! @return The projection direction vector of this view
Standard_EXPORT virtual void GetDirectionOfProjection (double& theDx,
double& theDy,
- double& theDz) const;
+ double& theDz) const Standard_OVERRIDE;
//! @return Three doubles containing scale components of the view transformation
- Standard_EXPORT virtual void GetScale (double& theX, double& theY, double& theZ) const;
+ Standard_EXPORT virtual void GetScale (double& theX, double& theY, double& theZ) const Standard_OVERRIDE;
//! @return The current view's zoom factor (for parallel projection)
- Standard_EXPORT virtual double GetParallelScale() const;
+ Standard_EXPORT virtual double GetParallelScale() const Standard_OVERRIDE;
//! @return The current view angle (for perspective projection)
- Standard_EXPORT virtual double GetViewAngle() const;
+ Standard_EXPORT virtual double GetViewAngle() const Standard_OVERRIDE;
//! @return Two doubles containing the display coordinates of the view window center
- Standard_EXPORT virtual void GetViewCenter (double& theX, double& theY) const;
+ Standard_EXPORT virtual void GetViewCenter (double& theX, double& theY) const Standard_OVERRIDE;
//! Gets window size in screen coordinates in pixels
Standard_EXPORT virtual void GetWindowSize (int& theX, int& theY) const Standard_OVERRIDE;
//! @param [in] theDisplayPnt 2d point of display coordinates
//! @param [out] theWorldPnt 3d point of world coordinates
//! @return true if conversion was successful, false otherwise
- Standard_EXPORT virtual bool DisplayToWorld (const gp_XY& theDisplayPnt, gp_XYZ& theWorldPnt) const;
+ Standard_EXPORT virtual bool DisplayToWorld (const gp_XY& theDisplayPnt, gp_XYZ& theWorldPnt) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(IVtkVTK_View,IVtk_IView)
else
{
// Local search may fail. Try to use more precise algo.
- Extrema_ExtPC anExt(aPv, aGAC, 1.e-10);
+ Extrema_ExtPC anExt2(aPv, aGAC, 1.e-10);
Standard_Real aMinDist = RealLast();
Standard_Integer aMinIdx = -1;
- for (Standard_Integer anIdx = 1; anIdx <= anExt.NbExt(); anIdx++)
+ for (Standard_Integer anIdx = 1; anIdx <= anExt2.NbExt(); anIdx++)
{
- if ( anExt.IsMin(anIdx) &&
- anExt.SquareDistance(anIdx) < aMinDist )
+ if ( anExt2.IsMin(anIdx) &&
+ anExt2.SquareDistance(anIdx) < aMinDist )
{
- aMinDist = anExt.SquareDistance(anIdx);
+ aMinDist = anExt2.SquareDistance(anIdx);
aMinIdx = anIdx;
}
}
if (aMinIdx != -1)
{
- const Extrema_POnCurv& aPOncurve = anExt.Point(aMinIdx);
+ const Extrema_POnCurv& aPOncurve = anExt2.Point(aMinIdx);
aT = aPOncurve.Parameter();
if((aT > (aLast + aFirst) * 0.5) ||
else
{
// Local search may fail. Try to use more precise algo.
- Extrema_ExtPC anExt(aPv, aGAC, 1.e-10);
+ Extrema_ExtPC anExt2(aPv, aGAC, 1.e-10);
Standard_Real aMinDist = RealLast();
Standard_Integer aMinIdx = -1;
- for (Standard_Integer anIdx = 1; anIdx <= anExt.NbExt(); anIdx++)
+ for (Standard_Integer anIdx = 1; anIdx <= anExt2.NbExt(); anIdx++)
{
- if ( anExt.IsMin(anIdx) &&
- anExt.SquareDistance(anIdx) < aMinDist )
+ if ( anExt2.IsMin(anIdx) &&
+ anExt2.SquareDistance(anIdx) < aMinDist )
{
- aMinDist = anExt.SquareDistance(anIdx);
+ aMinDist = anExt2.SquareDistance(anIdx);
aMinIdx = anIdx;
}
}
if (aMinIdx != -1)
{
- const Extrema_POnCurv& aPOncurve = anExt.Point(aMinIdx);
+ const Extrema_POnCurv& aPOncurve = anExt2.Point(aMinIdx);
aT = aPOncurve.Parameter();
if((aT < (aLast + aFirst) * 0.5) ||
void LDOM_CharacterData::setData (const LDOMString& theValue)
{
LDOM_BasicText& aText = (LDOM_BasicText&) Origin ();
- if (&aText == NULL)
- Standard_ProgramError::Raise("LDOM_CharacterData::setData: called on void");
aText.SetData (theValue, myDocument);
myLength = -1;
}
return;
}
- if (typeid (*aState.Aspect()) == typeid (OpenGl_AspectFace))
+ const OpenGl_Element* anAspect = aState.Aspect();
+ if (typeid (*anAspect) == typeid (OpenGl_AspectFace))
{
- PushAspectFace (myContext, theProgram, dynamic_cast<const OpenGl_AspectFace*> (aState.Aspect()));
+ PushAspectFace (myContext, theProgram, dynamic_cast<const OpenGl_AspectFace*> (anAspect));
}
- else if (typeid (*aState.Aspect()) == typeid (OpenGl_AspectLine))
+ else if (typeid (*anAspect) == typeid (OpenGl_AspectLine))
{
- PushAspectLine (myContext, theProgram, dynamic_cast<const OpenGl_AspectLine*> (aState.Aspect()));
+ PushAspectLine (myContext, theProgram, dynamic_cast<const OpenGl_AspectLine*> (anAspect));
}
- else if (typeid (*aState.Aspect()) == typeid (OpenGl_AspectText))
+ else if (typeid (*anAspect) == typeid (OpenGl_AspectText))
{
- PushAspectText (myContext, theProgram, dynamic_cast<const OpenGl_AspectText*> (aState.Aspect()));
+ PushAspectText (myContext, theProgram, dynamic_cast<const OpenGl_AspectText*> (anAspect));
}
- else if (typeid (*aState.Aspect()) == typeid (OpenGl_AspectMarker))
+ else if (typeid (*anAspect) == typeid (OpenGl_AspectMarker))
{
- PushAspectMarker (myContext, theProgram, dynamic_cast<const OpenGl_AspectMarker*> (aState.Aspect()));
+ PushAspectMarker (myContext, theProgram, dynamic_cast<const OpenGl_AspectMarker*> (anAspect));
}
theProgram->UpdateState (OpenGl_MATERIALS_STATE, aState.Index());
if (anObject->GetMaxValueModifier() != 0) {
isWithMaxTol = Standard_True;
aMaxLMWU = new StepBasic_LengthMeasureWithUnit();
- Handle(StepBasic_MeasureValueMember) aValueMember = new StepBasic_MeasureValueMember();
- aValueMember->SetName("LENGTH_MEASURE");
- aValueMember->SetReal(anObject->GetMaxValueModifier());
- aMaxLMWU->Init(aValueMember, aUnit);
+ Handle(StepBasic_MeasureValueMember) aModifierValueMember = new StepBasic_MeasureValueMember();
+ aModifierValueMember->SetName("LENGTH_MEASURE");
+ aModifierValueMember->SetReal(anObject->GetMaxValueModifier());
+ aMaxLMWU->Init(aModifierValueMember, aUnit);
Model->AddWithRefs(aMaxLMWU);
}
}
virtual Standard_Boolean SetName(const Standard_CString /*theName*/) Standard_OVERRIDE
{ return Standard_True; }
- inline Standard_Integer Kind() const
+ Standard_Integer Kind() const Standard_OVERRIDE
{return 4;}
Standard_EXPORT virtual Standard_CString EnumText() const Standard_OVERRIDE;
new StepData_StepReaderData(nbhead,nbrec,nbpar); // creation tableau de records
for ( Standard_Integer nr = 1; nr <= nbrec; nr ++) {
- int nbarg; char* ident; char* typrec ;
+ int nbarg; char* ident; char* typrec = 0;
lir_file_rec (&ident, &typrec, &nbarg);
undirec->SetRecord (nr, ident, typrec, nbarg);
// ========================================
//! Returns the ID of the attribute.
- Standard_EXPORT const Standard_GUID& ID() const;
+ Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
//! Undos (and redos) the attribute.
- Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& with);
+ Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
//! Pastes the attribute to another label.
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const;
+ Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& into,
+ const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
//! Returns a new empty instance of the attribute.
Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;