ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvCustomAxisHandleRepresentation Class Reference

Handle representation with custom translation axis support. More...

#include <cvCustomAxisHandleRepresentation.h>

Inheritance diagram for cvCustomAxisHandleRepresentation:
Collaboration diagram for cvCustomAxisHandleRepresentation:

Public Member Functions

 vtkTypeMacro (cvCustomAxisHandleRepresentation, vtkPointHandleRepresentation3D)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetCustomTranslationAxisOn ()
 Enable custom translation axis mode. More...
 
void SetCustomTranslationAxisOff ()
 Disable custom translation axis mode. More...
 
void SetCustomTranslationAxis (double axis[3])
 Set the custom translation axis vector. More...
 
void SetCustomTranslationAxis (double x, double y, double z)
 
 vtkGetVector3Macro (CustomTranslationAxis, double)
 Get the custom translation axis. More...
 
bool IsCustomAxisEnabled () const
 Check if custom translation axis is enabled. More...
 
void GetTranslationVector (const double *p1, const double *p2, double *v) const override
 Override GetTranslationVector to support custom axis. More...
 
void Translate (const double *p1, const double *p2) override
 Override Translate to support custom axis. More...
 
void Translate (const double *v) override
 

Static Public Member Functions

static cvCustomAxisHandleRepresentationNew ()
 

Protected Member Functions

 cvCustomAxisHandleRepresentation ()
 
 ~cvCustomAxisHandleRepresentation () override
 

Protected Attributes

bool CustomAxisEnabled
 
double CustomTranslationAxis [3]
 

Detailed Description

Handle representation with custom translation axis support.

This class extends vtkPointHandleRepresentation3D to add support for custom translation axes, which is available in VTK 9.3+ but not in earlier versions. It follows ParaView's implementation approach.

Definition at line 24 of file cvCustomAxisHandleRepresentation.h.

Constructor & Destructor Documentation

◆ cvCustomAxisHandleRepresentation()

cvCustomAxisHandleRepresentation::cvCustomAxisHandleRepresentation ( )
protected

Definition at line 19 of file cvCustomAxisHandleRepresentation.cpp.

References CustomTranslationAxis.

◆ ~cvCustomAxisHandleRepresentation()

cvCustomAxisHandleRepresentation::~cvCustomAxisHandleRepresentation ( )
overrideprotecteddefault

Member Function Documentation

◆ GetTranslationVector()

void cvCustomAxisHandleRepresentation::GetTranslationVector ( const double *  p1,
const double *  p2,
double *  v 
) const
override

Override GetTranslationVector to support custom axis.

Definition at line 74 of file cvCustomAxisHandleRepresentation.cpp.

References CustomAxisEnabled, and CustomTranslationAxis.

Referenced by Translate().

◆ IsCustomAxisEnabled()

bool cvCustomAxisHandleRepresentation::IsCustomAxisEnabled ( ) const
inline

Check if custom translation axis is enabled.

Definition at line 61 of file cvCustomAxisHandleRepresentation.h.

References CustomAxisEnabled.

◆ New()

static cvCustomAxisHandleRepresentation* cvCustomAxisHandleRepresentation::New ( )
static

◆ PrintSelf()

void cvCustomAxisHandleRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ SetCustomTranslationAxis() [1/2]

void cvCustomAxisHandleRepresentation::SetCustomTranslationAxis ( double  axis[3])

Set the custom translation axis vector.

Parameters
axisThe axis vector (will be normalized internally)

Definition at line 48 of file cvCustomAxisHandleRepresentation.cpp.

References CustomTranslationAxis.

Referenced by SetCustomTranslationAxis().

◆ SetCustomTranslationAxis() [2/2]

void cvCustomAxisHandleRepresentation::SetCustomTranslationAxis ( double  x,
double  y,
double  z 
)

Definition at line 66 of file cvCustomAxisHandleRepresentation.cpp.

References SetCustomTranslationAxis(), x, y, and z.

◆ SetCustomTranslationAxisOff()

void cvCustomAxisHandleRepresentation::SetCustomTranslationAxisOff ( )

Disable custom translation axis mode.

Definition at line 40 of file cvCustomAxisHandleRepresentation.cpp.

References CustomAxisEnabled.

Referenced by cvConstrainedDistanceWidget::ProcessKeyEvents().

◆ SetCustomTranslationAxisOn()

void cvCustomAxisHandleRepresentation::SetCustomTranslationAxisOn ( )

Enable custom translation axis mode.

Definition at line 30 of file cvCustomAxisHandleRepresentation.cpp.

References CustomAxisEnabled.

Referenced by cvConstrainedDistanceWidget::ProcessKeyEvents().

◆ Translate() [1/2]

void cvCustomAxisHandleRepresentation::Translate ( const double *  p1,
const double *  p2 
)
override

Override Translate to support custom axis.

Definition at line 109 of file cvCustomAxisHandleRepresentation.cpp.

References GetTranslationVector().

◆ Translate() [2/2]

void cvCustomAxisHandleRepresentation::Translate ( const double *  v)
override

◆ vtkGetVector3Macro()

cvCustomAxisHandleRepresentation::vtkGetVector3Macro ( CustomTranslationAxis  ,
double   
)

Get the custom translation axis.

◆ vtkTypeMacro()

cvCustomAxisHandleRepresentation::vtkTypeMacro ( cvCustomAxisHandleRepresentation  ,
vtkPointHandleRepresentation3D   
)

Member Data Documentation

◆ CustomAxisEnabled

bool cvCustomAxisHandleRepresentation::CustomAxisEnabled
protected

◆ CustomTranslationAxis

double cvCustomAxisHandleRepresentation::CustomTranslationAxis[3]
protected

The documentation for this class was generated from the following files: