VTK
dox/Interaction/Widgets/vtkFocalPlanePointPlacer.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkFocalPlanePointPlacer.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 // .SECTION Description
00016 //
00017 //
00018 // .SECTION See Also
00019 
00020 #ifndef __vtkFocalPlanePointPlacer_h
00021 #define __vtkFocalPlanePointPlacer_h
00022 
00023 #include "vtkInteractionWidgetsModule.h" // For export macro
00024 #include "vtkPointPlacer.h"
00025 
00026 class vtkRenderer;
00027 
00028 class VTKINTERACTIONWIDGETS_EXPORT vtkFocalPlanePointPlacer : public vtkPointPlacer
00029 {
00030 public:
00032   static vtkFocalPlanePointPlacer *New();
00033 
00035 
00036   vtkTypeMacro(vtkFocalPlanePointPlacer,vtkPointPlacer);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00039 
00040   // Descirption:
00041   // Given a renderer and a display position, compute
00042   // the world position and orientation. The orientation
00043   // computed by the placer will always line up with the
00044   // standard coordinate axes. The world position will be
00045   // computed by projecting the display position onto the
00046   // focal plane. This method is typically used to place a
00047   // point for the first time.
00048   int ComputeWorldPosition( vtkRenderer *ren,
00049                             double displayPos[2],
00050                             double worldPos[3],
00051                             double worldOrient[9] );
00052 
00054 
00060   int ComputeWorldPosition( vtkRenderer *ren,
00061                             double displayPos[2],
00062                             double refWorldPos[3],
00063                             double worldPos[3],
00064                             double worldOrient[9] );
00066 
00068 
00070   int ValidateWorldPosition( double worldPos[3] );
00071   int ValidateWorldPosition( double worldPos[3],
00072                              double worldOrient[9]);
00074 
00076 
00079   vtkSetMacro( Offset, double );
00080   vtkGetMacro( Offset, double );
00082 
00084 
00086   vtkSetVector6Macro( PointBounds, double );
00087   vtkGetVector6Macro( PointBounds, double );
00089 
00090 protected:
00091   vtkFocalPlanePointPlacer();
00092   ~vtkFocalPlanePointPlacer();
00093 
00094   void GetCurrentOrientation( double worldOrient[9] );
00095 
00096   double PointBounds[6];
00097   double Offset;
00098 
00099 private:
00100   vtkFocalPlanePointPlacer(const vtkFocalPlanePointPlacer&);  //Not implemented
00101   void operator=(const vtkFocalPlanePointPlacer&);  //Not implemented
00102 };
00103 
00104 #endif