# Visualization
TKMeshVS
MeshVS

# MeshVS_ElementalColorPrsBuilder Class Reference

This class provides methods to create presentation of elements with
assigned colors. The class contains two color maps: map of same colors for front
and back side of face and map of different ones,
.

`#include <MeshVS_ElementalColorPrsBuilder.hxx>`

Inheritance diagram for MeshVS_ElementalColorPrsBuilder:

[legend]

## Public Member Functions

Standard_EXPORT | MeshVS_ElementalColorPrsBuilder (const Handle(MeshVS_Mesh)&Parent, const MeshVS_DisplayModeFlags &Flags=MeshVS_DMF_ElementalColorDataPrs, const Handle(MeshVS_DataSource)&DS=0, const Standard_Integer Id=-1, const MeshVS_BuilderPriority &Priority=MeshVS_BP_ElemColor)
| Constructor .
virtual Standard_EXPORT void | Build (const Handle(Prs3d_Presentation)&Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Boolean IsElement, const Standard_Integer DisplayMode) const
| Builds presentation of elements with assigned colors. .
Standard_EXPORT const MeshVS_DataMapOfIntegerColor & | GetColors1 () const
| Returns map of colors same for front and back side of face. .
Standard_EXPORT void | SetColors1 (const MeshVS_DataMapOfIntegerColor &Map)
| Sets map of colors same for front and back side of face. .
Standard_EXPORT Standard_Boolean | HasColors1 () const
| Returns true, if map of colors isn't empty .
Standard_EXPORT Standard_Boolean | GetColor1 (const Standard_Integer ID, Quantity_Color &theColor) const
| Returns color assigned with element number ID .
Standard_EXPORT void | SetColor1 (const Standard_Integer ID, const Quantity_Color &theColor)
| Sets color assigned with element number ID .
Standard_EXPORT const MeshVS_DataMapOfIntegerTwoColors & | GetColors2 () const
| Returns map of different colors for front and back side of face .
Standard_EXPORT void | SetColors2 (const MeshVS_DataMapOfIntegerTwoColors &Map)
| Sets map of different colors for front and back side of face .
Standard_EXPORT Standard_Boolean | HasColors2 () const
| Returns true, if map isn't empty .
Standard_EXPORT Standard_Boolean | GetColor2 (const Standard_Integer ID, MeshVS_TwoColors &theColor) const
| Returns colors assigned with element number ID .
Standard_EXPORT Standard_Boolean | GetColor2 (const Standard_Integer ID, Quantity_Color &theColor1, Quantity_Color &theColor2) const
| Returns colors assigned with element number ID theColor1 is the front element color theColor2 is the back element color .
Standard_EXPORT void | SetColor2 (const Standard_Integer ID, const MeshVS_TwoColors &theTwoColors)
| Sets colors assigned with element number ID .
Standard_EXPORT void | SetColor2 (const Standard_Integer ID, const Quantity_Color &theColor1, const Quantity_Color &theColor2)
| Sets color assigned with element number ID theColor1 is the front element color theColor2 is the back element color .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Private Attributes

MeshVS_DataMapOfIntegerColor | myElemColorMap1
MeshVS_DataMapOfIntegerTwoColors | myElemColorMap2

## Constructor & Destructor Documentation

Standard_EXPORT MeshVS_ElementalColorPrsBuilder::MeshVS_ElementalColorPrsBuilder | ( | const Handle(MeshVS_Mesh)& | Parent,
|  | const MeshVS_DisplayModeFlags & | Flags = `MeshVS_DMF_ElementalColorDataPrs`,
|  | const Handle(MeshVS_DataSource)& | DS = `0`,
|  | const Standard_Integer | Id = `-1`,
|  | const MeshVS_BuilderPriority & | Priority = `MeshVS_BP_ElemColor`
| ) |

## Member Function Documentation

virtual Standard_EXPORT void MeshVS_ElementalColorPrsBuilder::Build | ( | const Handle(Prs3d_Presentation)& | Prs,
|  | const TColStd_PackedMapOfInteger & | IDs,
|  | TColStd_PackedMapOfInteger & | IDsToExclude,
|  | const Standard_Boolean | IsElement,
|  | const Standard_Integer | DisplayMode
| ) | const`[virtual]`

| Implements MeshVS_PrsBuilder.

Standard_EXPORT Standard_Boolean MeshVS_ElementalColorPrsBuilder::GetColor1 | ( | const Standard_Integer | ID,
|  | Quantity_Color & | theColor
| ) | const

Standard_EXPORT Standard_Boolean MeshVS_ElementalColorPrsBuilder::GetColor2 | ( | const Standard_Integer | ID,
|  | Quantity_Color & | theColor1,
|  | Quantity_Color & | theColor2
| ) | const

Standard_EXPORT Standard_Boolean MeshVS_ElementalColorPrsBuilder::GetColor2 | ( | const Standard_Integer | ID,
|  | MeshVS_TwoColors & | theColor
| ) | const

Standard_EXPORT const MeshVS_DataMapOfIntegerColor& MeshVS_ElementalColorPrsBuilder::GetColors1 | ( |  | ) | const

Standard_EXPORT const MeshVS_DataMapOfIntegerTwoColors& MeshVS_ElementalColorPrsBuilder::GetColors2 | ( |  | ) | const

Standard_EXPORT const MeshVS_ElementalColorPrsBuilder::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from MeshVS_PrsBuilder.

Standard_EXPORT Standard_Boolean MeshVS_ElementalColorPrsBuilder::HasColors1 | ( |  | ) | const

Standard_EXPORT Standard_Boolean MeshVS_ElementalColorPrsBuilder::HasColors2 | ( |  | ) | const

Standard_EXPORT void MeshVS_ElementalColorPrsBuilder::SetColor1 | ( | const Standard_Integer | ID,
|  | const Quantity_Color & | theColor
| ) |

Standard_EXPORT void MeshVS_ElementalColorPrsBuilder::SetColor2 | ( | const Standard_Integer | ID,
|  | const Quantity_Color & | theColor1,
|  | const Quantity_Color & | theColor2
| ) |

Standard_EXPORT void MeshVS_ElementalColorPrsBuilder::SetColor2 | ( | const Standard_Integer | ID,
|  | const MeshVS_TwoColors & | theTwoColors
| ) |

Standard_EXPORT void MeshVS_ElementalColorPrsBuilder::SetColors1 | ( | const MeshVS_DataMapOfIntegerColor & | Map | ) |

Standard_EXPORT void MeshVS_ElementalColorPrsBuilder::SetColors2 | ( | const MeshVS_DataMapOfIntegerTwoColors & | Map | ) |

## Field Documentation

MeshVS_DataMapOfIntegerColor MeshVS_ElementalColorPrsBuilder::myElemColorMap1 `[private]`

MeshVS_DataMapOfIntegerTwoColors MeshVS_ElementalColorPrsBuilder::myElemColorMap2 `[private]`

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

- MeshVS_ElementalColorPrsBuilder.hxx