Skip to content
Snippets Groups Projects
Commit 2577a877 authored by Yohann Bearzi (Kitware)'s avatar Yohann Bearzi (Kitware) Committed by Kitware Robot
Browse files

Merge topic 'htg-supercursor-fix' into paraview/release


0743e8bb Little hack for htg supercursors

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !6405
parents fed31c7c 0743e8bb
Branches
No related tags found
No related merge requests found
......@@ -105,6 +105,12 @@ public:
vtkTypeMacro(vtkHyperTreeGrid, vtkDataObject);
void PrintSelf(ostream& os, vtkIndent indent) override;
/**
* Invalid index that is returned for undefined nodes, for example for nodes that are out of
* bounds (they can exist with the super cursors).
*/
static constexpr vtkIdType InvalidIndex = ~0;
/**
* Set/Get mode squeeze
*/
......
......@@ -21,6 +21,16 @@ PURPOSE. See the above copyright notice for more information.
#include <cassert>
//-----------------------------------------------------------------------------
vtkHyperTreeGridGeometryEntry::vtkHyperTreeGridGeometryEntry()
{
this->Index = 0;
for (unsigned int d = 0; d < 3; ++d)
{
this->Origin[d] = 0.;
}
}
//-----------------------------------------------------------------------------
void vtkHyperTreeGridGeometryEntry::PrintSelf(ostream& os, vtkIndent indent)
{
......
......@@ -56,14 +56,7 @@ public:
/**
* Constructor
*/
vtkHyperTreeGridGeometryEntry()
{
this->Index = 0;
for (unsigned int d = 0; d < 3; ++d)
{
this->Origin[d] = 0.;
}
}
vtkHyperTreeGridGeometryEntry();
/**
* Constructor
......
......@@ -56,8 +56,8 @@ vtkHyperTree* vtkHyperTreeGridGeometryLevelEntry::Initialize(
//-----------------------------------------------------------------------------
vtkIdType vtkHyperTreeGridGeometryLevelEntry::GetGlobalNodeIndex() const
{
assert("pre: not_tree" && this->Tree);
return this->Tree->GetGlobalIndexFromLocal(this->Index);
return this->Tree ? this->Tree->GetGlobalIndexFromLocal(this->Index)
: vtkHyperTreeGrid::InvalidIndex;
}
//-----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment