fix vtkActor to vtkLODActor, initial implementation LineWidget, showWidget

This commit is contained in:
ozantonkal
2013-07-03 20:53:03 +03:00
parent 54c7dfab83
commit c8d2b5ff44
10 changed files with 74 additions and 35 deletions

View File

@@ -118,17 +118,22 @@ namespace temp_viz
{
public:
Widget();
Widget(const String &id);
Widget(const Widget &other);
void setId(const String &id);
void setColor(const Color &color);
void setPose(const Affine3f &pose);
void updatePose(const Affine3f &pose);
Affine3f getPose() const;
private:
class Impl;
cv::Ptr<Impl> impl_;
friend struct WidgetAccessor;
};
class LineWidget : public Widget
{
public:
LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color);
};
}

View File

@@ -69,6 +69,8 @@ namespace temp_viz
void registerMouseCallback(void (*callback)(const MouseEvent&, void*), void* cookie = 0);
bool wasStopped() const;
void showWidget(const String &id, const Widget &widget);
private:
Viz3d(const Viz3d&);
Viz3d& operator=(const Viz3d&);

View File

@@ -1,12 +1,11 @@
#pragma once
#include "precomp.hpp"
#include "types.hpp"
#include <opencv2/viz/types.hpp>
namespace temp_viz
{
struct WidgetAccessor
{
static CV_EXPORTS vtkSmartPointer<vtkActor> getActor(const Widget &widget);
static CV_EXPORTS vtkSmartPointer<vtkLODActor> getActor(const Widget &widget);
};
}