Base class for surface, text handling etc. More...
Public Types | |
enum | renderModeType { rmFlat, rmGouraud, rmPhong } |
Surface shading types. More... | |
Public Member Functions | |
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 void | updateActors (const scalar position)=0 |
Update the actors. More... | |
virtual bool | clear ()=0 |
Clear any files used to create the object(s) More... | |
Static Public Attributes | |
static const Enum< renderModeType > | renderModeTypeNames |
Names for surface shading types. More... | |
static int | debug |
Debug switch. More... | |
Protected Member Functions | |
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 | |
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... | |
Base class for surface, text handling etc.
Dictionary controls
Property | Description | Required | Default |
---|---|---|---|
visible | Display the object | no | yes |
renderMode | Shading (flat/gouraud/phong) | no | gouraud |
opacity | Object opacity | no | 1.0 |
parallel | Allow parallel rendering | no | true |
Definition at line 101 of file geometryBase.H.
enum renderModeType |
Surface shading types.
Enumerator | |
---|---|
rmFlat | Flat shading. |
rmGouraud | Gouraud shading. |
rmPhong | Phong shading. |
Definition at line 108 of file geometryBase.H.
|
protecteddelete |
No copy construct.
geometryBase | ( | const runTimePostProcessing & | parent_, |
const dictionary & | dict, | ||
const HashPtrTable< Function1< vector >> & | colours | ||
) |
|
virtual |
Destructor.
Definition at line 134 of file geometryBase.C.
|
protected |
Initialise actor.
Definition at line 64 of file geometryBase.C.
|
protecteddelete |
No copy assignment.
const Foam::functionObjects::runTimePostProcessing & parent | ( | ) | const |
Return the reference to the parent function object.
Definition at line 141 of file geometryBase.C.
bool needsCollective | ( | ) | const |
May need to gather geometry parts to render on single-processor.
True when OpenFOAM is running in parallel but VTK is not.
Definition at line 148 of file geometryBase.C.
References UPstream::parRun().
const Foam::word & name | ( | ) | const |
Return the name.
Definition at line 155 of file geometryBase.C.
|
inline |
Return the visible flag.
Definition at line 190 of file geometryBase.H.
References geometryBase::visible_.
|
inline |
Allow parallel rendering.
Definition at line 196 of file geometryBase.H.
References geometryBase::parallel_.
Foam::scalar opacity | ( | const scalar | position | ) | const |
Return the opacity.
Definition at line 162 of file geometryBase.C.
const Foam::HashPtrTable< Foam::Function1< Foam::vector >, Foam::word > & colours | ( | ) | const |
Return reference to the colours.
Definition at line 171 of file geometryBase.C.
|
pure virtual |
Add geometry to scene.
Implemented in text, geometryCloud, cuttingPlaneFilter, functionObjectCloud, geometryPatches, contourFilter, geometrySurface, functionObjectSurface, and functionObjectLine.
|
pure virtual |
Update the actors.
Implemented in surface, text, geometryCloud, functionObjectCloud, geometryPatches, geometrySurface, and functionObjectLine.
|
pure virtual |
Clear any files used to create the object(s)
Implemented in text, geometryCloud, cuttingPlaneFilter, functionObjectCloud, geometryPatches, geometrySurface, contourFilter, functionObjectSurface, and functionObjectLine.
|
static |
Names for surface shading types.
Definition at line 116 of file geometryBase.H.
|
protected |
Reference to the parent function object.
Definition at line 124 of file geometryBase.H.
Referenced by text::addGeometryToScene().
|
protected |
The surface name.
Definition at line 127 of file geometryBase.H.
|
protected |
|
protected |
Allow parallel rendering.
Definition at line 133 of file geometryBase.H.
Referenced by geometryBase::parallel().
|
protected |
Render mode.
Definition at line 136 of file geometryBase.H.
Opacity.
Definition at line 139 of file geometryBase.H.
|
protected |
Reference to the colours.
Definition at line 142 of file geometryBase.H.
|
static |
Debug switch.
Definition at line 160 of file geometryBase.H.
Referenced by runTimePostProcessing::read().