fixed some warnings for windows

minor buitification
pull/1453/head
Anatoly Baksheev 12 years ago
parent ea8d485d76
commit c6a8bd65a8
  1. 6
      modules/viz/include/opencv2/viz/widgets.hpp
  2. 2
      modules/viz/src/interactor_style.cpp
  3. 21
      modules/viz/src/precomp.hpp
  4. 2
      modules/viz/src/q/interactor_style.h
  5. 6
      modules/viz/src/q/viz3d_impl.hpp
  6. 5
      modules/viz/src/simple_widgets.cpp
  7. 23
      modules/viz/src/viz3d_impl.cpp

@ -142,8 +142,8 @@ namespace temp_viz
class CV_EXPORTS CloudWidget : public Widget3D
{
public:
CloudWidget(InputArray _cloud, InputArray _colors);
CloudWidget(InputArray _cloud, const Color &color = Color::white());
CloudWidget(InputArray cloud, InputArray colors);
CloudWidget(InputArray cloud, const Color &color = Color::white());
private:
struct CreateCloudWidget;
@ -152,7 +152,7 @@ namespace temp_viz
class CV_EXPORTS CloudNormalsWidget : public Widget3D
{
public:
CloudNormalsWidget(InputArray _cloud, InputArray _normals, int level = 100, float scale = 0.02f, const Color &color = Color::white());
CloudNormalsWidget(InputArray cloud, InputArray normals, int level = 100, float scale = 0.02f, const Color &color = Color::white());
private:
struct ApplyCloudNormals;

@ -78,7 +78,7 @@ void temp_viz::InteractorStyle::OnChar ()
else if (key.find ("XF86ZoomOut") != std::string::npos)
zoomOut ();
bool keymod = false;
int keymod = false;
switch (modifier_)
{
case KB_MOD_ALT:

@ -157,3 +157,24 @@
#include "opencv2/viz/widget_accessor.hpp"
#include <opencv2/viz/widgets.hpp>
#include <opencv2/calib3d.hpp>
namespace temp_viz
{
template<typename _Tp> Vec<_Tp, 3>* vtkpoints_data(vtkSmartPointer<vtkPoints>& points);
template<> static inline Vec3f* vtkpoints_data<float>(vtkSmartPointer<vtkPoints>& points)
{
CV_Assert(points->GetDataType() == VTK_FLOAT);
vtkDataArray *data = points->GetData();
float *pointer = static_cast<vtkFloatArray*>(data)->GetPointer(0);
return reinterpret_cast<Vec3f*>(pointer);
}
template<> static inline Vec3d* vtkpoints_data<double>(vtkSmartPointer<vtkPoints>& points)
{
CV_Assert(points->GetDataType() == VTK_DOUBLE);
vtkDataArray *data = points->GetData();
double *pointer = static_cast<vtkDoubleArray*>(data)->GetPointer(0);
return reinterpret_cast<Vec3d*>(pointer);
}
}

@ -28,7 +28,7 @@ namespace temp_viz
* \author Radu B. Rusu
* \ingroup visualization
*/
class CV_EXPORTS InteractorStyle : public vtkInteractorStyleTrackballCamera
class InteractorStyle : public vtkInteractorStyleTrackballCamera
{
public:

@ -12,7 +12,7 @@
namespace temp_viz
{
class CV_EXPORTS Viz3d::VizImpl
struct Viz3d::VizImpl
{
public:
typedef cv::Ptr<VizImpl> Ptr;
@ -366,6 +366,10 @@ struct ApplyAffine
result[2] = (_Tp)(m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11]);
return result;
}
private:
ApplyAffine(const ApplyAffine&);
ApplyAffine& operator=(const ApplyAffine&);
};
}

@ -1,10 +1,5 @@
#include "precomp.hpp"
namespace temp_viz
{
template<typename _Tp> Vec<_Tp, 3>* vtkpoints_data(vtkSmartPointer<vtkPoints>& points);
}
///////////////////////////////////////////////////////////////////////////////////////////////
/// line widget implementation
temp_viz::LineWidget::LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color)

@ -1,26 +1,5 @@
#include "precomp.hpp"
namespace temp_viz
{
template<typename _Tp> Vec<_Tp, 3>* vtkpoints_data(vtkSmartPointer<vtkPoints>& points);
template<> Vec3f* vtkpoints_data<float>(vtkSmartPointer<vtkPoints>& points)
{
CV_Assert(points->GetDataType() == VTK_FLOAT);
vtkDataArray *data = points->GetData();
float *pointer = static_cast<vtkFloatArray*>(data)->GetPointer(0);
return reinterpret_cast<Vec3f*>(pointer);
}
template<> Vec3d* vtkpoints_data<double>(vtkSmartPointer<vtkPoints>& points)
{
CV_Assert(points->GetDataType() == VTK_DOUBLE);
vtkDataArray *data = points->GetData();
double *pointer = static_cast<vtkDoubleArray*>(data)->GetPointer(0);
return reinterpret_cast<Vec3d*>(pointer);
}
}
void temp_viz::Viz3d::VizImpl::setFullScreen (bool mode)
{
if (window_)
@ -577,4 +556,4 @@ temp_viz::Affine3f temp_viz::Viz3d::VizImpl::getWidgetPose(const String &id) con
vtkSmartPointer<vtkMatrix4x4> matrix = actor->GetUserMatrix();
Matx44f matrix_cv = convertToMatx(matrix);
return Affine3f(matrix_cv);
}
}

Loading…
Cancel
Save