Open CASCADE Technology 7.8.0
Public Member Functions
Graphic3d_Aspects Class Reference

This class defines graphic attributes. More...

#include <Graphic3d_Aspects.hxx>

Inheritance diagram for Graphic3d_Aspects:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_Aspects ()
 Creates a context table for drawing primitives defined with the following default values:
 
Aspect_InteriorStyle InteriorStyle () const
 Return interior rendering style; Aspect_IS_SOLID by default.
 
void SetInteriorStyle (const Aspect_InteriorStyle theStyle)
 Modifies the interior type used for rendering.
 
Graphic3d_TypeOfShadingModel ShadingModel () const
 Returns shading model; Graphic3d_TypeOfShadingModel_DEFAULT by default. Graphic3d_TOSM_DEFAULT means that Shading Model set as default for entire Viewer will be used.
 
void SetShadingModel (const Graphic3d_TypeOfShadingModel theShadingModel)
 Sets shading model.
 
Graphic3d_AlphaMode AlphaMode () const
 Returns the way how alpha value should be treated (Graphic3d_AlphaMode_BlendAuto by default, for backward compatibility).
 
Standard_ShortReal AlphaCutoff () const
 Returns alpha cutoff threshold, for discarding fragments within Graphic3d_AlphaMode_Mask mode (0.5 by default). If the alpha value is greater than or equal to this value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent.
 
void SetAlphaMode (Graphic3d_AlphaMode theMode, Standard_ShortReal theAlphaCutoff=0.5f)
 Defines the way how alpha value should be treated.
 
const Quantity_ColorRGBAColorRGBA () const
 Return color.
 
const Quantity_ColorColor () const
 Return the color.
 
void SetColor (const Quantity_Color &theColor)
 Modifies the color.
 
const Quantity_ColorInteriorColor () const
 Return interior color.
 
const Quantity_ColorRGBAInteriorColorRGBA () const
 Return interior color.
 
void SetInteriorColor (const Quantity_Color &theColor)
 Modifies the color of the interior of the face.
 
void SetInteriorColor (const Quantity_ColorRGBA &theColor)
 Modifies the color of the interior of the face.
 
const Quantity_ColorBackInteriorColor () const
 Return back interior color.
 
const Quantity_ColorRGBABackInteriorColorRGBA () const
 Return back interior color.
 
void SetBackInteriorColor (const Quantity_Color &theColor)
 Modifies the color of the interior of the back face.
 
void SetBackInteriorColor (const Quantity_ColorRGBA &theColor)
 Modifies the color of the interior of the back face.
 
const Graphic3d_MaterialAspectFrontMaterial () const
 Returns the surface material of external faces.
 
Graphic3d_MaterialAspectChangeFrontMaterial ()
 Returns the surface material of external faces.
 
void SetFrontMaterial (const Graphic3d_MaterialAspect &theMaterial)
 Modifies the surface material of external faces.
 
const Graphic3d_MaterialAspectBackMaterial () const
 Returns the surface material of internal faces.
 
Graphic3d_MaterialAspectChangeBackMaterial ()
 Returns the surface material of internal faces.
 
void SetBackMaterial (const Graphic3d_MaterialAspect &theMaterial)
 Modifies the surface material of internal faces.
 
Graphic3d_TypeOfBackfacingModel FaceCulling () const
 Return face culling mode; Graphic3d_FaceCulling_BackClosed by default. A back-facing polygon is defined as a polygon whose vertices are in a clockwise order with respect to screen coordinates.
 
void SetFaceCulling (Graphic3d_TypeOfBackfacingModel theCulling)
 Set face culling mode.
 
bool Distinguish () const
 Returns true if material properties should be distinguished for back and front faces (false by default).
 
void SetDistinguish (bool toDistinguish)
 Set material distinction between front and back faces.
 
void SetDistinguishOn ()
 Allows material distinction between front and back faces.
 
void SetDistinguishOff ()
 Forbids material distinction between front and back faces.
 
const Handle< Graphic3d_ShaderProgram > & ShaderProgram () const
 Return shader program.
 
void SetShaderProgram (const Handle< Graphic3d_ShaderProgram > &theProgram)
 Sets up OpenGL/GLSL shader program.
 
const Handle< Graphic3d_TextureSet > & TextureSet () const
 Return texture array to be mapped.
 
void SetTextureSet (const Handle< Graphic3d_TextureSet > &theTextures)
 Setup texture array to be mapped.
 
Handle< Graphic3d_TextureMapTextureMap () const
 Return texture to be mapped.
 
void SetTextureMap (const Handle< Graphic3d_TextureMap > &theTexture)
 Assign texture to be mapped. See also SetTextureMapOn() to actually activate texture mapping.
 
bool ToMapTexture () const
 Return true if texture mapping is enabled (false by default).
 
bool TextureMapState () const
 Return true if texture mapping is enabled (false by default).
 
void SetTextureMapOn (bool theToMap)
 Enable or disable texture mapping (has no effect if texture is not set).
 
void SetTextureMapOn ()
 Enable texture mapping (has no effect if texture is not set).
 
void SetTextureMapOff ()
 Disable texture mapping.
 
const Graphic3d_PolygonOffsetPolygonOffset () const
 Returns current polygon offsets settings.
 
void SetPolygonOffset (const Graphic3d_PolygonOffset &theOffset)
 Sets polygon offsets settings.
 
void PolygonOffsets (Standard_Integer &theMode, Standard_ShortReal &theFactor, Standard_ShortReal &theUnits) const
 Returns current polygon offsets settings.
 
void SetPolygonOffsets (const Standard_Integer theMode, const Standard_ShortReal theFactor=1.0f, const Standard_ShortReal theUnits=0.0f)
 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:
 
parameters specific to Point (Marker) primitive rendering
Aspect_TypeOfMarker MarkerType () const
 Return marker type; Aspect_TOM_POINT by default.
 
void SetMarkerType (Aspect_TypeOfMarker theType)
 Modifies the type of marker.
 
Standard_ShortReal MarkerScale () const
 Return marker scale factor; 1.0 by default.
 
void SetMarkerScale (const Standard_ShortReal theScale)
 Modifies the scale factor. Marker type Aspect_TOM_POINT is not affected by the marker size scale factor. It is always the smallest displayable dot. Warning: Raises Standard_OutOfRange if the scale is a negative value.
 
const Handle< Graphic3d_MarkerImage > & MarkerImage () const
 Returns marker's image texture. Could be null handle if marker aspect has been initialized as default type of marker.
 
void SetMarkerImage (const Handle< Graphic3d_MarkerImage > &theImage)
 Set marker's image texture.
 
bool IsMarkerSprite () const
 Returns TRUE if marker should be drawn using marker sprite (either user-provided or generated).
 
parameters specific to text rendering
const Handle< TCollection_HAsciiString > & TextFont () const
 Returns the font; NULL string by default.
 
void SetTextFont (const Handle< TCollection_HAsciiString > &theFont)
 Modifies the font.
 
Font_FontAspect TextFontAspect () const
 Returns text FontAspect.
 
void SetTextFontAspect (Font_FontAspect theFontAspect)
 Turns usage of Aspect text.
 
Aspect_TypeOfDisplayText TextDisplayType () const
 Returns display type; Aspect_TODT_NORMAL by default.
 
void SetTextDisplayType (Aspect_TypeOfDisplayText theType)
 Sets display type.
 
const Quantity_ColorRGBAColorSubTitleRGBA () const
 Returns text background/shadow color; equals to EdgeColor() property.
 
const Quantity_ColorColorSubTitle () const
 Return text background/shadow color; equals to EdgeColor() property.
 
void SetColorSubTitle (const Quantity_Color &theColor)
 Modifies text background/shadow color; equals to EdgeColor() property.
 
void SetColorSubTitle (const Quantity_ColorRGBA &theColor)
 Modifies text background/shadow color; equals to EdgeColor() property.
 
bool IsTextZoomable () const
 Returns TRUE when the Text Zoomable is on.
 
void SetTextZoomable (bool theFlag)
 Turns usage of text zoomable on/off.
 
Aspect_TypeOfStyleText TextStyle () const
 Returns the text style; Aspect_TOST_NORMAL by default.
 
void SetTextStyle (Aspect_TypeOfStyleText theStyle)
 Modifies the style of the text.
 
Standard_ShortReal TextAngle () const
 Returns Angle of degree.
 
void SetTextAngle (Standard_ShortReal theAngle)
 Turns usage of text rotated.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
Standard_Boolean IsKind (const opencascade::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.
 
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.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
Standard_Integer GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object.
 
Standard_Integer DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

parameters specific to Mesh Edges (of triangulation primitive) rendering

Handle< Graphic3d_ShaderProgrammyProgram
 Returns true if mesh edges should be drawn (false by default).
 
Handle< Graphic3d_TextureSetmyTextureSet
 Returns true if mesh edges should be drawn (false by default).
 
Handle< Graphic3d_MarkerImagemyMarkerImage
 Returns true if mesh edges should be drawn (false by default).
 
Handle< Graphic3d_HatchStylemyHatchStyle
 Returns true if mesh edges should be drawn (false by default).
 
Handle< TCollection_HAsciiStringmyTextFont
 Returns true if mesh edges should be drawn (false by default).
 
Graphic3d_MaterialAspect myFrontMaterial
 Returns true if mesh edges should be drawn (false by default).
 
Graphic3d_MaterialAspect myBackMaterial
 Returns true if mesh edges should be drawn (false by default).
 
Quantity_ColorRGBA myInteriorColor
 Returns true if mesh edges should be drawn (false by default).
 
Quantity_ColorRGBA myBackInteriorColor
 Returns true if mesh edges should be drawn (false by default).
 
Quantity_ColorRGBA myEdgeColor
 Returns true if mesh edges should be drawn (false by default).
 
Graphic3d_PolygonOffset myPolygonOffset
 Returns true if mesh edges should be drawn (false by default).
 
Aspect_InteriorStyle myInteriorStyle
 Returns true if mesh edges should be drawn (false by default).
 
Graphic3d_TypeOfShadingModel myShadingModel
 Returns true if mesh edges should be drawn (false by default).
 
Graphic3d_TypeOfBackfacingModel myFaceCulling
 Returns true if mesh edges should be drawn (false by default).
 
Graphic3d_AlphaMode myAlphaMode
 Returns true if mesh edges should be drawn (false by default).
 
Standard_ShortReal myAlphaCutoff
 Returns true if mesh edges should be drawn (false by default).
 
Aspect_TypeOfLine myLineType
 Returns true if mesh edges should be drawn (false by default).
 
Standard_ShortReal myLineWidth
 Returns true if mesh edges should be drawn (false by default).
 
uint16_t myLineFactor
 Returns true if mesh edges should be drawn (false by default).
 
uint16_t myLinePattern
 Returns true if mesh edges should be drawn (false by default).
 
Aspect_TypeOfMarker myMarkerType
 Returns true if mesh edges should be drawn (false by default).
 
Standard_ShortReal myMarkerScale
 Returns true if mesh edges should be drawn (false by default).
 
Aspect_TypeOfStyleText myTextStyle
 Returns true if mesh edges should be drawn (false by default).
 
Aspect_TypeOfDisplayText myTextDisplayType
 Returns true if mesh edges should be drawn (false by default).
 
Font_FontAspect myTextFontAspect
 Returns true if mesh edges should be drawn (false by default).
 
Standard_ShortReal myTextAngle
 Returns true if mesh edges should be drawn (false by default).
 
bool myToSkipFirstEdge
 Returns true if mesh edges should be drawn (false by default).
 
bool myToDistinguishMaterials
 Returns true if mesh edges should be drawn (false by default).
 
bool myToDrawEdges
 Returns true if mesh edges should be drawn (false by default).
 
bool myToDrawSilhouette
 Returns true if mesh edges should be drawn (false by default).
 
bool myToMapTexture
 Returns true if mesh edges should be drawn (false by default).
 
bool myIsTextZoomable
 Returns true if mesh edges should be drawn (false by default).
 
bool ToDrawEdges () const
 Returns true if mesh edges should be drawn (false by default).
 
void SetDrawEdges (bool theToDraw)
 Set if mesh edges should be drawn or not.
 
void SetEdgeOn ()
 The edges of FillAreas are drawn.
 
void SetEdgeOff ()
 The edges of FillAreas are not drawn.
 
const Quantity_ColorEdgeColor () const
 Return color of edges.
 
const Quantity_ColorRGBAEdgeColorRGBA () const
 Return color of edges.
 
void SetEdgeColor (const Quantity_Color &theColor)
 Modifies the color of the edge of the face.
 
void SetEdgeColor (const Quantity_ColorRGBA &theColor)
 Modifies the color of the edge of the face.
 
Aspect_TypeOfLine EdgeLineType () const
 Return edges line type (same as LineType()).
 
void SetEdgeLineType (Aspect_TypeOfLine theType)
 Modifies the edge line type (same as SetLineType())
 
Standard_ShortReal EdgeWidth () const
 Return width for edges in pixels (same as LineWidth()).
 
void SetEdgeWidth (Standard_Real theWidth)
 Modifies the edge thickness (same as SetLineWidth())
 
bool ToSkipFirstEdge () const
 Returns TRUE if drawing element edges should discard first edge in triangle; FALSE by default. Graphics hardware works mostly with triangles, so that wireframe presentation will draw triangle edges by default. This flag allows rendering wireframe presentation of quad-only array split into triangles. For this, quads should be split in specific order, so that the quad diagonal (to be NOT rendered) goes first: 1---—2 / / Triangle #1: 2-0-1; Triangle #2: 0-2-3 0---—3.
 
void SetSkipFirstEdge (bool theToSkipFirstEdge)
 Set skip first triangle edge flag for drawing wireframe presentation of quads array split into triangles.
 
bool ToDrawSilhouette () const
 Returns TRUE if silhouette (outline) should be drawn (with edge color and width); FALSE by default.
 
void SetDrawSilhouette (bool theToDraw)
 Enables/disables drawing silhouette (outline).
 
const Handle< Graphic3d_HatchStyle > & HatchStyle () const
 Returns the hatch type used when InteriorStyle is IS_HATCH.
 
void SetHatchStyle (const Handle< Graphic3d_HatchStyle > &theStyle)
 Modifies the hatch type used when InteriorStyle is IS_HATCH.
 
void SetHatchStyle (const Aspect_HatchStyle theStyle)
 Modifies the hatch type used when InteriorStyle is IS_HATCH.
 
bool IsEqual (const Graphic3d_Aspects &theOther)
 Check for equality with another aspects.
 
virtual void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream.
 
bool ToSuppressBackFaces () const
 
void SetSuppressBackFaces (bool theToSuppress)
 
bool BackFace () const
 
void AllowBackFace ()
 
void SuppressBackFace ()
 

parameters specific to Line primitive rendering

Aspect_TypeOfLine LineType () const
 Return line type; Aspect_TOL_SOLID by default.
 
void SetLineType (Aspect_TypeOfLine theType)
 Modifies the line type.
 
uint16_t LinePattern () const
 Return custom stipple line pattern; 0xFFFF by default.
 
void SetLinePattern (uint16_t thePattern)
 Modifies the stipple line pattern, and changes line type to Aspect_TOL_USERDEFINED for non-standard pattern.
 
uint16_t LineStippleFactor () const
 Return a multiplier for each bit in the line stipple pattern within [1, 256] range; 1 by default.
 
void SetLineStippleFactor (uint16_t theFactor)
 Set a multiplier for each bit in the line stipple pattern.
 
Standard_ShortReal LineWidth () const
 Return width for edges in pixels; 1.0 by default.
 
void SetLineWidth (Standard_ShortReal theWidth)
 Modifies the line thickness Warning: Raises Standard_OutOfRange if the width is a negative value.
 
static uint16_t DefaultLinePatternForType (Aspect_TypeOfLine theType)
 Return stipple line pattern for line type.
 
static Aspect_TypeOfLine DefaultLineTypeForPattern (uint16_t thePattern)
 Return line type for stipple line pattern.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

This class defines graphic attributes.

Constructor & Destructor Documentation

◆ Graphic3d_Aspects()

Graphic3d_Aspects::Graphic3d_Aspects ( )

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

Member Function Documentation

◆ AllowBackFace()

void Graphic3d_Aspects::AllowBackFace ( )
inline
Deprecated:
("Deprecated method, SetFaceCulling() should be used instead")

◆ AlphaCutoff()

Standard_ShortReal Graphic3d_Aspects::AlphaCutoff ( ) const
inline

Returns alpha cutoff threshold, for discarding fragments within Graphic3d_AlphaMode_Mask mode (0.5 by default). If the alpha value is greater than or equal to this value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent.

◆ AlphaMode()

Graphic3d_AlphaMode Graphic3d_Aspects::AlphaMode ( ) const
inline

Returns the way how alpha value should be treated (Graphic3d_AlphaMode_BlendAuto by default, for backward compatibility).

◆ BackFace()

bool Graphic3d_Aspects::BackFace ( ) const
inline
Deprecated:
("Deprecated method, FaceCulling() should be used instead")

◆ BackInteriorColor()

const Quantity_Color & Graphic3d_Aspects::BackInteriorColor ( ) const
inline

Return back interior color.

◆ BackInteriorColorRGBA()

const Quantity_ColorRGBA & Graphic3d_Aspects::BackInteriorColorRGBA ( ) const
inline

Return back interior color.

◆ BackMaterial()

const Graphic3d_MaterialAspect & Graphic3d_Aspects::BackMaterial ( ) const
inline

Returns the surface material of internal faces.

◆ ChangeBackMaterial()

Graphic3d_MaterialAspect & Graphic3d_Aspects::ChangeBackMaterial ( )
inline

Returns the surface material of internal faces.

◆ ChangeFrontMaterial()

Graphic3d_MaterialAspect & Graphic3d_Aspects::ChangeFrontMaterial ( )
inline

Returns the surface material of external faces.

◆ Color()

const Quantity_Color & Graphic3d_Aspects::Color ( ) const
inline

Return the color.

◆ ColorRGBA()

const Quantity_ColorRGBA & Graphic3d_Aspects::ColorRGBA ( ) const
inline

Return color.

◆ ColorSubTitle()

const Quantity_Color & Graphic3d_Aspects::ColorSubTitle ( ) const
inline

Return text background/shadow color; equals to EdgeColor() property.

◆ ColorSubTitleRGBA()

const Quantity_ColorRGBA & Graphic3d_Aspects::ColorSubTitleRGBA ( ) const
inline

Returns text background/shadow color; equals to EdgeColor() property.

◆ DefaultLinePatternForType()

static uint16_t Graphic3d_Aspects::DefaultLinePatternForType ( Aspect_TypeOfLine  theType)
inlinestatic

Return stipple line pattern for line type.

◆ DefaultLineTypeForPattern()

static Aspect_TypeOfLine Graphic3d_Aspects::DefaultLineTypeForPattern ( uint16_t  thePattern)
inlinestatic

Return line type for stipple line pattern.

◆ Distinguish()

bool Graphic3d_Aspects::Distinguish ( ) const
inline

Returns true if material properties should be distinguished for back and front faces (false by default).

◆ DumpJson()

virtual void Graphic3d_Aspects::DumpJson ( Standard_OStream theOStream,
Standard_Integer  theDepth = -1 
) const
virtual

Dumps the content of me into the stream.

Reimplemented in Graphic3d_AspectText3d.

◆ EdgeColor()

const Quantity_Color & Graphic3d_Aspects::EdgeColor ( ) const
inline

Return color of edges.

◆ EdgeColorRGBA()

const Quantity_ColorRGBA & Graphic3d_Aspects::EdgeColorRGBA ( ) const
inline

Return color of edges.

◆ EdgeLineType()

Aspect_TypeOfLine Graphic3d_Aspects::EdgeLineType ( ) const
inline

Return edges line type (same as LineType()).

◆ EdgeWidth()

Standard_ShortReal Graphic3d_Aspects::EdgeWidth ( ) const
inline

Return width for edges in pixels (same as LineWidth()).

◆ FaceCulling()

Graphic3d_TypeOfBackfacingModel Graphic3d_Aspects::FaceCulling ( ) const
inline

Return face culling mode; Graphic3d_FaceCulling_BackClosed by default. A back-facing polygon is defined as a polygon whose vertices are in a clockwise order with respect to screen coordinates.

◆ FrontMaterial()

const Graphic3d_MaterialAspect & Graphic3d_Aspects::FrontMaterial ( ) const
inline

Returns the surface material of external faces.

◆ HatchStyle()

const Handle< Graphic3d_HatchStyle > & Graphic3d_Aspects::HatchStyle ( ) const
inline

Returns the hatch type used when InteriorStyle is IS_HATCH.

◆ InteriorColor()

const Quantity_Color & Graphic3d_Aspects::InteriorColor ( ) const
inline

Return interior color.

◆ InteriorColorRGBA()

const Quantity_ColorRGBA & Graphic3d_Aspects::InteriorColorRGBA ( ) const
inline

Return interior color.

◆ InteriorStyle()

Aspect_InteriorStyle Graphic3d_Aspects::InteriorStyle ( ) const
inline

Return interior rendering style; Aspect_IS_SOLID by default.

◆ IsEqual()

bool Graphic3d_Aspects::IsEqual ( const Graphic3d_Aspects theOther)
inline

Check for equality with another aspects.

◆ IsMarkerSprite()

bool Graphic3d_Aspects::IsMarkerSprite ( ) const
inline

Returns TRUE if marker should be drawn using marker sprite (either user-provided or generated).

◆ IsTextZoomable()

bool Graphic3d_Aspects::IsTextZoomable ( ) const
inline

Returns TRUE when the Text Zoomable is on.

◆ LinePattern()

uint16_t Graphic3d_Aspects::LinePattern ( ) const
inline

Return custom stipple line pattern; 0xFFFF by default.

◆ LineStippleFactor()

uint16_t Graphic3d_Aspects::LineStippleFactor ( ) const
inline

Return a multiplier for each bit in the line stipple pattern within [1, 256] range; 1 by default.

◆ LineType()

Aspect_TypeOfLine Graphic3d_Aspects::LineType ( ) const
inline

Return line type; Aspect_TOL_SOLID by default.

◆ LineWidth()

Standard_ShortReal Graphic3d_Aspects::LineWidth ( ) const
inline

Return width for edges in pixels; 1.0 by default.

◆ MarkerImage()

const Handle< Graphic3d_MarkerImage > & Graphic3d_Aspects::MarkerImage ( ) const
inline

Returns marker's image texture. Could be null handle if marker aspect has been initialized as default type of marker.

◆ MarkerScale()

Standard_ShortReal Graphic3d_Aspects::MarkerScale ( ) const
inline

Return marker scale factor; 1.0 by default.

◆ MarkerType()

Aspect_TypeOfMarker Graphic3d_Aspects::MarkerType ( ) const
inline

Return marker type; Aspect_TOM_POINT by default.

◆ PolygonOffset()

const Graphic3d_PolygonOffset & Graphic3d_Aspects::PolygonOffset ( ) const
inline

Returns current polygon offsets settings.

◆ PolygonOffsets()

void Graphic3d_Aspects::PolygonOffsets ( Standard_Integer theMode,
Standard_ShortReal theFactor,
Standard_ShortReal theUnits 
) const
inline

Returns current polygon offsets settings.

◆ SetAlphaMode()

void Graphic3d_Aspects::SetAlphaMode ( Graphic3d_AlphaMode  theMode,
Standard_ShortReal  theAlphaCutoff = 0.5f 
)
inline

Defines the way how alpha value should be treated.

◆ SetBackInteriorColor() [1/2]

void Graphic3d_Aspects::SetBackInteriorColor ( const Quantity_Color theColor)
inline

Modifies the color of the interior of the back face.

◆ SetBackInteriorColor() [2/2]

void Graphic3d_Aspects::SetBackInteriorColor ( const Quantity_ColorRGBA theColor)
inline

Modifies the color of the interior of the back face.

◆ SetBackMaterial()

void Graphic3d_Aspects::SetBackMaterial ( const Graphic3d_MaterialAspect theMaterial)
inline

Modifies the surface material of internal faces.

◆ SetColor()

void Graphic3d_Aspects::SetColor ( const Quantity_Color theColor)
inline

Modifies the color.

◆ SetColorSubTitle() [1/2]

void Graphic3d_Aspects::SetColorSubTitle ( const Quantity_Color theColor)
inline

Modifies text background/shadow color; equals to EdgeColor() property.

◆ SetColorSubTitle() [2/2]

void Graphic3d_Aspects::SetColorSubTitle ( const Quantity_ColorRGBA theColor)
inline

Modifies text background/shadow color; equals to EdgeColor() property.

◆ SetDistinguish()

void Graphic3d_Aspects::SetDistinguish ( bool  toDistinguish)
inline

Set material distinction between front and back faces.

◆ SetDistinguishOff()

void Graphic3d_Aspects::SetDistinguishOff ( )
inline

Forbids material distinction between front and back faces.

◆ SetDistinguishOn()

void Graphic3d_Aspects::SetDistinguishOn ( )
inline

Allows material distinction between front and back faces.

◆ SetDrawEdges()

void Graphic3d_Aspects::SetDrawEdges ( bool  theToDraw)
inline

Set if mesh edges should be drawn or not.

◆ SetDrawSilhouette()

void Graphic3d_Aspects::SetDrawSilhouette ( bool  theToDraw)
inline

Enables/disables drawing silhouette (outline).

◆ SetEdgeColor() [1/2]

void Graphic3d_Aspects::SetEdgeColor ( const Quantity_Color theColor)
inline

Modifies the color of the edge of the face.

◆ SetEdgeColor() [2/2]

void Graphic3d_Aspects::SetEdgeColor ( const Quantity_ColorRGBA theColor)
inline

Modifies the color of the edge of the face.

◆ SetEdgeLineType()

void Graphic3d_Aspects::SetEdgeLineType ( Aspect_TypeOfLine  theType)
inline

Modifies the edge line type (same as SetLineType())

◆ SetEdgeOff()

void Graphic3d_Aspects::SetEdgeOff ( )
inline

The edges of FillAreas are not drawn.

◆ SetEdgeOn()

void Graphic3d_Aspects::SetEdgeOn ( )
inline

The edges of FillAreas are drawn.

◆ SetEdgeWidth()

void Graphic3d_Aspects::SetEdgeWidth ( Standard_Real  theWidth)
inline

Modifies the edge thickness (same as SetLineWidth())

◆ SetFaceCulling()

void Graphic3d_Aspects::SetFaceCulling ( Graphic3d_TypeOfBackfacingModel  theCulling)
inline

Set face culling mode.

◆ SetFrontMaterial()

void Graphic3d_Aspects::SetFrontMaterial ( const Graphic3d_MaterialAspect theMaterial)
inline

Modifies the surface material of external faces.

◆ SetHatchStyle() [1/2]

void Graphic3d_Aspects::SetHatchStyle ( const Aspect_HatchStyle  theStyle)
inline

Modifies the hatch type used when InteriorStyle is IS_HATCH.

Warning
This method always creates a new handle for a given hatch style

◆ SetHatchStyle() [2/2]

void Graphic3d_Aspects::SetHatchStyle ( const Handle< Graphic3d_HatchStyle > &  theStyle)
inline

Modifies the hatch type used when InteriorStyle is IS_HATCH.

◆ SetInteriorColor() [1/2]

void Graphic3d_Aspects::SetInteriorColor ( const Quantity_Color theColor)
inline

Modifies the color of the interior of the face.

◆ SetInteriorColor() [2/2]

void Graphic3d_Aspects::SetInteriorColor ( const Quantity_ColorRGBA theColor)
inline

Modifies the color of the interior of the face.

◆ SetInteriorStyle()

void Graphic3d_Aspects::SetInteriorStyle ( const Aspect_InteriorStyle  theStyle)
inline

Modifies the interior type used for rendering.

◆ SetLinePattern()

void Graphic3d_Aspects::SetLinePattern ( uint16_t  thePattern)
inline

Modifies the stipple line pattern, and changes line type to Aspect_TOL_USERDEFINED for non-standard pattern.

◆ SetLineStippleFactor()

void Graphic3d_Aspects::SetLineStippleFactor ( uint16_t  theFactor)
inline

Set a multiplier for each bit in the line stipple pattern.

◆ SetLineType()

void Graphic3d_Aspects::SetLineType ( Aspect_TypeOfLine  theType)
inline

Modifies the line type.

◆ SetLineWidth()

void Graphic3d_Aspects::SetLineWidth ( Standard_ShortReal  theWidth)
inline

Modifies the line thickness Warning: Raises Standard_OutOfRange if the width is a negative value.

◆ SetMarkerImage()

void Graphic3d_Aspects::SetMarkerImage ( const Handle< Graphic3d_MarkerImage > &  theImage)
inline

Set marker's image texture.

◆ SetMarkerScale()

void Graphic3d_Aspects::SetMarkerScale ( const Standard_ShortReal  theScale)
inline

Modifies the scale factor. Marker type Aspect_TOM_POINT is not affected by the marker size scale factor. It is always the smallest displayable dot. Warning: Raises Standard_OutOfRange if the scale is a negative value.

◆ SetMarkerType()

void Graphic3d_Aspects::SetMarkerType ( Aspect_TypeOfMarker  theType)
inline

Modifies the type of marker.

◆ SetPolygonOffset()

void Graphic3d_Aspects::SetPolygonOffset ( const Graphic3d_PolygonOffset theOffset)
inline

Sets polygon offsets settings.

◆ SetPolygonOffsets()

void Graphic3d_Aspects::SetPolygonOffsets ( const Standard_Integer  theMode,
const Standard_ShortReal  theFactor = 1.0f,
const Standard_ShortReal  theUnits = 0.0f 
)
inline

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)

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

◆ SetShaderProgram()

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

Sets up OpenGL/GLSL shader program.

◆ SetShadingModel()

void Graphic3d_Aspects::SetShadingModel ( const Graphic3d_TypeOfShadingModel  theShadingModel)
inline

Sets shading model.

◆ SetSkipFirstEdge()

void Graphic3d_Aspects::SetSkipFirstEdge ( bool  theToSkipFirstEdge)
inline

Set skip first triangle edge flag for drawing wireframe presentation of quads array split into triangles.

◆ SetSuppressBackFaces()

void Graphic3d_Aspects::SetSuppressBackFaces ( bool  theToSuppress)
inline
Deprecated:
("Deprecated method, SetFaceCulling() should be used instead")

◆ SetTextAngle()

void Graphic3d_Aspects::SetTextAngle ( Standard_ShortReal  theAngle)
inline

Turns usage of text rotated.

◆ SetTextDisplayType()

void Graphic3d_Aspects::SetTextDisplayType ( Aspect_TypeOfDisplayText  theType)
inline

Sets display type.

◆ SetTextFont()

void Graphic3d_Aspects::SetTextFont ( const Handle< TCollection_HAsciiString > &  theFont)
inline

Modifies the font.

◆ SetTextFontAspect()

void Graphic3d_Aspects::SetTextFontAspect ( Font_FontAspect  theFontAspect)
inline

Turns usage of Aspect text.

◆ SetTextStyle()

void Graphic3d_Aspects::SetTextStyle ( Aspect_TypeOfStyleText  theStyle)
inline

Modifies the style of the text.

◆ SetTextureMap()

void Graphic3d_Aspects::SetTextureMap ( const Handle< Graphic3d_TextureMap > &  theTexture)

Assign texture to be mapped. See also SetTextureMapOn() to actually activate texture mapping.

◆ SetTextureMapOff()

void Graphic3d_Aspects::SetTextureMapOff ( )
inline

Disable texture mapping.

◆ SetTextureMapOn() [1/2]

void Graphic3d_Aspects::SetTextureMapOn ( )
inline

Enable texture mapping (has no effect if texture is not set).

◆ SetTextureMapOn() [2/2]

void Graphic3d_Aspects::SetTextureMapOn ( bool  theToMap)
inline

Enable or disable texture mapping (has no effect if texture is not set).

◆ SetTextureSet()

void Graphic3d_Aspects::SetTextureSet ( const Handle< Graphic3d_TextureSet > &  theTextures)
inline

Setup texture array to be mapped.

◆ SetTextZoomable()

void Graphic3d_Aspects::SetTextZoomable ( bool  theFlag)
inline

Turns usage of text zoomable on/off.

◆ ShaderProgram()

const Handle< Graphic3d_ShaderProgram > & Graphic3d_Aspects::ShaderProgram ( ) const
inline

Return shader program.

◆ ShadingModel()

Graphic3d_TypeOfShadingModel Graphic3d_Aspects::ShadingModel ( ) const
inline

Returns shading model; Graphic3d_TypeOfShadingModel_DEFAULT by default. Graphic3d_TOSM_DEFAULT means that Shading Model set as default for entire Viewer will be used.

◆ SuppressBackFace()

void Graphic3d_Aspects::SuppressBackFace ( )
inline
Deprecated:
("Deprecated method, SetFaceCulling() should be used instead")

◆ TextAngle()

Standard_ShortReal Graphic3d_Aspects::TextAngle ( ) const
inline

Returns Angle of degree.

◆ TextDisplayType()

Aspect_TypeOfDisplayText Graphic3d_Aspects::TextDisplayType ( ) const
inline

Returns display type; Aspect_TODT_NORMAL by default.

◆ TextFont()

const Handle< TCollection_HAsciiString > & Graphic3d_Aspects::TextFont ( ) const
inline

Returns the font; NULL string by default.

◆ TextFontAspect()

Font_FontAspect Graphic3d_Aspects::TextFontAspect ( ) const
inline

Returns text FontAspect.

◆ TextStyle()

Aspect_TypeOfStyleText Graphic3d_Aspects::TextStyle ( ) const
inline

Returns the text style; Aspect_TOST_NORMAL by default.

◆ TextureMap()

Handle< Graphic3d_TextureMap > Graphic3d_Aspects::TextureMap ( ) const
inline

Return texture to be mapped.

◆ TextureMapState()

bool Graphic3d_Aspects::TextureMapState ( ) const
inline

Return true if texture mapping is enabled (false by default).

◆ TextureSet()

const Handle< Graphic3d_TextureSet > & Graphic3d_Aspects::TextureSet ( ) const
inline

Return texture array to be mapped.

◆ ToDrawEdges()

bool Graphic3d_Aspects::ToDrawEdges ( ) const
inline

Returns true if mesh edges should be drawn (false by default).

◆ ToDrawSilhouette()

bool Graphic3d_Aspects::ToDrawSilhouette ( ) const
inline

Returns TRUE if silhouette (outline) should be drawn (with edge color and width); FALSE by default.

◆ ToMapTexture()

bool Graphic3d_Aspects::ToMapTexture ( ) const
inline

Return true if texture mapping is enabled (false by default).

◆ ToSkipFirstEdge()

bool Graphic3d_Aspects::ToSkipFirstEdge ( ) const
inline

Returns TRUE if drawing element edges should discard first edge in triangle; FALSE by default. Graphics hardware works mostly with triangles, so that wireframe presentation will draw triangle edges by default. This flag allows rendering wireframe presentation of quad-only array split into triangles. For this, quads should be split in specific order, so that the quad diagonal (to be NOT rendered) goes first: 1---—2 / / Triangle #1: 2-0-1; Triangle #2: 0-2-3 0---—3.

◆ ToSuppressBackFaces()

bool Graphic3d_Aspects::ToSuppressBackFaces ( ) const
inline
Deprecated:
("Deprecated method, FaceCulling() should be used instead")

Field Documentation

◆ myAlphaCutoff

Standard_ShortReal Graphic3d_Aspects::myAlphaCutoff
protected

Returns true if mesh edges should be drawn (false by default).

◆ myAlphaMode

Graphic3d_AlphaMode Graphic3d_Aspects::myAlphaMode
protected

Returns true if mesh edges should be drawn (false by default).

◆ myBackInteriorColor

Quantity_ColorRGBA Graphic3d_Aspects::myBackInteriorColor
protected

Returns true if mesh edges should be drawn (false by default).

◆ myBackMaterial

Graphic3d_MaterialAspect Graphic3d_Aspects::myBackMaterial
protected

Returns true if mesh edges should be drawn (false by default).

◆ myEdgeColor

Quantity_ColorRGBA Graphic3d_Aspects::myEdgeColor
protected

Returns true if mesh edges should be drawn (false by default).

◆ myFaceCulling

Graphic3d_TypeOfBackfacingModel Graphic3d_Aspects::myFaceCulling
protected

Returns true if mesh edges should be drawn (false by default).

◆ myFrontMaterial

Graphic3d_MaterialAspect Graphic3d_Aspects::myFrontMaterial
protected

Returns true if mesh edges should be drawn (false by default).

◆ myHatchStyle

Handle< Graphic3d_HatchStyle > Graphic3d_Aspects::myHatchStyle
protected

Returns true if mesh edges should be drawn (false by default).

◆ myInteriorColor

Quantity_ColorRGBA Graphic3d_Aspects::myInteriorColor
protected

Returns true if mesh edges should be drawn (false by default).

◆ myInteriorStyle

Aspect_InteriorStyle Graphic3d_Aspects::myInteriorStyle
protected

Returns true if mesh edges should be drawn (false by default).

◆ myIsTextZoomable

bool Graphic3d_Aspects::myIsTextZoomable
protected

Returns true if mesh edges should be drawn (false by default).

◆ myLineFactor

uint16_t Graphic3d_Aspects::myLineFactor
protected

Returns true if mesh edges should be drawn (false by default).

◆ myLinePattern

uint16_t Graphic3d_Aspects::myLinePattern
protected

Returns true if mesh edges should be drawn (false by default).

◆ myLineType

Aspect_TypeOfLine Graphic3d_Aspects::myLineType
protected

Returns true if mesh edges should be drawn (false by default).

◆ myLineWidth

Standard_ShortReal Graphic3d_Aspects::myLineWidth
protected

Returns true if mesh edges should be drawn (false by default).

◆ myMarkerImage

Handle< Graphic3d_MarkerImage > Graphic3d_Aspects::myMarkerImage
protected

Returns true if mesh edges should be drawn (false by default).

◆ myMarkerScale

Standard_ShortReal Graphic3d_Aspects::myMarkerScale
protected

Returns true if mesh edges should be drawn (false by default).

◆ myMarkerType

Aspect_TypeOfMarker Graphic3d_Aspects::myMarkerType
protected

Returns true if mesh edges should be drawn (false by default).

◆ myPolygonOffset

Graphic3d_PolygonOffset Graphic3d_Aspects::myPolygonOffset
protected

Returns true if mesh edges should be drawn (false by default).

◆ myProgram

Handle< Graphic3d_ShaderProgram > Graphic3d_Aspects::myProgram
protected

Returns true if mesh edges should be drawn (false by default).

◆ myShadingModel

Graphic3d_TypeOfShadingModel Graphic3d_Aspects::myShadingModel
protected

Returns true if mesh edges should be drawn (false by default).

◆ myTextAngle

Standard_ShortReal Graphic3d_Aspects::myTextAngle
protected

Returns true if mesh edges should be drawn (false by default).

◆ myTextDisplayType

Aspect_TypeOfDisplayText Graphic3d_Aspects::myTextDisplayType
protected

Returns true if mesh edges should be drawn (false by default).

◆ myTextFont

Handle< TCollection_HAsciiString > Graphic3d_Aspects::myTextFont
protected

Returns true if mesh edges should be drawn (false by default).

◆ myTextFontAspect

Font_FontAspect Graphic3d_Aspects::myTextFontAspect
protected

Returns true if mesh edges should be drawn (false by default).

◆ myTextStyle

Aspect_TypeOfStyleText Graphic3d_Aspects::myTextStyle
protected

Returns true if mesh edges should be drawn (false by default).

◆ myTextureSet

Handle< Graphic3d_TextureSet > Graphic3d_Aspects::myTextureSet
protected

Returns true if mesh edges should be drawn (false by default).

◆ myToDistinguishMaterials

bool Graphic3d_Aspects::myToDistinguishMaterials
protected

Returns true if mesh edges should be drawn (false by default).

◆ myToDrawEdges

bool Graphic3d_Aspects::myToDrawEdges
protected

Returns true if mesh edges should be drawn (false by default).

◆ myToDrawSilhouette

bool Graphic3d_Aspects::myToDrawSilhouette
protected

Returns true if mesh edges should be drawn (false by default).

◆ myToMapTexture

bool Graphic3d_Aspects::myToMapTexture
protected

Returns true if mesh edges should be drawn (false by default).

◆ myToSkipFirstEdge

bool Graphic3d_Aspects::myToSkipFirstEdge
protected

Returns true if mesh edges should be drawn (false by default).


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