fix: removed comments and added comments
This commit is contained in:
parent
52873b38de
commit
0f99201c06
|
|
@ -89,34 +89,4 @@ vtkSmartPointer<vtkTransformFilter> createInverseCartographicTransformFilter(con
|
|||
transformFilter->SetTransform(totalProjection);
|
||||
|
||||
return transformFilter;
|
||||
}
|
||||
|
||||
//vtkSmartPointer<vtkMatrix4x4> getCartographicTransformMatrix(const std::shared_ptr<UVGrid> uvGrid) {
|
||||
// const double XMin = uvGrid->lons.front();
|
||||
// const double XMax = uvGrid->lons.back();
|
||||
// const double YMin = uvGrid->lats.front();
|
||||
// const double YMax = uvGrid->lats.back();
|
||||
//
|
||||
// double eyeTransform[] = {
|
||||
// 2/(XMax-XMin), 0, 0, -(XMax+XMin)/(XMax-XMin),
|
||||
// 0, 2/(YMax-YMin), 0, -(YMax+YMin)/(YMax-YMin),
|
||||
// 0, 0, 1, 0,
|
||||
// 0, 0, 0, 1
|
||||
// };
|
||||
//
|
||||
// auto matrix = vtkSmartPointer<vtkMatrix4x4>::New();
|
||||
// matrix->DeepCopy(eyeTransform);
|
||||
// return matrix;
|
||||
//}
|
||||
//
|
||||
//// Assumes Normalised camera is used
|
||||
//vtkSmartPointer<vtkTransformFilter> createCartographicTransformFilter(const std::shared_ptr<UVGrid> uvGrid) {
|
||||
// vtkNew<vtkTransform> transform;
|
||||
//
|
||||
// transform->SetMatrix(getCartographicTransformMatrix(uvGrid));
|
||||
//
|
||||
// vtkSmartPointer<vtkTransformFilter> transformFilter = vtkSmartPointer<vtkTransformFilter>::New();
|
||||
// transformFilter->SetTransform(transform);
|
||||
//
|
||||
// return transformFilter;
|
||||
//}
|
||||
}
|
||||
|
|
@ -15,19 +15,20 @@
|
|||
vtkSmartPointer<vtkCamera> createNormalisedCamera();
|
||||
|
||||
/**
|
||||
* Constructs a 4x4 projection matrix that maps homogenious (longitude, latitude, 0, 1) points
|
||||
* to the normalised space.
|
||||
* TODO: This transformation has room for improvement see:
|
||||
* https://github.com/MakeNEnjoy/interactive-track-and-trace/issues/12
|
||||
* @return pointer to 4x4 matrix
|
||||
*/
|
||||
vtkSmartPointer<vtkMatrix4x4> getCartographicTransformMatrix(const std::shared_ptr<UVGrid> uvGrid);
|
||||
|
||||
/**
|
||||
* Convenience function that converts the 4x4 projection matrix into a vtkTransformFilter
|
||||
* @return pointer to transform filter
|
||||
* Creates a mercator projection and then scales into normalised space.
|
||||
* @param uvGrid grid that contains latitudes and longitudes
|
||||
* @return pointer to transform filter
|
||||
*/
|
||||
vtkSmartPointer<vtkTransformFilter> createCartographicTransformFilter(const std::shared_ptr<UVGrid> uvGrid);
|
||||
|
||||
/**
|
||||
* Creates an inverse mercator projection and then scales into normalised space.
|
||||
*
|
||||
* Note that it is not possible to call the Inverse() member function on the transform of the
|
||||
* createCartographicTransformFilter. It produces the wrong output,
|
||||
* I believe that this is a bug in VTK, I might make an issue about this sometime.
|
||||
* @param uvGrid grid that contains latitudes and longitudes
|
||||
* @return pointer to transform filter
|
||||
*/
|
||||
vtkSmartPointer<vtkTransformFilter> createInverseCartographicTransformFilter(const std::shared_ptr<UVGrid> uvGrid);
|
||||
#endif //NORMALISEDCARTOGRAPHICCAMERA_H
|
||||
|
|
|
|||
|
|
@ -23,13 +23,15 @@ public:
|
|||
*/
|
||||
LGlyphLayer(std::shared_ptr<UVGrid> uvGrid, std::unique_ptr<AdvectionKernel> advectionKernel);
|
||||
|
||||
/** This function spoofs a few points in the dataset. Mostly used for testing.
|
||||
*/
|
||||
/**
|
||||
* This function spoofs a few points in the dataset. Mostly used for testing.
|
||||
*/
|
||||
void spoofPoints();
|
||||
|
||||
/** updates the glyphs to reflect the given timestamp in the dataset.
|
||||
* @param t : the time at which to fetch the data.
|
||||
*/
|
||||
/**
|
||||
* updates the glyphs to reflect the given timestamp in the dataset.
|
||||
* @param t : the time at which to fetch the data.
|
||||
*/
|
||||
void updateData(int t) override;
|
||||
|
||||
vtkSmartPointer<SpawnPointCallback> createSpawnPointCallback();
|
||||
|
|
|
|||
Loading…
Reference in New Issue