77ecfbeb78
The clang compiler was running into linker errors constructors of classes with virtual methods that were inline and destructors that were not declared at all. In this case, the compiler was not creating everything needed by a virtual table and the link died.
84 lines
3.8 KiB
C++
84 lines
3.8 KiB
C++
//============================================================================
|
|
// Copyright (c) Kitware, Inc.
|
|
// All rights reserved.
|
|
// See LICENSE.txt 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.
|
|
//
|
|
// Copyright 2016 Sandia Corporation.
|
|
// Copyright 2016 UT-Battelle, LLC.
|
|
// Copyright 2016 Los Alamos National Security.
|
|
//
|
|
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
|
// the U.S. Government retains certain rights in this software.
|
|
//
|
|
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
|
// Laboratory (LANL), the U.S. Government retains certain rights in
|
|
// this software.
|
|
//============================================================================
|
|
|
|
#include <vtkm/rendering/BoundingBoxAnnotation.h>
|
|
|
|
namespace vtkm {
|
|
namespace rendering {
|
|
|
|
BoundingBoxAnnotation::BoundingBoxAnnotation()
|
|
: Color(0.5, 0.5, 0.5), Extents(-1, 1, -1, 1, -1, 1)
|
|
{
|
|
}
|
|
|
|
BoundingBoxAnnotation::~BoundingBoxAnnotation()
|
|
{
|
|
}
|
|
|
|
void BoundingBoxAnnotation::Render(const vtkm::rendering::Camera &,
|
|
const WorldAnnotator &annotator)
|
|
{
|
|
//win->SetupForWorldSpace();
|
|
|
|
vtkm::Float32 linewidth = 1.0;
|
|
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Min,
|
|
this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Min,
|
|
this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Min,
|
|
this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Min,
|
|
this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Min,
|
|
this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Min,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Max,
|
|
this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Min,
|
|
this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Min,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Max,
|
|
this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Min,
|
|
this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Min,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Max,
|
|
this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Min,
|
|
this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Min,
|
|
linewidth, this->Color);
|
|
annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Max,
|
|
this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Max,
|
|
linewidth, this->Color);
|
|
}
|
|
|
|
}
|
|
} // namespace vtkm::rendering
|