1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0026403: Add missing Standard_EXPORT keyword in SelectMgr headers

This commit is contained in:
isk 2015-08-17 10:53:57 +03:00
parent 9bfa28a7c2
commit 1f3913c65c
10 changed files with 165 additions and 164 deletions

View File

@ -45,40 +45,41 @@ public:
//! Creates new selecting volume with pixel toletance set to 2, //! Creates new selecting volume with pixel toletance set to 2,
//! orthographic camera and empty frustum builder //! orthographic camera and empty frustum builder
SelectMgr_BaseFrustum(); Standard_EXPORT SelectMgr_BaseFrustum();
virtual ~SelectMgr_BaseFrustum() {} virtual ~SelectMgr_BaseFrustum() {}
//! Passes camera projection and orientation matrices to builder //! Passes camera projection and orientation matrices to builder
void SetCamera (const Handle(Graphic3d_Camera)& theCamera); Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera)& theCamera);
//! Passes camera projection and orientation matrices to builder //! Passes camera projection and orientation matrices to builder
void SetCamera (const Graphic3d_Mat4d& theProjection, Standard_EXPORT void SetCamera (const Graphic3d_Mat4d& theProjection,
const Graphic3d_Mat4d& theWorldView, const Graphic3d_Mat4d& theWorldView,
const Standard_Integer theIsOrthographic, const Standard_Integer theIsOrthographic,
const Graphic3d_WorldViewProjState& theWVPState = Graphic3d_WorldViewProjState()); const Graphic3d_WorldViewProjState& theWVPState = Graphic3d_WorldViewProjState());
//! @return current camera projection transformation common for all selecting volumes //! @return current camera projection transformation common for all selecting volumes
const Graphic3d_Mat4d& ProjectionMatrix() const; Standard_EXPORT const Graphic3d_Mat4d& ProjectionMatrix() const;
//! @return current camera world view transformation common for all selecting volumes //! @return current camera world view transformation common for all selecting volumes
const Graphic3d_Mat4d& WorldViewMatrix() const; Standard_EXPORT const Graphic3d_Mat4d& WorldViewMatrix() const;
//! @return current camera world view projection transformation state //! @return current camera world view projection transformation state
const Graphic3d_WorldViewProjState& WorldViewProjState() const; Standard_EXPORT const Graphic3d_WorldViewProjState& WorldViewProjState() const;
void SetPixelTolerance (const Standard_Real theTol); Standard_EXPORT void SetPixelTolerance (const Standard_Real theTol);
void SetWindowSize (const Standard_Integer theWidth, const Standard_Integer theHeight); Standard_EXPORT void SetWindowSize (const Standard_Integer theWidth,
const Standard_Integer theHeight);
//! Passes viewport parameters to builder //! Passes viewport parameters to builder
void SetViewport (const Standard_Real theX, Standard_EXPORT void SetViewport (const Standard_Real theX,
const Standard_Real theY, const Standard_Real theY,
const Standard_Real theWidth, const Standard_Real theWidth,
const Standard_Real theHeight); const Standard_Real theHeight);
//! Nullifies the builder created in the constructor and copies the pointer given //! Nullifies the builder created in the constructor and copies the pointer given
void SetBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder); Standard_EXPORT void SetBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder);
//! Builds volume according to the point and given pixel tolerance //! Builds volume according to the point and given pixel tolerance
@ -103,50 +104,50 @@ public:
virtual NCollection_Handle<SelectMgr_BaseFrustum> Scale (const Standard_Real /*theScaleFactor*/) { return NULL; } virtual NCollection_Handle<SelectMgr_BaseFrustum> Scale (const Standard_Real /*theScaleFactor*/) { return NULL; }
//! SAT intersection test between defined volume and given axis-aligned box //! SAT intersection test between defined volume and given axis-aligned box
virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox, Standard_EXPORT virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox,
Standard_Real& theDepth); Standard_Real& theDepth);
//! Returns true if selecting volume is overlapped by axis-aligned bounding box //! Returns true if selecting volume is overlapped by axis-aligned bounding box
//! with minimum corner at point theMinPt and maximum at point theMaxPt //! with minimum corner at point theMinPt and maximum at point theMaxPt
virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin,
const SelectMgr_Vec3& theBoxMax, const SelectMgr_Vec3& theBoxMax,
Standard_Boolean* theInside = NULL); Standard_Boolean* theInside = NULL);
//! Intersection test between defined volume and given point //! Intersection test between defined volume and given point
virtual Standard_Boolean Overlaps (const gp_Pnt& thePt, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt,
Standard_Real& theDepth); Standard_Real& theDepth);
//! SAT intersection test between defined volume and given ordered set of points, //! SAT intersection test between defined volume and given ordered set of points,
//! representing line segments. The test may be considered of interior part or //! representing line segments. The test may be considered of interior part or
//! boundary line defined by segments depending on given sensitivity type //! boundary line defined by segments depending on given sensitivity type
virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, Standard_EXPORT virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth); Standard_Real& theDepth);
//! Checks if line segment overlaps selecting frustum //! Checks if line segment overlaps selecting frustum
virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
const gp_Pnt& thePt2, const gp_Pnt& thePt2,
Standard_Real& theDepth); Standard_Real& theDepth);
//! SAT intersection test between defined volume and given triangle. The test may //! SAT intersection test between defined volume and given triangle. The test may
//! be considered of interior part or boundary line defined by triangle vertices //! be considered of interior part or boundary line defined by triangle vertices
//! depending on given sensitivity type //! depending on given sensitivity type
virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
const gp_Pnt& thePt2, const gp_Pnt& thePt2,
const gp_Pnt& thePt3, const gp_Pnt& thePt3,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth); Standard_Real& theDepth);
//! Measures distance between 3d projection of user-picked //! Measures distance between 3d projection of user-picked
//! screen point and given point theCOG //! screen point and given point theCOG
virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG); Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG);
virtual SelectMgr_Vec3 DetectedPoint (const Standard_Real theDepth) const; Standard_EXPORT virtual SelectMgr_Vec3 DetectedPoint (const Standard_Real theDepth) const;
//! Checks if the point of sensitive in which selection was detected belongs //! Checks if the point of sensitive in which selection was detected belongs
//! to the region defined by clipping planes //! to the region defined by clipping planes
virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes, Standard_EXPORT virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
const Standard_Real theDepth); const Standard_Real theDepth);
DEFINE_STANDARD_RTTI(SelectMgr_BaseFrustum, Standard_Transient) DEFINE_STANDARD_RTTI(SelectMgr_BaseFrustum, Standard_Transient)

View File

@ -62,26 +62,26 @@ protected:
//! Returns true if selecting volume is overlapped by axis-aligned bounding box //! Returns true if selecting volume is overlapped by axis-aligned bounding box
//! with minimum corner at point theMinPt and maximum at point theMaxPt //! with minimum corner at point theMinPt and maximum at point theMaxPt
Standard_Boolean hasOverlap (const SelectMgr_Vec3& theBoxMin, Standard_EXPORT Standard_Boolean hasOverlap (const SelectMgr_Vec3& theBoxMin,
const SelectMgr_Vec3& theBoxMax, const SelectMgr_Vec3& theBoxMax,
Standard_Boolean* theInside = NULL); Standard_Boolean* theInside = NULL);
//! SAT intersection test between defined volume and given point //! SAT intersection test between defined volume and given point
Standard_Boolean hasOverlap (const gp_Pnt& thePnt); Standard_EXPORT Standard_Boolean hasOverlap (const gp_Pnt& thePnt);
//! SAT intersection test between defined volume and given segment //! SAT intersection test between defined volume and given segment
Standard_Boolean hasOverlap (const gp_Pnt& thePnt1, Standard_EXPORT Standard_Boolean hasOverlap (const gp_Pnt& thePnt1,
const gp_Pnt& thePnt2); const gp_Pnt& thePnt2);
//! SAT intersection test between frustum given and planar convex polygon represented as ordered point set //! SAT intersection test between frustum given and planar convex polygon represented as ordered point set
Standard_Boolean hasOverlap (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts, Standard_EXPORT Standard_Boolean hasOverlap (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
SelectMgr_Vec3& theNormal); SelectMgr_Vec3& theNormal);
//! SAT intersection test between defined volume and given triangle //! SAT intersection test between defined volume and given triangle
Standard_Boolean hasOverlap (const gp_Pnt& thePnt1, Standard_EXPORT Standard_Boolean hasOverlap (const gp_Pnt& thePnt1,
const gp_Pnt& thePnt2, const gp_Pnt& thePnt2,
const gp_Pnt& thePnt3, const gp_Pnt& thePnt3,
SelectMgr_Vec3& theNormal); SelectMgr_Vec3& theNormal);
private: private:

View File

@ -33,46 +33,46 @@ public:
SelectMgr_FrustumBuilder(); SelectMgr_FrustumBuilder();
//! Stores current world view transformation matrix //! Stores current world view transformation matrix
void SetWorldViewMatrix (const Graphic3d_Mat4d& theWorldViewMatrix); Standard_EXPORT void SetWorldViewMatrix (const Graphic3d_Mat4d& theWorldViewMatrix);
//! @return current world view transformation matrix //! @return current world view transformation matrix
const Graphic3d_Mat4d& WorldViewMatrix() const; Standard_EXPORT const Graphic3d_Mat4d& WorldViewMatrix() const;
//! Stores current projection matrix //! Stores current projection matrix
void SetProjectionMatrix (const Graphic3d_Mat4d& theProjection); Standard_EXPORT void SetProjectionMatrix (const Graphic3d_Mat4d& theProjection);
//! @return current projection matrix //! @return current projection matrix
const Graphic3d_Mat4d& ProjectionMatrix() const; Standard_EXPORT const Graphic3d_Mat4d& ProjectionMatrix() const;
//! Stores current world view projection matrix state for the orientation and projection matrices //! Stores current world view projection matrix state for the orientation and projection matrices
void SetWorldViewProjState (const Graphic3d_WorldViewProjState& theState); Standard_EXPORT void SetWorldViewProjState (const Graphic3d_WorldViewProjState& theState);
//! @return current world view projection state //! @return current world view projection state
const Graphic3d_WorldViewProjState& WorldViewProjState() const; Standard_EXPORT const Graphic3d_WorldViewProjState& WorldViewProjState() const;
//! Stores current window width and height //! Stores current window width and height
void SetWindowSize (const Standard_Integer theWidth, Standard_EXPORT void SetWindowSize (const Standard_Integer theWidth,
const Standard_Integer theHeight); const Standard_Integer theHeight);
//! Stores current viewport coordinates //! Stores current viewport coordinates
void SetViewport (const Standard_Real theX, Standard_EXPORT void SetViewport (const Standard_Real theX,
const Standard_Real theY, const Standard_Real theY,
const Standard_Real theWidth, const Standard_Real theWidth,
const Standard_Real theHeight); const Standard_Real theHeight);
void InvalidateViewport(); Standard_EXPORT void InvalidateViewport();
//! Calculates signed distance between plane with equation //! Calculates signed distance between plane with equation
//! theEq and point thePnt //! theEq and point thePnt
Standard_Real SignedPlanePntDist (const SelectMgr_Vec3& theEq, Standard_EXPORT Standard_Real SignedPlanePntDist (const SelectMgr_Vec3& theEq,
const SelectMgr_Vec3& thePnt) const; const SelectMgr_Vec3& thePnt) const;
//! Projects 2d screen point onto view frustum plane: //! Projects 2d screen point onto view frustum plane:
//! theZ = 0 - near plane, //! theZ = 0 - near plane,
//! theZ = 1 - far plane //! theZ = 1 - far plane
SelectMgr_Vec3 ProjectPntOnViewPlane (const Standard_Real& theX, Standard_EXPORT SelectMgr_Vec3 ProjectPntOnViewPlane (const Standard_Real& theX,
const Standard_Real& theY, const Standard_Real& theY,
const Standard_Real& theZ) const; const Standard_Real& theZ) const;
DEFINE_STANDARD_RTTI(SelectMgr_FrustumBuilder, Standard_Transient) DEFINE_STANDARD_RTTI(SelectMgr_FrustumBuilder, Standard_Transient)

View File

@ -36,78 +36,78 @@ public:
SelectMgr_RectangularFrustum() {}; SelectMgr_RectangularFrustum() {};
//! Builds volume according to the point and given pixel tolerance //! Builds volume according to the point and given pixel tolerance
virtual void Build (const gp_Pnt2d& thePoint) Standard_OVERRIDE; Standard_EXPORT virtual void Build (const gp_Pnt2d& thePoint) Standard_OVERRIDE;
//! Builds volume according to the selected rectangle //! Builds volume according to the selected rectangle
virtual void Build (const gp_Pnt2d& theMinPnt, Standard_EXPORT virtual void Build (const gp_Pnt2d& theMinPnt,
const gp_Pnt2d& theMaxPnt) Standard_OVERRIDE; const gp_Pnt2d& theMaxPnt) Standard_OVERRIDE;
//! Returns a copy of the frustum transformed according to the matrix given //! Returns a copy of the frustum transformed according to the matrix given
virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& theTrsf) Standard_OVERRIDE; Standard_EXPORT virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& theTrsf) Standard_OVERRIDE;
//! IMPORTANT: Makes sense only for frustum built on a single point! //! IMPORTANT: Makes sense only for frustum built on a single point!
//! Returns a copy of the frustum resized according to the scale factor given //! Returns a copy of the frustum resized according to the scale factor given
virtual NCollection_Handle<SelectMgr_BaseFrustum> Scale (const Standard_Real theScaleFactor) Standard_OVERRIDE; Standard_EXPORT virtual NCollection_Handle<SelectMgr_BaseFrustum> Scale (const Standard_Real theScaleFactor) Standard_OVERRIDE;
// SAT Tests for different objects // SAT Tests for different objects
//! SAT intersection test between defined volume and given axis-aligned box //! SAT intersection test between defined volume and given axis-aligned box
virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox, Standard_EXPORT virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! Returns true if selecting volume is overlapped by axis-aligned bounding box //! Returns true if selecting volume is overlapped by axis-aligned bounding box
//! with minimum corner at point theMinPt and maximum at point theMaxPt //! with minimum corner at point theMinPt and maximum at point theMaxPt
virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin,
const SelectMgr_Vec3& theBoxMax, const SelectMgr_Vec3& theBoxMax,
Standard_Boolean* theInside = NULL) Standard_OVERRIDE; Standard_Boolean* theInside = NULL) Standard_OVERRIDE;
//! Intersection test between defined volume and given point //! Intersection test between defined volume and given point
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! SAT intersection test between defined volume and given ordered set of points, //! SAT intersection test between defined volume and given ordered set of points,
//! representing line segments. The test may be considered of interior part or //! representing line segments. The test may be considered of interior part or
//! boundary line defined by segments depending on given sensitivity type //! boundary line defined by segments depending on given sensitivity type
virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts, Standard_EXPORT virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! Checks if line segment overlaps selecting frustum //! Checks if line segment overlaps selecting frustum
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
const gp_Pnt& thePnt2, const gp_Pnt& thePnt2,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! SAT intersection test between defined volume and given triangle. The test may //! SAT intersection test between defined volume and given triangle. The test may
//! be considered of interior part or boundary line defined by triangle vertices //! be considered of interior part or boundary line defined by triangle vertices
//! depending on given sensitivity type //! depending on given sensitivity type
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
const gp_Pnt& thePnt2, const gp_Pnt& thePnt2,
const gp_Pnt& thePnt3, const gp_Pnt& thePnt3,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! Measures distance between 3d projection of user-picked //! Measures distance between 3d projection of user-picked
//! screen point and given point theCOG //! screen point and given point theCOG
virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) Standard_OVERRIDE; Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) Standard_OVERRIDE;
//! Calculates the point on a view ray that was detected during the run of selection algo by given depth //! Calculates the point on a view ray that was detected during the run of selection algo by given depth
virtual SelectMgr_Vec3 DetectedPoint (const Standard_Real theDepth) const Standard_OVERRIDE; Standard_EXPORT virtual SelectMgr_Vec3 DetectedPoint (const Standard_Real theDepth) const Standard_OVERRIDE;
//! Checks if the point of sensitive in which selection was detected belongs //! Checks if the point of sensitive in which selection was detected belongs
//! to the region defined by clipping planes //! to the region defined by clipping planes
virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes, Standard_EXPORT virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
const Standard_Real theDepth) Standard_OVERRIDE; const Standard_Real theDepth) Standard_OVERRIDE;
protected: protected:
void segmentSegmentDistance (const gp_Pnt& theSegPnt1, Standard_EXPORT void segmentSegmentDistance (const gp_Pnt& theSegPnt1,
const gp_Pnt& theSegPnt2, const gp_Pnt& theSegPnt2,
Standard_Real& theDepth); Standard_Real& theDepth);
void segmentPlaneIntersection (const SelectMgr_Vec3& thePlane, Standard_EXPORT void segmentPlaneIntersection (const SelectMgr_Vec3& thePlane,
const gp_Pnt& thePntOnPlane, const gp_Pnt& thePntOnPlane,
Standard_Real& theDepth); Standard_Real& theDepth);
private: private:

View File

@ -85,9 +85,9 @@ public:
} }
//! Returns BVH tree for the given world view projection (builds it if necessary). //! Returns BVH tree for the given world view projection (builds it if necessary).
const NCollection_Handle<BVH_Tree<Standard_Real, 3> >& BVH (const Graphic3d_Mat4d& theProjectionMatrix, Standard_EXPORT const NCollection_Handle<BVH_Tree<Standard_Real, 3> >& BVH (const Graphic3d_Mat4d& theProjectionMatrix,
const Graphic3d_Mat4d& theWorldViewMatrix, const Graphic3d_Mat4d& theWorldViewMatrix,
const Graphic3d_WorldViewProjState& theWVPState); const Graphic3d_WorldViewProjState& theWVPState);
private: private:

View File

@ -76,7 +76,7 @@ public:
//! The default setting 0 is the selection mode for a shape in its entirety. //! The default setting 0 is the selection mode for a shape in its entirety.
Standard_EXPORT SelectMgr_Selection (const Standard_Integer theModeIdx = 0); Standard_EXPORT SelectMgr_Selection (const Standard_Integer theModeIdx = 0);
~SelectMgr_Selection(); Standard_EXPORT ~SelectMgr_Selection();
Standard_EXPORT void Destroy(); Standard_EXPORT void Destroy();
@ -137,7 +137,7 @@ public:
protected: protected:
//! Returns sensitive entity stored by index theIdx in entites vector //! Returns sensitive entity stored by index theIdx in entites vector
Handle(SelectMgr_SensitiveEntity)& GetEntityById (const Standard_Integer theIdx); Standard_EXPORT Handle(SelectMgr_SensitiveEntity)& GetEntityById (const Standard_Integer theIdx);
private: private:

View File

@ -27,19 +27,19 @@ class SelectMgr_SensitiveEntity : public Standard_Transient
public: public:
//! Creates new inactive for selection object with base entity theEntity //! Creates new inactive for selection object with base entity theEntity
SelectMgr_SensitiveEntity (const Handle(SelectBasics_SensitiveEntity)& theEntity); Standard_EXPORT SelectMgr_SensitiveEntity (const Handle(SelectBasics_SensitiveEntity)& theEntity);
~SelectMgr_SensitiveEntity() {} ~SelectMgr_SensitiveEntity() {}
//! Clears up all resources and memory //! Clears up all resources and memory
void Clear(); Standard_EXPORT void Clear();
//! Returns related instance of SelectBasics class //! Returns related instance of SelectBasics class
Standard_EXPORT const Handle(SelectBasics_SensitiveEntity)& BaseSensitive() const; Standard_EXPORT const Handle(SelectBasics_SensitiveEntity)& BaseSensitive() const;
//! Returns true if this entity belongs to the active selection //! Returns true if this entity belongs to the active selection
//! mode of parent object //! mode of parent object
Standard_Boolean IsActiveForSelection() const; Standard_EXPORT Standard_Boolean IsActiveForSelection() const;
//! Marks entity as inactive for selection //! Marks entity as inactive for selection
Standard_EXPORT void ResetSelectionActiveStatus() const; Standard_EXPORT void ResetSelectionActiveStatus() const;

View File

@ -37,38 +37,38 @@ class SelectMgr_SensitiveEntitySet : public BVH_PrimitiveSet<Standard_Real, 3>
public: public:
SelectMgr_SensitiveEntitySet(); Standard_EXPORT SelectMgr_SensitiveEntitySet();
virtual ~SelectMgr_SensitiveEntitySet() {}; virtual ~SelectMgr_SensitiveEntitySet() {};
//! Adds new entity to the set and marks BVH tree for rebuild //! Adds new entity to the set and marks BVH tree for rebuild
void Append (const Handle(SelectMgr_SensitiveEntity)& theEntity); Standard_EXPORT void Append (const Handle(SelectMgr_SensitiveEntity)& theEntity);
//! Adds every entity of selection theSelection to the set and marks //! Adds every entity of selection theSelection to the set and marks
//! BVH tree for rebuild //! BVH tree for rebuild
void Append (const Handle(SelectMgr_Selection)& theSelection); Standard_EXPORT void Append (const Handle(SelectMgr_Selection)& theSelection);
//! Removes every entity of selection theSelection from the set //! Removes every entity of selection theSelection from the set
//! and marks BVH tree for rebuild //! and marks BVH tree for rebuild
void Remove (const Handle(SelectMgr_Selection)& theSelection); Standard_EXPORT void Remove (const Handle(SelectMgr_Selection)& theSelection);
//! Returns bounding box of entity with index theIdx //! Returns bounding box of entity with index theIdx
virtual Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE; Standard_EXPORT virtual Select3D_BndBox3d Box (const Standard_Integer theIndex) const Standard_OVERRIDE;
//! Returns geometry center of sensitive entity index theIdx //! Returns geometry center of sensitive entity index theIdx
//! along the given axis theAxis //! along the given axis theAxis
virtual Standard_Real Center (const Standard_Integer theIndex, Standard_EXPORT virtual Standard_Real Center (const Standard_Integer theIndex,
const Standard_Integer theAxis) const Standard_OVERRIDE; const Standard_Integer theAxis) const Standard_OVERRIDE;
//! Swaps items with indexes theIdx1 and theIdx2 //! Swaps items with indexes theIdx1 and theIdx2
virtual void Swap (const Standard_Integer theIndex1, Standard_EXPORT virtual void Swap (const Standard_Integer theIndex1,
const Standard_Integer theIndex2) Standard_OVERRIDE; const Standard_Integer theIndex2) Standard_OVERRIDE;
//! Returns the amount of entities //! Returns the amount of entities
virtual Standard_Integer Size() const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
//! Returns the entity with index theIndex in the set //! Returns the entity with index theIndex in the set
const Handle(SelectMgr_SensitiveEntity)& GetSensitiveById (const Standard_Integer theIndex) const; Standard_EXPORT const Handle(SelectMgr_SensitiveEntity)& GetSensitiveById (const Standard_Integer theIndex) const;
private: private:

View File

@ -31,56 +31,56 @@ public:
//! theP2 and theP3 projections onto near and far view frustum planes //! theP2 and theP3 projections onto near and far view frustum planes
SelectMgr_TriangularFrustum() {}; SelectMgr_TriangularFrustum() {};
~SelectMgr_TriangularFrustum(); Standard_EXPORT ~SelectMgr_TriangularFrustum();
//! Creates new triangular frustum with bases of triangles with vertices theP1, theP2 and theP3 //! Creates new triangular frustum with bases of triangles with vertices theP1, theP2 and theP3
//! projections onto near and far view frustum planes (only for triangular frustums) //! projections onto near and far view frustum planes (only for triangular frustums)
virtual void Build (const gp_Pnt2d& theP1, Standard_EXPORT virtual void Build (const gp_Pnt2d& theP1,
const gp_Pnt2d& theP2, const gp_Pnt2d& theP2,
const gp_Pnt2d& theP3) Standard_OVERRIDE; const gp_Pnt2d& theP3) Standard_OVERRIDE;
//! Returns a copy of the frustum transformed according to the matrix given //! Returns a copy of the frustum transformed according to the matrix given
virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& theTrsf) Standard_OVERRIDE; Standard_EXPORT virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& theTrsf) Standard_OVERRIDE;
// SAT Tests for different objects // SAT Tests for different objects
//! SAT intersection test between defined volume and given axis-aligned box //! SAT intersection test between defined volume and given axis-aligned box
virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox, Standard_EXPORT virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! Returns true if selecting volume is overlapped by axis-aligned bounding box //! Returns true if selecting volume is overlapped by axis-aligned bounding box
//! with minimum corner at point theMinPt and maximum at point theMaxPt //! with minimum corner at point theMinPt and maximum at point theMaxPt
virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt, Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt,
const SelectMgr_Vec3& theMaxPt, const SelectMgr_Vec3& theMaxPt,
Standard_Boolean* theInside) Standard_OVERRIDE; Standard_Boolean* theInside) Standard_OVERRIDE;
//! Intersection test between defined volume and given point //! Intersection test between defined volume and given point
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! SAT intersection test between defined volume and given ordered set of points, //! SAT intersection test between defined volume and given ordered set of points,
//! representing line segments. The test may be considered of interior part or //! representing line segments. The test may be considered of interior part or
//! boundary line defined by segments depending on given sensitivity type //! boundary line defined by segments depending on given sensitivity type
virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts, Standard_EXPORT virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! Checks if line segment overlaps selecting frustum //! Checks if line segment overlaps selecting frustum
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
const gp_Pnt& thePnt2, const gp_Pnt& thePnt2,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! SAT intersection test between defined volume and given triangle. The test may //! SAT intersection test between defined volume and given triangle. The test may
//! be considered of interior part or boundary line defined by triangle vertices //! be considered of interior part or boundary line defined by triangle vertices
//! depending on given sensitivity type //! depending on given sensitivity type
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
const gp_Pnt& thePnt2, const gp_Pnt& thePnt2,
const gp_Pnt& thePnt3, const gp_Pnt& thePnt3,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
//! Nullifies the handle to corresponding builder instance to prevent memory leaks //! Nullifies the handle to corresponding builder instance to prevent memory leaks
void Clear(); Standard_EXPORT void Clear();
DEFINE_STANDARD_RTTI(SelectMgr_TriangularFrustum,Standard_Transient) DEFINE_STANDARD_RTTI(SelectMgr_TriangularFrustum,Standard_Transient)
}; };

View File

@ -44,34 +44,34 @@ public:
//! Meshes polygon bounded by polyline. Than organizes a set of triangular frustums, //! Meshes polygon bounded by polyline. Than organizes a set of triangular frustums,
//! where each triangle's projection onto near and far view frustum planes is //! where each triangle's projection onto near and far view frustum planes is
//! considered as a frustum base //! considered as a frustum base
virtual void Build (const TColgp_Array1OfPnt2d& thePoints) Standard_OVERRIDE; Standard_EXPORT virtual void Build (const TColgp_Array1OfPnt2d& thePoints) Standard_OVERRIDE;
//! Returns a copy of the frustum with all sub-volumes transformed according to the matrix given //! Returns a copy of the frustum with all sub-volumes transformed according to the matrix given
virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& theTrsf) Standard_OVERRIDE; Standard_EXPORT virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& theTrsf) Standard_OVERRIDE;
virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox, Standard_EXPORT virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt, Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt,
const SelectMgr_Vec3& theMaxPnt, const SelectMgr_Vec3& theMaxPnt,
Standard_Boolean* theInside) Standard_OVERRIDE; Standard_Boolean* theInside) Standard_OVERRIDE;
virtual Standard_Boolean Overlaps (const gp_Pnt& thePt, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, Standard_EXPORT virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
const gp_Pnt& thePt2, const gp_Pnt& thePt2,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
const gp_Pnt& thePt2, const gp_Pnt& thePt2,
const gp_Pnt& thePt3, const gp_Pnt& thePt3,
Select3D_TypeOfSensitivity theSensType, Select3D_TypeOfSensitivity theSensType,
Standard_Real& theDepth) Standard_OVERRIDE; Standard_Real& theDepth) Standard_OVERRIDE;
private: private: