geometrySurface Class Reference

Read and visualize surface geometry files. More...

Inheritance diagram for geometrySurface:
[legend]
Collaboration diagram for geometrySurface:
[legend]

Public Member Functions

 TypeName ("geometry")
 Run-time type information. More...
 
 geometrySurface (const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours)
 Construct from dictionary. More...
 
 geometrySurface (const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours, const List< fileName > &fileNames)
 Construct from components. More...
 
virtual ~geometrySurface ()=default
 Destructor. More...
 
virtual void addGeometryToScene (const scalar position, vtkRenderer *renderer)
 Add geometry surface(s) to scene. More...
 
virtual void updateActors (const scalar position)
 Update actors. More...
 
virtual bool clear ()
 Clear files used to create the object(s) - no-op. More...
 
- Public Member Functions inherited from surface
 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...
 
- 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 runTimePostProcessingparent () 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 wordname () 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...
 

Protected Member Functions

void addGeometryToScene (const scalar position, vtkRenderer *renderer, const fileName &fName) const
 Add surface (file) to scene. More...
 
 geometrySurface (const geometrySurface &)=delete
 No copy construct. More...
 
void operator= (const geometrySurface &)=delete
 No copy assignment. More...
 
- Protected Member Functions inherited from surface
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

List< fileNamefileNames_
 File names. More...
 
- Protected Attributes inherited from surface
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 runTimePostProcessingparent_
 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...
 

Additional Inherited Members

- Public Types inherited from surface
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...
 
- Static Public Member Functions inherited from surface
static autoPtr< surfaceNew (const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< Function1< vector >> &colours, const word &surfaceName)
 Return selected surface. More...
 
- Static Public Attributes inherited from surface
static const Enum< representationTyperepresentationTypeNames
 Names for surface representation types. More...
 
- Static Public Attributes inherited from geometryBase
static const Enum< renderModeTyperenderModeTypeNames
 Names for surface shading types. More...
 
static int debug
 Debug switch. More...
 

Detailed Description

Read and visualize surface geometry files.

Dictionary controls

Property Description Required Default
type The type: geometry yes
files The files to read yes

Standard file types (vtk, vtp, obj, stl, stlb) are read with the VTK-native readers. Other file types use the OpenFOAM surfMesh readers and convert to VTK.

Source files

Definition at line 83 of file geometrySurface.H.

Constructor & Destructor Documentation

◆ geometrySurface() [1/3]

geometrySurface ( const geometrySurface )
protecteddelete

No copy construct.

◆ geometrySurface() [2/3]

geometrySurface ( const runTimePostProcessing parent,
const dictionary dict,
const HashPtrTable< Function1< vector >> &  colours 
)

Construct from dictionary.

Definition at line 193 of file geometrySurface.C.

References dict.

◆ geometrySurface() [3/3]

geometrySurface ( const runTimePostProcessing parent,
const dictionary dict,
const HashPtrTable< Function1< vector >> &  colours,
const List< fileName > &  fileNames 
)

Construct from components.

Definition at line 207 of file geometrySurface.C.

◆ ~geometrySurface()

virtual ~geometrySurface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addGeometryToScene() [1/2]

void addGeometryToScene ( const scalar  position,
vtkRenderer *  renderer,
const fileName fName 
) const
protected

Add surface (file) to scene.

Definition at line 144 of file geometrySurface.C.

References DebugInfo, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::New(), and Foam::nl.

Here is the call graph for this function:

◆ operator=()

void operator= ( const geometrySurface )
protecteddelete

No copy assignment.

◆ TypeName()

TypeName ( "geometry"  )

Run-time type information.

◆ addGeometryToScene() [2/2]

void addGeometryToScene ( const scalar  position,
vtkRenderer *  renderer 
)
virtual

Add geometry surface(s) to scene.

Implements geometryBase.

Reimplemented in geometryPatches, and functionObjectSurface.

Definition at line 222 of file geometrySurface.C.

References Foam::addGeometryToScene(), and f().

Here is the call graph for this function:

◆ updateActors()

void updateActors ( const scalar  position)
virtual

Update actors.

Reimplemented from surface.

Reimplemented in geometryPatches.

Definition at line 241 of file geometrySurface.C.

References Foam::updateActors().

Here is the call graph for this function:

◆ clear()

bool clear ( )
virtual

Clear files used to create the object(s) - no-op.

Implements geometryBase.

Reimplemented in geometryPatches, and functionObjectSurface.

Definition at line 262 of file geometrySurface.C.

Member Data Documentation

◆ fileNames_

List<fileName> fileNames_
protected

File names.

Definition at line 92 of file geometrySurface.H.


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