GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/limn/hestLimn.c Lines: 0 15 0.0 %
Date: 2017-05-26 Branches: 0 0 0.0 %

Line Branch Exec Source
1
/*
2
  Teem: Tools to process and visualize scientific data and images             .
3
  Copyright (C) 2013, 2012, 2011, 2010, 2009  University of Chicago
4
  Copyright (C) 2008, 2007, 2006, 2005  Gordon Kindlmann
5
  Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998  University of Utah
6
7
  This library is free software; you can redistribute it and/or
8
  modify it under the terms of the GNU Lesser General Public License
9
  (LGPL) as published by the Free Software Foundation; either
10
  version 2.1 of the License, or (at your option) any later version.
11
  The terms of redistributing and/or modifying this software also
12
  include exceptions to the LGPL that facilitate static linking.
13
14
  This library is distributed in the hope that it will be useful,
15
  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
  Lesser General Public License for more details.
18
19
  You should have received a copy of the GNU Lesser General Public License
20
  along with this library; if not, write to Free Software Foundation, Inc.,
21
  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22
*/
23
24
#include "limn.h"
25
26
/*
27
******** limnHestCameraOptAdd()
28
**
29
** calls hestOptAdd a bunch of times to set up command-line options
30
** useful for specifying a limnCamera.  The flags used are as follows:
31
** fr: cam->from
32
** at: cam->at
33
** up: cam->up
34
** rh: cam->rightHanded
35
** or: cam->orthographic
36
** dn: cam->neer
37
** di: cam->dist
38
** df: cam->faar
39
** ar: cam->atRelative
40
** ur: cam->uRange
41
** vr: cam->vRange
42
** fv: cam->fov
43
*/
44
void
45
limnHestCameraOptAdd(hestOpt **hoptP, limnCamera *cam,
46
                     const char *frDef, const char *atDef, const char *upDef,
47
                     const char *dnDef, const char *diDef, const char *dfDef,
48
                     const char *urDef, const char *vrDef, const char *fvDef) {
49
  hestOpt *hopt;
50
51
  hopt = *hoptP;
52
  hestOptAdd(&hopt, "fr", "eye pos", airTypeDouble, 3, 3, cam->from,
53
             frDef, "camera eye point");
54
  hestOptAdd(&hopt, "at", "at pos", airTypeDouble, 3, 3, cam->at,
55
             atDef, "camera look-at point");
56
  hestOptAdd(&hopt, "up", "up dir", airTypeDouble, 3, 3, cam->up,
57
             upDef, "camera pseudo-up vector");
58
  hestOptAdd(&hopt, "rh", NULL, airTypeInt, 0, 0, &(cam->rightHanded), NULL,
59
             "use a right-handed UVN frame (V points down)");
60
  hestOptAdd(&hopt, "or", NULL, airTypeInt, 0, 0, &(cam->orthographic), NULL,
61
             "orthogonal (not perspective) projection");
62
  hestOptAdd(&hopt, "dn", "near", airTypeDouble, 1, 1, &(cam->neer),
63
             dnDef, "distance to near clipping plane");
64
  hestOptAdd(&hopt, "di", "image", airTypeDouble, 1, 1, &(cam->dist),
65
             diDef, "distance to image plane");
66
  hestOptAdd(&hopt, "df", "far", airTypeDouble, 1, 1, &(cam->faar),
67
             dfDef, "distance to far clipping plane");
68
  hestOptAdd(&hopt, "ar", NULL, airTypeInt, 0, 0, &(cam->atRelative), NULL,
69
             "near, image, and far plane distances are relative to "
70
             "the *at* point, instead of the eye point");
71
  hestOptAdd(&hopt, "ur", "uMin uMax", airTypeDouble, 2, 2, cam->uRange,
72
             urDef, "range in U direction of image plane");
73
  hestOptAdd(&hopt, "vr", "vMin vMax", airTypeDouble, 2, 2, cam->vRange,
74
             vrDef, "range in V direction of image plane");
75
  hestOptAdd(&hopt, "fv", "field of view", airTypeDouble, 1, 1, &(cam->fov),
76
             fvDef, "angle (in degrees) vertically subtended by view window");
77
  *hoptP = hopt;
78
  return;
79
}