OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKV3d
AIS


AIS_LengthDimension Class Reference

A framework to display lengths.
These can be lengths along a face or edge, or
between two faces or two edges.
The value of the length is given in a text figuring in this display.
.

#include <AIS_LengthDimension.hxx>

Inheritance diagram for AIS_LengthDimension:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT AIS_LengthDimension (const TopoDS_Face &aFirstFace, const TopoDS_Face &aSecondFace, const Standard_Real aVal, const TCollection_ExtendedString &aText)
 Constructs a length display object defined by the first
face aFShape, the second face aSShape, the dimension aVal, and the text aText.
.
Standard_EXPORT AIS_LengthDimension (const TopoDS_Face &aFirstFace, const TopoDS_Face &aSecondFace, const Standard_Real aVal, const TCollection_ExtendedString &aText, const gp_Pnt &aPosition, const DsgPrs_ArrowSide aSymbolPrs, const Standard_Real anArrowSize=0.0)
 Constructs a length display object defined by the first
face aFShape, the second face aSShape, the
dimension aVal, the position aPosition, the arrow
aSymbolPrs with the size anArrowSize and the text aText.
.
Standard_EXPORT AIS_LengthDimension (const TopoDS_Face &Face, const TopoDS_Edge &Edge, const Standard_Real Val, const TCollection_ExtendedString &Text)
 Constructs a length display object defined by the first
edge or vertex aFShape, the second edge or vertex
aSShape, the dimension aVal,and the plane aPlane.
.
Standard_EXPORT AIS_LengthDimension (const TopoDS_Shape &aFShape, const TopoDS_Shape &aSShape, const Handle(Geom_Plane)&aPlane, const Standard_Real aVal, const TCollection_ExtendedString &aText)
 -- Constructs a length display object defined by the first
edge or vertex aFShape, the second edge or vertex
aSShape, the dimension aVal,and the plane aPlane.

Standard_EXPORT AIS_LengthDimension (const TopoDS_Shape &aFShape, const TopoDS_Shape &aSShape, const Handle(Geom_Plane)&aPlane, const Standard_Real aVal, const TCollection_ExtendedString &aText, const gp_Pnt &aPosition, const DsgPrs_ArrowSide aSymbolPrs, const AIS_TypeOfDist aTypeDist, const Standard_Real anArrowSize=0.0)
 Constructs a length display object defined by the first
edge or vertex aFShape, the second edge or vertex
aSShape, the dimension aVal, the position aPosition,
the type of distance aTypeDist, the type of arrow
aSymbolPrs with the size anArrowSize, and the plane aPlane.
.
Standard_EXPORT void SetFirstShape (const TopoDS_Shape &aFShape)
Standard_EXPORT void SetSecondShape (const TopoDS_Shape &aSShape)
 Allows you to identify the second shape aSShape
relative to the first.
.
virtual Standard_EXPORT AIS_KindOfDimension KindOfDimension () const
 Indicates that we are concerned with a length.
.
virtual Standard_EXPORT Standard_Boolean IsMovable () const
 Returns true if the length dimension is movable.
.
AIS_TypeOfDist TypeOfDist () const
 Returns the type of distance of the length primitive.
.
void SetTypeOfDist (const AIS_TypeOfDist aTypeDist)
 Returns true if the length dimension is movable.
.
virtual Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Geom_Transformation)&aTrsf, const Handle(Prs3d_Presentation)&aPresentation)
 computes the presentation according to a point of view
given by <aprojector>.
To be Used when the associated degenerated Presentations
have been transformed by <atrsf> which is not a Pure
Translation. The HLR Prs can't be deducted automatically
WARNING :<atrsf> must be applied
to the object to display before computation !!!

Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Static Public Member Functions

static Standard_EXPORT void ComputeTwoEdgesLength (const Handle(Prs3d_Presentation)&aPresentation, const Handle(AIS_Drawer)&aDrawer, const TCollection_ExtendedString &aText, const Standard_Real ArrowSize, const TopoDS_Edge &FirstEdge, const TopoDS_Edge &SecondEdge, const Handle(Geom_Plane)&Plane, const Standard_Boolean AutomaticPos, const Standard_Boolean IsSetBndBox, const Bnd_Box &BndBox, Standard_Integer &ExtShape, Standard_Real &Val, gp_Dir &DirAttach, gp_Pnt &Position, gp_Pnt &FirstAttach, gp_Pnt &SecondAttach, DsgPrs_ArrowSide &SymbolPrs)
static Standard_EXPORT void ComputeOneEdgeOneVertexLength (const Handle(Prs3d_Presentation)&aPresentation, const Handle(AIS_Drawer)&aDrawer, const TCollection_ExtendedString &aText, const Standard_Real ArrowSize, const TopoDS_Shape &FirstShape, const TopoDS_Shape &SecondShape, const Handle(Geom_Plane)&Plane, const Standard_Boolean AutomaticPos, const Standard_Boolean IsSetBndBox, const Bnd_Box &BndBox, Standard_Integer &ExtShape, Standard_Real &Val, gp_Dir &DirAttach, gp_Pnt &Position, gp_Pnt &FirstAttach, gp_Pnt &SecondAttach, DsgPrs_ArrowSide &SymbolPrs)
static Standard_EXPORT void ComputeTwoVerticesLength (const Handle(Prs3d_Presentation)&aPresentation, const Handle(AIS_Drawer)&aDrawer, const TCollection_ExtendedString &aText, const Standard_Real ArrowSize, const TopoDS_Vertex &FirstVertex, const TopoDS_Vertex &SecondVertex, const Handle(Geom_Plane)&Plane, const Standard_Boolean AutomaticPos, const Standard_Boolean IsSetBndBox, const Bnd_Box &BndBox, const AIS_TypeOfDist TypeDist, Standard_Integer &ExtShape, Standard_Real &Val, gp_Dir &DirAttach, gp_Pnt &Position, gp_Pnt &FirstAttach, gp_Pnt &SecondAttach, DsgPrs_ArrowSide &SymbolPrs)

Private Member Functions

virtual Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)&aPresentationManager, const Handle(Prs3d_Presentation)&aPresentation, const Standard_Integer aMode=0)
 Calculates the 3D view aPresentation and its
updates. The latter are managed by aPresentationManager.
aPresentableObject has the display mode aMode;
this has the default value of 0, that is, the wireframe display mode.
.
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Prs3d_Presentation)&aPresentation)
 Calculates the 3D view aPresentation and its
updates. The latter are managed by
aPresentationManager. Each of the views in the
viewer and every modification such as rotation, for
example, entails recalculation.
It must be redefined to implement hidden line removal
for the object. The user never calls this method
himself. This is done via the InteractiveContext object
and is dependent on the point of view from which the
object is displayed.
.
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager2d)&aPresentationManager, const Handle(Graphic2d_GraphicObject)&aPresentation, const Standard_Integer aMode=0)
 Calculates the 2D view aPresentation and its
updates. The latter are managed by aPresentationManager.
aPresentableObject has the display mode aMode;
this has the default value of 0, that is, the wireframe display mode.
Note that this syntax is not used in AIS as that
package only concerns 3D display.
.
virtual Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)&aSelection, const Standard_Integer aMode)
 Recovers and calculates any sensitive primitive,
aSelection, available in Shape mode, specified by
aMode. As a rule, these are sensitive faces.
This method is defined as virtual. This enables you to
implement it in the creation of a new class of AIS
Interactive Object. You need to do this and in so
doing, redefine this method, if you create a class
which enriches the list of signatures and types.
.
Standard_EXPORT void ComputeOneFaceLength (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeOneEdgeLength (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeTwoFacesLength (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeEdgeFaceLength (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeFaceSelection (const Handle(SelectMgr_Selection)&aSelection)
Standard_EXPORT void ComputeEdgeVertexSelection (const Handle(SelectMgr_Selection)&aSelection)

Private Attributes

Standard_Integer myNbShape
gp_Pnt myFAttach
gp_Pnt mySAttach
gp_Dir myDirAttach
AIS_TypeOfDist myTypeDist

Constructor & Destructor Documentation

Standard_EXPORT AIS_LengthDimension::AIS_LengthDimension const TopoDS_Face &  aFirstFace,
const TopoDS_Face &  aSecondFace,
const Standard_Real  aVal,
const TCollection_ExtendedString &  aText
 

Standard_EXPORT AIS_LengthDimension::AIS_LengthDimension const TopoDS_Face &  aFirstFace,
const TopoDS_Face &  aSecondFace,
const Standard_Real  aVal,
const TCollection_ExtendedString &  aText,
const gp_Pnt &  aPosition,
const DsgPrs_ArrowSide  aSymbolPrs,
const Standard_Real  anArrowSize = 0.0
 

Standard_EXPORT AIS_LengthDimension::AIS_LengthDimension const TopoDS_Face &  Face,
const TopoDS_Edge &  Edge,
const Standard_Real  Val,
const TCollection_ExtendedString &  Text
 

Standard_EXPORT AIS_LengthDimension::AIS_LengthDimension const TopoDS_Shape &  aFShape,
const TopoDS_Shape &  aSShape,
const Handle(Geom_Plane)&  aPlane,
const Standard_Real  aVal,
const TCollection_ExtendedString &  aText
 

Standard_EXPORT AIS_LengthDimension::AIS_LengthDimension const TopoDS_Shape &  aFShape,
const TopoDS_Shape &  aSShape,
const Handle(Geom_Plane)&  aPlane,
const Standard_Real  aVal,
const TCollection_ExtendedString &  aText,
const gp_Pnt &  aPosition,
const DsgPrs_ArrowSide  aSymbolPrs,
const AIS_TypeOfDist  aTypeDist,
const Standard_Real  anArrowSize = 0.0
 


Member Function Documentation

Standard_EXPORT void AIS_LengthDimension::Compute const Handle(PrsMgr_PresentationManager2d)&  aPresentationManager,
const Handle(Graphic2d_GraphicObject)&  aPresentation,
const Standard_Integer  aMode = 0
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT void AIS_LengthDimension::Compute const Handle(Prs3d_Projector)&  aProjector,
const Handle(Prs3d_Presentation)&  aPresentation
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

virtual Standard_EXPORT void AIS_LengthDimension::Compute const Handle(PrsMgr_PresentationManager3d)&  aPresentationManager,
const Handle(Prs3d_Presentation)&  aPresentation,
const Standard_Integer  aMode = 0
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

virtual Standard_EXPORT void AIS_LengthDimension::Compute const Handle(Prs3d_Projector)&  aProjector,
const Handle(Geom_Transformation)&  aTrsf,
const Handle(Prs3d_Presentation)&  aPresentation
[virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT void AIS_LengthDimension::ComputeEdgeFaceLength const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

Standard_EXPORT void AIS_LengthDimension::ComputeEdgeVertexSelection const Handle(SelectMgr_Selection)&  aSelection  )  [private]
 

Standard_EXPORT void AIS_LengthDimension::ComputeFaceSelection const Handle(SelectMgr_Selection)&  aSelection  )  [private]
 

Standard_EXPORT void AIS_LengthDimension::ComputeOneEdgeLength const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

static Standard_EXPORT void AIS_LengthDimension::ComputeOneEdgeOneVertexLength const Handle(Prs3d_Presentation)&  aPresentation,
const Handle(AIS_Drawer)&  aDrawer,
const TCollection_ExtendedString &  aText,
const Standard_Real  ArrowSize,
const TopoDS_Shape &  FirstShape,
const TopoDS_Shape &  SecondShape,
const Handle(Geom_Plane)&  Plane,
const Standard_Boolean  AutomaticPos,
const Standard_Boolean  IsSetBndBox,
const Bnd_Box &  BndBox,
Standard_Integer &  ExtShape,
Standard_Real &  Val,
gp_Dir &  DirAttach,
gp_Pnt &  Position,
gp_Pnt &  FirstAttach,
gp_Pnt &  SecondAttach,
DsgPrs_ArrowSide SymbolPrs
[static]
 

Standard_EXPORT void AIS_LengthDimension::ComputeOneFaceLength const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

virtual Standard_EXPORT void AIS_LengthDimension::ComputeSelection const Handle(SelectMgr_Selection)&  aSelection,
const Standard_Integer  aMode
[private, virtual]
 

Implements SelectMgr_SelectableObject.

static Standard_EXPORT void AIS_LengthDimension::ComputeTwoEdgesLength const Handle(Prs3d_Presentation)&  aPresentation,
const Handle(AIS_Drawer)&  aDrawer,
const TCollection_ExtendedString &  aText,
const Standard_Real  ArrowSize,
const TopoDS_Edge &  FirstEdge,
const TopoDS_Edge &  SecondEdge,
const Handle(Geom_Plane)&  Plane,
const Standard_Boolean  AutomaticPos,
const Standard_Boolean  IsSetBndBox,
const Bnd_Box &  BndBox,
Standard_Integer &  ExtShape,
Standard_Real &  Val,
gp_Dir &  DirAttach,
gp_Pnt &  Position,
gp_Pnt &  FirstAttach,
gp_Pnt &  SecondAttach,
DsgPrs_ArrowSide SymbolPrs
[static]
 

Standard_EXPORT void AIS_LengthDimension::ComputeTwoFacesLength const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

static Standard_EXPORT void AIS_LengthDimension::ComputeTwoVerticesLength const Handle(Prs3d_Presentation)&  aPresentation,
const Handle(AIS_Drawer)&  aDrawer,
const TCollection_ExtendedString &  aText,
const Standard_Real  ArrowSize,
const TopoDS_Vertex &  FirstVertex,
const TopoDS_Vertex &  SecondVertex,
const Handle(Geom_Plane)&  Plane,
const Standard_Boolean  AutomaticPos,
const Standard_Boolean  IsSetBndBox,
const Bnd_Box &  BndBox,
const AIS_TypeOfDist  TypeDist,
Standard_Integer &  ExtShape,
Standard_Real &  Val,
gp_Dir &  DirAttach,
gp_Pnt &  Position,
gp_Pnt &  FirstAttach,
gp_Pnt &  SecondAttach,
DsgPrs_ArrowSide SymbolPrs
[static]
 

Standard_EXPORT const AIS_LengthDimension::Handle Standard_Type   )  const
 

Reimplemented from AIS_Relation.

virtual Standard_EXPORT Standard_Boolean AIS_LengthDimension::IsMovable  )  const [virtual]
 

Reimplemented from AIS_Relation.

virtual Standard_EXPORT AIS_KindOfDimension AIS_LengthDimension::KindOfDimension  )  const [virtual]
 

Reimplemented from AIS_Relation.

Standard_EXPORT void AIS_LengthDimension::SetFirstShape const TopoDS_Shape &  aFShape  )  [virtual]
 

Reimplemented from AIS_Relation.

Standard_EXPORT void AIS_LengthDimension::SetSecondShape const TopoDS_Shape &  aSShape  )  [virtual]
 

Reimplemented from AIS_Relation.

void AIS_LengthDimension::SetTypeOfDist const AIS_TypeOfDist  aTypeDist  )  [inline]
 

AIS_TypeOfDist AIS_LengthDimension::TypeOfDist  )  const [inline]
 


Field Documentation

gp_Dir AIS_LengthDimension::myDirAttach [private]
 

gp_Pnt AIS_LengthDimension::myFAttach [private]
 

Standard_Integer AIS_LengthDimension::myNbShape [private]
 

gp_Pnt AIS_LengthDimension::mySAttach [private]
 

AIS_TypeOfDist AIS_LengthDimension::myTypeDist [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:55:12 2008 for OpenCASCADE by  doxygen 1.4.1