Commit ac9bf2ba authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot

Merge topic 'pvvtk-pv-master' into pv-master

84653eb2 Merge topic 'Warnings_MFIXReader' into master
5df08873 COMP: Shadowed variable warning
69b73931 Merge topic 'vtkweb-add-interaction-event' into master
44ea875c Add Web event for viewport interaction
0f37d1f3 Merge topic 'Coverage_MFIXReader' into master
d4d08fe2 Merge topic 'particletracer_changing_multiblocks' into master
e38e93f4 ENH: Added test for vtkMFIXReader
efac93cd Merge topic 'Remove_SESAMEReader' into master
07da0477 Merge topic 'fix-warning' into master
e9ebae9a Fix warnings and TestEmptyInput test
826262a8 Merge topic 'fix_mfix_reader' into master
00e86e74 Merge remote-tracking branch 'pvvtk/pv-master' into HEAD
ba45df80 BUG: Remove broken vtkSESAMEReader
f3ef1790 Changes to allow for multiblocks and seeds to change over time steps.
f6c0f71c Fixes issue with MFix reader and timesteps.
parents 8c4ad118 84653eb2
......@@ -122,8 +122,8 @@ vtkParticleTracerBase::vtkParticleTracerBase()
this->ForceReinjectionEveryNSteps = 0;
this->ReinjectionCounter = 0;
this->AllFixedGeometry = 1;
this->StaticMesh = 1;
this->StaticSeeds = 1;
this->StaticMesh = 0;
this->StaticSeeds = 0;
this->ComputeVorticity = 1;
this->IgnorePipelineTime = 1;
this->ParticleWriter = NULL;
......@@ -391,9 +391,11 @@ int vtkParticleTracerBase::RequestUpdateExtent(
//---------------------------------------------------------------------------
int vtkParticleTracerBase::InitializeInterpolator()
{
if (!this->CachedData[0] || !this->CachedData[1]) {
return 0;
}
if (!this->CachedData[0] || !this->CachedData[1])
{
vtkErrorMacro("Missing data set to process.");
return VTK_ERROR;
}
//
// When Multiblock arrays are processed, some may be empty
// if the first is empty, we won't find the correct vector name
......@@ -416,7 +418,7 @@ int vtkParticleTracerBase::InitializeInterpolator()
}
if (!vecname)
{
vtkDebugMacro(<< "Couldn't find vector array " << vecname);
vtkErrorMacro(<< "Couldn't find vector array " << vecname);
return VTK_ERROR;
}
......@@ -477,12 +479,14 @@ int vtkParticleTracerBase::InitializeInterpolator()
}
if (numValidInputBlocks[0]==0 || numValidInputBlocks[1]==0)
{
vtkDebugMacro("Not enough inputs have been found. Can not execute." << numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
vtkErrorMacro("Not enough inputs have been found. Can not execute."
<< numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
return VTK_ERROR;
}
if (numValidInputBlocks[0] != numValidInputBlocks[1])
if (numValidInputBlocks[0] != numValidInputBlocks[1] && this->StaticMesh)
{
vtkDebugMacro("The number of datasets is different between time steps " << numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
vtkErrorMacro("StaticMesh is set to True but the number of datasets is different between time steps "
<< numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
return VTK_ERROR;
}
//
......
......@@ -170,7 +170,8 @@ public:
// processor just once before start.
// If StaticSeeds is set and a moving seed source is specified
// the motion will be ignored and results will not be as expected.
//vtkSetMacro(StaticSeeds,int);
// The default is that StaticSeeds is 0.
vtkSetMacro(StaticSeeds,int);
vtkGetMacro(StaticSeeds,int);
// Description:
......@@ -180,7 +181,8 @@ public:
// setting it to true will force all optimizations.
// Do not Set StaticMesh to true if a dynamic mesh is being used
// as this will invalidate all results.
//vtkSetMacro(StaticMesh,int);
// The default is that StaticMesh is 0.
vtkSetMacro(StaticMesh,int);
vtkGetMacro(StaticMesh,int);
// Description:
......
......@@ -330,7 +330,6 @@ void GenerateDataSet()
0, 1, 1,
};
vtkIdType cellIdx;
vtkIdType globalNodeIdx;
vtkIdType localNodeIdx;
vtkIdType cell[8];
......@@ -347,8 +346,6 @@ void GenerateDataSet()
J(lijk) = j-JMIN(ext);
K(lijk) = k-KMIN(ext);
cellIdx = vtkStructuredData::ComputePointId(dims,lijk,dataDescription);
for(int node=0; node < 8; ++node)
{
// local ijk of the node
......
......@@ -714,7 +714,7 @@ void vtkPUnstructuredGridConnectivity::UpdateGhosts()
this->CreatePersistentRcvBuffers();
// STEP 3: Allocate MPI request objects for non-blocking point-to-point comm.
int numNeis = this->CommLists->NeighboringRanks.size();
int numNeis = static_cast<int>(this->CommLists->NeighboringRanks.size());
vtkMPICommunicator::Request* rqsts;
rqsts = new vtkMPICommunicator::Request[2*numNeis];
int rqstIdx = 0;
......@@ -783,6 +783,11 @@ void vtkPUnstructuredGridConnectivity::FillGhostZoneCells(
vtkIdType* cellIdx,
const unsigned int numGhostCells)
{
#ifdef NDEBUG
static_cast<void>(numGhostCells);
#endif
// Sanity checks
assert("pre: ghostData should not be NULL!" && (ghostData != NULL) );
assert("pre: cellIdx should not be NULL!" && (cellIdx != NULL) );
......@@ -798,8 +803,11 @@ void vtkPUnstructuredGridConnectivity::FillGhostZoneCells(
vtkDataArray* ghostArray = ghostData->GetArray(arrayIdx);
assert("pre: array by that name not found on ghosted grid!" &&
CD->HasArray(ghostArray->GetName()));
#ifndef NDEBUG
assert("pre: numtuples mismatch!" &&
(numGhostCells==ghostArray->GetNumberOfTuples()));
#endif
vtkDataArray* targetArray = CD->GetArray( ghostArray->GetName() );
assert("pre: numcomponents mismatch between target and ghost array!" &&
......@@ -824,6 +832,11 @@ void vtkPUnstructuredGridConnectivity::FillGhostZoneNodes(
vtkIdType* globalIdx,
const unsigned int numGhostNodes)
{
#ifdef NDEBUG
static_cast<void>(numGhostNodes);
#endif
// Sanity checks
assert("pre: ghostData should not be NULL!" && (ghostData != NULL) );
assert("pre: globalIdx should not be NULL!" && (globalIdx != NULL) );
......@@ -841,8 +854,11 @@ void vtkPUnstructuredGridConnectivity::FillGhostZoneNodes(
{
assert("pre: array by that name not found on ghosted grid!" &&
PD->HasArray(ghostArray->GetName()));
#ifndef NDEBUG
assert("pre: numtuples mismatch!" &&
(numGhostNodes==ghostArray->GetNumberOfTuples()));
#endif
vtkDataArray* targetArray = PD->GetArray( ghostArray->GetName() );
assert("pre: numcomponents mismatch between target and ghost array!" &&
......@@ -879,7 +895,7 @@ void vtkPUnstructuredGridConnectivity::CreatePersistentRcvBuffers()
}
// Allocate MPI request objects for non-blocking point-to-point comm.
int numNeis = this->CommLists->NeighboringRanks.size();
int numNeis = static_cast<int>(this->CommLists->NeighboringRanks.size());
vtkMPICommunicator::Request* rqsts;
rqsts = new vtkMPICommunicator::Request[2*numNeis];
......@@ -1032,11 +1048,12 @@ void vtkPUnstructuredGridConnectivity::SerializeGhostZones()
std::vector< vtkIdType > globalIdx;
globalIdx.resize(nodelinks->size());
vtkIdList* tupleIds = vtkIdList::New();
tupleIds->SetNumberOfIds( nodelinks->size());
for(unsigned int lnk=0; lnk < nodelinks->size(); ++lnk)
tupleIds->SetNumberOfIds( static_cast<vtkIdType>(nodelinks->size()) );
unsigned int lnk = 0;
for(; lnk < static_cast<unsigned int>(nodelinks->size()); ++lnk)
{
globalIdx[lnk] = (*nodelinks)[lnk].GlobalIdx;
tupleIds->SetId( lnk, (*nodelinks)[lnk].LocalIdx );
tupleIds->SetId(static_cast<vtkIdType>(lnk),(*nodelinks)[lnk].LocalIdx);
} // END for all links
// serialize the global IDs s.t. the remote rank knows which node to
......@@ -1267,6 +1284,9 @@ bool vtkPUnstructuredGridConnectivity::IsCellConnected(
vtkIdType& adjCell,
vtkIdList* shared)
{
#ifdef NDEBUG
static_cast<void>(NumPoints);
#endif
adjCell = -1;
......@@ -1286,8 +1306,12 @@ bool vtkPUnstructuredGridConnectivity::IsCellConnected(
shared->SetNumberOfIds(N);
for(int i=0; i < N; ++i)
{
#ifndef NDEBUG
assert("pre: face node out-of-bounds!" &&
(nodePtr[i] >= 0) && (nodePtr[i] < NumPoints) );
#endif
nodes[i] = globalId[ nodePtr[i] ];
shared->SetId(i,nodes[i]);
} // END for all face nodes
......@@ -1494,7 +1518,8 @@ void vtkPUnstructuredGridConnectivity::BuildGhostedGridAndCommLists()
// STEP 2: Loop through all remote boundary grids, find the cells that
// are face-adjacent and insert them to the ghosted grid.
for(unsigned int i=0; i < this->AuxiliaryData->RmtBGrids.size(); ++i)
unsigned int i=0;
for(;i<static_cast<unsigned int>(this->AuxiliaryData->RmtBGrids.size()); ++i)
{
int rmtRank = this->AuxiliaryData->CandidateRanks[ i ];
this->ProcessRemoteGrid(
......@@ -1505,7 +1530,8 @@ void vtkPUnstructuredGridConnectivity::BuildGhostedGridAndCommLists()
//------------------------------------------------------------------------------
void vtkPUnstructuredGridConnectivity::ExchangeBoundaryGridSizes(int size)
{
int numCandidates = this->AuxiliaryData->CandidateRanks.size();
int numCandidates =
static_cast<int>(this->AuxiliaryData->CandidateRanks.size());
this->AuxiliaryData->RmtBGridSizes.resize(numCandidates,0);
vtkMPICommunicator::Request* rqsts;
......@@ -1551,7 +1577,8 @@ void vtkPUnstructuredGridConnectivity::ExchangeBoundaryGrids()
this->ExchangeBoundaryGridSizes(bytestream.RawSize());
// STEP 2: Post receives
int numCandidates = this->AuxiliaryData->CandidateRanks.size();
int numCandidates =
static_cast<int>(this->AuxiliaryData->CandidateRanks.size());
std::vector< unsigned char* > RawData;
RawData.resize(numCandidates);
......@@ -1805,9 +1832,11 @@ void vtkPUnstructuredGridConnectivity::ExtractBoundaryCell(
cellType,numCellNodes,&cellConnectivity[0]);
// sanity checks
#ifndef NDEBUG
vtkIdType N = nodes->GetNumberOfPoints();
assert("post: array size mismatch!" && (localIdx->GetNumberOfTuples()==N));
assert("post: array size mismatch!" && (globalIdx->GetNumberOfTuples()==N));
#endif
}
//------------------------------------------------------------------------------
......@@ -1887,12 +1916,14 @@ void vtkPUnstructuredGridConnectivity::ExtractBoundaryGrid()
this->AuxiliaryData->BoundaryGrid->Squeeze();
// sanity checks
#ifndef NDEBUG
vtkIdType nc = this->AuxiliaryData->BoundaryGrid->GetNumberOfCells();
vtkIdType numPoints = points->GetNumberOfPoints();
assert("array size mismatch!" && (localidx->GetNumberOfTuples()==numPoints));
assert("array size mismatch!" && (globalidx->GetNumberOfTuples()==numPoints));
assert("post: array size mismatch!" &&
(localCellIdx->GetNumberOfTuples()==nc) );
#endif
this->AuxiliaryData->BoundaryGrid->SetPoints(points);
this->AuxiliaryData->BoundaryGrid->GetPointData()->AddArray(localidx);
......
......@@ -85,6 +85,12 @@ int vtkPUnstructuredGridGhostDataGenerator::RequestData(
vtkUnstructuredGrid* grid =
vtkUnstructuredGrid::SafeDownCast(input->Get(vtkDataObject::DATA_OBJECT()));
if( (grid==NULL) || (grid->GetNumberOfCells()==0) )
{
// empty input, do nothing
return 1;
}
// STEP 1: Get output grid
vtkInformation* output = outputVector->GetInformationObject(0);
assert("pre: output object is NULL" && (output != NULL) );
......
......@@ -21,7 +21,6 @@ SET(Module_SRCS
vtkPDBReader.cxx
vtkPlot3DMetaReader.cxx
vtkProStarReader.cxx
vtkSESAMEReader.cxx
vtkSTLReader.cxx
vtkSTLWriter.cxx
vtkTecplotReader.cxx
......
......@@ -21,11 +21,16 @@ if(VTK_USE_LARGE_DATA AND _known_little_endian)
"DATA{${VTK_TEST_INPUT_DIR}/WindBladeReader/,REGEX:.*}"
"DATA{${VTK_TEST_INPUT_DIR}/WindBladeReader/field/,REGEX:.*}"
"DATA{${VTK_TEST_INPUT_DIR}/WindBladeReader/turbine/,REGEX:.*}"
"DATA{${VTK_TEST_INPUT_DIR}/MFIXReader/,REGEX:.*}"
)
vtk_add_test_cxx(
TestWindBladeReader.cxx
)
vtk_add_test_cxx(NO_VALID
TestMFIXReader.cxx
)
endif()
vtk_test_cxx_executable(${vtk-module}CxxTests)
/*=========================================================================
Program: Visualization Toolkit
Module: TestSimplePointsReaderWriter.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 <vtkSmartPointer.h>
#include <vtkDataSetMapper.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkMFIXReader.h>
#include <vtkUnstructuredGrid.h>
#include <vtkCellData.h>
#include <vtkTestUtilities.h>
#include <vtkTestErrorObserver.h>
#include <vtkRegressionTestImage.h>
int TestMFIXReader(int argc, char *argv[])
{
// Read file name.
char* filename =
vtkTestUtilities::ExpandDataFileName(argc, argv, "Data/MFIXReader/BUB01.RES");
vtkSmartPointer<vtkTest::ErrorObserver> errorObserver =
vtkSmartPointer<vtkTest::ErrorObserver>::New();
vtkSmartPointer<vtkMFIXReader> reader =
vtkSmartPointer<vtkMFIXReader>::New();
reader->AddObserver(vtkCommand::ErrorEvent, errorObserver);
// Update without a filename should cause an error
reader->Update();
// Check for model bounds error
if (errorObserver->GetError())
{
std::cout << "Caught expected error: "
<< errorObserver->GetErrorMessage();
}
else
{
std::cout << "Failed to catch expected error regarding missing file name" << std::endl;
return EXIT_FAILURE;
}
errorObserver->Clear();
reader->SetFileName(filename);
delete [] filename;
reader->Update();
std::cout << "Testing reader with file: "
<< reader->GetFileName() << std::endl;
std::cout << "There are " << reader->GetNumberOfPoints()\
<< " number of points" << std::endl;
std::cout << "There are " << reader->GetNumberOfCells()\
<< " number of cells" << std::endl;
std::cout << "There are " << reader->GetNumberOfCellFields()
<< " number of cell fields" << std::endl;
reader->SetTimeStep(reader->GetNumberOfTimeSteps()/2);
std::cout << "The timestep is " << reader->GetTimeStep() << std::endl;
reader->SetTimeStepRange (0, reader->GetNumberOfTimeSteps() - 1);
std::cout << "The time step range is: "
<< reader->GetTimeStepRange()[0] << " to "
<< reader->GetTimeStepRange()[1]
<< std::endl;
// Exercise Cell Arrays
// 1) Default array settings
int numberOfCellArrays = reader->GetNumberOfCellArrays();
std::cout << "----- Default array settings" << std::endl;
for (int i = 0; i < numberOfCellArrays; ++i)
{
const char * name = reader->GetCellArrayName(i);
std::cout << " Cell Array: " << i
<< " is named " << name
<< " and is "
<< (reader->GetCellArrayStatus(name) ? "Enabled" : "Disabled")
<< std::endl;
}
// 2) Disable one array
std::cout << "----- Disable one array" << std::endl;
const char * arrayName = reader->GetCellArrayName(0);
reader->SetCellArrayStatus(arrayName, 0);
if (reader->GetCellArrayStatus(arrayName) != 0)
{
std::cout << "ERROR: Cell Array: " << "0"
<< " is named " << arrayName
<< " and should be disabled"
<< std::endl;
return EXIT_FAILURE;
}
// 3) Disable all arrays
std::cout << "----- Disable all arrays" << std::endl;
reader->DisableAllCellArrays();
for (int i = 0; i < numberOfCellArrays; ++i)
{
const char * name = reader->GetCellArrayName(i);
if (reader->GetCellArrayStatus(name) != 0)
{
std::cout << "ERROR: " << " Cell Array: " << i
<< " is named " << name
<< " and should be disabled"
<< std::endl;
return EXIT_FAILURE;
}
}
// 4) Enable one array
std::cout << "----- Enable one array" << std::endl;
arrayName = reader->GetCellArrayName(0);
reader->SetCellArrayStatus(arrayName, 1);
if (reader->GetCellArrayStatus(arrayName) != 1)
{
std::cout << "ERROR: Cell Array: " << "0"
<< " is named " << arrayName
<< " and should be disabled"
<< std::endl;
return EXIT_FAILURE;
}
// 5) Enable all arrays
std::cout << "----- Enable all arrays" << std::endl;
reader->EnableAllCellArrays();
for (int i = 0; i < numberOfCellArrays; ++i)
{
const char * name = reader->GetCellArrayName(i);
if (reader->GetCellArrayStatus(name) != 1)
{
std::cout << "ERROR: " << " Cell Array: " << i
<< " is named " << name
<< " and should be enabled"
<< std::endl;
return EXIT_FAILURE;
}
}
reader->Print(std::cout);
// Visualize
vtkSmartPointer<vtkDataSetMapper> mapper =
vtkSmartPointer<vtkDataSetMapper>::New();
mapper->SetInputConnection(reader->GetOutputPort());
mapper->SetScalarRange(reader->GetOutput()->GetScalarRange());
vtkSmartPointer<vtkActor> actor =
vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow);
renderer->AddActor(actor);
renderer->SetBackground(.2, .4, .6);
renderWindow->Render();
int retVal = vtkRegressionTestImage( renderWindow );
if ( retVal == vtkRegressionTester::DO_INTERACTOR)
{
renderWindowInteractor->Start();
}
return EXIT_SUCCESS;
}
......@@ -2048,7 +2048,7 @@ void vtkMFIXReader::GetTimeSteps()
case 7:
{
numberOfVariables = this->NMax->GetValue(0);
for (int m=0; m<=this->MMAX; ++m)
for (int m=1; m<=this->MMAX; ++m)
{
numberOfVariables += this->NMax->GetValue(m);
}
......@@ -2243,7 +2243,7 @@ void vtkMFIXReader::GetNumberOfVariablesInSPXFiles()
int skip = 0;
for (int j=1; j<this->NumberOfSPXFilesUsed; j++)
{
for(int i=0;i<this->VariableNames->GetMaxId()+1;i++)
for(int i=0;i<=this->VariableNames->GetMaxId();i++)
{
if ((this->VariableIndexToSPX->GetValue(i) == j)
&& (this->VariableComponents->GetValue(i) == 1))
......
This diff is collapsed.
/*=========================================================================
Program: Visualization Toolkit
Module: vtkSESAMEReader.h
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.
=========================================================================*/
// .NAME vtkSESAMEReader - read SESAME files
// .SECTION Description
// vtkSESAMEReader is a source object that reads SESAME files.
// Currently supported tables include 301, 304, 502, 503, 504, 505, 602
//
// SESAMEReader creates rectilinear grid datasets. The dimension of the
// dataset depends upon the number of densities and temperatures in the table.
// Values at certain temperatures and densities are stored as scalars.
//
#ifndef __vtkSESAMEReader_h
#define __vtkSESAMEReader_h
#include "vtkIOGeometryModule.h" // For export macro
#include <vtkRectilinearGridAlgorithm.h>
class vtkIntArray;
class VTKIOGEOMETRY_EXPORT vtkSESAMEReader : public vtkRectilinearGridAlgorithm
{
public:
static vtkSESAMEReader *New();
vtkTypeMacro(vtkSESAMEReader, vtkRectilinearGridAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set the filename to read
void SetFileName(const char* file);
// Description:
// Get the filename to read
const char* GetFileName();
// Description:
// Return whether this is a valid file
int IsValidFile();
// Description:
// Get the number of tables in this file
int GetNumberOfTableIds();
// Description:
// Get the ids of the tables in this file
int* GetTableIds();
// Description:
// Returns the table ids in a data array.
vtkIntArray* GetTableIdsAsArray();
// Description:
// Set the table to read in
void SetTable(int tableId);
// Description:
// Get the table to read in
int GetTable();
// Description:
// Get the number of arrays for the table to read
int GetNumberOfTableArrayNames();
// Description:
// Get the number of arrays for the table to read
int GetNumberOfTableArrays()
{ return this->GetNumberOfTableArrayNames(); }
// Description:
// Get the names of arrays for the table to read
const char* GetTableArrayName(int index);
// Description:
// Set whether to read a table array
void SetTableArrayStatus(const char* name, int flag);
int GetTableArrayStatus(const char* name);
protected:
vtkSESAMEReader();
virtual ~vtkSESAMEReader();
//BTX
class MyInternal;
MyInternal* Internal;
//ETX
int OpenFile();
void CloseFile();
virtual int RequestData(vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
virtual int RequestInformation(vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
int ReadTableValueLine ( float *v1, float *v2, float *v3,
float *v4, float *v5);
int JumpToTable( int tableID );
void ReadTable(vtkRectilinearGrid* output);
private:
vtkSESAMEReader(const vtkSESAMEReader&); // Not implemented.
void operator=(const vtkSESAMEReader&); // Not implemented.
};
#endif
898d7d3d25c5eb075b247114b115c4ab
51293ec33a5906800d45419d9138eced
d359db6bdee28549a702181861b764e9
573721a463eda19a8357dd3b46acc8e4
07fd5ea3af04b746667a1a6dd28e2c48
67f7c30095246d93154c8fa1a308649b
413072379d645b9684830b12d73cfdff
670ff03f8463a9e72ebc17f19ebde171
efcabfbaf1f022de2611b93edb8f7d6d
093312d734f8d4d4b524e3ec787fa335
0e92e4059d495ebad3cffe539f722f36
......@@ -80,6 +80,7 @@
action: 'up',
current_button: current_button
}));
renderersContainer.trigger('endInteraction');
} else if(event.type === 'mousedown') {
current_button = event.which;
......@@ -92,7 +93,7 @@
current_button = 2;
event.altKey = false;
}
renderersContainer.trigger('startInteraction');
renderersContainer.trigger($.extend(event, {
type: 'mouse',
action: 'down',
......@@ -636,6 +637,18 @@
statisticManager.reset();
statContainer.empty();
}
/**
* Event triggered before a mouse down.
*
* @member vtkWeb.Viewport
* @event startInteraction
*/
/**
* Event triggered after a mouse up.
*
* @member vtkWeb.Viewport
* @event endInteraction
*/
};
// Attach config object to renderer parent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment