vtkBiDimensionalRepresentation2D Class Reference

#include <vtkBiDimensionalRepresentation2D.h>

Inheritance diagram for vtkBiDimensionalRepresentation2D:

Inheritance graph
[legend]
Collaboration diagram for vtkBiDimensionalRepresentation2D:

Collaboration graph
[legend]

List of all members.


Detailed Description

represent the vtkBiDimensionalWidget

The vtkBiDimensionalRepresentation2D is used to represent the bi-dimensional measure in a 2D (overlay) context. This representation consists of two perpendicular lines defined by four vtkHandleRepresentations. The four handles can be independently manipulated consistent with the orthogonal constraint on the lines. (Note: the four points are referred to as Point1, Point2, Point3 and Point4. Point1 and Point2 define the first line; and Point3 and Point4 define the second orthogonal line.)

To create this widget, you click to place the first two points. The third point is mirrored with the fourth point; when you place the third point (which is orthogonal to the lined defined by the first two points), the fourth point is dropped as well. After definition, the four points can be moved (in constrained fashion, preserving orthogonality). Further, the entire widget can be translated by grabbing the center point of the widget; each line can be moved along the other line; and the entire widget can be rotated around its center point.

See also:
vtkAngleWidget vtkHandleRepresentation vtkBiDimensionalRepresentation2D
Tests:
vtkBiDimensionalRepresentation2D (Tests)

Definition at line 59 of file vtkBiDimensionalRepresentation2D.h.

typedef vtkWidgetRepresentation Superclass
static int IsTypeOf (const char *type)
static
vtkBiDimensionalRepresentation2D
SafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)

Public Types

enum  {
  Outside = 0, NearP1, NearP2, NearP3,
  NearP4, OnL1Inner, OnL1Outer, OnL2Inner,
  OnL2Outer, OnCenter
}

Public Member Functions

virtual double GetLength1 ()
virtual double GetLength2 ()
char * GetLabelText ()
virtual void SetPoint1WorldPosition (double pos[3])
virtual void SetPoint2WorldPosition (double pos[3])
virtual void SetPoint3WorldPosition (double pos[3])
virtual void SetPoint4WorldPosition (double pos[3])
virtual void GetPoint1WorldPosition (double pos[3])
virtual void GetPoint2WorldPosition (double pos[3])
virtual void GetPoint3WorldPosition (double pos[3])
virtual void GetPoint4WorldPosition (double pos[3])
virtual void SetPoint1DisplayPosition (double pos[3])
virtual void SetPoint2DisplayPosition (double pos[3])
virtual void SetPoint3DisplayPosition (double pos[3])
virtual void SetPoint4DisplayPosition (double pos[3])
virtual void GetPoint1DisplayPosition (double pos[3])
virtual void GetPoint2DisplayPosition (double pos[3])
virtual void GetPoint3DisplayPosition (double pos[3])
virtual void GetPoint4DisplayPosition (double pos[3])
virtual void SetLine1Visibility (int)
virtual int GetLine1Visibility ()
virtual void Line1VisibilityOn ()
virtual void Line1VisibilityOff ()
virtual void SetLine2Visibility (int)
virtual int GetLine2Visibility ()
virtual void Line2VisibilityOn ()
virtual void Line2VisibilityOff ()
void SetHandleRepresentation (vtkHandleRepresentation *handle)
void InstantiateHandleRepresentation ()
virtual vtkHandleRepresentationGetPoint1Representation ()
virtual vtkHandleRepresentationGetPoint2Representation ()
virtual vtkHandleRepresentationGetPoint3Representation ()
virtual vtkHandleRepresentationGetPoint4Representation ()
virtual vtkProperty2DGetLineProperty ()
virtual vtkProperty2DGetSelectedLineProperty ()
virtual vtkTextPropertyGetTextProperty ()
virtual void SetTolerance (int)
virtual int GetTolerance ()
virtual void SetLabelFormat (const char *)
virtual char * GetLabelFormat ()
virtual void BuildRepresentation ()
virtual int ComputeInteractionState (int X, int Y, int modify=0)
virtual void StartWidgetDefinition (double e[2])
virtual void Point2WidgetInteraction (double e[2])
virtual void Point3WidgetInteraction (double e[2])
virtual void StartWidgetManipulation (double e[2])
virtual void WidgetInteraction (double e[2])
virtual void Highlight (int highlightOn)
virtual void ReleaseGraphicsResources (vtkWindow *w)
virtual int RenderOverlay (vtkViewport *viewport)
virtual void SetShowLabelAboveWidget (int)
virtual int GetShowLabelAboveWidget ()
virtual void ShowLabelAboveWidgetOn ()
virtual void ShowLabelAboveWidgetOff ()
void SetID (unsigned long id)
virtual unsigned long GetID ()
double * GetLabelPosition ()
void GetLabelPosition (double pos[3])
void GetWorldLabelPosition (double pos[3])

Static Public Member Functions

static
vtkBiDimensionalRepresentation2D
New ()

Protected Member Functions

 vtkBiDimensionalRepresentation2D ()
 ~vtkBiDimensionalRepresentation2D ()
void ProjectOrthogonalPoint (double x[4], double y[3], double x1[3], double x2[3], double x21[3], double dir, double xP[3])

Protected Attributes

int Modifier
vtkHandleRepresentationHandleRepresentation
vtkHandleRepresentationPoint1Representation
vtkHandleRepresentationPoint2Representation
vtkHandleRepresentationPoint3Representation
vtkHandleRepresentationPoint4Representation
int Tolerance
int Line1Visibility
int Line2Visibility
vtkCellArrayLineCells
vtkPointsLinePoints
vtkPolyDataLinePolyData
vtkPolyDataMapper2DLineMapper
vtkActor2DLineActor
vtkProperty2DLineProperty
vtkProperty2DSelectedLineProperty
vtkTextPropertyTextProperty
vtkTextMapperTextMapper
vtkActor2DTextActor
unsigned long ID
int IDInitialized
double P1World [3]
double P2World [3]
double P3World [3]
double P4World [3]
double P21World [3]
double P43World [3]
double T21
double T43
double CenterWorld [3]
double StartEventPositionWorld [4]
char * LabelFormat
int ShowLabelAboveWidget

Member Typedef Documentation

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

Definition at line 67 of file vtkBiDimensionalRepresentation2D.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
Outside 
NearP1 
NearP2 
NearP3 
NearP4 
OnL1Inner 
OnL1Outer 
OnL2Inner 
OnL2Outer 
OnCenter 

Definition at line 169 of file vtkBiDimensionalRepresentation2D.h.


Constructor & Destructor Documentation

vtkBiDimensionalRepresentation2D::vtkBiDimensionalRepresentation2D (  )  [protected]

vtkBiDimensionalRepresentation2D::~vtkBiDimensionalRepresentation2D (  )  [protected]


Member Function Documentation

static vtkBiDimensionalRepresentation2D* vtkBiDimensionalRepresentation2D::New (  )  [static]

Instantiate the class.

Reimplemented from vtkObject.

virtual const char* vtkBiDimensionalRepresentation2D::GetClassName (  )  [virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

static int vtkBiDimensionalRepresentation2D::IsTypeOf ( const char *  type  )  [static]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

virtual int vtkBiDimensionalRepresentation2D::IsA ( const char *  type  )  [virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

static vtkBiDimensionalRepresentation2D* vtkBiDimensionalRepresentation2D::SafeDownCast ( vtkObject o  )  [static]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

void vtkBiDimensionalRepresentation2D::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkBiDimensionalRepresentation2D::SetPoint1WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetPoint2WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetPoint3WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetPoint4WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint1WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint2WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint3WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint4WorldPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetPoint1DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetPoint2DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetPoint3DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetPoint4DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint1DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint2DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint3DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::GetPoint4DisplayPosition ( double  pos[3]  )  [virtual]

Methods to Set/Get the coordinates of the four points defining this representation. Note that methods are available for both display and world coordinates.

virtual void vtkBiDimensionalRepresentation2D::SetLine1Visibility ( int   )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

virtual int vtkBiDimensionalRepresentation2D::GetLine1Visibility (  )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

virtual void vtkBiDimensionalRepresentation2D::Line1VisibilityOn (  )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

virtual void vtkBiDimensionalRepresentation2D::Line1VisibilityOff (  )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

virtual void vtkBiDimensionalRepresentation2D::SetLine2Visibility ( int   )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

virtual int vtkBiDimensionalRepresentation2D::GetLine2Visibility (  )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

virtual void vtkBiDimensionalRepresentation2D::Line2VisibilityOn (  )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

virtual void vtkBiDimensionalRepresentation2D::Line2VisibilityOff (  )  [virtual]

Special methods for turning off the lines that define the bi-dimensional measure. Generally these methods are used by the vtkBiDimensionalWidget to control the appearance of the widget. Note: turning off Line1 actually turns off Line1 and Line2.

void vtkBiDimensionalRepresentation2D::SetHandleRepresentation ( vtkHandleRepresentation handle  ) 

This method is used to specify the type of handle representation to use for the four internal vtkHandleRepresentations within vtkBiDimensionalRepresentation2D. To use this method, create a dummy vtkHandleRepresentation (or subclass), and then invoke this method with this dummy. Then the vtkBiDimensionalRepresentation2D uses this dummy to clone four vtkHandleRepresentations of the same type. Make sure you set the handle representation before the widget is enabled. (The method InstantiateHandleRepresentation() is invoked by the vtkBiDimensionalWidget for the purposes of cloning.)

void vtkBiDimensionalRepresentation2D::InstantiateHandleRepresentation (  ) 

This method is used to specify the type of handle representation to use for the four internal vtkHandleRepresentations within vtkBiDimensionalRepresentation2D. To use this method, create a dummy vtkHandleRepresentation (or subclass), and then invoke this method with this dummy. Then the vtkBiDimensionalRepresentation2D uses this dummy to clone four vtkHandleRepresentations of the same type. Make sure you set the handle representation before the widget is enabled. (The method InstantiateHandleRepresentation() is invoked by the vtkBiDimensionalWidget for the purposes of cloning.)

virtual vtkHandleRepresentation* vtkBiDimensionalRepresentation2D::GetPoint1Representation (  )  [virtual]

Set/Get the handle representations used within the vtkBiDimensionalRepresentation2D. (Note: properties can be set by grabbing these representations and setting the properties appropriately.)

virtual vtkHandleRepresentation* vtkBiDimensionalRepresentation2D::GetPoint2Representation (  )  [virtual]

Set/Get the handle representations used within the vtkBiDimensionalRepresentation2D. (Note: properties can be set by grabbing these representations and setting the properties appropriately.)

virtual vtkHandleRepresentation* vtkBiDimensionalRepresentation2D::GetPoint3Representation (  )  [virtual]

Set/Get the handle representations used within the vtkBiDimensionalRepresentation2D. (Note: properties can be set by grabbing these representations and setting the properties appropriately.)

virtual vtkHandleRepresentation* vtkBiDimensionalRepresentation2D::GetPoint4Representation (  )  [virtual]

Set/Get the handle representations used within the vtkBiDimensionalRepresentation2D. (Note: properties can be set by grabbing these representations and setting the properties appropriately.)

virtual vtkProperty2D* vtkBiDimensionalRepresentation2D::GetLineProperty (  )  [virtual]

Retrieve the property used to control the appearance of the two orthogonal lines.

virtual vtkProperty2D* vtkBiDimensionalRepresentation2D::GetSelectedLineProperty (  )  [virtual]

Retrieve the property used to control the appearance of the two orthogonal lines.

virtual vtkTextProperty* vtkBiDimensionalRepresentation2D::GetTextProperty (  )  [virtual]

Retrieve the property used to control the appearance of the text labels.

virtual void vtkBiDimensionalRepresentation2D::SetTolerance ( int   )  [virtual]

The tolerance representing the distance to the representation (in pixels) in which the cursor is considered near enough to the representation to be active.

virtual int vtkBiDimensionalRepresentation2D::GetTolerance (  )  [virtual]

The tolerance representing the distance to the representation (in pixels) in which the cursor is considered near enough to the representation to be active.

virtual double vtkBiDimensionalRepresentation2D::GetLength1 (  )  [virtual]

Return the length of the line defined by (Point1,Point2). This is the distance in the world coordinate system.

virtual double vtkBiDimensionalRepresentation2D::GetLength2 (  )  [virtual]

Return the length of the line defined by (Point3,Point4). This is the distance in the world coordinate system.

virtual void vtkBiDimensionalRepresentation2D::SetLabelFormat ( const char *   )  [virtual]

Specify the format to use for labelling the distance. Note that an empty string results in no label, or a format string without a "%" character will not print the distance value.

virtual char* vtkBiDimensionalRepresentation2D::GetLabelFormat (  )  [virtual]

Specify the format to use for labelling the distance. Note that an empty string results in no label, or a format string without a "%" character will not print the distance value.

virtual void vtkBiDimensionalRepresentation2D::BuildRepresentation (  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Implements vtkWidgetRepresentation.

virtual int vtkBiDimensionalRepresentation2D::ComputeInteractionState ( int  X,
int  Y,
int  modify = 0 
) [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkBiDimensionalRepresentation2D::StartWidgetDefinition ( double  e[2]  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

virtual void vtkBiDimensionalRepresentation2D::Point2WidgetInteraction ( double  e[2]  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

virtual void vtkBiDimensionalRepresentation2D::Point3WidgetInteraction ( double  e[2]  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

virtual void vtkBiDimensionalRepresentation2D::StartWidgetManipulation ( double  e[2]  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

virtual void vtkBiDimensionalRepresentation2D::WidgetInteraction ( double  e[2]  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkBiDimensionalRepresentation2D::Highlight ( int  highlightOn  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

virtual void vtkBiDimensionalRepresentation2D::ReleaseGraphicsResources ( vtkWindow w  )  [virtual]

Methods required by vtkProp superclass.

Reimplemented from vtkWidgetRepresentation.

virtual int vtkBiDimensionalRepresentation2D::RenderOverlay ( vtkViewport viewport  )  [virtual]

Methods required by vtkProp superclass.

Reimplemented from vtkProp.

virtual void vtkBiDimensionalRepresentation2D::SetShowLabelAboveWidget ( int   )  [virtual]

Toggle whether to display the label above or below the widget. Defaults to 1.

virtual int vtkBiDimensionalRepresentation2D::GetShowLabelAboveWidget (  )  [virtual]

Toggle whether to display the label above or below the widget. Defaults to 1.

virtual void vtkBiDimensionalRepresentation2D::ShowLabelAboveWidgetOn (  )  [virtual]

Toggle whether to display the label above or below the widget. Defaults to 1.

virtual void vtkBiDimensionalRepresentation2D::ShowLabelAboveWidgetOff (  )  [virtual]

Toggle whether to display the label above or below the widget. Defaults to 1.

void vtkBiDimensionalRepresentation2D::SetID ( unsigned long  id  ) 

Set/get the id to display in the label.

virtual unsigned long vtkBiDimensionalRepresentation2D::GetID (  )  [virtual]

Set/get the id to display in the label.

char* vtkBiDimensionalRepresentation2D::GetLabelText (  ) 

Get the text shown in the widget's label.

double* vtkBiDimensionalRepresentation2D::GetLabelPosition (  ) 

Get the position of the widget's label in display coordinates.

void vtkBiDimensionalRepresentation2D::GetLabelPosition ( double  pos[3]  ) 

Get the position of the widget's label in display coordinates.

void vtkBiDimensionalRepresentation2D::GetWorldLabelPosition ( double  pos[3]  ) 

Get the position of the widget's label in display coordinates.

void vtkBiDimensionalRepresentation2D::ProjectOrthogonalPoint ( double  x[4],
double  y[3],
double  x1[3],
double  x2[3],
double  x21[3],
double  dir,
double  xP[3] 
) [protected]


Member Data Documentation

Definition at line 219 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 222 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 223 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 224 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 225 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 226 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 229 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 232 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 233 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 236 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 237 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 238 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 239 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 240 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 241 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 242 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 245 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 246 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 247 of file vtkBiDimensionalRepresentation2D.h.

unsigned long vtkBiDimensionalRepresentation2D::ID [protected]

Definition at line 249 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 250 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 253 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 254 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 255 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 256 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 257 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 258 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 259 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 260 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 261 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 262 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 265 of file vtkBiDimensionalRepresentation2D.h.

Definition at line 268 of file vtkBiDimensionalRepresentation2D.h.


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

Generated on Wed Jun 3 18:54:08 2009 for VTK by  doxygen 1.5.6