refactor: rename Vtk classes by removing the vtk prefix to follow project naming conventions
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
#include <vtkPolyData.h>
|
||||
#include <vtkProperty.h>
|
||||
#include <vtkCylinderSource.h>
|
||||
#include "Math/vtkDense.h"
|
||||
#include "Vtk/Math/vtkDense.h"
|
||||
|
||||
namespace uLib {
|
||||
namespace Vtk {
|
||||
|
||||
vtkEmitterPrimary::vtkEmitterPrimary(Geant::EmitterPrimary &emitter)
|
||||
EmitterPrimary::EmitterPrimary(Geant::EmitterPrimary &emitter)
|
||||
: m_emitter(emitter), m_Actor(vtkActor::New()) {
|
||||
|
||||
vtkNew<vtkArrowSource> arrow;
|
||||
@@ -43,16 +43,16 @@ vtkEmitterPrimary::vtkEmitterPrimary(Geant::EmitterPrimary &emitter)
|
||||
|
||||
this->SetProp(m_Actor);
|
||||
|
||||
Object::connect(&m_emitter, &Object::Updated, this, &vtkEmitterPrimary::contentUpdate);
|
||||
Object::connect(&m_emitter, &Object::Updated, this, &EmitterPrimary::contentUpdate);
|
||||
this->contentUpdate();
|
||||
}
|
||||
|
||||
vtkEmitterPrimary::~vtkEmitterPrimary() {
|
||||
Object::disconnect(&m_emitter, &Object::Updated, this, &vtkEmitterPrimary::contentUpdate);
|
||||
EmitterPrimary::~EmitterPrimary() {
|
||||
Object::disconnect(&m_emitter, &Object::Updated, this, &EmitterPrimary::contentUpdate);
|
||||
m_Actor->Delete();
|
||||
}
|
||||
|
||||
void vtkEmitterPrimary::contentUpdate() {
|
||||
void EmitterPrimary::contentUpdate() {
|
||||
vtkMatrix4x4 *vmat = m_Actor->GetUserMatrix();
|
||||
if (!vmat) {
|
||||
vtkNew<vtkMatrix4x4> mat;
|
||||
@@ -66,7 +66,7 @@ void vtkEmitterPrimary::contentUpdate() {
|
||||
Puppet::Update();
|
||||
}
|
||||
|
||||
void vtkEmitterPrimary::Update() {
|
||||
void EmitterPrimary::Update() {
|
||||
vtkMatrix4x4 *vmat = m_Actor->GetUserMatrix();
|
||||
if (!vmat) return;
|
||||
|
||||
@@ -79,7 +79,7 @@ void vtkEmitterPrimary::Update() {
|
||||
// vtkSkyPlaneEmitterPrimary
|
||||
|
||||
vtkSkyPlaneEmitterPrimary::vtkSkyPlaneEmitterPrimary(Geant::SkyPlaneEmitterPrimary &emitter)
|
||||
: vtkEmitterPrimary(emitter), m_skyEmitter(emitter), m_PlaneSource(vtkPlaneSource::New()) {
|
||||
: EmitterPrimary(emitter), m_skyEmitter(emitter), m_PlaneSource(vtkPlaneSource::New()) {
|
||||
|
||||
vtkNew<vtkAppendPolyData> append;
|
||||
// Base class constructor already set an arrow. We keep it as a directional indicator.
|
||||
@@ -107,27 +107,27 @@ void vtkSkyPlaneEmitterPrimary::contentUpdate() {
|
||||
m_PlaneSource->SetPoint2(-size(0)/2.0, size(1)/2.0, 0.0);
|
||||
m_PlaneSource->Update();
|
||||
|
||||
vtkEmitterPrimary::contentUpdate();
|
||||
EmitterPrimary::contentUpdate();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// vtkQuadMeshEmitterPrimary
|
||||
|
||||
vtkQuadMeshEmitterPrimary::vtkQuadMeshEmitterPrimary(Geant::QuadMeshEmitterPrimary &emitter)
|
||||
: vtkEmitterPrimary(emitter), m_meshEmitter(emitter) {
|
||||
: EmitterPrimary(emitter), m_meshEmitter(emitter) {
|
||||
this->contentUpdate();
|
||||
}
|
||||
|
||||
void vtkQuadMeshEmitterPrimary::contentUpdate() {
|
||||
// For now stick with the arrow. In the future visualize the mesh if useful.
|
||||
vtkEmitterPrimary::contentUpdate();
|
||||
EmitterPrimary::contentUpdate();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// vtkCylinderEmitterPrimary
|
||||
|
||||
vtkCylinderEmitterPrimary::vtkCylinderEmitterPrimary(Geant::CylinderEmitterPrimary &emitter)
|
||||
: vtkEmitterPrimary(emitter), m_cylinderEmitter(emitter), m_CylinderSource(vtkCylinderSource::New()) {
|
||||
: EmitterPrimary(emitter), m_cylinderEmitter(emitter), m_CylinderSource(vtkCylinderSource::New()) {
|
||||
|
||||
// vtkCylinderSource is along Y by default.
|
||||
// We will update its actual dimensions in contentUpdate().
|
||||
@@ -170,7 +170,7 @@ void vtkCylinderEmitterPrimary::contentUpdate() {
|
||||
m_CylinderSource->SetCenter(0, h/2.0, 0);
|
||||
m_CylinderSource->Update();
|
||||
|
||||
vtkEmitterPrimary::contentUpdate();
|
||||
EmitterPrimary::contentUpdate();
|
||||
}
|
||||
|
||||
} // namespace Vtk
|
||||
|
||||
Reference in New Issue
Block a user