Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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
More...

#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])


Detailed Description

  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

Constructor & Destructor Documentation


Member Function Documentation

Implements MeshVS_PrsBuilder.


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