Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <br>
     defined with the following default values: <br>


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.
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 <br>
     defined with the specified values. <br>


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


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).
More...

 
void SetShaderProgram (const Graphic3d_ShaderProgram_Handle &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...
 
Graphic3d_MaterialAspect BackMaterial () const
 Returns the surface material of internal faces
More...
 
Graphic3d_MaterialAspect FrontMaterial () const
 Returns the surface material of external faces
More...
 
Handle_Graphic3d_TextureMap TextureMap () const
 
Standard_Boolean TextureMapState () const
 
void PolygonOffsets (Standard_Integer &aMode, Standard_ShortReal &aFactor, Standard_ShortReal &aUnits) const
 Returns current polygon offsets settings.
More...
 
const
Graphic3d_ShaderProgram_Handle
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 <br>


Category: Methods to modify the class definition

Warning: Raises AspectFillAreaDefinitionError if the
width is a negative value.
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 <br>


InteriorStyle : IS_EMPTY no interior
IS_HOLLOW display the boundaries of the surface
IS_HATCH display hatching
IS_SOLID display interior entirely filled

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 void ShallowDump (Standard_OStream &) const
 
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 <br>
   of Graphic3d_AspectFillArea3d. <br>


default values :

InteriorStyle = Aspect_IS_EMPTY;
InteriorColor = Quantity_NOC_CYAN1;
EdgeColor = Quantity_NOC_WHITE;
EdgeType = Aspect_TOL_SOLID;
EdgeWidth = 1.0;
HatchStyle = Aspect_HS_VERTICAL;
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 <br>
   Graphic3d_AspectFillArea3d. <br>


InteriorStyle :
IS_EMPTY no interior.
IS_HOLLOW display the boundaries of the surface.
IS_HATCH display hatched with a hatch style.
IS_SOLID display the interior entirely filled.

EdgeLineType :
TOL_SOLID continuous
TOL_DASH dashed
TOL_DOT dotted
TOL_DOTDASH mixed

default values :
HatchStyle = Aspect_HS_VERTICAL;

Warning: Raises AspectFillAreaDefinitionError if the
width is a negative value.
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 <br>
     defined with the following default values: <br>


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 <br>
     defined with the specified values. <br>


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.

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.

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


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 Graphic3d_ShaderProgram_Handle 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 Graphic3d_ShaderProgram_Handle& 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: