Commit 4dee0274 authored by Dan Lipsa's avatar Dan Lipsa

Redesign "vtkGhostLevels" arrays and related ghost functionalties.

Co-authored-by: default avatarYuanxin Liu <leo.liu@kitware.com>
Co-authored-by: Berk Geveci's avatarBerk Geveci <berk.geveci@kitware.com>

 -The semantics of each unsigned char in the ghost arrays changes:
  Instead of storing a numeric value representing how far a cell is
  from the boundary, it is now a bit field specified by
  vtkDataSetAttributes::CellGhostTypes and
  vtkDataSetAttributes::PointGhostTypes.  The bit field is consistent
  with VisIt specs.

- Previously, filters strip all ghost cells they request from upstream
  before finalizing the output. This is no longer done.

- vtkUniform grids previously supported blanking through member arrays
  vtkUniformGrid::CellVisibility and
  vtkUniformGrid::PointVisibility. These arrays are removed and the
  blanking functionality are supported through the new ghost arrays
  instead.

- the "vtkGhostLevel" arrays for cell and point data are renamed to
  vtkDataSetAttributes::GhostArrayName() ("vtkGhostType").

- the version for VTK Legacy files is increased to 4.0 and the version for
  VTK XML files is increased to 2.0. When reading older files we
  convert vtkGhostLevels array to vtkGhostType.
parent 1424cab4
......@@ -161,7 +161,6 @@ set(Module_SRCS
vtkStructuredGrid.cxx
vtkStructuredPointsCollection.cxx
vtkStructuredPoints.cxx
vtkStructuredVisibilityConstraint.cxx
vtkSuperquadric.cxx
vtkTable.cxx
vtkTensor.cxx
......
......@@ -34,6 +34,72 @@
#define JMAX(ext) ext[3]
#define KMIN(ext) ext[4]
#define KMAX(ext) ext[5]
#define PRINT(x) cout<<"("<<myRank<<")"<<x<<endl;
namespace
{
void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx, std::vector<std::vector<unsigned int> >& children,
const std::vector<int>& processMap)
{
unsigned int numDataSets = amr->GetNumberOfDataSets(levelIdx);
int N;
for( unsigned int dataSetIdx=0; dataSetIdx<numDataSets; dataSetIdx++)
{
const vtkAMRBox& box = amr->GetAMRBox(levelIdx, dataSetIdx);
vtkUniformGrid* grid = amr->GetDataSet(levelIdx, dataSetIdx);
if (grid == NULL )
{
continue;
}
N = grid->GetNumberOfCells();
vtkUnsignedCharArray *ghosts = vtkUnsignedCharArray::New();
ghosts->SetNumberOfTuples(N);
ghosts->FillComponent(0, 0);
ghosts->SetName(vtkDataSetAttributes::GhostArrayName());
if (children.size() > dataSetIdx)
{
std::vector<unsigned int>& dsChildren = children[dataSetIdx];
std::vector<unsigned int>::iterator iter;
// For each higher res box fill in the cells that
// it covers
for (iter=dsChildren.begin(); iter!=dsChildren.end(); iter++)
{
vtkAMRBox ibox;;
int childGridIndex = amr->GetCompositeIndex(levelIdx+1, *iter);
if(processMap[childGridIndex]<0)
{
continue;
}
if (amr->GetAMRInfo()->GetCoarsenedAMRBox(levelIdx+1, *iter, ibox))
{
ibox.Intersect(box);
const int *loCorner=ibox.GetLoCorner();
int hi[3];
ibox.GetValidHiCorner(hi);
for( int iz=loCorner[2]; iz<=hi[2]; iz++ )
{
for( int iy=loCorner[1]; iy<=hi[1]; iy++ )
{
for( int ix=loCorner[0]; ix<=hi[0]; ix++ )
{
vtkIdType id = vtkAMRBox::GetCellLinearIndex(box,ix, iy, iz, grid->GetDimensions());
ghosts->SetValue(id, ghosts->GetValue(id) | vtkDataSetAttributes::REFINEDCELL);
} // END for x
} // END for y
} // END for z
}
} // Processing all higher boxes for a specific coarse grid
}
grid->GetCellData()->AddArray(ghosts);
ghosts->Delete();
}
}
};
//------------------------------------------------------------------------------
void vtkAMRUtilities::PrintSelf( std::ostream& os, vtkIndent indent )
......@@ -408,47 +474,48 @@ void vtkAMRUtilities::BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
}
N = grid->GetNumberOfCells();
vtkUnsignedCharArray* vis = vtkUnsignedCharArray::New();
vis->SetName("visibility");
vis->SetNumberOfTuples( N );
vis->FillComponent(0,static_cast<char>(1));
grid->SetCellVisibilityArray(vis);
vis->Delete();
if (children.size() <= dataSetIdx)
continue;
std::vector<unsigned int>& dsChildren = children[dataSetIdx];
std::vector<unsigned int>::iterator iter;
vtkUnsignedCharArray *ghosts = vtkUnsignedCharArray::New();
ghosts->SetNumberOfTuples(N);
ghosts->FillComponent(0, 0);
ghosts->SetName(vtkDataSetAttributes::GhostArrayName());
// For each higher res box fill in the cells that
// it covers
for (iter=dsChildren.begin(); iter!=dsChildren.end(); iter++)
if (children.size() > dataSetIdx)
{
vtkAMRBox ibox;;
int childGridIndex = amr->GetCompositeIndex(levelIdx+1, *iter);
if(processMap[childGridIndex]<0)
{
continue;
}
if (amr->GetAMRInfo()->GetCoarsenedAMRBox(levelIdx+1, *iter, ibox))
std::vector<unsigned int>& dsChildren = children[dataSetIdx];
std::vector<unsigned int>::iterator iter;
// For each higher res box fill in the cells that
// it covers
for (iter=dsChildren.begin(); iter!=dsChildren.end(); iter++)
{
ibox.Intersect(box);
const int *loCorner=ibox.GetLoCorner();
int hi[3];
ibox.GetValidHiCorner(hi);
for( int iz=loCorner[2]; iz<=hi[2]; iz++ )
vtkAMRBox ibox;;
int childGridIndex = amr->GetCompositeIndex(levelIdx+1, *iter);
if(processMap[childGridIndex]<0)
{
continue;
}
if (amr->GetAMRInfo()->GetCoarsenedAMRBox(levelIdx+1, *iter, ibox))
{
for( int iy=loCorner[1]; iy<=hi[1]; iy++ )
ibox.Intersect(box);
const int *loCorner=ibox.GetLoCorner();
int hi[3];
ibox.GetValidHiCorner(hi);
for( int iz=loCorner[2]; iz<=hi[2]; iz++ )
{
for( int ix=loCorner[0]; ix<=hi[0]; ix++ )
for( int iy=loCorner[1]; iy<=hi[1]; iy++ )
{
vtkIdType id = vtkAMRBox::GetCellLinearIndex(box,ix, iy, iz, grid->GetDimensions());
vis->SetValue(id, 0);
} // END for x
} // END for y
} // END for z
}
} // Processing all higher boxes for a specific coarse grid
for( int ix=loCorner[0]; ix<=hi[0]; ix++ )
{
vtkIdType id = vtkAMRBox::GetCellLinearIndex(box,ix, iy, iz, grid->GetDimensions());
ghosts->SetValue(id, ghosts->GetValue(id) | vtkDataSetAttributes::REFINEDCELL);
} // END for x
} // END for y
} // END for z
}
} // Processing all higher boxes for a specific coarse grid
}
grid->GetCellData()->AddArray(ghosts);
ghosts->Delete();
}
}
This diff is collapsed.
......@@ -47,6 +47,8 @@ class vtkCellTypes;
class vtkGenericCell;
class vtkIdList;
class vtkPointData;
class vtkUnsignedCharArray;
class vtkCallbackCommand;
class VTKCOMMONDATAMODEL_EXPORT vtkDataSet : public vtkDataObject
{
......@@ -330,10 +332,10 @@ public:
int CheckAttributes();
// Description:
// Normally called by pipeline executives or algoritgms only. This method
// Normally called by pipeline executives or algoritms only. This method
// computes the ghost arrays for a given dataset. The zeroExt argument
// specifies the extent of the region which ghost level = 0.
virtual void GenerateGhostLevelArray(int zeroExt[6]);
// specifies the extent of the region which ghost type = 0.
virtual void GenerateGhostArray(int zeroExt[6]);
//BTX
// Description:
......@@ -353,6 +355,55 @@ public:
// Get the number of elements for a specific attribute type (POINT, CELL, etc.).
virtual vtkIdType GetNumberOfElements(int type);
// Description:
// Returns 1 if there are any ghost cells
// 0 otherwise.
bool HasAnyGhostCells();
// Description:
// Returns 1 if there are any ghost points
// 0 otherwise.
bool HasAnyGhostPoints();
// Description:
// Returns 1 if there are any blanking cells
// 0 otherwise. Blanking is supported only for vtkStructuredGrid
// and vtkUniformGrid
virtual bool HasAnyBlankCells()
{
return 0;
}
// Description:
// Returns 1 if there are any blanking points
// 0 otherwise. Blanking is supported only for vtkStructuredGrid
// and vtkUniformGrid
virtual bool HasAnyBlankPoints()
{
return 0;
}
// Description:
// Gets the array that defines the ghost type of each point.
// We cache the pointer to the array to save a lookup involving string comparisons
vtkUnsignedCharArray* GetPointGhostArray();
// Description:
// Updates the pointer to the point ghost array.
void UpdatePointGhostArrayCache();
// Description:
// Allocate ghost array for points.
vtkUnsignedCharArray* AllocatePointGhostArray();
// Description:
// Get the array that defines the ghost type of each cell.
// We cache the pointer to the array to save a lookup involving string comparisons
vtkUnsignedCharArray* GetCellGhostArray();
// Description:
// Updates the pointer to the cell ghost array.
void UpdateCellGhostArrayCache();
// Description:
// Allocate ghost array for cells.
vtkUnsignedCharArray* AllocateCellGhostArray();
protected:
// Constructor with default bounds (0,1, 0,1, 0,1).
vtkDataSet();
......@@ -363,8 +414,14 @@ protected:
// only if the cache became invalid (ScalarRangeComputeTime).
virtual void ComputeScalarRange();
// Description:
// Helper function that tests if any of the values in 'a' have bitFlag set.
// The test performed is (value & bitFlag).
bool IsAnyBitSet(vtkUnsignedCharArray *a, int bitFlag);
vtkCellData *CellData; // Scalars, vectors, etc. associated w/ each cell
vtkPointData *PointData; // Scalars, vectors, etc. associated w/ each point
vtkCallbackCommand *DataObserver; // Observes changes to cell/point data
vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
double Center[3];
......@@ -375,8 +432,21 @@ protected:
// Time at which scalar range is computed
vtkTimeStamp ScalarRangeComputeTime;
// Description:
// These arrays pointers are caches used to avoid a string comparision (when
// getting ghost arrays using GetArray(name))
vtkUnsignedCharArray* PointGhostArray;
vtkUnsignedCharArray* CellGhostArray;
private:
void InternalDataSetCopy(vtkDataSet *src);
// Description:
// Called when point/cell data is modified
// Updates caches to point/cell ghost arrays.
static void OnDataModified(
vtkObject* source, unsigned long eid, void* clientdata, void *calldata);
//BTX
friend class vtkImageAlgorithmToDataSetFriendship;
//ETX
......
......@@ -103,6 +103,33 @@ public:
};
//ETX
// ----------- ghost points and ghost cells -------------------------------------------
//The following bit fields are consistent with VisIt ghost zones specification
//For details, see http://www.visitusers.org/index.php?title=Representing_ghost_data
enum CellGhostTypes
{
DUPLICATECELL = 1, //the cell is present on multiple processors
HIGHCONNECTIVITYCELL = 2, //the cell has more neighbors than in a regular mesh
LOWCONNECTIVITYCELL = 4, //the cell has less neighbors than in a regular mesh
REFINEDCELL = 8, //other cells are present that refines it.
EXTERIORCELL = 16, //the cell is on the exterior of the data set
HIDDENCELL = 32 //the cell is needed to maintain connectivity, but the data values should be ignored.
};
enum PointGhostTypes
{
DUPLICATEPOINT =1, //the cell is present on multiple processors
HIDDENPOINT =2 //the point is needed to maintain connectivity, but the data values should be ignored.
};
//A vtkDataArray with this name must be of type vtkUnsignedCharArray.
//Each value must be assigned according to the bit fields described in
//PointGhostTypes or CellGhostType
static const char* GhostArrayName() { return "vtkGhostType";}
//-----------------------------------------------------------------------------------
// Description:
// Set/Get the scalar data.
int SetScalars(vtkDataArray* da);
......
......@@ -304,10 +304,6 @@ void vtkFieldData::AllocateArrays(int num)
{
return;
}
else
{
this->Modified();
}
if ( num == 0 )
{
......@@ -346,6 +342,7 @@ void vtkFieldData::AllocateArrays(int num)
this->Data = data;
this->NumberOfArrays = num;
}
this->Modified();
}
//----------------------------------------------------------------------------
......@@ -372,7 +369,6 @@ void vtkFieldData::SetArray(int i, vtkAbstractArray *data)
if ( this->Data[i] != data )
{
this->Modified();
if ( this->Data[i] != NULL )
{
this->Data[i]->UnRegister(this);
......@@ -382,6 +378,7 @@ void vtkFieldData::SetArray(int i, vtkAbstractArray *data)
{
this->Data[i]->Register(this);
}
this->Modified();
}
}
......@@ -398,7 +395,7 @@ vtkDataArray *vtkFieldData::GetArray(int i)
// if range.
vtkAbstractArray *vtkFieldData::GetAbstractArray(int i)
{
if ( i < 0 || i >= this->GetNumberOfArrays() )
if ( i < 0 || i >= this->GetNumberOfArrays() || this->Data == NULL)
{
return 0;
}
......
......@@ -3034,13 +3034,13 @@ int vtkKdTree::NewGeometry(vtkDataSet **sets, int numSets)
{
newGeometry = 1;
}
else if (ug->GetPointVisibilityArray()->GetMTime() >
this->BuildTime)
else if (ug->GetPointGhostArray()
&& ug->GetPointGhostArray()->GetMTime() > this->BuildTime)
{
newGeometry = 1;
}
else if (ug->GetCellVisibilityArray()->GetMTime() >
this->BuildTime)
else if (ug->GetCellGhostArray()
&& ug->GetCellGhostArray()->GetMTime() > this->BuildTime)
{
newGeometry = 1;
}
......
......@@ -20,6 +20,7 @@
#include "vtkUniformGrid.h"
#include "vtkInformationIdTypeKey.h"
#include "vtkCellData.h"
#include "vtkDataSetAttributes.h"
#include <vector>
vtkStandardNewMacro(vtkOverlappingAMR);
......@@ -207,7 +208,7 @@ void vtkOverlappingAMR::Audit()
for(iter->GoToFirstItem(); !iter->IsDoneWithTraversal(); iter->GoToNextItem())
{
vtkUniformGrid* grid = vtkUniformGrid::SafeDownCast(iter->GetCurrentDataObject());
bool hasGhost = grid->GetCellData()->GetArray("vtkGhostLevels")!=NULL;
int hasGhost = grid->HasAnyGhostCells();
unsigned int level = iter->GetCurrentLevel();
unsigned int id = iter->GetCurrentIndex();
......
......@@ -1868,23 +1868,22 @@ void vtkPolyData::DeepCopy(vtkDataObject *dataObject)
}
}
void vtkPolyData::RemoveGhostCells(int level)
void vtkPolyData::RemoveGhostCells()
{
// Get a pointer to the cell ghost level array.
vtkUnsignedCharArray* temp = vtkUnsignedCharArray::SafeDownCast(
this->CellData->GetArray("vtkGhostLevels"));
vtkUnsignedCharArray* temp = this->GetCellGhostArray();
if (temp == NULL)
{
vtkDebugMacro("Could not find cell ghost level array.");
vtkDebugMacro("Could not find cell ghost array.");
return;
}
if (temp->GetNumberOfComponents() != 1 ||
temp->GetNumberOfTuples() < this->GetNumberOfCells())
{
vtkErrorMacro("Poorly formed ghost level array.");
vtkErrorMacro("Poorly formed ghost array.");
return;
}
unsigned char* cellGhostLevels = temp->GetPointer(0);
unsigned char* cellGhosts = temp->GetPointer(0);
vtkIdType numCells = this->GetNumberOfCells();
......@@ -1951,7 +1950,7 @@ void vtkPolyData::RemoveGhostCells(int level)
{
verts->GetNextCell(n, pts);
if (int(cellGhostLevels[i]) < level)
if (! (cellGhosts[i] & vtkDataSetAttributes::DUPLICATECELL))
{
cellId = this->InsertNextCell(type, n, pts);
newCellData->CopyData(this->CellData, i, cellId);
......@@ -1961,7 +1960,7 @@ void vtkPolyData::RemoveGhostCells(int level)
{
lines->GetNextCell(n, pts);
if (int(cellGhostLevels[i]) < level)
if (! (cellGhosts[i] & vtkDataSetAttributes::DUPLICATECELL))
{
cellId = this->InsertNextCell(type, n, pts);
newCellData->CopyData(this->CellData, i, cellId);
......@@ -1971,7 +1970,7 @@ void vtkPolyData::RemoveGhostCells(int level)
{
polys->GetNextCell(n, pts);
if (int(cellGhostLevels[i]) < level)
if (! (cellGhosts[i] & vtkDataSetAttributes::DUPLICATECELL))
{
cellId = this->InsertNextCell(type, n, pts);
newCellData->CopyData(this->CellData, i, cellId);
......@@ -1981,7 +1980,7 @@ void vtkPolyData::RemoveGhostCells(int level)
{
strips->GetNextCell(n, pts);
if (int(cellGhostLevels[i]) < level)
if (! (cellGhosts[i] & vtkDataSetAttributes::DUPLICATECELL))
{
cellId = this->InsertNextCell(type, n, pts);
newCellData->CopyData(this->CellData, i, cellId);
......@@ -1997,11 +1996,7 @@ void vtkPolyData::RemoveGhostCells(int level)
types->Delete();
// If there are no more ghost levels, then remove all arrays.
if (level <= 1)
{
this->CellData->RemoveArray("vtkGhostLevels");
this->PointData->RemoveArray("vtkGhostLevels");
}
this->CellData->RemoveArray(vtkDataSetAttributes::GhostArrayName());
this->Squeeze();
}
......
......@@ -384,9 +384,10 @@ public:
void DeepCopy(vtkDataObject *src);
// Description:
// This method will remove any cell that has a ghost level array value
// greater or equal to level. It does not remove unused points (yet).
void RemoveGhostCells(int level);
// This method will remove any cell that is marked as ghost
// (has the vtkDataSetAttributes::DUPLICATECELL bit set).
// It does not remove unused points.
void RemoveGhostCells();
//BTX
// Description:
......
This diff is collapsed.
......@@ -31,10 +31,10 @@
// 0<=i<(dims[0]-1)), then j (0<=j<(dims[1]-1)), then k (0<=k<(dims[2]-1))
// The number of cells is (dims[0]-1)*(dims[1]-1)*(dims[2]-1).
//
// A unusual feature of vtkStructuredGrid is the ability to blank,
// or "turn-off" points and cells in the dataset. This is controlled by
// defining a "blanking array" whose values (0,1) specify whether
// a point should be blanked or not.
// vtkStructuredGrid has the ability to blank,
// or "turn-off" points and cells in the dataset. This is done by setting
// vtkDataSetAttributes::HIDDENPOINT or vtkDataSetAttributes::HIDDENCELL
// in the ghost array for each point / cell that needs to be blanked.
#ifndef vtkStructuredGrid_h
#define vtkStructuredGrid_h
......@@ -48,7 +48,6 @@ class vtkEmptyCell;
class vtkHexahedron;
class vtkLine;
class vtkQuad;
class vtkStructuredVisibilityConstraint;
class vtkUnsignedCharArray;
class vtkVertex;
......@@ -139,32 +138,12 @@ public:
// Description:
// Methods for supporting blanking of cells. Blanking turns on or off
// cells in the structured grid, and hence the cells connected to them.
// cells in the structured grid, and hence the points connected to them.
// These methods should be called only after the dimensions of the
// grid are set.
void BlankCell(vtkIdType ptId);
void UnBlankCell(vtkIdType ptId);
// Description:
// Get the array that defines the blanking (visibility) of each point.
vtkUnsignedCharArray *GetPointVisibilityArray();
// Description:
// Set an array that defines the (blanking) visibility of the points
// in the grid. Make sure that length of the visibility array matches
// the number of points in the grid.
void SetPointVisibilityArray(vtkUnsignedCharArray *pointVisibility);
// Description:
// Get the array that defines the blanking (visibility) of each cell.
vtkUnsignedCharArray *GetCellVisibilityArray();
// Description:
// Set an array that defines the (blanking) visibility of the cells
// in the grid. Make sure that length of the visibility array matches
// the number of points in the grid.
void SetCellVisibilityArray(vtkUnsignedCharArray *pointVisibility);
// Description:
// Return non-zero value if specified point is visible.
// These methods should be called only after the dimensions of the
......@@ -180,12 +159,11 @@ public:
// Description:
// Returns 1 if there is any visibility constraint on the points,
// 0 otherwise.
unsigned char GetPointBlanking();
virtual bool HasAnyBlankPoints();
// Description:
// Returns 1 if there is any visibility constraint on the cells,
// 0 otherwise.
unsigned char GetCellBlanking();
virtual bool HasAnyBlankCells();
// Description:
// Given the node dimensions of this grid instance, this method computes the
......@@ -233,16 +211,6 @@ protected:
int Extent[6];
vtkStructuredVisibilityConstraint* PointVisibility;
void SetPointVisibility(vtkStructuredVisibilityConstraint *pointVisibility);
vtkGetObjectMacro(PointVisibility, vtkStructuredVisibilityConstraint);
vtkStructuredVisibilityConstraint* CellVisibility;
void SetCellVisibility(vtkStructuredVisibilityConstraint *cellVisibility);
vtkGetObjectMacro(CellVisibility, vtkStructuredVisibilityConstraint);
// Description:
// Compute the range of the scalars and cache it into ScalarRange
// only if the cache became invalid (ScalarRangeComputeTime).
......@@ -257,6 +225,8 @@ private:
// Internal method used by DeepCopy and ShallowCopy.
void InternalStructuredGridCopy(vtkStructuredGrid *src);
static unsigned char MASKED_CELL_VALUE;
private:
vtkStructuredGrid(const vtkStructuredGrid&); // Not implemented.
void operator=(const vtkStructuredGrid&); // Not implemented.
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkStructuredVisibilityConstraint.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkStructuredVisibilityConstraint.h"
#include "vtkObjectFactory.h"
#include "vtkUnsignedCharArray.h"
vtkStandardNewMacro(vtkStructuredVisibilityConstraint);
vtkCxxSetObjectMacro(vtkStructuredVisibilityConstraint,
VisibilityById,
vtkUnsignedCharArray);
//----------------------------------------------------------------------------
vtkStructuredVisibilityConstraint::vtkStructuredVisibilityConstraint()
{
this->VisibilityById = 0;
for (int i=0; i<3; i++)
{
this->Dimensions[i] = 0;
}
this->NumberOfIds = 0;
this->Initialized = 0;
}
//----------------------------------------------------------------------------
vtkStructuredVisibilityConstraint::~vtkStructuredVisibilityConstraint()
{
if (this->VisibilityById)
{
this->VisibilityById->Delete();
}
}
//----------------------------------------------------------------------------
void vtkStructuredVisibilityConstraint::DeepCopy(
vtkStructuredVisibilityConstraint* src)
{
memcpy(this->Dimensions, src->Dimensions, 3*sizeof(int));
// use vtkIdType to avoid 32-bit overflow
this->NumberOfIds =
static_cast<vtkIdType>(this->Dimensions[0])*
static_cast<vtkIdType>(this->Dimensions[1])*
static_cast<vtkIdType>(this->Dimensions[2]);
if(src->VisibilityById)
{
if (!this->VisibilityById)
{
this->VisibilityById = vtkUnsignedCharArray::New();
}
this->VisibilityById->DeepCopy(src->VisibilityById);
}
this->Initialized = src->Initialized;
}
//----------------------------------------------------------------------------
void vtkStructuredVisibilityConstraint::ShallowCopy(
vtkStructuredVisibilityConstraint* src)
{
memcpy(this->Dimensions, src->Dimensions, 3*sizeof(int));
this->NumberOfIds =
static_cast<vtkIdType>(this->Dimensions[0])*
static_cast<vtkIdType>(this->Dimensions[1])*
static_cast<vtkIdType>(this->Dimensions[2]);
this->SetVisibilityById(src->VisibilityById);
this->Initialized = src->Initialized;
}
//----------------------------------------------------------------------------