Open CASCADE Technology 6.6.0
Public Member Functions
MeshVS_NodalColorPrsBuilder Class Reference

This class provides methods to create presentation of nodes with assigned color.
There are two ways of presentation building
1. Without using texture.
In this case colors of nodes are specified with DataMapOfIntegerColor and presentation
is built with gradient fill between these nodes (default behaviour)
2. Using texture.
In this case presentation is built with spectrum filling between nodes. For example, if
one node has blue color and second one has violet color, parameters of this class may be
set to fill presentation between nodes with solar spectrum.
Methods:
UseTexture - activates/deactivates this way
SetColorMap - sets colors used for generation of texture
SetColorindices - specifies correspondence between node IDs and indices of colors from color map

#include <MeshVS_NodalColorPrsBuilder.hxx>

Inheritance diagram for MeshVS_NodalColorPrsBuilder:
Inheritance graph
[legend]

Public Member Functions

 MeshVS_NodalColorPrsBuilder (const Handle< MeshVS_Mesh > &Parent, const MeshVS_DisplayModeFlags &Flags=MeshVS_DMF_NodalColorDataPrs, const Handle< MeshVS_DataSource > &DS=0, const Standard_Integer Id=-1, const MeshVS_BuilderPriority &Priority=MeshVS_BP_NodalColor)
virtual 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 nodes with assigned color.

const
MeshVS_DataMapOfIntegerColor
GetColors () const
 Returns map of colors assigned to nodes.

void SetColors (const MeshVS_DataMapOfIntegerColor &Map)
 Sets map of colors assigned to nodes.

Standard_Boolean HasColors () const
 Returns true, if map isn't empty

Standard_Boolean GetColor (const Standard_Integer ID, Quantity_Color &theColor) const
 Returns color assigned to single node

void SetColor (const Standard_Integer ID, const Quantity_Color &theColor)
 Sets color assigned to single node

void UseTexture (const Standard_Boolean theToUse)
 Specify whether texture must be used to build presentation

Standard_Boolean IsUseTexture () const
 Verify whether texture is used to build presentation

void SetColorMap (const Aspect_SequenceOfColor &theColors)
 Set colors to be used for texrture presentation
theColors - colors for valid coordinates (laying in range [0, 1])

const Aspect_SequenceOfColorGetColorMap () const
 Return colors used for texrture presentation

void SetInvalidColor (const Quantity_Color &theInvalidColor)
 Set color representing invalid texture coordinate
(laying outside range [0, 1])

Quantity_Color GetInvalidColor () const
 Return color representing invalid texture coordinate
(laying outside range [0, 1])

void SetTextureCoords (const TColStd_DataMapOfIntegerReal &theMap)
 Specify correspondence between node IDs and texture coordinates (range [0, 1])

const
TColStd_DataMapOfIntegerReal
GetTextureCoords () const
 Get correspondence between node IDs and texture coordinates (range [0, 1])

void SetTextureCoord (const Standard_Integer theID, const Standard_Real theCoord)
 Specify correspondence between node ID and texture coordinate (range [0, 1])

Standard_Real GetTextureCoord (const Standard_Integer theID)
 Return correspondence between node IDs and texture coordinate (range [0, 1])


Constructor & Destructor Documentation

MeshVS_NodalColorPrsBuilder::MeshVS_NodalColorPrsBuilder ( const Handle< MeshVS_Mesh > &  Parent,
const MeshVS_DisplayModeFlags Flags = MeshVS_DMF_NodalColorDataPrs,
const Handle< MeshVS_DataSource > &  DS = 0,
const Standard_Integer  Id = -1,
const MeshVS_BuilderPriority Priority = MeshVS_BP_NodalColor 
)

Member Function Documentation

virtual void MeshVS_NodalColorPrsBuilder::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_Boolean MeshVS_NodalColorPrsBuilder::GetColor ( const Standard_Integer  ID,
Quantity_Color theColor 
) const
const Aspect_SequenceOfColor& MeshVS_NodalColorPrsBuilder::GetColorMap ( ) const
const MeshVS_DataMapOfIntegerColor& MeshVS_NodalColorPrsBuilder::GetColors ( ) const
Quantity_Color MeshVS_NodalColorPrsBuilder::GetInvalidColor ( ) const
Standard_Real MeshVS_NodalColorPrsBuilder::GetTextureCoord ( const Standard_Integer  theID)
const TColStd_DataMapOfIntegerReal& MeshVS_NodalColorPrsBuilder::GetTextureCoords ( ) const
Standard_Boolean MeshVS_NodalColorPrsBuilder::HasColors ( ) const
Standard_Boolean MeshVS_NodalColorPrsBuilder::IsUseTexture ( ) const
void MeshVS_NodalColorPrsBuilder::SetColor ( const Standard_Integer  ID,
const Quantity_Color theColor 
)
void MeshVS_NodalColorPrsBuilder::SetColorMap ( const Aspect_SequenceOfColor theColors)
void MeshVS_NodalColorPrsBuilder::SetColors ( const MeshVS_DataMapOfIntegerColor Map)
void MeshVS_NodalColorPrsBuilder::SetInvalidColor ( const Quantity_Color theInvalidColor)
void MeshVS_NodalColorPrsBuilder::SetTextureCoord ( const Standard_Integer  theID,
const Standard_Real  theCoord 
)
void MeshVS_NodalColorPrsBuilder::SetTextureCoords ( const TColStd_DataMapOfIntegerReal theMap)
void MeshVS_NodalColorPrsBuilder::UseTexture ( const Standard_Boolean  theToUse)

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines