Open CASCADE Technology  6.8.0
Public Member Functions
AIS_Drawer Class Reference

A framework to manage display attributes of interactive objects. An interactive object can have a certain number of display attributes specific to it. These include visualization mode, color, material and so on. To deal with this information, the interactive context has a Drawer attribute manager which is valid by default for the objects it controls. When an interactive object is visualized, the required graphic display attributes are first taken from its own Drawer if it has the ones required, or from the context drawer for those it does not have them. The set of display attributes of an interactive object is stocked in an AIS_Drawer, which is, in fact, a Prs3d_Drawer with the possibility of a link to another display attribute manager. This drawer then manages the stocked graphic display attributes by specifying how the presentation algorithms compute the presentation of a specific kind of object. These factors involved include color, width and type of line, and maximal chordal deviation. The Drawer includes instances of the aspect classes providing the default values for them. Prs3d_Drawer completes AIS_Drawer by adding functions for setting deviation angle and deviation coefficient in presentations using hidden line removal. More...

#include <AIS_Drawer.hxx>

Inheritance diagram for AIS_Drawer:
Inheritance graph
[legend]

Public Member Functions

 AIS_Drawer ()
 Constructs an empty attribute management framework. More...
 
Aspect_TypeOfDeflection TypeOfDeflection () const
 Returns the type of chordal deflection: relative to the size of the object or absolute. More...
 
Quantity_Length MaximalChordialDeviation () const
 Returns the maximal chordal deviation. The default value is 0.1. Drawings of curves or patches are made with respect to an absolute maximal chordal deviation. More...
 
void SetDeviationCoefficient ()
 Sets the hasOwnDeviationCoefficient flag to Standard_False. More...
 
void SetHLRDeviationCoefficient ()
 Sets the deviation coefficient aCoefficient for removal of hidden lines created by different viewpoints in different presentations. The Default value is 0.02. More...
 
void SetDeviationAngle ()
 Sets the hasOwnDeviationAngle flag to Standard_False. More...
 
void SetHLRAngle ()
 Sets the angle of maximum chordal deviation for removal of hidden lines created by different viewpoints in different presentations. The default value is 20*PI/180. More...
 
void SetDeviationCoefficient (const Standard_Real aCoefficient)
 Sets the hasOwnDeviationCoefficient flag to Standard_True, sets myOwnDeviationCoefficient and myPreviousDeviationCoefficient. More...
 
void SetHLRDeviationCoefficient (const Standard_Real aCoefficient)
 Sets the hasOwnHLRDeviationCoefficient flag to Standard_True, sets myOwnHLRDeviationCoefficient and myPreviousHLRDeviationCoefficient. More...
 
virtual void SetDeviationAngle (const Standard_Real anAngle)
 Sets the hasOwnDeviationAngle flag to Standard_True, sets myOwnDeviationAngle and myPreviousDeviationAngle. More...
 
void SetHLRAngle (const Standard_Real anAngle)
 Sets the hasOwnHLRDeviationAngle flag to Standard_True, sets myOwnHLRDeviationAngle and myPreviousHLRDeviationAngle. More...
 
virtual void SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR)
 Sets the type of HLR algorithm used by drawer's interactive objects. More...
 
virtual Prs3d_TypeOfHLR TypeOfHLR () const
 Returns the type of HLR algorithm currently in use. More...
 
Standard_Real DeviationCoefficient () const
 Drawings of curves or patches are made with respect to a maximal chordal deviation. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation is absolute and is set through the method: SetMaximalChordialDeviation. The default value is 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This deviation will be: SizeOfObject * DeviationCoefficient. More...
 
Standard_Real HLRDeviationCoefficient () const
 Returns the real number value of the HLR deviation coefficient in this framework, if the flag hasOwnHLRDeviationCoefficient is true. If hasOwnHLRDeviationCoefficient is false, the shape's HLR deviation coefficient is used. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient give the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. To find the hidden lines, hidden line display mode entails recalculation of the view at each different projector perspective. Since hidden lines entail calculations of more than usual complexity to decompose them into these triangles, a deviation coefficient allowing greater tolerance is used. This increases efficiency in calculation. The Default value is 0.02. More...
 
virtual Standard_Real DeviationAngle () const
 Returns myOwnDeviationAngle if hasOwnDeviationAngle is True else gets myDeviationAngle field from Prs3d_Drawer. More...
 
Standard_Real HLRAngle () const
 Returns the real number value of the deviation angle in hidden line removal views. The default value is 20*PI/180. More...
 
Standard_Real PreviousDeviationCoefficient () const
 Saves the previous value used for the chordal deviation coefficient. The default value is 0.1. More...
 
Standard_Real PreviousHLRDeviationCoefficient () const
 returns myPreviousHLRDeviationCoefficient More...
 
Standard_Real PreviousDeviationAngle () const
 returns myPreviousDeviationAngle More...
 
Standard_Real PreviousHLRDeviationAngle () const
 returns myPreviousHLRDeviationAngle More...
 
Standard_Boolean IsOwnDeviationCoefficient () const
 Returns true if the there is a local setting for deviation coefficient in this framework for a specific interactive object. More...
 
Standard_Boolean IsOwnHLRDeviationCoefficient () const
 Returns true if the there is a setting for HLR deviation coefficient in this framework for a specific interactive object. More...
 
Standard_Boolean IsOwnDeviationAngle () const
 Returns true if the there is a local setting for deviation angle in this framework for a specific interactive object. More...
 
Standard_Boolean IsOwnHLRDeviationAngle () const
 Returns true if the there is a setting for HLR deviation angle in this framework for a specific interactive object. More...
 
Standard_Integer Discretisation () const
 Draws algorithms using discretisation, a default number of points has been set to 17. You can use the method Prs3d_Drawer_SetDiscretisation to change this value. More...
 
Standard_Real MaximalParameterValue () const
 Sets the maximum value allowed for the first and last parameters of an infinite curve. By default, this value is 500000. More...
 
Standard_Boolean IsoOnPlane () const
 returns True if the drawing of isos on planes is enabled. More...
 
Handle< Prs3d_IsoAspectUIsoAspect ()
 Defines the attributes which are used when drawing an U isoparametric curve of a face. Defines the number of U isoparametric curves to be drawn for a single face. The LineAspect for U isoparametric lines can be edited (methods SetColor, SetTypeOfLine, SetWidth, SetNumber) The default values are: COLOR : Quantity_NOC_GRAY75 TYPE OF LINE: Aspect_TOL_SOLID WIDTH : 0.5 These attributes are used by the following algorithms: Prs3d_WFDeflectionSurface Prs3d_WFDeflectionRestrictedFace. More...
 
Standard_Boolean HasUIsoAspect () const
 Returns true if the Drawer has a UIso aspect setting active. More...
 
Handle< Prs3d_IsoAspectVIsoAspect ()
 Defines the attributes which are used when drawing an V isoparametric curve of a face. Defines the number of V isoparametric curves to be drawn for a single face. The LineAspect for V isoparametric lines can be edited (methods SetColor, SetTypeOfLine, SetWidth, SetNumber) The default values are: COLOR : Quantity_NOC_GRAY82 TYPE OF LINE: Aspect_TOL_SOLID WIDTH : 0.5 These attributes are used by the following algorithms: Prs3d_WFDeflectionSurface Prs3d_WFDeflectionRestrictedFace. More...
 
Standard_Boolean HasVIsoAspect () const
 Returns true if the Drawer has a VIso aspect setting active. More...
 
Handle< Prs3d_LineAspectFreeBoundaryAspect ()
 Returns a link with Prs3d_Drawer_FreeBoundaryAspect. Stores the values for presentation of free boundaries, in other words, boundaries which are not shared . The LineAspect for the free boundaries can be edited. The default values are: Color: Quantity_NOC_GREEN Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by Prs3d_WFShape. More...
 
Standard_Boolean HasFreeBoundaryAspect () const
 Returns true if the Drawer has a free boundary aspect setting active. More...
 
Standard_Boolean FreeBoundaryDraw () const
 returns True if the drawing of the free boundaries is enabled. More...
 
Handle< Prs3d_LineAspectWireAspect ()
 Returns a link with Prs3d_Drawer_WireAspect. This method provides wire aspect settings. The LineAspect for wires can be edited. The default values are: Color: Quantity_NOC_RED Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_WFShape. More...
 
Standard_Boolean HasLineAspect () const
 Returns true if the Interactive Object has a line visualization aspect. More...
 
Standard_Boolean HasWireAspect () const
 Returns true if the Drawer has a wire aspect setting active. More...
 
Standard_Boolean WireDraw () const
 Returns a link with Prs3d_Drawer_WireDraw. This method returns true if drawing of wires is enabled. The default setting is true. More...
 
Handle< Prs3d_LineAspectUnFreeBoundaryAspect ()
 Returns a link with Prs3d_Drawer_UnFreeBoundaryAspect, which provides settings for shared boundary line aspects. The LineAspect for shared boundaries can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_WFShape. More...
 
Standard_Boolean HasUnFreeBoundaryAspect () const
 Returns true if the Drawer has an unfree boundary aspect setting active. More...
 
Standard_Boolean UnFreeBoundaryDraw () const
 Returns True if the drawing of the shared boundaries is enabled. True is the default setting. More...
 
Handle< Prs3d_LineAspectLineAspect ()
 Returns a link with Prs3d_Drawer_LineAspect, which provides settings for line aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_Curve Prs3d_Line Prs3d_HLRShape. More...
 
Standard_Boolean HasTextAspect () const
 
Handle< Prs3d_TextAspectTextAspect ()
 Returns settings for text aspect. These settings can be edited. The default value is: More...
 
Standard_Boolean LineArrowDraw () const
 Returns True if the drawing of an arrow at the end of each line is enabled. The default setting is False. More...
 
Handle< Prs3d_ArrowAspectArrowAspect ()
 Returns the attributes for display of arrows. More...
 
Handle< Prs3d_PointAspectPointAspect ()
 Returns the point aspect setting. The default values are: Color: Quantity_NOC_YELLOW Type of marker: Aspect_TOM_PLUS Scale: 1. These attributes are used by the following algorithms: Prs3d_Point. More...
 
Standard_Boolean HasPointAspect () const
 Returns true if the Drawer has a point aspect setting active. More...
 
void SetVertexDrawMode (const Prs3d_VertexDrawMode theMode)
 Sets the mode of visualization of vertices by AIS_Shape and helper algorithms. By default, only isolated vertices not belonging to any face are drawn, that corresponds to Prs3d_VDM_Isolated mode. Switching to Prs3d_VDM_Isolated mode makes all shape's vertices visible. To inherit this parameter from the global drawer instance ("the link") when it is present, Prs3d_VDM_Inherited value should be used. More...
 
Prs3d_VertexDrawMode VertexDrawMode () const
 Returns the current mode of visualization of vertices of a TopoDS_Shape instance. More...
 
Standard_Boolean IsOwnVertexDrawMode () const
 Returns true if the vertex draw mode is not equal to Prs3d_VDM_Inherited. This means that individual vertex draw mode value (i.e. not inherited from the global drawer) is used for a specific interactive object. More...
 
Handle< Prs3d_ShadingAspectShadingAspect ()
 Returns a link with Prs3d_Drawer_ShadingAspect, which provides settings for shading aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Material: Graphic3d_NOM_BRASS hading aspect is obtained through decomposition of 3D faces into triangles, each side of each triangle being a chord of the corresponding curved edge in the face. Reflection of light in each projector perspective is then calculated for each of the resultant triangular planes. More...
 
Standard_Boolean HasShadingAspect () const
 Returns True if the Drawer has shading aspect active. More...
 
Standard_Boolean ShadingAspectGlobal () const
 Provides the attributes for hidden line removal. More...
 
Standard_Boolean DrawHiddenLine () const
 Returns Standard_True if the hidden lines are to be drawn. By default the hidden lines are not drawn. More...
 
Handle< Prs3d_LineAspectHiddenLineAspect ()
 Returns a link with Prs3d_Drawer_HiddenLineAspect, which provides settings for hidden line aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_DASH Width: 1. More...
 
Handle< Prs3d_LineAspectSeenLineAspect ()
 Returns a link with Prs3d_Drawer_SeenLineAspect, which provides settings for seen line aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_SOLID Width: 1. More...
 
Standard_Boolean HasPlaneAspect () const
 
Handle< Prs3d_PlaneAspectPlaneAspect ()
 Returns a link with Prs3d_Drawer_PlaneAspect. This method provides settings for the appearance of planes. More...
 
Handle< Prs3d_LineAspectVectorAspect ()
 Returns a link with Prs3d_Drawer_VectorAspect, which provides settings for the appearance of vectors. These settings can be edited. The default values are: Color: Quantity_NOC_SKYBLUE Type of line: Aspect_TOL_SOLID Width: 1. More...
 
void SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
 Enables or disables drawing of face boundaries for shading presentations. The method sets drawing flag owned by the drawer that will be used during visualization instead of the one set in link. theIsEnabled is a boolean flag indicating whether the face boundaries should be drawn or not. More...
 
Standard_Boolean IsFaceBoundaryDraw () const
 Checks whether the drawing of face boundaries is enabled or not. More...
 
void SetFaceBoundaryAspect (const Handle< Prs3d_LineAspect > &theAspect)
 Sets line aspect for face boundaries. The method sets line aspect owned by the drawer that will be used during visualization instead of the one set in link. theAspect is the line aspect that determines the look of the face boundaries. More...
 
Handle< Prs3d_LineAspectFaceBoundaryAspect ()
 Returns line aspect of face boundaries. More...
 
Standard_Boolean IsOwnFaceBoundaryDraw () const
 Returns true if the drawer has its own attribute for "draw face boundaries" flag that overrides the one in the link. More...
 
Standard_Boolean IsOwnFaceBoundaryAspect () const
 Returns true if the drawer has its own attribute for face boundaries aspect that overrides the one in the link. More...
 
Standard_Boolean HasDatumAspect () const
 
Handle< Prs3d_DatumAspectDatumAspect ()
 Returns a link with Prs3d_Drawer_DatumAspect, which provides settings for the appearance of datums. These settings can be edited. The default values for the three axes are: Color: Quantity_NOC_PEACHPUFF Type of line: Aspect_TOL_SOLID Width: 1. More...
 
Handle< Prs3d_DimensionAspectDimensionAspect ()
 Returns a link with Prs3d_Drawer_DimensionAspect, which provides settings for the appearance of dimensions. More...
 
Standard_Boolean HasDimensionAspect () const
 
void SetDimLengthModelUnits (const TCollection_AsciiString &theUnits)
 Sets dimension length model units for computing of dimension presentation. More...
 
void SetDimAngleModelUnits (const TCollection_AsciiString &theUnits)
 Sets dimension angle model units for computing of dimension presentation. More...
 
const TCollection_AsciiStringDimAngleModelUnits () const
 Returns angle model units for the dimension presentation. More...
 
const TCollection_AsciiStringDimLengthModelUnits () const
 Returns length model units for the dimension presentation. More...
 
void SetDimLengthDisplayUnits (const TCollection_AsciiString &theUnits)
 Sets length units in which value for dimension presentation is displayed. More...
 
void SetDimAngleDisplayUnits (const TCollection_AsciiString &theUnits)
 Sets angle units in which value for dimension presentation is displayed. More...
 
const TCollection_AsciiStringDimLengthDisplayUnits () const
 Returns length units in which dimension presentation is displayed. More...
 
const TCollection_AsciiStringDimAngleDisplayUnits () const
 Returns angle units in which dimension presentation is displayed. More...
 
Handle< Prs3d_LineAspectSectionAspect ()
 Returns a link with Prs3d_Drawer_SectionAspect, which provides settings for wires which highlight sections. The LineAspect for the wire can be edited. The default values are: Color: Quantity_NOC_ORANGE Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_WFShape. More...
 
const Handle< Prs3d_Drawer > & Link ()
 
Standard_Boolean HasLink () const
 
void Link (const Handle< Prs3d_Drawer > &aDrawer)
 
virtual void ClearLocalAttributes ()
 Removes attributes stored in a Local Context. More...
 
Standard_Boolean WasLastLocal () const
 Returns true if the last called attribute was local; false if it was global. More...
 
Standard_Boolean HasLocalAttributes () const
 Returns true if a Local Context has stored attributes for Interactive Objects. More...
 
- Public Member Functions inherited from Prs3d_Drawer
 Prs3d_Drawer ()
 
virtual void SetTypeOfDeflection (const Aspect_TypeOfDeflection aTypeOfDeflection)
 Sets the type of chordal deflection. This indicates whether the deflection value is absolute or relative to the size of the object. More...
 
virtual void SetMaximalChordialDeviation (const Quantity_Length aChordialDeviation)
 Defines the maximal chordial deviation when drawing any curve; Even if the type of deviation is set to TOD_Relative, this value is used by: More...
 
virtual void SetDiscretisation (const Standard_Integer d)
 Sets the discretisation parameter d. More...
 
virtual void SetMaximalParameterValue (const Standard_Real Value)
 defines the maximum value allowed for the first and last parameters of an infinite curve. Default value: 500. More...
 
virtual void SetIsoOnPlane (const Standard_Boolean OnOff)
 Sets IsoOnPlane on or off by setting the parameter OnOff to true or false. More...
 
virtual void SetUIsoAspect (const Handle< Prs3d_IsoAspect > &anAspect)
 
virtual void SetVIsoAspect (const Handle< Prs3d_IsoAspect > &anAspect)
 Sets the appearance of V isoparameters - anAspect. More...
 
virtual void SetFreeBoundaryAspect (const Handle< Prs3d_LineAspect > &anAspect)
 Sets the parameter anAspect for the display of free boundaries. More...
 
virtual void SetFreeBoundaryDraw (const Standard_Boolean OnOff)
 Sets free boundary drawing on or off by setting the parameter OnOff to true or false. More...
 
virtual void SetWireAspect (const Handle< Prs3d_LineAspect > &anAspect)
 Sets the parameter anAspect for display of wires. More...
 
virtual void SetWireDraw (const Standard_Boolean OnOff)
 Sets WireDraw on or off by setting the parameter OnOff to true or false. More...
 
virtual void SetUnFreeBoundaryAspect (const Handle< Prs3d_LineAspect > &anAspect)
 Sets the parameter anAspect for the display of shared boundaries. More...
 
virtual void SetUnFreeBoundaryDraw (const Standard_Boolean OnOff)
 Sets FreeBoundaryDraw on or off by setting the parameter OnOff to true or false. By default the unfree boundaries are drawn. More...
 
virtual void SetLineAspect (const Handle< Prs3d_LineAspect > &anAspect)
 Sets the parameter anAspect for display attributes of lines. More...
 
virtual void SetTextAspect (const Handle< Prs3d_TextAspect > &anAspect)
 Sets the parameter anAspect for display attributes of text. More...
 
virtual void SetLineArrowDraw (const Standard_Boolean OnOff)
 enables the drawing of an arrow at the end of each line. By default the arrows are not drawn. More...
 
virtual void SetArrowAspect (const Handle< Prs3d_ArrowAspect > &anAspect)
 Sets the parameter anAspect for display attributes of arrows. More...
 
virtual void SetPointAspect (const Handle< Prs3d_PointAspect > &anAspect)
 Sets the parameter anAspect for display attributes of points. More...
 
virtual void SetShadingAspect (const Handle< Prs3d_ShadingAspect > &anAspect)
 Sets the parameter anAspect for display attributes of shading. More...
 
virtual void SetShadingAspectGlobal (const Standard_Boolean aValue)
 indicates that the ShadingAspect will be apply to the whole presentation. This allows to modify the aspect without recomputing the content of the presentation. More...
 
virtual void EnableDrawHiddenLine ()
 Enables the DrawHiddenLine function. More...
 
virtual void DisableDrawHiddenLine ()
 Disables the DrawHiddenLine function. More...
 
virtual void SetHiddenLineAspect (const Handle< Prs3d_LineAspect > &anAspect)
 Sets the parameter anAspect for the display of hidden lines in hidden line removal mode. More...
 
virtual void SetSeenLineAspect (const Handle< Prs3d_LineAspect > &anAspect)
 Sets the parameter anAspect for the display of seen lines in hidden line removal mode. More...
 
virtual void SetPlaneAspect (const Handle< Prs3d_PlaneAspect > &anAspect)
 Sets the parameter anAspect for the display of planes. More...
 
virtual void SetVectorAspect (const Handle< Prs3d_LineAspect > &anAspect)
 Sets the modality anAspect for the display of vectors. More...
 
virtual void SetDatumAspect (const Handle< Prs3d_DatumAspect > &anAspect)
 Sets the modality anAspect for the display of datums. More...
 
virtual void SetDimensionAspect (const Handle< Prs3d_DimensionAspect > &theAspect)
 Sets the settings for the appearance of dimensions. More...
 
virtual void SetSectionAspect (const Handle< Prs3d_LineAspect > &theAspect)
 Sets the parameter theAspect for display attributes of sections. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Additional Inherited Members

- Protected Attributes inherited from Prs3d_Drawer
Handle< Prs3d_IsoAspectmyUIsoAspect
 
Handle< Prs3d_IsoAspectmyVIsoAspect
 
Standard_Integer myNbPoints
 
Standard_Boolean myIsoOnPlane
 
Handle< Prs3d_LineAspectmyFreeBoundaryAspect
 
Standard_Boolean myFreeBoundaryDraw
 
Handle< Prs3d_LineAspectmyUnFreeBoundaryAspect
 
Standard_Boolean myUnFreeBoundaryDraw
 
Handle< Prs3d_LineAspectmyWireAspect
 
Standard_Boolean myWireDraw
 
Handle< Prs3d_LineAspectmyLineAspect
 
Handle< Prs3d_TextAspectmyTextAspect
 
Handle< Prs3d_ShadingAspectmyShadingAspect
 
Standard_Boolean myShadingAspectGlobal
 
Quantity_Length myChordialDeviation
 
Aspect_TypeOfDeflection myTypeOfDeflection
 
Standard_Real myMaximalParameterValue
 
Standard_Real myDeviationCoefficient
 
Standard_Real myHLRDeviationCoefficient
 
Standard_Real myDeviationAngle
 
Standard_Real myHLRAngle
 
Handle< Prs3d_PointAspectmyPointAspect
 
Prs3d_VertexDrawMode myVertexDrawMode
 
Handle< Prs3d_PlaneAspectmyPlaneAspect
 
Handle< Prs3d_ArrowAspectmyArrowAspect
 
Standard_Boolean myLineDrawArrow
 
Standard_Boolean myDrawHiddenLine
 
Handle< Prs3d_LineAspectmyHiddenLineAspect
 
Handle< Prs3d_LineAspectmySeenLineAspect
 
Handle< Prs3d_LineAspectmyVectorAspect
 
Handle< Prs3d_DatumAspectmyDatumAspect
 
Standard_Real myDatumScale
 
Handle< Prs3d_DimensionAspectmyDimensionAspect
 
Prs3d_DimensionUnits myDimensionModelUnits
 
Prs3d_DimensionUnits myDimensionDisplayUnits
 
Handle< Prs3d_LineAspectmySectionAspect
 
Standard_Boolean myFaceBoundaryDraw
 
Handle< Prs3d_LineAspectmyFaceBoundaryAspect
 
Prs3d_TypeOfHLR myTypeOfHLR
 

Detailed Description

A framework to manage display attributes of interactive objects. An interactive object can have a certain number of display attributes specific to it. These include visualization mode, color, material and so on. To deal with this information, the interactive context has a Drawer attribute manager which is valid by default for the objects it controls. When an interactive object is visualized, the required graphic display attributes are first taken from its own Drawer if it has the ones required, or from the context drawer for those it does not have them. The set of display attributes of an interactive object is stocked in an AIS_Drawer, which is, in fact, a Prs3d_Drawer with the possibility of a link to another display attribute manager. This drawer then manages the stocked graphic display attributes by specifying how the presentation algorithms compute the presentation of a specific kind of object. These factors involved include color, width and type of line, and maximal chordal deviation. The Drawer includes instances of the aspect classes providing the default values for them. Prs3d_Drawer completes AIS_Drawer by adding functions for setting deviation angle and deviation coefficient in presentations using hidden line removal.

Constructor & Destructor Documentation

AIS_Drawer::AIS_Drawer ( )

Constructs an empty attribute management framework.

Member Function Documentation

Handle< Prs3d_ArrowAspect > AIS_Drawer::ArrowAspect ( )
virtual

Returns the attributes for display of arrows.

Reimplemented from Prs3d_Drawer.

virtual void AIS_Drawer::ClearLocalAttributes ( )
virtual

Removes attributes stored in a Local Context.

Handle< Prs3d_DatumAspect > AIS_Drawer::DatumAspect ( )
virtual

Returns a link with Prs3d_Drawer_DatumAspect, which provides settings for the appearance of datums. These settings can be edited. The default values for the three axes are: Color: Quantity_NOC_PEACHPUFF Type of line: Aspect_TOL_SOLID Width: 1.

Reimplemented from Prs3d_Drawer.

virtual Standard_Real AIS_Drawer::DeviationAngle ( ) const
virtual

Returns myOwnDeviationAngle if hasOwnDeviationAngle is True else gets myDeviationAngle field from Prs3d_Drawer.

Reimplemented from Prs3d_Drawer.

Standard_Real AIS_Drawer::DeviationCoefficient ( ) const
virtual

Drawings of curves or patches are made with respect to a maximal chordal deviation. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation is absolute and is set through the method: SetMaximalChordialDeviation. The default value is 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This deviation will be: SizeOfObject * DeviationCoefficient.

Reimplemented from Prs3d_Drawer.

const TCollection_AsciiString& AIS_Drawer::DimAngleDisplayUnits ( ) const
virtual

Returns angle units in which dimension presentation is displayed.

Reimplemented from Prs3d_Drawer.

const TCollection_AsciiString& AIS_Drawer::DimAngleModelUnits ( ) const
virtual

Returns angle model units for the dimension presentation.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_DimensionAspect > AIS_Drawer::DimensionAspect ( )
virtual

Returns a link with Prs3d_Drawer_DimensionAspect, which provides settings for the appearance of dimensions.

Reimplemented from Prs3d_Drawer.

const TCollection_AsciiString& AIS_Drawer::DimLengthDisplayUnits ( ) const
virtual

Returns length units in which dimension presentation is displayed.

Reimplemented from Prs3d_Drawer.

const TCollection_AsciiString& AIS_Drawer::DimLengthModelUnits ( ) const
virtual

Returns length model units for the dimension presentation.

Reimplemented from Prs3d_Drawer.

Standard_Integer AIS_Drawer::Discretisation ( ) const
virtual

Draws algorithms using discretisation, a default number of points has been set to 17. You can use the method Prs3d_Drawer_SetDiscretisation to change this value.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::DrawHiddenLine ( ) const
virtual

Returns Standard_True if the hidden lines are to be drawn. By default the hidden lines are not drawn.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_LineAspect > AIS_Drawer::FaceBoundaryAspect ( )
virtual

Returns line aspect of face boundaries.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_LineAspect > AIS_Drawer::FreeBoundaryAspect ( )
virtual

Returns a link with Prs3d_Drawer_FreeBoundaryAspect. Stores the values for presentation of free boundaries, in other words, boundaries which are not shared . The LineAspect for the free boundaries can be edited. The default values are: Color: Quantity_NOC_GREEN Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by Prs3d_WFShape.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::FreeBoundaryDraw ( ) const
virtual

returns True if the drawing of the free boundaries is enabled.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::HasDatumAspect ( ) const
Standard_Boolean AIS_Drawer::HasDimensionAspect ( ) const
Standard_Boolean AIS_Drawer::HasFreeBoundaryAspect ( ) const

Returns true if the Drawer has a free boundary aspect setting active.

Standard_Boolean AIS_Drawer::HasLineAspect ( ) const

Returns true if the Interactive Object has a line visualization aspect.

Standard_Boolean AIS_Drawer::HasLink ( ) const
Standard_Boolean AIS_Drawer::HasLocalAttributes ( ) const

Returns true if a Local Context has stored attributes for Interactive Objects.

Standard_Boolean AIS_Drawer::HasPlaneAspect ( ) const
Standard_Boolean AIS_Drawer::HasPointAspect ( ) const

Returns true if the Drawer has a point aspect setting active.

Standard_Boolean AIS_Drawer::HasShadingAspect ( ) const

Returns True if the Drawer has shading aspect active.

Standard_Boolean AIS_Drawer::HasTextAspect ( ) const
Standard_Boolean AIS_Drawer::HasUIsoAspect ( ) const

Returns true if the Drawer has a UIso aspect setting active.

Standard_Boolean AIS_Drawer::HasUnFreeBoundaryAspect ( ) const

Returns true if the Drawer has an unfree boundary aspect setting active.

Standard_Boolean AIS_Drawer::HasVIsoAspect ( ) const

Returns true if the Drawer has a VIso aspect setting active.

Standard_Boolean AIS_Drawer::HasWireAspect ( ) const

Returns true if the Drawer has a wire aspect setting active.

Handle< Prs3d_LineAspect > AIS_Drawer::HiddenLineAspect ( )
virtual

Returns a link with Prs3d_Drawer_HiddenLineAspect, which provides settings for hidden line aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_DASH Width: 1.

Reimplemented from Prs3d_Drawer.

Standard_Real AIS_Drawer::HLRAngle ( ) const
virtual

Returns the real number value of the deviation angle in hidden line removal views. The default value is 20*PI/180.

Reimplemented from Prs3d_Drawer.

Standard_Real AIS_Drawer::HLRDeviationCoefficient ( ) const
virtual

Returns the real number value of the HLR deviation coefficient in this framework, if the flag hasOwnHLRDeviationCoefficient is true. If hasOwnHLRDeviationCoefficient is false, the shape's HLR deviation coefficient is used. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient give the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. To find the hidden lines, hidden line display mode entails recalculation of the view at each different projector perspective. Since hidden lines entail calculations of more than usual complexity to decompose them into these triangles, a deviation coefficient allowing greater tolerance is used. This increases efficiency in calculation. The Default value is 0.02.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::IsFaceBoundaryDraw ( ) const
virtual

Checks whether the drawing of face boundaries is enabled or not.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::IsoOnPlane ( ) const
virtual

returns True if the drawing of isos on planes is enabled.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::IsOwnDeviationAngle ( ) const

Returns true if the there is a local setting for deviation angle in this framework for a specific interactive object.

Standard_Boolean AIS_Drawer::IsOwnDeviationCoefficient ( ) const

Returns true if the there is a local setting for deviation coefficient in this framework for a specific interactive object.

Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryAspect ( ) const

Returns true if the drawer has its own attribute for face boundaries aspect that overrides the one in the link.

Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryDraw ( ) const

Returns true if the drawer has its own attribute for "draw face boundaries" flag that overrides the one in the link.

Standard_Boolean AIS_Drawer::IsOwnHLRDeviationAngle ( ) const

Returns true if the there is a setting for HLR deviation angle in this framework for a specific interactive object.

Standard_Boolean AIS_Drawer::IsOwnHLRDeviationCoefficient ( ) const

Returns true if the there is a setting for HLR deviation coefficient in this framework for a specific interactive object.

Standard_Boolean AIS_Drawer::IsOwnVertexDrawMode ( ) const

Returns true if the vertex draw mode is not equal to Prs3d_VDM_Inherited. This means that individual vertex draw mode value (i.e. not inherited from the global drawer) is used for a specific interactive object.

Standard_Boolean AIS_Drawer::LineArrowDraw ( ) const
virtual

Returns True if the drawing of an arrow at the end of each line is enabled. The default setting is False.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_LineAspect > AIS_Drawer::LineAspect ( )
virtual

Returns a link with Prs3d_Drawer_LineAspect, which provides settings for line aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_Curve Prs3d_Line Prs3d_HLRShape.

Reimplemented from Prs3d_Drawer.

const Handle< Prs3d_Drawer >& AIS_Drawer::Link ( )
void AIS_Drawer::Link ( const Handle< Prs3d_Drawer > &  aDrawer)
Quantity_Length AIS_Drawer::MaximalChordialDeviation ( ) const
virtual

Returns the maximal chordal deviation. The default value is 0.1. Drawings of curves or patches are made with respect to an absolute maximal chordal deviation.

Reimplemented from Prs3d_Drawer.

Standard_Real AIS_Drawer::MaximalParameterValue ( ) const
virtual

Sets the maximum value allowed for the first and last parameters of an infinite curve. By default, this value is 500000.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_PlaneAspect > AIS_Drawer::PlaneAspect ( )
virtual

Returns a link with Prs3d_Drawer_PlaneAspect. This method provides settings for the appearance of planes.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_PointAspect > AIS_Drawer::PointAspect ( )
virtual

Returns the point aspect setting. The default values are: Color: Quantity_NOC_YELLOW Type of marker: Aspect_TOM_PLUS Scale: 1. These attributes are used by the following algorithms: Prs3d_Point.

Reimplemented from Prs3d_Drawer.

Standard_Real AIS_Drawer::PreviousDeviationAngle ( ) const

returns myPreviousDeviationAngle

Standard_Real AIS_Drawer::PreviousDeviationCoefficient ( ) const

Saves the previous value used for the chordal deviation coefficient. The default value is 0.1.

Standard_Real AIS_Drawer::PreviousHLRDeviationAngle ( ) const

returns myPreviousHLRDeviationAngle

Standard_Real AIS_Drawer::PreviousHLRDeviationCoefficient ( ) const

returns myPreviousHLRDeviationCoefficient

Handle< Prs3d_LineAspect > AIS_Drawer::SectionAspect ( )
virtual

Returns a link with Prs3d_Drawer_SectionAspect, which provides settings for wires which highlight sections. The LineAspect for the wire can be edited. The default values are: Color: Quantity_NOC_ORANGE Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_WFShape.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_LineAspect > AIS_Drawer::SeenLineAspect ( )
virtual

Returns a link with Prs3d_Drawer_SeenLineAspect, which provides settings for seen line aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_SOLID Width: 1.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetDeviationAngle ( )

Sets the hasOwnDeviationAngle flag to Standard_False.

virtual void AIS_Drawer::SetDeviationAngle ( const Standard_Real  anAngle)
virtual

Sets the hasOwnDeviationAngle flag to Standard_True, sets myOwnDeviationAngle and myPreviousDeviationAngle.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetDeviationCoefficient ( )

Sets the hasOwnDeviationCoefficient flag to Standard_False.

void AIS_Drawer::SetDeviationCoefficient ( const Standard_Real  aCoefficient)
virtual

Sets the hasOwnDeviationCoefficient flag to Standard_True, sets myOwnDeviationCoefficient and myPreviousDeviationCoefficient.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetDimAngleDisplayUnits ( const TCollection_AsciiString theUnits)
virtual

Sets angle units in which value for dimension presentation is displayed.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetDimAngleModelUnits ( const TCollection_AsciiString theUnits)
virtual

Sets dimension angle model units for computing of dimension presentation.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetDimLengthDisplayUnits ( const TCollection_AsciiString theUnits)
virtual

Sets length units in which value for dimension presentation is displayed.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetDimLengthModelUnits ( const TCollection_AsciiString theUnits)
virtual

Sets dimension length model units for computing of dimension presentation.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetFaceBoundaryAspect ( const Handle< Prs3d_LineAspect > &  theAspect)
virtual

Sets line aspect for face boundaries. The method sets line aspect owned by the drawer that will be used during visualization instead of the one set in link. theAspect is the line aspect that determines the look of the face boundaries.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetFaceBoundaryDraw ( const Standard_Boolean  theIsEnabled)
virtual

Enables or disables drawing of face boundaries for shading presentations. The method sets drawing flag owned by the drawer that will be used during visualization instead of the one set in link. theIsEnabled is a boolean flag indicating whether the face boundaries should be drawn or not.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetHLRAngle ( )

Sets the angle of maximum chordal deviation for removal of hidden lines created by different viewpoints in different presentations. The default value is 20*PI/180.

void AIS_Drawer::SetHLRAngle ( const Standard_Real  anAngle)
virtual

Sets the hasOwnHLRDeviationAngle flag to Standard_True, sets myOwnHLRDeviationAngle and myPreviousHLRDeviationAngle.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetHLRDeviationCoefficient ( )

Sets the deviation coefficient aCoefficient for removal of hidden lines created by different viewpoints in different presentations. The Default value is 0.02.

void AIS_Drawer::SetHLRDeviationCoefficient ( const Standard_Real  aCoefficient)
virtual

Sets the hasOwnHLRDeviationCoefficient flag to Standard_True, sets myOwnHLRDeviationCoefficient and myPreviousHLRDeviationCoefficient.

Reimplemented from Prs3d_Drawer.

virtual void AIS_Drawer::SetTypeOfHLR ( const Prs3d_TypeOfHLR  theTypeOfHLR)
virtual

Sets the type of HLR algorithm used by drawer's interactive objects.

Reimplemented from Prs3d_Drawer.

void AIS_Drawer::SetVertexDrawMode ( const Prs3d_VertexDrawMode  theMode)
virtual

Sets the mode of visualization of vertices by AIS_Shape and helper algorithms. By default, only isolated vertices not belonging to any face are drawn, that corresponds to Prs3d_VDM_Isolated mode. Switching to Prs3d_VDM_Isolated mode makes all shape's vertices visible. To inherit this parameter from the global drawer instance ("the link") when it is present, Prs3d_VDM_Inherited value should be used.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_ShadingAspect > AIS_Drawer::ShadingAspect ( )
virtual

Returns a link with Prs3d_Drawer_ShadingAspect, which provides settings for shading aspects. These settings can be edited. The default values are: Color: Quantity_NOC_YELLOW Material: Graphic3d_NOM_BRASS hading aspect is obtained through decomposition of 3D faces into triangles, each side of each triangle being a chord of the corresponding curved edge in the face. Reflection of light in each projector perspective is then calculated for each of the resultant triangular planes.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::ShadingAspectGlobal ( ) const
virtual

Provides the attributes for hidden line removal.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_TextAspect > AIS_Drawer::TextAspect ( )
virtual

Returns settings for text aspect. These settings can be edited. The default value is:

  • Color: Quantity_NOC_YELLOW

Reimplemented from Prs3d_Drawer.

Aspect_TypeOfDeflection AIS_Drawer::TypeOfDeflection ( ) const
virtual

Returns the type of chordal deflection: relative to the size of the object or absolute.

Reimplemented from Prs3d_Drawer.

virtual Prs3d_TypeOfHLR AIS_Drawer::TypeOfHLR ( ) const
virtual

Returns the type of HLR algorithm currently in use.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_IsoAspect > AIS_Drawer::UIsoAspect ( )
virtual

Defines the attributes which are used when drawing an U isoparametric curve of a face. Defines the number of U isoparametric curves to be drawn for a single face. The LineAspect for U isoparametric lines can be edited (methods SetColor, SetTypeOfLine, SetWidth, SetNumber) The default values are: COLOR : Quantity_NOC_GRAY75 TYPE OF LINE: Aspect_TOL_SOLID WIDTH : 0.5 These attributes are used by the following algorithms: Prs3d_WFDeflectionSurface Prs3d_WFDeflectionRestrictedFace.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_LineAspect > AIS_Drawer::UnFreeBoundaryAspect ( )
virtual

Returns a link with Prs3d_Drawer_UnFreeBoundaryAspect, which provides settings for shared boundary line aspects. The LineAspect for shared boundaries can be edited. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_WFShape.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::UnFreeBoundaryDraw ( ) const
virtual

Returns True if the drawing of the shared boundaries is enabled. True is the default setting.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_LineAspect > AIS_Drawer::VectorAspect ( )
virtual

Returns a link with Prs3d_Drawer_VectorAspect, which provides settings for the appearance of vectors. These settings can be edited. The default values are: Color: Quantity_NOC_SKYBLUE Type of line: Aspect_TOL_SOLID Width: 1.

Reimplemented from Prs3d_Drawer.

Prs3d_VertexDrawMode AIS_Drawer::VertexDrawMode ( ) const
virtual

Returns the current mode of visualization of vertices of a TopoDS_Shape instance.

Reimplemented from Prs3d_Drawer.

Handle< Prs3d_IsoAspect > AIS_Drawer::VIsoAspect ( )
virtual

Defines the attributes which are used when drawing an V isoparametric curve of a face. Defines the number of V isoparametric curves to be drawn for a single face. The LineAspect for V isoparametric lines can be edited (methods SetColor, SetTypeOfLine, SetWidth, SetNumber) The default values are: COLOR : Quantity_NOC_GRAY82 TYPE OF LINE: Aspect_TOL_SOLID WIDTH : 0.5 These attributes are used by the following algorithms: Prs3d_WFDeflectionSurface Prs3d_WFDeflectionRestrictedFace.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::WasLastLocal ( ) const

Returns true if the last called attribute was local; false if it was global.

Handle< Prs3d_LineAspect > AIS_Drawer::WireAspect ( )
virtual

Returns a link with Prs3d_Drawer_WireAspect. This method provides wire aspect settings. The LineAspect for wires can be edited. The default values are: Color: Quantity_NOC_RED Type of line: Aspect_TOL_SOLID Width: 1. These attributes are used by the following algorithms: Prs3d_WFShape.

Reimplemented from Prs3d_Drawer.

Standard_Boolean AIS_Drawer::WireDraw ( ) const
virtual

Returns a link with Prs3d_Drawer_WireDraw. This method returns true if drawing of wires is enabled. The default setting is true.

Reimplemented from Prs3d_Drawer.


The documentation for this class was generated from the following file: