mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Function objects - runTimePostProcessing - updated and exposed culling options
This commit is contained in:
@ -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;
|
||||||
@ -211,7 +215,9 @@ Foam::functionObjects::runTimePostPro::surface::surface
|
|||||||
edgeColour_(nullptr),
|
edgeColour_(nullptr),
|
||||||
surfaceActor_(),
|
surfaceActor_(),
|
||||||
edgeActor_(),
|
edgeActor_(),
|
||||||
maxGlyphLength_(0)
|
maxGlyphLength_(0),
|
||||||
|
backFaceCulling_(false),
|
||||||
|
frontFaceCulling_(true)
|
||||||
{
|
{
|
||||||
surfaceActor_ = vtkSmartPointer<vtkActor>::New();
|
surfaceActor_ = vtkSmartPointer<vtkActor>::New();
|
||||||
edgeActor_ = vtkSmartPointer<vtkActor>::New();
|
edgeActor_ = vtkSmartPointer<vtkActor>::New();
|
||||||
@ -238,6 +244,9 @@ Foam::functionObjects::runTimePostPro::surface::surface
|
|||||||
{
|
{
|
||||||
dict.readEntry("maxGlyphLength", maxGlyphLength_);
|
dict.readEntry("maxGlyphLength", maxGlyphLength_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dict.readIfPresent("backFaceCulling", backFaceCulling_);
|
||||||
|
dict.readIfPresent("frontFaceCulling", frontFaceCulling_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
@ -183,6 +185,12 @@ protected:
|
|||||||
//- Max glyph length for representation type rtGlyph
|
//- Max glyph length for representation type rtGlyph
|
||||||
scalar maxGlyphLength_;
|
scalar maxGlyphLength_;
|
||||||
|
|
||||||
|
//- Back face culling option; default = off
|
||||||
|
bool backFaceCulling_;
|
||||||
|
|
||||||
|
//- Front face culling option; default = on
|
||||||
|
bool frontFaceCulling_;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user