Open CASCADE Technology  7.7.0
Public Member Functions | Static Public Member Functions | Protected Attributes

XCAFPrs_Style Class Reference

Represents a set of styling settings applicable to a (sub)shape. More...

#include <XCAFPrs_Style.hxx>

Public Member Functions

 XCAFPrs_Style ()
 Empty constructor - colors are unset, visibility is TRUE. More...
 
Standard_Boolean IsEmpty () const
 Return TRUE if style is empty - does not override any properties. More...
 
const Handle< XCAFDoc_VisMaterial > & Material () const
 Return material. More...
 
void SetMaterial (const Handle< XCAFDoc_VisMaterial > &theMaterial)
 Set material. More...
 
Standard_Boolean IsSetColorSurf () const
 Return TRUE if surface color has been defined. More...
 
const Quantity_ColorGetColorSurf () const
 Return surface color. More...
 
void SetColorSurf (const Quantity_Color &theColor)
 Set surface color. More...
 
const Quantity_ColorRGBAGetColorSurfRGBA () const
 Return surface color. More...
 
void SetColorSurf (const Quantity_ColorRGBA &theColor)
 Set surface color. More...
 
void UnSetColorSurf ()
 Manage surface color setting. More...
 
Standard_Boolean IsSetColorCurv () const
 Return TRUE if curve color has been defined. More...
 
const Quantity_ColorGetColorCurv () const
 Return curve color. More...
 
void SetColorCurv (const Quantity_Color &col)
 Set curve color. More...
 
void UnSetColorCurv ()
 Manage curve color setting. More...
 
void SetVisibility (const Standard_Boolean theVisibility)
 Assign visibility. More...
 
Standard_Boolean IsVisible () const
 Manage visibility. More...
 
const Handle< Image_Texture > & BaseColorTexture () const
 Return base color texture. More...
 
Standard_Boolean IsEqual (const XCAFPrs_Style &theOther) const
 Returns True if styles are the same Methods for using Style as key in maps. More...
 
Standard_Boolean operator== (const XCAFPrs_Style &theOther) const
 Returns True if styles are the same. More...
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. More...
 

Static Public Member Functions

static Standard_Integer HashCode (const XCAFPrs_Style &theStyle, const Standard_Integer theUpperBound)
 Computes a hash code for the given set of styling settings, in the range [1, theUpperBound]. More...
 
static Standard_Boolean IsEqual (const XCAFPrs_Style &theS1, const XCAFPrs_Style &theS2)
 Returns True when the two keys are the same. More...
 

Protected Attributes

Handle< XCAFDoc_VisMaterialmyMaterial
 
Quantity_ColorRGBA myColorSurf
 
Quantity_Color myColorCurv
 
Standard_Boolean myHasColorSurf
 
Standard_Boolean myHasColorCurv
 
Standard_Boolean myIsVisible
 

Detailed Description

Represents a set of styling settings applicable to a (sub)shape.

Constructor & Destructor Documentation

◆ XCAFPrs_Style()

XCAFPrs_Style::XCAFPrs_Style ( )

Empty constructor - colors are unset, visibility is TRUE.

Member Function Documentation

◆ BaseColorTexture()

const Handle< Image_Texture >& XCAFPrs_Style::BaseColorTexture ( ) const
inline

Return base color texture.

◆ DumpJson()

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

Dumps the content of me into the stream.

◆ GetColorCurv()

const Quantity_Color& XCAFPrs_Style::GetColorCurv ( ) const
inline

Return curve color.

◆ GetColorSurf()

const Quantity_Color& XCAFPrs_Style::GetColorSurf ( ) const
inline

Return surface color.

◆ GetColorSurfRGBA()

const Quantity_ColorRGBA& XCAFPrs_Style::GetColorSurfRGBA ( ) const
inline

Return surface color.

◆ HashCode()

static Standard_Integer XCAFPrs_Style::HashCode ( const XCAFPrs_Style theStyle,
const Standard_Integer  theUpperBound 
)
inlinestatic

Computes a hash code for the given set of styling settings, in the range [1, theUpperBound].

Parameters
theStylethe set of styling settings which hash code is to be computed
theUpperBoundthe upper bound of the range a computing hash code must be within
Returns
a computed hash code, in the range [1, theUpperBound]

◆ IsEmpty()

Standard_Boolean XCAFPrs_Style::IsEmpty ( ) const
inline

Return TRUE if style is empty - does not override any properties.

◆ IsEqual() [1/2]

Standard_Boolean XCAFPrs_Style::IsEqual ( const XCAFPrs_Style theOther) const
inline

Returns True if styles are the same Methods for using Style as key in maps.

◆ IsEqual() [2/2]

static Standard_Boolean XCAFPrs_Style::IsEqual ( const XCAFPrs_Style theS1,
const XCAFPrs_Style theS2 
)
inlinestatic

Returns True when the two keys are the same.

◆ IsSetColorCurv()

Standard_Boolean XCAFPrs_Style::IsSetColorCurv ( ) const
inline

Return TRUE if curve color has been defined.

◆ IsSetColorSurf()

Standard_Boolean XCAFPrs_Style::IsSetColorSurf ( ) const
inline

Return TRUE if surface color has been defined.

◆ IsVisible()

Standard_Boolean XCAFPrs_Style::IsVisible ( ) const
inline

Manage visibility.

◆ Material()

const Handle< XCAFDoc_VisMaterial >& XCAFPrs_Style::Material ( ) const
inline

Return material.

◆ operator==()

Standard_Boolean XCAFPrs_Style::operator== ( const XCAFPrs_Style theOther) const
inline

Returns True if styles are the same.

◆ SetColorCurv()

void XCAFPrs_Style::SetColorCurv ( const Quantity_Color col)

Set curve color.

◆ SetColorSurf() [1/2]

void XCAFPrs_Style::SetColorSurf ( const Quantity_Color theColor)
inline

Set surface color.

◆ SetColorSurf() [2/2]

void XCAFPrs_Style::SetColorSurf ( const Quantity_ColorRGBA theColor)

Set surface color.

◆ SetMaterial()

void XCAFPrs_Style::SetMaterial ( const Handle< XCAFDoc_VisMaterial > &  theMaterial)
inline

Set material.

◆ SetVisibility()

void XCAFPrs_Style::SetVisibility ( const Standard_Boolean  theVisibility)
inline

Assign visibility.

◆ UnSetColorCurv()

void XCAFPrs_Style::UnSetColorCurv ( )

Manage curve color setting.

◆ UnSetColorSurf()

void XCAFPrs_Style::UnSetColorSurf ( )

Manage surface color setting.

Field Documentation

◆ myColorCurv

Quantity_Color XCAFPrs_Style::myColorCurv
protected

◆ myColorSurf

Quantity_ColorRGBA XCAFPrs_Style::myColorSurf
protected

◆ myHasColorCurv

Standard_Boolean XCAFPrs_Style::myHasColorCurv
protected

◆ myHasColorSurf

Standard_Boolean XCAFPrs_Style::myHasColorSurf
protected

◆ myIsVisible

Standard_Boolean XCAFPrs_Style::myIsVisible
protected

◆ myMaterial

Handle< XCAFDoc_VisMaterial > XCAFPrs_Style::myMaterial
protected

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