Visualisation of surface data with additional routines for handling parallel distributed data. More...
Public Types | |
enum | representationType { rtNone, rtGlyph, rtWireframe, rtSurface, rtSurfaceWithEdges } |
Surface representation types. More... | |
Public Types inherited from geometryBase | |
enum | renderModeType { rmFlat, rmGouraud, rmPhong } |
Surface shading types. More... | |
Public Member Functions | |
TypeNameNoDebug ("surface") | |
Run-time type information. More... | |
declareRunTimeSelectionTable (autoPtr, surface, dictionary,(const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours),(parent, dict, colours)) | |
surface (const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours) | |
Construct from dictionary. More... | |
virtual | ~surface () |
Destructor. More... | |
virtual void | updateActors (const scalar position) |
Update the actors. More... | |
Public Member Functions inherited from geometryBase | |
geometryBase (const runTimePostProcessing &parent_, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours) | |
Construct from dictionary. More... | |
virtual | ~geometryBase () |
Destructor. More... | |
const runTimePostProcessing & | parent () const |
Return the reference to the parent function object. More... | |
bool | needsCollective () const |
May need to gather geometry parts to render on single-processor. More... | |
const word & | name () const |
Return the name. More... | |
bool | visible () const |
Return the visible flag. More... | |
bool | parallel () const |
Allow parallel rendering. More... | |
scalar | opacity (const scalar position) const |
Return the opacity. More... | |
const HashPtrTable< Function1< vector > > & | colours () const |
Return reference to the colours. More... | |
virtual void | addGeometryToScene (const scalar position, vtkRenderer *renderer)=0 |
Add geometry to scene. More... | |
virtual bool | clear ()=0 |
Clear any files used to create the object(s) More... | |
Static Public Member Functions | |
static autoPtr< surface > | New (const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours, const word &surfaceName) |
Return selected surface. More... | |
Static Public Attributes | |
static const Enum< representationType > | representationTypeNames |
Names for surface representation types. More... | |
Static Public Attributes inherited from geometryBase | |
static const Enum< renderModeType > | renderModeTypeNames |
Names for surface shading types. More... | |
static int | debug |
Debug switch. More... | |
Protected Member Functions | |
void | setRepresentation (vtkActor *actor) const |
Set the representation. More... | |
void | addFeatureEdges (vtkRenderer *renderer, vtkFeatureEdges *featureEdges) const |
Add feature edges to scene. More... | |
void | addFeatureEdges (vtkRenderer *renderer, vtkPolyData *data) const |
Add feature edges to scene. More... | |
void | addFeatureEdges (vtkRenderer *renderer, vtkCompositeDataGeometryFilter *input) const |
Add feature edges to scene. More... | |
vtkSmartPointer< vtkMultiPieceDataSet > | gatherSurfacePieces (const polySurface *surf) const |
vtkSmartPointer< vtkMultiPieceDataSet > | gatherFaceCentres (const polySurface *surf) const |
template<class Type , class GeoMeshType > | |
bool | addField (vtkDataSet *piece, const Field< Type > &fld, const word &fieldName) const |
Add field of Type to piece as VTK field data in GeoMeshType slot. More... | |
template<class Type , class GeoMeshType > | |
bool | addDimField (vtkDataSet *piece, const regIOobject *ioptr, const word &fieldName) const |
template<class GeoMeshType > | |
bool | addDimField (vtkDataSet *piece, const regIOobject *ioptr, const word &fieldName) const |
template<class Type , class GeoMeshType > | |
bool | addDimField (vtkMultiPieceDataSet *multiPiece, const DimensionedField< Type, GeoMeshType > *fldptr, const word &fieldName) const |
template<class Type , class GeoMeshType > | |
bool | addDimField (vtkMultiPieceDataSet *multiPiece, const regIOobject *ioptr, const word &fieldName) const |
template<class GeoMeshType > | |
bool | addDimField (vtkMultiPieceDataSet *multiPiece, const regIOobject *ioptr, const word &fieldName) const |
template<class GeoMeshType > | |
bool | addDimField (vtkMultiPieceDataSet *multiPiece, const polySurface *surf, const word &fieldName) const |
Add using regIOobject information obtained from surface. More... | |
surface (const surface &)=delete | |
No copy construct. More... | |
void | operator= (const surface &)=delete |
No copy assignment. More... | |
Protected Member Functions inherited from geometryBase | |
void | initialiseActor (vtkActor *actor) const |
Initialise actor. More... | |
geometryBase (const geometryBase &)=delete | |
No copy construct. More... | |
void | operator= (const geometryBase &)=delete |
No copy assignment. More... | |
Protected Attributes | |
representationType | representation_ |
Representation type. More... | |
bool | featureEdges_ |
Activate feature edges. More... | |
bool | backFaceCulling_ |
Back face culling option; default = off. More... | |
bool | frontFaceCulling_ |
Front face culling option; default = on. More... | |
autoPtr< Function1< vector > > | surfaceColour_ |
Surface colour. More... | |
autoPtr< Function1< vector > > | edgeColour_ |
Edge colour. More... | |
vtkSmartPointer< vtkActor > | surfaceActor_ |
Surface actor. More... | |
vtkSmartPointer< vtkActor > | edgeActor_ |
Edge actor. More... | |
scalar | maxGlyphLength_ |
Max glyph length for representation type rtGlyph. More... | |
Protected Attributes inherited from geometryBase | |
const runTimePostProcessing & | parent_ |
Reference to the parent function object. More... | |
word | name_ |
The surface name. More... | |
bool | visible_ |
Visible flag. More... | |
bool | parallel_ |
Allow parallel rendering. More... | |
renderModeType | renderMode_ |
Render mode. More... | |
autoPtr< Function1< scalar > > | opacity_ |
Opacity. More... | |
const HashPtrTable< Function1< vector > > & | colours_ |
Reference to the colours. More... | |
Visualisation of surface data with additional routines for handling parallel distributed data.
Dictionary controls
Property | Description | Required | Default |
---|---|---|---|
representation | none/glyph/wireframe/surface/surfaceWithEdges | yes | |
surfaceColour | Override surface colour | no | |
edgeColour | Override edge colour | no | |
featureEdges | Display surface feature edges | no | false |
maxGlyphLength | Limit for glyph representation | yes | 0 |
backFaceCulling | Cull back face | no | false |
frontFaceCulling | Cull front face | no | true |
enum representationType |
surface | ( | const runTimePostProcessing & | parent, |
const dictionary & | dict, | ||
const HashPtrTable< Function1< vector >> & | colours | ||
) |
Construct from dictionary.
Definition at line 202 of file surface.C.
References dict, and Foam::New().
|
protected |
|
protected |
Add feature edges to scene.
featureEdges->SetFeatureAngle(60);
Definition at line 136 of file surface.C.
References Foam::New().
|
protected |
Add feature edges to scene.
Definition at line 168 of file surface.C.
References Foam::New().
|
protected |
Add feature edges to scene.
Definition at line 184 of file surface.C.
References Foam::New().
|
protected |
Gather and convert polySurface to multi-piece dataset with vtkPolyData for the leaves.
If VTK is also running in parallel, each surface is left as a processor-local piece. Otherwise all processor-local surfaces are gathered onto the master in their correponding slots.
Definition at line 44 of file surfaceGather.C.
References List< T >::clear(), polySurface::faces(), Patch::mesh(), Foam::New(), points, and polySurface::points().
|
protected |
Gather and convert polySurface to multi-piece dataset with vtkPolyData for the leaves.
If VTK is also running in parallel, each surface is left as a processor-local piece. Otherwise all processor-local surfaces are gathered onto the master in their correponding slots.
Definition at line 135 of file surfaceGather.C.
References Patch::faceCentres(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceCentres(), Foam::vtk::Tools::identityVertices(), Foam::New(), polySurface::nFaces(), points, and Foam::vtk::Tools::Vertices().
|
protected |
Add field of Type to piece as VTK field data in GeoMeshType slot.
GeoMeshType distinguishes between vtkCellData and vtkPointData
piece | The VTK piece (null protected) |
fld | The field values to add |
fieldName | The field name to use |
Definition at line 36 of file surfaceTemplates.C.
References fld.
|
protected |
Attempt cast of regIOobject to DimensionedField<Type> and add to piece as VTK field data in GeoMeshType slot.
GeoMeshType distinguishes between vtkCellData and vtkPointData
piece | The VTK piece (null protected) |
ioptr | The field values to add |
fieldName | The field name to use |
Definition at line 62 of file surfaceTemplates.C.
|
protected |
Attempt cast of regIOobject to standard DimensionedField types and add to piece when possible
piece | The VTK piece (null protected) |
ioptr | The field values to add |
fieldName | The field name to use |
Definition at line 87 of file surfaceTemplates.C.
|
protected |
Add DimensionedField of Type to multi-piece as VTK field data in GeoMeshType slot (CELL | POINT).
Definition at line 121 of file surfaceTemplates.C.
References DimensionedField< Type, GeoMesh >::field(), and Foam::returnReduce().
|
protected |
Attempt cast of regIOobject to DimensionedField<Type> and add in multi-piece as VTK field data in GeoMeshType slot (CELL | POINT).
multiPiece | The VTK pieces |
ioptr | The field values to add |
fieldName | The field name to use |
Definition at line 223 of file surfaceTemplates.C.
|
protected |
Attempt cast of regIOobject to standard DimensionedField types and add when possible in GeoMeshType slot (CELL | POINT).
multiPiece | The VTK pieces |
ioptr | The field values to add |
fieldName | The field name to use |
Definition at line 240 of file surfaceTemplates.C.
|
protected |
Add using regIOobject information obtained from surface.
Definition at line 274 of file surfaceTemplates.C.
References polySurface::findFieldObject().
|
protecteddelete |
No copy assignment.
TypeNameNoDebug | ( | "surface" | ) |
Run-time type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
surface | , | ||
dictionary | , | ||
(const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours) | , | ||
(parent, dict, colours) | |||
) |
|
static |
Return selected surface.
Definition at line 254 of file surface.C.
References DebugInfo, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, and FatalIOErrorInLookup.
|
virtual |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |