Open CASCADE Technology
6.5.4
|
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
#include <Graphic3d_AspectFillArea3d.hxx>
Public Member Functions | |
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 (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. | |
void | AllowBackFace () |
Allows the display of back-facing filled polygons. | |
void | SetBackMaterial (const Graphic3d_MaterialAspect &AMaterial) |
Modifies the surface material of internal faces | |
void | SetDistinguishOn () |
Allows distinction between external and internal faces of FillAreas. | |
void | SetDistinguishOff () |
Forbids distinction between external and internal faces of FillAreas. | |
void | SetEdgeOn () |
The edges of FillAreas are drawn. | |
void | SetEdgeOff () |
The edges of FillAreas are not drawn. | |
void | SetFrontMaterial (const Graphic3d_MaterialAspect &AMaterial) |
Modifies the surface material of external faces | |
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. | |
void | SetTextureMap (const Handle< Graphic3d_TextureMap > &ATexture) |
void | SetTextureMapOn () |
void | SetTextureMapOff () |
void | SetDegenerateModel (const Aspect_TypeOfDegenerateModel aModel=Aspect_TDM_WIREFRAME, const Quantity_Ratio aRatio=0.0) |
Sets the model of degeneration for the polygons according to the degenerate ratio >= 0. & <= 1. where : <aRatio> = 0. indicate that all polygons of the graphic structure are displayed. <aRatio> = 1. indicate that nothing is displayed in the graphic structure. When <ARatio> is > 0 & < 1. the corresponding amount of polygons are displayed in the graphic structure with a random method. Warning: the degenerate structure is shown only when the animation and degenerate flags are set to TRUE in V3d_View::SetAnimationMode(..) | |
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: 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). | |
Standard_Boolean | BackFace () const |
Returns the Back Face Removal status. Standard_True if SuppressBackFace is activated. | |
Standard_Boolean | Distinguish () const |
Returns the Distinguish Mode status. | |
Standard_Boolean | Edge () const |
Returns Standard_True if the edges are drawn and Standard_False if the edges are not drawn. | |
Graphic3d_MaterialAspect | BackMaterial () const |
Returns the surface material of internal faces | |
Graphic3d_MaterialAspect | FrontMaterial () const |
Returns the surface material of external faces | |
Handle_Graphic3d_TextureMap | TextureMap () const |
Standard_Boolean | TextureMapState () const |
Aspect_TypeOfDegenerateModel | DegenerateModel (Quantity_Ratio &aRatio) const |
returns the current degeneration model and ratio for the polygons | |
void | PolygonOffsets (Standard_Integer &aMode, Standard_ShortReal &aFactor, Standard_ShortReal &aUnits) const |
Returns current polygon offsets settings. | |
Static Public Member Functions | |
static void | SetDefaultDegenerateModel (const Aspect_TypeOfDegenerateModel aModel=Aspect_TDM_WIREFRAME, const Quantity_Ratio aRatio=0.0) |
Sets the default model of degeneration for the polygons which is taking in account at creation time of any graphic structure until the model is change using SetDegenerateModel() method. | |
static Aspect_TypeOfDegenerateModel | DefaultDegenerateModel (Quantity_Ratio &aRatio) |
returns the default degeneration model and ratio for the polygons |
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 | ||
) |
static Aspect_TypeOfDegenerateModel Graphic3d_AspectFillArea3d::DefaultDegenerateModel | ( | Quantity_Ratio & | aRatio | ) | [static] |
Aspect_TypeOfDegenerateModel Graphic3d_AspectFillArea3d::DegenerateModel | ( | Quantity_Ratio & | aRatio | ) | const |
void Graphic3d_AspectFillArea3d::PolygonOffsets | ( | Standard_Integer & | aMode, |
Standard_ShortReal & | aFactor, | ||
Standard_ShortReal & | aUnits | ||
) | const |
static void Graphic3d_AspectFillArea3d::SetDefaultDegenerateModel | ( | const Aspect_TypeOfDegenerateModel | aModel = Aspect_TDM_WIREFRAME , |
const Quantity_Ratio | aRatio = 0.0 |
||
) | [static] |
void Graphic3d_AspectFillArea3d::SetDegenerateModel | ( | const Aspect_TypeOfDegenerateModel | aModel = Aspect_TDM_WIREFRAME , |
const Quantity_Ratio | aRatio = 0.0 |
||
) |
void Graphic3d_AspectFillArea3d::SetPolygonOffsets | ( | const Standard_Integer | aMode, |
const Standard_ShortReal | aFactor = 1.0 , |
||
const Standard_ShortReal | aUnits = 0.0 |
||
) |
void Graphic3d_AspectFillArea3d::SetTextureMap | ( | const Handle< Graphic3d_TextureMap > & | ATexture | ) |
Handle_Graphic3d_TextureMap Graphic3d_AspectFillArea3d::TextureMap | ( | ) | const |