Go to the documentation of this file.
34 #include "vtkPolyDataMapper.h"
35 #include "vtkProperty.h"
36 #include "vtkRenderer.h"
37 #include "vtkSmartPointer.h"
38 #include "vtkTubeFilter.h"
39 #include "vtkLookupTable.h"
45 namespace functionObjects
47 namespace runTimePostPro
61 { representationType::rtNone,
"none" },
62 { representationType::rtLine,
"line" },
63 { representationType::rtTube,
"tube" },
64 { representationType::rtVector,
"vector" },
77 geometryBase::initialiseActor(actor);
79 vector colour = lineColour_->value(framei);
80 actor->GetProperty()->SetColor(colour[0], colour[1], colour[2]);
82 vtkPolyDataMapper* mapper =
83 vtkPolyDataMapper::SafeDownCast(actor->GetMapper());
85 switch (representation_)
89 actor->VisibilityOff();
94 mapper->SetInputData(
data);
101 tubes->SetInputData(
data);
102 tubes->SetRadius(tubeRadius_);
103 tubes->SetNumberOfSides(20);
107 mapper->SetInputConnection(tubes->GetOutputPort());
131 representationTypeNames.get(
"representation",
dict)
136 if (
dict.found(
"lineColour"))
142 lineColour_.reset(colours[
"line"]->clone().ptr());
145 switch (representation_)
157 dict.readEntry(
"tubeRadius", tubeRadius_);
176 const word& pathlineType
181 auto cstrIter = dictionaryConstructorTablePtr_->cfind(pathlineType);
183 if (!cstrIter.found())
190 *dictionaryConstructorTablePtr_
static const Enum< representationType > representationTypeNames
Names for line representations.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A class for handling words, derived from Foam::string.
void addLines(const label framei, vtkActor *actor, vtkPolyData *data) const
Add the pathlines to the renderer.
static autoPtr< pathline > New(const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours, const word &pathlineName)
Return selected pathline.
representationType
Line representations.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Generate images during run-time.
pathline(const pathline &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Base class for surface, text handling etc.
#define DebugInfo
Report an information message using Foam::Info.
A HashTable of pointers to objects of type <T>.
defineTypeName(contourFilter)
virtual ~pathline()
Destructor.
defineRunTimeSelectionTable(pathline, dictionary)
Database for solution data, solver performance and other reduced data.