Open CASCADE Technology  6.9.0
Public Member Functions
Graphic3d_AspectFillArea3d Class Reference

This class permits the creation and updating of a graphic attribute context for opaque 3d primitives (polygons, triangles, quadrilaterals) Keywords: Face, FillArea, Triangle, Quadrangle, Polygon, TriangleMesh, QuadrangleMesh, Edge, Border, Interior, Color, Type, Width, Style, Hatch, Material, BackFaceRemoval, DistinguishMode. More...

#include <Graphic3d_AspectFillArea3d.hxx>

Inheritance diagram for Graphic3d_AspectFillArea3d:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_AspectFillArea3d ()
 Creates a context table for fill area primitives defined with the following default values: More...
 
 Graphic3d_AspectFillArea3d (const Aspect_InteriorStyle Interior, const Quantity_Color &InteriorColor, const Quantity_Color &EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeWidth, const Graphic3d_MaterialAspect &FrontMaterial, const Graphic3d_MaterialAspect &BackMaterial)
 Creates a context table for fill area primitives defined with the specified values. More...
 
void AllowBackFace ()
 Allows the display of back-facing filled polygons. More...
 
void SetBackMaterial (const Graphic3d_MaterialAspect &AMaterial)
 Modifies the surface material of internal faces. More...
 
void SetDistinguishOn ()
 Allows distinction between external and internal faces of FillAreas. More...
 
void SetDistinguishOff ()
 Forbids distinction between external and internal faces of FillAreas. More...
 
void SetEdgeOn ()
 The edges of FillAreas are drawn. More...
 
void SetEdgeOff ()
 The edges of FillAreas are not drawn. More...
 
void SetFrontMaterial (const Graphic3d_MaterialAspect &AMaterial)
 Modifies the surface material of external faces. More...
 
void SuppressBackFace ()
 Suppress the display of back-facing filled polygons. A back-facing polygon is defined as a polygon whose vertices are in a clockwise order with respect to screen coordinates. More...
 
void SetTextureMap (const Handle< Graphic3d_TextureMap > &ATexture)
 
void SetTextureMapOn ()
 
void SetTextureMapOff ()
 
void SetPolygonOffsets (const Standard_Integer aMode, const Standard_ShortReal aFactor=1.0, const Standard_ShortReal aUnits=0.0)
 Sets up OpenGL polygon offsets mechanism. <aMode> parameter can contain various combinations of Aspect_PolygonOffsetMode enumeration elements (Aspect_POM_None means that polygon offsets are not changed). If <aMode> is different from Aspect_POM_Off and Aspect_POM_None, then <aFactor> and <aUnits> arguments are used by graphic renderer to calculate a depth offset value: More...
 
void SetShaderProgram (const Handle< Graphic3d_ShaderProgram > &theProgram)
 Sets up OpenGL/GLSL shader program. More...
 
Standard_Boolean BackFace () const
 Returns the Back Face Removal status. Standard_True if SuppressBackFace is activated. More...
 
Standard_Boolean Distinguish () const
 Returns the Distinguish Mode status. More...
 
Standard_Boolean Edge () const
 Returns Standard_True if the edges are drawn and Standard_False if the edges are not drawn. More...
 
const Graphic3d_MaterialAspectBackMaterial () const
 Returns the surface material of internal faces. More...
 
const Graphic3d_MaterialAspectFrontMaterial () const
 Returns the surface material of external faces. More...
 
Handle< Graphic3d_TextureMapTextureMap () const
 
Standard_Boolean TextureMapState () const
 
void PolygonOffsets (Standard_Integer &aMode, Standard_ShortReal &aFactor, Standard_ShortReal &aUnits) const
 Returns current polygon offsets settings. More...
 
const Handle
< Graphic3d_ShaderProgram > & 
ShaderProgram () const
 
- Public Member Functions inherited from Aspect_AspectFillArea
void SetEdgeColor (const Quantity_Color &AColor)
 Modifies the colour of the edge of the face. More...
 
void SetEdgeLineType (const Aspect_TypeOfLine AType)
 Modifies the edge line type. More...
 
void SetEdgeWidth (const Standard_Real AWidth)
 Modifies the edge thickness. More...
 
void SetHatchStyle (const Aspect_HatchStyle AStyle)
 Modifies the hatch type used when InteriorStyle is IS_HATCH. More...
 
void SetInteriorColor (const Quantity_Color &AColor)
 Modifies the colour of the interior of the face. More...
 
void SetBackInteriorColor (const Quantity_Color &color)
 Modifies the colour of the interior of the back face. More...
 
void SetInteriorStyle (const Aspect_InteriorStyle AStyle)
 Modifies the interior type used for rendering. More...
 
Aspect_HatchStyle HatchStyle () const
 Returns the hatch type used when InteriorStyle is IS_HATCH. More...
 
void Values (Aspect_InteriorStyle &AStyle, Quantity_Color &AIntColor, Quantity_Color &AEdgeColor, Aspect_TypeOfLine &AType, Standard_Real &AWidth) const
 
void Values (Aspect_InteriorStyle &AStyle, Quantity_Color &AIntColor, Quantity_Color &BackIntColor, Quantity_Color &AEdgeColor, Aspect_TypeOfLine &AType, Standard_Real &AWidth) const
 Returns the current values of the <me> group. 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 Member Functions inherited from Aspect_AspectFillArea
 Aspect_AspectFillArea ()
 Initialise the constructor of Graphic3d_AspectFillArea3d. More...
 
 Aspect_AspectFillArea (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color &InteriorColor, const Quantity_Color &EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth)
 Initialise the values for the constructor of Graphic3d_AspectFillArea3d. More...
 

Detailed Description

This class permits the creation and updating of a graphic attribute context for opaque 3d primitives (polygons, triangles, quadrilaterals) Keywords: Face, FillArea, Triangle, Quadrangle, Polygon, TriangleMesh, QuadrangleMesh, Edge, Border, Interior, Color, Type, Width, Style, Hatch, Material, BackFaceRemoval, DistinguishMode.

Constructor & Destructor Documentation

Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d ( )

Creates a context table for fill area primitives defined with the following default values:

InteriorStyle : IS_EMPTY InteriorColor : NOC_CYAN1 EdgeColor : NOC_WHITE EdgeLineType : TOL_SOLID EdgeWidth : 1.0 FrontMaterial : NOM_BRASS BackMaterial : NOM_BRASS

Display of back-facing filled polygons. No distinction between external and internal faces of FillAreas. The edges are not drawn. Polygon offset parameters: mode = Aspect_POM_None, factor = 1., units = 0.

Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d ( const Aspect_InteriorStyle  Interior,
const Quantity_Color InteriorColor,
const Quantity_Color EdgeColor,
const Aspect_TypeOfLine  EdgeLineType,
const Standard_Real  EdgeWidth,
const Graphic3d_MaterialAspect FrontMaterial,
const Graphic3d_MaterialAspect BackMaterial 
)

Creates a context table for fill area primitives defined with the specified values.

Display of back-facing filled polygons. No distinction between external and internal faces of FillAreas. The edges are not drawn. Polygon offset parameters: mode = Aspect_POM_None, factor = 1., units = 0. Warning EdgeWidth is the "line width scale factor". The nominal line width is 1 pixel. The width of the line is determined by applying the line width scale factor to this nominal line width. The supported line widths vary by 1-pixel units.

Member Function Documentation

void Graphic3d_AspectFillArea3d::AllowBackFace ( )

Allows the display of back-facing filled polygons.

Standard_Boolean Graphic3d_AspectFillArea3d::BackFace ( ) const

Returns the Back Face Removal status. Standard_True if SuppressBackFace is activated.

const Graphic3d_MaterialAspect& Graphic3d_AspectFillArea3d::BackMaterial ( ) const

Returns the surface material of internal faces.

Standard_Boolean Graphic3d_AspectFillArea3d::Distinguish ( ) const

Returns the Distinguish Mode status.

Standard_Boolean Graphic3d_AspectFillArea3d::Edge ( ) const

Returns Standard_True if the edges are drawn and Standard_False if the edges are not drawn.

const Graphic3d_MaterialAspect& Graphic3d_AspectFillArea3d::FrontMaterial ( ) const

Returns the surface material of external faces.

void Graphic3d_AspectFillArea3d::PolygonOffsets ( Standard_Integer aMode,
Standard_ShortReal aFactor,
Standard_ShortReal aUnits 
) const

Returns current polygon offsets settings.

void Graphic3d_AspectFillArea3d::SetBackMaterial ( const Graphic3d_MaterialAspect AMaterial)

Modifies the surface material of internal faces.

void Graphic3d_AspectFillArea3d::SetDistinguishOff ( )

Forbids distinction between external and internal faces of FillAreas.

void Graphic3d_AspectFillArea3d::SetDistinguishOn ( )

Allows distinction between external and internal faces of FillAreas.

void Graphic3d_AspectFillArea3d::SetEdgeOff ( )

The edges of FillAreas are not drawn.

void Graphic3d_AspectFillArea3d::SetEdgeOn ( )

The edges of FillAreas are drawn.

void Graphic3d_AspectFillArea3d::SetFrontMaterial ( const Graphic3d_MaterialAspect AMaterial)

Modifies the surface material of external faces.

void Graphic3d_AspectFillArea3d::SetPolygonOffsets ( const Standard_Integer  aMode,
const Standard_ShortReal  aFactor = 1.0,
const Standard_ShortReal  aUnits = 0.0 
)

Sets up OpenGL polygon offsets mechanism. <aMode> parameter can contain various combinations of Aspect_PolygonOffsetMode enumeration elements (Aspect_POM_None means that polygon offsets are not changed). If <aMode> is different from Aspect_POM_Off and Aspect_POM_None, then <aFactor> and <aUnits> arguments are used by graphic renderer to calculate a depth offset value:

offset = <aFactor> * m + <aUnits> * r, where m - maximum depth slope for the polygon currently being displayed, r - minimum window coordinates depth resolution (implementation-specific)

Deafult settings for OCC 3D viewer: mode = Aspect_POM_Fill, factor = 1., units = 0.

Negative offset values move polygons closer to the viewport, while positive values shift polygons away. Consult OpenGL reference for details (glPolygonOffset function description).

void Graphic3d_AspectFillArea3d::SetShaderProgram ( const Handle< Graphic3d_ShaderProgram > &  theProgram)

Sets up OpenGL/GLSL shader program.

void Graphic3d_AspectFillArea3d::SetTextureMap ( const Handle< Graphic3d_TextureMap > &  ATexture)
void Graphic3d_AspectFillArea3d::SetTextureMapOff ( )
void Graphic3d_AspectFillArea3d::SetTextureMapOn ( )
const Handle< Graphic3d_ShaderProgram >& Graphic3d_AspectFillArea3d::ShaderProgram ( ) const
void Graphic3d_AspectFillArea3d::SuppressBackFace ( )

Suppress the display of back-facing filled polygons. A back-facing polygon is defined as a polygon whose vertices are in a clockwise order with respect to screen coordinates.

Handle< Graphic3d_TextureMap > Graphic3d_AspectFillArea3d::TextureMap ( ) const
Standard_Boolean Graphic3d_AspectFillArea3d::TextureMapState ( ) const

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