|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
21 e_line = e_line.normal();
26 Vector3D p_ff = p_line + e_line *
dot(focus-p_line, e_line);
27 double q_sq = distance*distance -
dot(focus-p_ff, focus-p_ff);
34 double q = sqrt(q_sq);
62 vup =
cross(vpn, left).normal();
77 j =
cross(k, i).normal();
85 camera = (aMb*R*bMa).coord(camera);
96 double dist = std::max(dist_v, dist_h);
98 Vector3D camera_r_t = focus + vpn*dist;
104 std::vector<double> dists;
105 for (
unsigned x=0; x<2; ++x)
106 for (
unsigned y=0; y<2; ++y)
107 for (
unsigned z=0; z<2; ++z)
114 double maxDist = *std::max_element(dists.begin(), dists.end());
129 double cos_plane_angle =
dot(vpn, vpn_p);
130 d_p = d_p / cos_plane_angle;
137 double beta = (p-pp).
length() / tan(viewAngle/2);
139 double dist = beta +
dot(pp-focus, vpn);
static Vector3D findCameraPosByZoomingToROI(double viewAngle_vertical, double viewAngle_horizontal, Vector3D focus, Vector3D vup, Vector3D vpn, const DoubleBoundingBox3D &bb)
Transform3D createTransformRotateZ(const double angle)
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,...
Namespace for all CustusX production code.
Vector3D corner(int x, int y, int z) const
Transform3D createTransformIJC(const Vector3D &ivec, const Vector3D &jvec, const Vector3D ¢er)
RealScalar length() const
Vector3D cross(const Vector3D &a, const Vector3D &b)
compute cross product of a and b.
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
static double findCameraDistanceKeepPointInViewOneAxis(Vector3D n, double viewAngle, Vector3D focus, Vector3D vpn, Vector3D p)
#define CX_LOG_CHANNEL_DEBUG(channel)
static double findMaxCameraDistance(Vector3D n, double viewAngle, Vector3D focus, Vector3D vpn, const DoubleBoundingBox3D &bb)
static double findCameraDistanceKeepPointInView(double viewAngle, Vector3D focus, Vector3D vpn, Vector3D p)
PlainObject normal() const
static Vector3D orthogonalize_vup(Vector3D vup, Vector3D vpn, Vector3D vup_fallback)
static Vector3D elevateCamera(double angle, Vector3D camera, Vector3D focus, Vector3D vup)
double dot(const Vector3D &a, const Vector3D &b)
compute inner product (or dot product) of a and b.
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
static Vector3D findCameraPosOnLineFixedDistanceFromFocus(Vector3D p_line, Vector3D e_line, double distance, Vector3D focus)