vtkInteractorStyleImage をサブクラス化して、クリック時のマウスの動作を変更したいと考えています。Qt Creator を使用しており、vtkinteractorStyleImage などを試してみました。
ここに私のコード。
vtkinteractorstylevisor.h:
#define VTK_EXCLUDE_STRSTREAM_HEADERS
#ifndef VTKINTERACTORSTYLEVISOR_H
#define VTKINTERACTORSTYLEVISOR_H
#include <vtkInteractorStyleImage.h>
class VTK_RENDERING_EXPORT vtkInteractorStyleVisor : public vtkInteractorStyleImage
{
public:
static vtkInteractorStyleVisor* New();
vtkTypeMacro(vtkInteractorStyleVisor, vtkInteractorStyleImage)
virtual void OnLeftButtonDown();
protected:
vtkInteractorStyleVisor();
~vtkInteractorStyleVisor();
};
#endif // VTKINTERACTORSTYLEVISOR_H
vtkinteractorstyle.cpp
#include <vtkinteractorstylevisor.h>
#include <vtkObjectFactory.h>
vtkStandardNewMacro(vtkInteractorStyleVisor)
左クリック動作の実装を開始したいのですが、これをコンパイルすると次のエラーが発生します。
vtkinteractorstylevisor.cpp:-1: エラー: `vtkInteractorStyleVisor::vtkInteractorStyleVisor()' への未定義の参照:-1: エラー: collect2: エラー: ld が 1 つの終了ステータスを返しました
助言がありますか?ありがとう。