Go to the documentation of this file.
32 #include "vtkFeatureEdges.h"
33 #include "vtkPolyData.h"
34 #include "vtkPolyDataMapper.h"
35 #include "vtkProperty.h"
36 #include "vtkRenderer.h"
37 #include "vtkSmartPointer.h"
71 actor->VisibilityOff();
77 actor->GetProperty()->SetRepresentationToWireframe();
83 actor->GetProperty()->SetRepresentationToSurface();
88 actor->GetProperty()->SetRepresentationToSurface();
89 actor->GetProperty()->EdgeVisibilityOn();
98 vtkRenderer* renderer,
107 vtkSmartPointer<vtkFeatureEdges> featureEdges =
109 featureEdges->SetInputData(
data);
110 featureEdges->BoundaryEdgesOn();
111 featureEdges->FeatureEdgesOn();
112 featureEdges->ManifoldEdgesOff();
113 featureEdges->NonManifoldEdgesOff();
115 featureEdges->ColoringOff();
116 featureEdges->Update();
118 vtkSmartPointer<vtkPolyDataMapper> mapper =
120 mapper->SetInputConnection(featureEdges->GetOutputPort());
121 mapper->ScalarVisibilityOff();
123 edgeActor_->GetProperty()->SetSpecular(0);
124 edgeActor_->GetProperty()->SetSpecularPower(20);
125 edgeActor_->GetProperty()->SetRepresentationToWireframe();
126 edgeActor_->SetMapper(mapper);
128 renderer->AddActor(edgeActor_);
144 representationTypeNames.read(
dict.
lookup(
"representation"))
146 featureEdges_(
false),
147 surfaceColour_(NULL),
165 surfaceColour_.reset(colours[
"surface"]->clone().ptr());
174 edgeColour_.reset(colours[
"edge"]->clone().ptr());
177 if (representation_ == rtGlyph)
179 dict.
lookup(
"maxGlyphLength") >> maxGlyphLength_;
195 const word& surfaceType
200 Info<<
"Selecting surface " << surfaceType <<
endl;
203 dictionaryConstructorTable::iterator cstrIter =
204 dictionaryConstructorTablePtr_->find(surfaceType);
206 if (cstrIter == dictionaryConstructorTablePtr_->end())
209 <<
"Unknown surface type "
210 << surfaceType <<
nl <<
nl
211 <<
"Valid surface types are:" <<
endl
212 << dictionaryConstructorTablePtr_->sortedToc()
235 edgeActor_->GetProperty()->SetLineWidth(2);
236 edgeActor_->GetProperty()->SetOpacity(opacity(position));
238 const vector colour = edgeColour_->value(position);
239 edgeActor_->GetProperty()->SetColor
245 edgeActor_->GetProperty()->SetEdgeColor
virtual void updateActors(const scalar position)
Update the actors.
surface(const surface &)
Disallow default bitwise copy construct.
A class for handling words, derived from string.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
static const NamedEnum< representationType, 5 > representationTypeNames
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
representationType representation_
Representation type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~surface()
Destructor.
Function object to generate images during run-time.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static autoPtr< surface > New(const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< DataEntry< vector >, word > &colours, const word &surfaceName)
Return a reference to the selected RAS model.
errorManipArg< error, int > exit(error &err, const int errNo=1)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void setRepresentation(vtkActor *actor) const
Set the representation.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A HashTable specialization for hashing pointers.
void addFeatureEdges(vtkRenderer *renderer, vtkPolyData *data) const
Add feature edges to scene.
void initialiseActor(vtkActor *actor) const
Initialse actor.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
defineTypeNameAndDebug(combustionModel, 0)
Database for solution data, solver performance and other reduced data.
Initialise the NamedEnum HashTable from the static list of names.