Commit f4693076 authored by Andrew Heather's avatar Andrew Heather

ENH: Function objects - runTimePostProcessing - updated and exposed culling options

parent 8de57623
...@@ -115,11 +115,15 @@ void Foam::functionObjects::runTimePostPro::surface::setRepresentation ...@@ -115,11 +115,15 @@ void Foam::functionObjects::runTimePostPro::surface::setRepresentation
case rtGlyph: case rtGlyph:
case rtSurface: case rtSurface:
{ {
actor->GetProperty()->SetBackfaceCulling(backFaceCulling_);
actor->GetProperty()->SetFrontfaceCulling(frontFaceCulling_);
actor->GetProperty()->SetRepresentationToSurface(); actor->GetProperty()->SetRepresentationToSurface();
break; break;
} }
case rtSurfaceWithEdges: case rtSurfaceWithEdges:
{ {
actor->GetProperty()->SetBackfaceCulling(backFaceCulling_);
actor->GetProperty()->SetFrontfaceCulling(frontFaceCulling_);
actor->GetProperty()->SetRepresentationToSurface(); actor->GetProperty()->SetRepresentationToSurface();
actor->GetProperty()->EdgeVisibilityOn(); actor->GetProperty()->EdgeVisibilityOn();
break; break;
...@@ -207,6 +211,8 @@ Foam::functionObjects::runTimePostPro::surface::surface ...@@ -207,6 +211,8 @@ Foam::functionObjects::runTimePostPro::surface::surface
representationTypeNames.get("representation", dict) representationTypeNames.get("representation", dict)
), ),
featureEdges_(dict.getOrDefault("featureEdges", false)), featureEdges_(dict.getOrDefault("featureEdges", false)),
backFaceCulling_(dict.getOrDefault("backFaceCulling", false)),
frontFaceCulling_(dict.getOrDefault("frontFaceCulling", true)),
surfaceColour_(nullptr), surfaceColour_(nullptr),
edgeColour_(nullptr), edgeColour_(nullptr),
surfaceActor_(), surfaceActor_(),
......
...@@ -38,6 +38,8 @@ Description ...@@ -38,6 +38,8 @@ Description
edgeColour | Override edge colour | no | edgeColour | Override edge colour | no |
featureEdges | Display surface feature edges | no | false featureEdges | Display surface feature edges | no | false
maxGlyphLength | Limit for glyph representation | yes | 0 maxGlyphLength | Limit for glyph representation | yes | 0
backFaceCulling | Cull back face | no | false
frontFaceCulling | Cull front face | no | true
\endtable \endtable
SourceFiles SourceFiles
...@@ -168,6 +170,12 @@ protected: ...@@ -168,6 +170,12 @@ protected:
//- Activate feature edges //- Activate feature edges
bool featureEdges_; bool featureEdges_;
//- Back face culling option; default = off
bool backFaceCulling_;
//- Front face culling option; default = on
bool frontFaceCulling_;
//- Surface colour //- Surface colour
autoPtr<Function1<vector>> surfaceColour_; autoPtr<Function1<vector>> surfaceColour_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment