Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Mark Olesen
2016-06-23 16:16:38 +02:00
4 changed files with 9 additions and 8 deletions

View File

@ -244,7 +244,8 @@ void Foam::fieldVisualisationBase::setField
const scalar position, const scalar position,
const word& colourFieldName, const word& colourFieldName,
vtkPolyDataMapper* mapper, vtkPolyDataMapper* mapper,
vtkRenderer* renderer vtkRenderer* renderer,
vtkPolyData* pData
) const ) const
{ {
mapper->InterpolateScalarsBeforeMappingOn(); mapper->InterpolateScalarsBeforeMappingOn();
@ -269,7 +270,6 @@ void Foam::fieldVisualisationBase::setField
mapper->SetScalarRange(range_.first(), range_.second()); mapper->SetScalarRange(range_.first(), range_.second());
// Set to use either cell or point data // Set to use either cell or point data
vtkPolyData* pData = mapper->GetInput();
const char* fieldName = colourFieldName.c_str(); const char* fieldName = colourFieldName.c_str();
if (pData->GetCellData()->HasArray(fieldName) == 1) if (pData->GetCellData()->HasArray(fieldName) == 1)
{ {
@ -439,7 +439,7 @@ void Foam::fieldVisualisationBase::addGlyphs
{ {
glyph->Update(); glyph->Update();
setField(position, colourFieldName, glyphMapper, renderer); setField(position, colourFieldName, glyphMapper, renderer, data);
glyphMapper->Update(); glyphMapper->Update();

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -158,7 +158,8 @@ protected:
const scalar position, const scalar position,
const word& colourFieldName, const word& colourFieldName,
vtkPolyDataMapper* mapper, vtkPolyDataMapper* mapper,
vtkRenderer* renderer vtkRenderer* renderer,
vtkPolyData* pData
) const; ) const;
//- Add glyphs //- Add glyphs

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -110,7 +110,7 @@ void Foam::functionObjectLine::addGeometryToScene
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper> mapper =
vtkSmartPointer<vtkPolyDataMapper>::New(); vtkSmartPointer<vtkPolyDataMapper>::New();
setField(position, fieldName_, mapper, renderer); setField(position, fieldName_, mapper, renderer, lines->GetOutput());
actor_->SetMapper(mapper); actor_->SetMapper(mapper);

View File

@ -137,7 +137,7 @@ void Foam::functionObjectSurface::addGeometryToScene
vtkSmartPointer<vtkPolyDataMapper>::New(); vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(surf->GetOutputPort()); mapper->SetInputConnection(surf->GetOutputPort());
setField(position, fieldName_, mapper, renderer); setField(position, fieldName_, mapper, renderer, surf->GetOutput());
surfaceActor_->SetMapper(mapper); surfaceActor_->SetMapper(mapper);