fixed some warnings for windows
minor buitification
This commit is contained in:
parent
ea8d485d76
commit
c6a8bd65a8
@ -142,8 +142,8 @@ namespace temp_viz
|
|||||||
class CV_EXPORTS CloudWidget : public Widget3D
|
class CV_EXPORTS CloudWidget : public Widget3D
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CloudWidget(InputArray _cloud, InputArray _colors);
|
CloudWidget(InputArray cloud, InputArray colors);
|
||||||
CloudWidget(InputArray _cloud, const Color &color = Color::white());
|
CloudWidget(InputArray cloud, const Color &color = Color::white());
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct CreateCloudWidget;
|
struct CreateCloudWidget;
|
||||||
@ -152,7 +152,7 @@ namespace temp_viz
|
|||||||
class CV_EXPORTS CloudNormalsWidget : public Widget3D
|
class CV_EXPORTS CloudNormalsWidget : public Widget3D
|
||||||
{
|
{
|
||||||
public:
|
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:
|
private:
|
||||||
struct ApplyCloudNormals;
|
struct ApplyCloudNormals;
|
||||||
|
@ -78,7 +78,7 @@ void temp_viz::InteractorStyle::OnChar ()
|
|||||||
else if (key.find ("XF86ZoomOut") != std::string::npos)
|
else if (key.find ("XF86ZoomOut") != std::string::npos)
|
||||||
zoomOut ();
|
zoomOut ();
|
||||||
|
|
||||||
bool keymod = false;
|
int keymod = false;
|
||||||
switch (modifier_)
|
switch (modifier_)
|
||||||
{
|
{
|
||||||
case KB_MOD_ALT:
|
case KB_MOD_ALT:
|
||||||
|
@ -157,3 +157,24 @@
|
|||||||
#include "opencv2/viz/widget_accessor.hpp"
|
#include "opencv2/viz/widget_accessor.hpp"
|
||||||
#include <opencv2/viz/widgets.hpp>
|
#include <opencv2/viz/widgets.hpp>
|
||||||
#include <opencv2/calib3d.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
|
* \author Radu B. Rusu
|
||||||
* \ingroup visualization
|
* \ingroup visualization
|
||||||
*/
|
*/
|
||||||
class CV_EXPORTS InteractorStyle : public vtkInteractorStyleTrackballCamera
|
class InteractorStyle : public vtkInteractorStyleTrackballCamera
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
namespace temp_viz
|
namespace temp_viz
|
||||||
{
|
{
|
||||||
|
|
||||||
class CV_EXPORTS Viz3d::VizImpl
|
struct Viz3d::VizImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef cv::Ptr<VizImpl> Ptr;
|
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]);
|
result[2] = (_Tp)(m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11]);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
ApplyAffine(const ApplyAffine&);
|
||||||
|
ApplyAffine& operator=(const ApplyAffine&);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
|
||||||
namespace temp_viz
|
|
||||||
{
|
|
||||||
template<typename _Tp> Vec<_Tp, 3>* vtkpoints_data(vtkSmartPointer<vtkPoints>& points);
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/// line widget implementation
|
/// line widget implementation
|
||||||
temp_viz::LineWidget::LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color)
|
temp_viz::LineWidget::LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color)
|
||||||
|
@ -1,26 +1,5 @@
|
|||||||
#include "precomp.hpp"
|
#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)
|
void temp_viz::Viz3d::VizImpl::setFullScreen (bool mode)
|
||||||
{
|
{
|
||||||
if (window_)
|
if (window_)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user