Go to the documentation of this file.
33 #include "vtkPolyDataMapper.h"
34 #include "vtkPolyDataReader.h"
35 #include "vtkProperty.h"
36 #include "vtkRenderer.h"
37 #include "vtkSmartPointer.h"
63 dict.lookup(
"functionObject") >> functionObject_;
78 const scalar position,
99 <<
"Unable to find function object " << functionObject_
100 <<
" output for field " << fieldName_
101 <<
". Surface will not be processed"
107 if (representation_ == rtGlyph)
109 vtkSmartPointer<vtkPolyDataReader> surf =
111 surf->SetFileName(fName.c_str());
127 if ((colourBy_ == cbField) && (fName.
ext() ==
"vtk"))
129 vtkSmartPointer<vtkPolyDataReader> surf =
131 surf->SetFileName(fName.c_str());
134 addFeatureEdges(renderer, surf->GetOutput());
136 vtkSmartPointer<vtkPolyDataMapper> mapper =
138 mapper->SetInputConnection(surf->GetOutputPort());
140 setField(position, fieldName_, mapper, renderer);
142 surfaceActor_->SetMapper(mapper);
144 setRepresentation(surfaceActor_);
146 renderer->AddActor(surfaceActor_);
const runTimePostProcessing & parent_
Reference to the parent function object.
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)
A class for handling file names.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
void addGeometryToScene(const scalar position, vtkRenderer *renderer, const fileName &fName) const
Add surface (file) to scene.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Function object to generate images during run-time.
functionObjectSurface(const functionObjectSurface &)
Disallow default bitwise copy construct.
surfacesMesh setField(triSurfaceToAgglom)
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
word ext() const
Return file name extension (part after last .)
A HashTable specialization for hashing pointers.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual ~functionObjectSurface()
Destructor.
Type getObjectProperty(const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
Retrieve generic property from named object.
virtual void addGeometryToScene(const scalar position, vtkRenderer *renderer)
Add surface(s) to scene.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
static const dictionary null
Null dictionary.