1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkCursor3D.h,v $
6 Date: $Date: 2002/02/01 06:33:16 $
7 Version: $Revision: 1.1.1.1 $
10 Copyright (c) 1993-1998 Ken Martin, Will Schroeder, Bill Lorensen.
12 This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
13 The following terms apply to all files associated with the software unless
14 explicitly disclaimed in individual files. This copyright specifically does
15 not apply to the related textbook "The Visualization Toolkit" ISBN
16 013199837-4 published by Prentice Hall which is covered by its own copyright.
18 The authors hereby grant permission to use, copy, and distribute this
19 software and its documentation for any purpose, provided that existing
20 copyright notices are retained in all copies and that this notice is included
21 verbatim in any distributions. Additionally, the authors grant permission to
22 modify this software and its documentation for any purpose, provided that
23 such modifications are not distributed without the explicit consent of the
24 authors and that existing copyright notices are retained in all copies. Some
25 of the algorithms implemented by this software are patented, observe all
26 applicable patent law.
28 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
29 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
30 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
31 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
34 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
35 PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
36 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
37 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
40 =========================================================================*/
41 // .NAME vtkCursor3D - generate a 3D cursor representation
42 // .SECTION Description
43 // vtkCursor3D is an object that generates a 3D representation of a cursor.
44 // The cursor consists of a wireframe bounding box, three intersecting
45 // axes lines that meet at the cursor focus, and "shadows" or projections
46 // of the axes against the sides of the bounding box. Each of these
47 // components can be turned on/off.
49 // This filter generates two output datasets. The first (Output) is just the
50 // geometric representation of the cursor. The second (Focus) is a single
51 // point at the focal point.
53 #ifndef __vtkCursor3D_h
54 #define __vtkCursor3D_h
56 #include "vtkPolyDataSource.h"
58 class VTK_EXPORT vtkCursor3D : public vtkPolyDataSource
63 static vtkCursor3D *New() {return new vtkCursor3D;};
64 const char *GetClassName() {return "vtkCursor3D";};
65 void PrintSelf(ostream& os, vtkIndent indent);
67 void SetModelBounds(float *bounds);
68 void SetModelBounds(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax);
69 vtkGetVectorMacro(ModelBounds,float,6);
72 // Specify the position of cursor focus.
73 vtkSetVector3Macro(FocalPoint,float);
74 vtkGetVectorMacro(FocalPoint,float,3);
77 // Turn on/off the wireframe bounding box.
78 vtkSetMacro(Outline,int);
79 vtkGetMacro(Outline,int);
80 vtkBooleanMacro(Outline,int);
83 // Turn on/off the wireframe axes.
84 vtkSetMacro(Axes,int);
85 vtkGetMacro(Axes,int);
86 vtkBooleanMacro(Axes,int);
89 // Turn on/off the wireframe x-shadows.
90 vtkSetMacro(XShadows,int);
91 vtkGetMacro(XShadows,int);
92 vtkBooleanMacro(XShadows,int);
95 // Turn on/off the wireframe y-shadows.
96 vtkSetMacro(YShadows,int);
97 vtkGetMacro(YShadows,int);
98 vtkBooleanMacro(YShadows,int);
101 // Turn on/off the wireframe z-shadows.
102 vtkSetMacro(ZShadows,int);
103 vtkGetMacro(ZShadows,int);
104 vtkBooleanMacro(ZShadows,int);
107 // Turn on/off cursor wrapping. If the cursor focus moves outside the
108 // specified bounds, the cursor will either be restrained against the
109 // nearest "wall" (Wrap=off), or it will wrap around (Wrap=on).
110 vtkSetMacro(Wrap,int);
111 vtkGetMacro(Wrap,int);
112 vtkBooleanMacro(Wrap,int);
115 // Get the focus for this filter.
116 vtkPolyData *GetFocus() {return (vtkPolyData *)this->Focus;};
118 // Convenience methods turn all wires on or off.
126 float ModelBounds[6];