NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cx::NavigationAlgorithms Class Reference

#include <cxNavigationAlgorithms.h>

Static Public Member Functions

static Vector3D findCameraPosOnLineFixedDistanceFromFocus (Vector3D p_line, Vector3D e_line, double distance, Vector3D focus)
 
static Vector3D elevateCamera (double angle, Vector3D camera, Vector3D focus, Vector3D vup)
 
static Vector3D orthogonalize_vup (Vector3D vup, Vector3D vpn, Vector3D vup_fallback)
 
static Vector3D findCameraPosByZoomingToROI (double viewAngle_vertical, double viewAngle_horizontal, Vector3D focus, Vector3D vup, Vector3D vpn, const DoubleBoundingBox3D &bb)
 
static double findMaxCameraDistance (Vector3D n, double viewAngle, Vector3D focus, Vector3D vpn, const DoubleBoundingBox3D &bb)
 
static double findCameraDistanceKeepPointInViewOneAxis (Vector3D n, double viewAngle, Vector3D focus, Vector3D vpn, Vector3D p)
 
static double findCameraDistanceKeepPointInView (double viewAngle, Vector3D focus, Vector3D vpn, Vector3D p)
 

Detailed Description

A collection of algorithms used in navigation.

Stateless.

Definition at line 33 of file cxNavigationAlgorithms.h.

Member Function Documentation

◆ elevateCamera()

Vector3D cx::NavigationAlgorithms::elevateCamera ( double  angle,
Vector3D  camera,
Vector3D  focus,
Vector3D  vup 
)
static

Given a camera looking at a focus with a vup, Elevate the camera a given angle towards up, keeping distance |camera-focus| constant. Return the new camera position.

Definition at line 68 of file cxNavigationAlgorithms.cpp.

◆ findCameraDistanceKeepPointInView()

double cx::NavigationAlgorithms::findCameraDistanceKeepPointInView ( double  viewAngle,
Vector3D  focus,
Vector3D  vpn,
Vector3D  p 
)
static

Given a viewangle, focus and vpn, find the camera distance required to keep p in view. The resulting distance is the minimum camera distance required to see p.

Definition at line 134 of file cxNavigationAlgorithms.cpp.

◆ findCameraDistanceKeepPointInViewOneAxis()

double cx::NavigationAlgorithms::findCameraDistanceKeepPointInViewOneAxis ( Vector3D  n,
double  viewAngle,
Vector3D  focus,
Vector3D  vpn,
Vector3D  p 
)
static

As findCameraDistanceKeepPointInView(), but do all the calculations in a plane defined by n. The viewAngle is the view angle in plane n.

Definition at line 118 of file cxNavigationAlgorithms.cpp.

◆ findCameraPosByZoomingToROI()

Vector3D cx::NavigationAlgorithms::findCameraPosByZoomingToROI ( double  viewAngle_vertical,
double  viewAngle_horizontal,
Vector3D  focus,
Vector3D  vup,
Vector3D  vpn,
const DoubleBoundingBox3D bb 
)
static

Given a scene with focus and vpn+vup, and vertical+horizontal view angles, find a camera pos that keeps the entire input bounding box in view.

Definition at line 90 of file cxNavigationAlgorithms.cpp.

◆ findCameraPosOnLineFixedDistanceFromFocus()

Vector3D cx::NavigationAlgorithms::findCameraPosOnLineFixedDistanceFromFocus ( Vector3D  p_line,
Vector3D  e_line,
double  distance,
Vector3D  focus 
)
static

Given a line (p_line, e_line), Find a (camera) point on that line at a given distance from focus.

Definition at line 19 of file cxNavigationAlgorithms.cpp.

◆ findMaxCameraDistance()

double cx::NavigationAlgorithms::findMaxCameraDistance ( Vector3D  n,
double  viewAngle,
Vector3D  focus,
Vector3D  vpn,
const DoubleBoundingBox3D bb 
)
static

Used by findCameraPosByZoomingToROI(), input a plane n+viewAngle and find camera distance for this plane.

Definition at line 102 of file cxNavigationAlgorithms.cpp.

◆ orthogonalize_vup()

Vector3D cx::NavigationAlgorithms::orthogonalize_vup ( Vector3D  vup,
Vector3D  vpn,
Vector3D  vup_fallback 
)
static

Find a vup (view up vector) orthogonal to vpn (view plane normal), Use vup_fallback if the two are parallel.

Definition at line 52 of file cxNavigationAlgorithms.cpp.


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