Fraxinus  18.10
An IGT application
cxNavigationAlgorithms.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXNAVIGATIONALGORITHMS_H
12 #define CXNAVIGATIONALGORITHMS_H
13 
14 #include "org_custusx_core_view_Export.h"
15 
16 #include "cxTransform3D.h"
17 #include "cxForwardDeclarations.h"
18 #include "cxEnumConverter.h"
19 
20 namespace cx
21 {
22 
34 class org_custusx_core_view_EXPORT NavigationAlgorithms
35 {
36 public:
37 
42  static Vector3D findCameraPosOnLineFixedDistanceFromFocus(Vector3D p_line, Vector3D e_line, double distance, Vector3D focus);
48  static Vector3D elevateCamera(double angle, Vector3D camera, Vector3D focus, Vector3D vup);
53  static Vector3D orthogonalize_vup(Vector3D vup, Vector3D vpn, Vector3D vup_fallback);
58  static Vector3D findCameraPosByZoomingToROI(double viewAngle_vertical, double viewAngle_horizontal,
59  Vector3D focus, Vector3D vup, Vector3D vpn,
60  const DoubleBoundingBox3D& bb);
61 
62  // primitives, used by other algorithms
67  static double findMaxCameraDistance(Vector3D n, double viewAngle,
68  Vector3D focus, Vector3D vpn,
69  const DoubleBoundingBox3D &bb);
74  static double findCameraDistanceKeepPointInViewOneAxis(Vector3D n, double viewAngle,
75  Vector3D focus, Vector3D vpn, Vector3D p);
81  static double findCameraDistanceKeepPointInView(double viewAngle, Vector3D focus, Vector3D vpn, Vector3D p);
82 };
83 
84 
88 } //namespace cx
89 
90 #endif // CXNAVIGATIONALGORITHMS_H
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
Namespace for all CustusX production code.