HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GUI_ViewParameter.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GUI_ViewParameter (Geometry Render Library, C++)
7  *
8  * COMMENTS:
9  * ViewParameter contains information relating to the
10  * viewport's physical characteristics, eg aspect ratio,
11  * position, lookat.
12  *
13  */
14 
15 #ifndef __GUI_ViewParameter__
16 #define __GUI_ViewParameter__
17 
18 #include "GUI_API.h"
19 #include <UT/UT_BoundingBox.h>
20 #include <UT/UT_Matrix3.h>
21 #include <UT/UT_Matrix4.h>
22 #include <UT/UT_Quaternion.h>
23 #include <UT/UT_Rect.h>
24 #include <UT/UT_Vector3.h>
25 #include <UT/UT_Plane.h>
26 
27 class RE_Render;
28 
29 typedef void (*GRgetTransformCallback)(UT_DMatrix4 &, fpreal time, void *);
30 
32 {
33 public:
35  {
36  ortho = 0;
37  applyAspect = 0;
38  matrixDirty = 1;
39  iMatrixDirty = 1;
40  boxZoom = 0;
41  viewportDirty = 0;
42  rotoTrackWindow = 0;
43  initXform = 0;
44  rxyzDirty = 1;
45  }
46 
47  // ASCII methods to save and load flags
48  void save(std::ostream &os) const;
49  bool load(UT_IStream &is);
50 
51  unsigned ortho:1,
52  applyAspect:1,
53  matrixDirty:1,
54  iMatrixDirty:1,
55  boxZoom:1,
56  viewportDirty:1,
57  rotoTrackWindow:1,
58  initXform:1,
59  rxyzDirty:1;
60 };
61 
63 {
64 public:
67 
68  enum axis { OBLIQUE, CUSTOM, XAXIS, YAXIS, ZAXIS,
69  FRONT, RIGHT, TOP, BACK, LEFT, BOTTOM };
70 
71  enum orientation { Y_UP, Z_UP };
72 
74  {
75  int w,h;
76  getViewportSize(w,h);
77  area.set(myViewportLeft, myViewportBottom, w,h);
78  }
79  void getViewport(int &l, int &r, int &b, int &t) const;
80  void getViewportSize(int &w, int &h) const
81  {
82  // Note that we have inclusive coordinates.
83  w = myViewportRight - myViewportLeft + 1;
84  h = myViewportTop - myViewportBottom + 1;
85  }
86  int getViewportWidth() const
87  { return myViewportRight - myViewportLeft + 1; }
88  int getViewportHeight() const
89  { return myViewportTop - myViewportBottom + 1; }
90  void setViewport(RE_Render *r, int x, int y, int w, int h);
91  void setViewport(RE_Render *r, const UT_DimRect &viewarea)
92  { setViewport(r, viewarea.x(), viewarea.y(),
93  viewarea.w(), viewarea.h()); }
94 
95  // Utility for converting our viewport into a UT_Rect.
97  { return UT_InclusiveRect(myViewportLeft, myViewportBottom,
98  myViewportRight, myViewportTop); }
99 
100 
101  // Both setViewport and setView must be called before setProjection.
102  // r may be NULL to set the projection matrix without loading it into
103  // RE_Render.
104  void setProjection(RE_Render *r);
105 
106  // Returns the projection matrix. If depth_adjust is false, Z is not
107  // mapped to [0,1], and instead remains as-is.
108  void getProjection(UT_Matrix4D &view, bool depth_adjust=true);
109 
110 
111  // temporarily use this projection matrix. This class does not take
112  // ownership.
113  void setProjectionOverride(UT_Matrix4D *override);
114 
115  // Get the direction a particular point (px, py) in the camera's
116  // near plane is pointing to in world coordinates. The range of
117  // (px, py) is (0, 0) to (1, 1) with (0, 0) representing the
118  // lower-left corner and the default arguments represent the center of
119  // the screen.
120  UT_Vector3 getCameraDir(fpreal px = 0.5, fpreal py = 0.5);
121 
122  // A utility method to return the world space plane representing our
123  // view plane. The point will be set to the center of the view and
124  // the normal will point towards the camera.
125  UT_PlaneD getViewPlane();
126 
127  // The view is a subregion of the viewport that represents the current
128  // "camera" view. Aspect ratio bars are used to dim the parts of the
129  // viewport not in this view. The window coordinates are relative to
130  // this view, not the viewport.
131  void setView(const UT_DimRect &area)
132  { setView(area.x(), area.y(), area.w(), area.h()); }
133  void setView(int x, int y, int w, int h);
134  void getView(int &l, int &r, int &b, int &t) const;
135  int getViewWidth() const
136  { return myViewRight - myViewLeft + 1; }
137  int getViewHeight() const
138  { return myViewTop - myViewBottom + 1; }
139 
140  // A handy method to compute projection bounds for the viewport such
141  // that the specified bounds map to the view subregion.
142  void viewToViewportProjectionBounds(
143  fpreal &left, fpreal &right,
144  fpreal &bottom, fpreal &top) const;
145 
146  // Convenience methods to query the margins on each side of the view
147  // subregion.
148  int getLeftMargin() const
149  { return myViewLeft - myViewportLeft; }
150  int getRightMargin() const
151  { return myViewportRight - myViewRight; }
152  int getBottomMargin() const
153  { return myViewBottom - myViewportBottom; }
154  int getTopMargin() const
155  { return myViewportTop - myViewTop; }
156 
157  void homeToBox(int width, int height, fpreal minzoom,
158  UT_BoundingBox &box, const UT_Matrix3R *rot = NULL,
159  bool centre_to_origin = false, bool zoom_in = false);
160  void homeRotation(axis a, UT_Matrix3R &rot) const;
161  void homeRotation(axis a);
162 
163  void resetFOV();
164 
165  // Query the rotation that converts the view rotation from the old mode
166  // to the new mode.
167  static void getOrientationChangeRotation(
170  UT_Matrix3R &rot);
171 
172  // Convert a view transform relative to the old_mode to the corresponding
173  // view transform relative to the new mode.
174  void convertTransform(GUI_ViewParameter::axis home_axis,
177 
178  void rotate(UT_Axis3::axis axis, fpreal dx);
179  void rotate(const UT_Vector3R &axis, fpreal dx);
180  void rotate(const UT_Quaternion &quat);
181  void trackball(fpreal dx, fpreal dy);
182  void incrementtrackball(fpreal dx, fpreal dy, int finish);
183  void eulertumble(fpreal dx, fpreal dy, int finish, bool lock);
184  void dotumble(fpreal dx, fpreal dy, int finish);
185 
186  void scroll(fpreal dx, fpreal dy);
187  // Scroll using the specified viewport size instead of our settings. Used
188  // for scrolling linked ortho viewports.
189  void scroll(fpreal dx, fpreal dy, const UT_InclusiveRect &viewport);
190 
191  void dolly(fpreal dx,
192  bool precise_zoom = false,
193  bool smooth_deltas = false);
194 
195  // Dolly using a specified world-space direction (instead of towards the
196  // center of the view as in a regular dolly). The use of world space is
197  // a convenience for the GUI_ViewState wrapper that would otherwise have
198  // to transform this to a view space direction for each instance of this
199  // class.
200  void directedDolly(const UT_Vector3R &unit_worldspace_dir,
201  fpreal dx, bool precise_zoom = false,
202  bool smooth_deltas = false);
203 
205  {
207  GUI_ORTHO_WIDTH
208  };
209  void zoom(fpreal dx, GUI_ZoomItem item, bool precise_zoom = false);
210  // Zoom using the specified viewport size instead of our settings. Used
211  // for zooming linked ortho viewports.
212  void zoom(fpreal dx, GUI_ZoomItem item,
213  const UT_InclusiveRect &viewport,
214  bool precise_zoom = false);
215 
216  // Versions of the zoom() methods that center the zoom around the given
217  // (normalized) screen position (sx, sy). This affects either the window
218  // offset, when GUI_WIN_SIZE is specified, or the view position, when
219  // GUI_ORTHO_WIDTH is specified.
220  void offsetZoom(fpreal sx, fpreal sy, fpreal dx, GUI_ZoomItem item,
221  bool precise_zoom = false);
222  void offsetZoom(fpreal sx, fpreal sy, fpreal dx, GUI_ZoomItem item,
223  const UT_InclusiveRect &viewport,
224  bool precise_zoom = false);
225 
226  // Dolly onto a target located at a specified distance.
227  // Note that the location and size of the "box" must be
228  // normalized to [0, 1]
229  // ** Note : Aspect ratio of the box is assumed to match aspect ratio
230  // of the viewport!
231  void boxZoom(fpreal firstx, fpreal firsty, fpreal lastx,
232  fpreal lasty, fpreal distance);
233 
234  // Returns the width of the frustum cross-section at the distance t.
235  static fpreal getFrustumWidth(fpreal t, fpreal aperture, fpreal focal_length,
236  fpreal orthowidth, bool is_ortho);
237 
238  // Returns the centre of the frustum (cx, cy) and the half-width and
239  // half-height (hw, hh), from these, you can compute the corners of the
240  // frustum.
241  static void getFrustumCenter(fpreal frustum_width, fpreal aspect,
242  fpreal x_offset, fpreal y_offset,
243  fpreal x_window_size, fpreal y_window_size,
244  fpreal &cx, fpreal &cy,
245  fpreal &hw, fpreal &hh);
246 
247 // member data access methods
248 
249  bool isDirty() const { return (myFlag.viewportDirty ||
250  myFlag.matrixDirty ||
251  myFlag.iMatrixDirty); }
252  // bumped whenever the view has changed.
253  int getViewVersion() const { return myVersion; }
254 
255  // projection
256  int initialized() const { return myFlag.initXform; }
257  int getOrthoFlag() const { return myFlag.ortho; }
258  void setOrthoFlag(int o) { myFlag.ortho = o; }
259  void setLimits(fpreal n, fpreal f) { setNearClip(n); setFarClip(f); }
261  {
262  *n = myView.myNearLimit;
263  *f = myView.myFarLimit;
264  }
265  void setNearClip(fpreal near);
266  void setFarClip(fpreal far);
267  fpreal getNearClip() const { return myView.myNearLimit; }
268  fpreal getFarClip() const { return myView.myFarLimit; }
269 
271  {
272  myView.myWinX = x;
273  myView.myWinY = y;
274  myView.myWinW = SYSmax(w, fpreal(0.001));
275  myView.myWinH = SYSmax(h, fpreal(0.001));
276  }
278  fpreal &w, fpreal &h) const
279  {
280  x = myView.myWinX;
281  y = myView.myWinY;
282  w = myView.myWinW;
283  h = myView.myWinH;
284  }
285 
286  // The window is stored as an offset from 0, 0 with the scale applied prior
287  // to translation. However, mantra and other renderers expect the window
288  // to be relative to the (0,1) rectangle. getScreenWindow() will translate
289  // the window parameters into a screen window. setScreenWindow() will take
290  // a screen window and set the appropriate parameters.
292  fpreal &b, fpreal &t) const
293  {
294  convertViewToScreenWindow(myView.myWinX, myView.myWinY,
295  myView.myWinW, myView.myWinH,
296  l, r, b, t);
297  }
299  {
300  convertScreenToViewWindow(l, r, b, t,
301  myView.myWinX, myView.myWinY,
302  myView.myWinW, myView.myWinH);
303  }
304 
305  static void convertScreenToViewWindow(
306  fpreal l, fpreal r, fpreal b, fpreal t,
307  fpreal &xoff, fpreal &yoff, fpreal &xsize, fpreal &ysz);
308  static void convertViewToScreenWindow(
309  fpreal xoff, fpreal yoff, fpreal xsize, fpreal ysize,
310  fpreal &l, fpreal &r, fpreal &b, fpreal &t);
311 
312  fpreal getWinSizeX() const { return myView.myWinW; }
313  fpreal getWinSizeY() const { return myView.myWinH; }
314  fpreal getWinX() const { return myView.myWinX; }
315  fpreal getWinY() const { return myView.myWinY; }
316 
318  {
319  GUI_VIEW_ADJUST_NONE = 0,
320  GUI_VIEW_ADJUST_FAR = 1,
321  GUI_VIEW_ADJUST_NEAR = 2,
322  GUI_VIEW_ADJUST_BOTH = 3
323  };
325  { myAdjustLimits = which; }
326  GUI_ViewAdjustLimits getAdjustLimits() const { return myAdjustLimits; }
327 
328  void setWindowAffectRotoscope(int v) { myFlag.rotoTrackWindow = v; }
330  { return myFlag.rotoTrackWindow; }
331 
332  // aspectRatio
333  void setApplyAspectFlag(int a) { myFlag.applyAspect = a; }
334  int getApplyAspectFlag() const { return myFlag.applyAspect; }
335  void setAspectRatio(fpreal a) { myViewAspectRatio = a; }
336  fpreal getAspectRatio() const { return myViewAspectRatio; }
337 
339  {
340  myFrustumWidthScale = xsc;
341  myFrustumHeightScale = ysc;
342  }
343 
344  // position
345  void setT(const UT_Vector3D &t)
346  { myView.myT = t; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
347  void setTx(fpreal v)
348  { myView.myT.x()=v; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
349  void setTy(fpreal v)
350  { myView.myT.y()=v; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
351  void setTz(fpreal v)
352  { myView.myT.z() = v; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
353 
354  UT_Vector3D getT() const { return myView.myT; }
355  fpreal getTx() const { return myView.myT.x(); }
356  fpreal getTy() const { return myView.myT.y(); }
357  fpreal getTz() const { return myView.myT.z(); }
358 
359  // pivot
360  UT_Vector3D getP() const { return myView.myP; }
361  fpreal getPx() const { return myView.myP.x(); }
362  fpreal getPy() const { return myView.myP.y(); }
363  fpreal getPz() const { return myView.myP.z(); }
364  void setP(const UT_Vector3D &p)
365  { myView.myP = p; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
366  void setPx(fpreal v)
367  { myView.myP.x() = v; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
368  void setPy(fpreal v)
369  { myView.myP.y() = v; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
370  void setPz(fpreal v)
371  { myView.myP.z() = v; myFlag.matrixDirty=1; myFlag.iMatrixDirty=1;}
372 
374  { myOrientationMode = o; }
375  static orientation getOrientationMode() { return myOrientationMode; }
376  static bool isOrientationYUp()
377  { return myOrientationMode == Y_UP; }
378  static bool isOrientationZUp()
379  { return myOrientationMode == Z_UP; }
380 
381  // Rotation style:
382  static void setTumbleStyleFlag(int style)
383  { myTumbleStyle = style; }
384  static int getTumbleStyleFlag() { return myTumbleStyle; }
385  static void setAltKeyViewControlsFlag(int style)
386  { myAltKeyViewControls = style; }
387  static int getAltKeyViewControlsFlag() { return myAltKeyViewControls; }
388  static void setScrollStyleFlag(int style)
389  { myScrollStyle = style; }
390  static int getScrollStyleFlag() { return myScrollStyle; }
391  static void setDefaultHomingStyleFlag(int style)
392  { myDefaultHomingStyle = GUI_ViewParameter::axis(style); }
393  static axis getDefaultHomingStyleFlag() { return myDefaultHomingStyle; }
394 
395  // the resulting matrices
396  void setRotateMatrix(const UT_Matrix3D &mat)
397  { myView.myRotateMatrix = mat;
398  myFlag.matrixDirty = 1;
399  myFlag.iMatrixDirty = 1;
400  myFlag.rxyzDirty = 1; }
401  const UT_Matrix4D &getRotateMatrix() const { return myView.myRotateMatrix; }
402 
404  { return myProjectionOverride ? *myProjectionOverride
405  : myView.myProjectionMatrix; }
406  const UT_Matrix4D &getTransformMatrix() { updateTransformMatrix();
407  return myTransformMatrix; }
408  const UT_Matrix4D &getItransformMatrix() { updateItransformMatrix();
409  return myItransformMatrix; }
410 
411  // This sets the transform matrix to the given value, bypassing the
412  // PX, TX, etc. The purpose of this is to get accurate camera transforms
413  // you can first set all the PX, Rotate, etc, according to the cracked
414  // values, and then do a forceTransformMatrix to ensure the user sees
415  // the most accurate possible matrix.
416  void forceTransformMatrix(const UT_DMatrix4 &mat);
417  void getTransformMatrix(UT_DMatrix4 &mat, fpreal time);
419  void *data)
420  {
421  myTransformCallback = callback;
422  myTransformCallbackData = data;
423  }
424 
425  // Class I/O methods. They return 0 if successful, -1 if not.
426  int save(std::ostream &os, char separator = '\n') const;
427  bool load(UT_IStream &is);
428  bool oldLoad(UT_IStream &is, int version);
429 
430  // inline for non-virtual class
431  const char *className() const { return "GUI_ViewParameter"; }
432 
433  fpreal getLastHomeRadius() const { return myLastHomeRadius; }
434 
435  void setHomeAxis(axis homeaxis)
436  { myHomeAxis = homeaxis; myFlag.rxyzDirty = 1; }
437  axis getHomeAxis() const { return myHomeAxis; }
438  void setCustomHomeRot(UT_Matrix3R &rot) { myCustomHomeRot = rot; }
439  const UT_Matrix3R &getCustomHomeRot() const { return myCustomHomeRot; }
440 
441 
442  void setOrthoWidth(fpreal w) { myView.myOrthoWidth = w; }
443  fpreal getOrthoWidth() const { return myView.myOrthoWidth; }
444 
445  void setFocalLength(fpreal f) { myView.myFocalLength = f; }
446  fpreal getFocalLength() const { return myView.myFocalLength; }
447 
448  void setAperture(fpreal a) { myView.myAperture = a; }
449  fpreal getAperture() const { return myView.myAperture; }
450  fpreal getNearLimit() const { return myView.myNearLimit; }
451  fpreal getFarLimit() const { return myView.myFarLimit; }
452 
453  fpreal getZBufferNear() const { return myZBufferNear; }
454  fpreal getZBufferFar() const { return myZBufferFar; }
455 
456  // viewport clearing
458 
459  // fog
460  int myFog;
462  float myFogNear;
463  float myFogFar;
464  float myFogColor[3];
465  float myFogAlpha;
466 
467  // used for rotoscoping only
469 
470  // container for all view home information
471  class gui_View
472  {
473  public:
475  : myT(0.0, 0.0, 0.1),
476  myP(0.0, 0.0, 0.0),
477  myRotateMatrix(1.0),
478  myProjectionMatrix(1.0),
479  myWinX(0.0),
480  myWinY(0.0),
481  myWinW(1.0),
482  myWinH(1.0),
483  myOrthoWidth(1.0),
484  myFocalLength(50.0),
485  myAperture(41.4214),
486  myNearLimit(0.1),
487  myFarLimit(10000.0)
488  {}
489 
492 
495 
496  // window (zooming)
501 
502  // projection information
503  // ortho specific
505 
506  // perspective specific sSee diagram below)
509 
512  };
513 
514  // methods to quickly stash and recall the view state.
515  void getViewState(gui_View &view_state) const
516  { view_state = myView; }
517  void setViewState(const gui_View &view_state)
518  {
519  myView = view_state;
520  myFlag.matrixDirty=1;
521  myFlag.iMatrixDirty=1;
522  myFlag.rxyzDirty=1;
523  }
524 
525  // clipping
526 private:
527  fpreal myZBufferNear;
528  fpreal myZBufferFar;
529  GUI_ViewAdjustLimits myAdjustLimits;
530 
531  // aspect ratio
532  fpreal myViewAspectRatio;
533 public:
534  fpreal myPixelAspect; // depends on output device
535 
536 // projection information (see docs below)
547 
549 
550 private:
551  void updateTransformMatrix();
552  void updateItransformMatrix();
553  void updateRXYZValues();
554  fpreal getDistanceToBoxCenter(int clamp = 0) const;
555 
556  void internalScroll(fpreal dx, fpreal dy,
557  const UT_InclusiveRect &viewport,
558  bool decouple_axes);
559  void internalZoom(fpreal dx, GUI_ZoomItem item, int width);
560  void internalOffsetZoom(fpreal sx, fpreal sy, fpreal dx,
561  GUI_ZoomItem item,
562  const UT_InclusiveRect &viewport);
563 
564  void getFrustumClip(fpreal &l, fpreal &r, fpreal &t, fpreal &b,
565  fpreal &n, fpreal &f);
566  fpreal computeZoomDelta(fpreal dx,
567  bool precise_zoom,
568  bool smooth_deltas);
569 
570  GUI_ViewFlag myFlag;
571 
572 // transform information
573 
574  gui_View myView;
575  fpreal myDx, myDy;
576  static orientation myOrientationMode;
577  static int myTumbleStyle;
578  static int myAltKeyViewControls;
579  static int myScrollStyle;
580  static axis myDefaultHomingStyle;
581 
582  fpreal myRx, myRy, myRz; // Used by euler method. In degrees
583 
584  // always call updateTransformMatrix before using myTransformMatrix.
585  UT_Matrix4D myTransformMatrix; // this one is generated from the above
586  UT_Matrix4D myItransformMatrix; // inverse of myTransformMatrix;
587 
588  GRgetTransformCallback myTransformCallback;
589  void *myTransformCallbackData;
590 
591 // home information to be used in scaling of view transformation
592  fpreal myLastHomeDistance;
593  fpreal myLastHomePixelWidthOBSOLETE;
594  fpreal myLastHomeAdjustedBoxWidth;
595  fpreal myLastHomeOrthoWidth;
596  fpreal myLastHomeRadius;
597 
598  // myLastHomeAdjustedBoxWidth supercedes myLastHomePixelWidth, but to load
599  // view transforms from old hip files without screwed up scrolling, we may
600  // need to use the obsolete quantity until the next manual home operation.
601  bool myObsoleteScrollIsActive;
602 
603  axis myHomeAxis;
604  UT_Matrix3R myCustomHomeRot;
605 
606 
607 
608  // These might be needed for other guys.
609  int myViewportLeft, myViewportRight;
610  int myViewportBottom, myViewportTop;
611 
612  // The view is a subregion of the viewport that represents the current
613  // "camera" view. Aspect ratio bars are used to dim the parts of the
614  // viewport not in this view. The window coordinates are relative to
615  // this view, not the viewport.
616  int myViewLeft, myViewRight;
617  int myViewBottom, myViewTop;
618 
619  int myVersion;
620 
621  UT_Matrix4D *myProjectionOverride;
622 };
623 
624 
625 #ifdef __DOCUMENTATION__
626 
627 FOV can be computed from aperture and focal length.
628 
629  <--aperture--->
630  | |
631  | |
632  +------+------+-----------
633  \ | / ^
634  \ | / |
635  \_--+--_/ Focal
636 Unzoomed \ | / Length
637  FOV --> \ | / |
638  \|/ v
639  +------------------
640 
641 myFullW and myFullH are the dimensions of the plane onto which the
642 image is projected before any adjustments for zoom or window parms.
643 the plane is located at "myAdjustedNear" along the z axis.
644 After taking the zoom and win channels into account, myAdjustedX and
645 myAdjustedY refer to the center of the view on the same plane, and
646 myAdjustedW and myAdjustedH contain the dimensions of the adjusted view.
647 
648 #endif
649 
650 #endif
#define SYSmax(a, b)
Definition: SYS_Math.h:1365
void setLimits(fpreal n, fpreal f)
fpreal getNearClip() const
int getViewWidth() const
fpreal getNearLimit() const
int rotoscopeTracksWindowVals() const
void getViewportSize(int &w, int &h) const
static void setDefaultHomingStyleFlag(int style)
fpreal getPy() const
GLint left
Definition: glcorearb.h:2004
const GLdouble * v
Definition: glcorearb.h:836
void setTx(fpreal v)
void setWindow(fpreal x, fpreal y, fpreal w, fpreal h)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
axis getHomeAxis() const
GA_API const UT_StringHolder rot
fpreal getWinX() const
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:847
fpreal getTy() const
int getBottomMargin() const
int h() const
Get width/height dimensions.
Definition: UT_Rect.h:246
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
static void setOrientationMode(orientation o)
void setAperture(fpreal a)
GLint y
Definition: glcorearb.h:102
GLdouble far
Definition: glcorearb.h:142
3D Vector class.
int getApplyAspectFlag() const
static void setTumbleStyleFlag(int style)
void getLimits(fpreal *n, fpreal *f)
void setView(const UT_DimRect &area)
void setPz(fpreal v)
int initialized() const
void setViewport(RE_Render *r, const UT_DimRect &viewarea)
void setP(const UT_Vector3D &p)
GLint GLsizei width
Definition: glcorearb.h:102
png_bytepp image
Definition: png.h:1849
fpreal getFarLimit() const
int getOrthoFlag() const
void setScreenWindow(fpreal l, fpreal r, fpreal b, fpreal t)
fpreal getAperture() const
void setFocalLength(fpreal f)
const char * className() const
void setAdjustLimits(GUI_ViewAdjustLimits which)
fpreal getFocalLength() const
GLdouble n
Definition: glcorearb.h:2007
GLfloat f
Definition: glcorearb.h:1925
void getWindow(fpreal &x, fpreal &y, fpreal &w, fpreal &h) const
int getViewportHeight() const
void setApplyAspectFlag(int a)
void setWindowAffectRotoscope(int v)
T distance(const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
Definition: UT_Vector4.h:634
#define GUI_API
Definition: GUI_API.h:10
void setHomeAxis(axis homeaxis)
void setTz(fpreal v)
void setOrthoFlag(int o)
void getViewport(UT_DimRect &area) const
fpreal getTx() const
GUI_ViewAdjustLimits getAdjustLimits() const
void set(int v1, int v2, int v3, int v4)
Set the native rect type values.
Definition: UT_Rect.h:135
void setOrthoWidth(fpreal w)
static bool isOrientationZUp()
void setRotateMatrix(const UT_Matrix3D &mat)
int getViewHeight() const
int getViewportWidth() const
int x() const
Get lower-left corner.
Definition: UT_Rect.h:225
int w() const
Get width/height dimensions.
Definition: UT_Rect.h:245
GLboolean * data
Definition: glcorearb.h:130
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
fpreal getZBufferFar() const
void setPx(fpreal v)
fpreal getLastHomeRadius() const
fpreal getWinSizeX() const
static int getScrollStyleFlag()
int getRightMargin() const
fpreal getTz() const
void(* GRgetTransformCallback)(UT_DMatrix4 &, fpreal time, void *)
UT_Rect< UT_InclusiveRectImpl > UT_InclusiveRect
Integer rectangle class which stores its data as inclusive lower-left to upper-right (x1...
Definition: UT_Rect.h:53
void setT(const UT_Vector3D &t)
GLint GLint bottom
Definition: glcorearb.h:2004
GLint GLsizei GLsizei height
Definition: glcorearb.h:102
fpreal getWinY() const
IFDmantra py
Definition: HDK_Image.dox:266
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2001
static orientation getOrientationMode()
double fpreal
Definition: SYS_Types.h:269
static axis getDefaultHomingStyleFlag()
static int getTumbleStyleFlag()
void setPy(fpreal v)
static void setScrollStyleFlag(int style)
static int getAltKeyViewControlsFlag()
const UT_Matrix4D & getTransformMatrix()
static void setAltKeyViewControlsFlag(int style)
void getViewState(gui_View &view_state) const
void setTy(fpreal v)
fpreal getAspectRatio() const
bool isDirty() const
UT_Vector3D getT() const
GLint GLenum GLint x
Definition: glcorearb.h:408
static bool isOrientationYUp()
int y() const
Get lower-left corner.
Definition: UT_Rect.h:226
void setCustomHomeRot(UT_Matrix3R &rot)
int getTopMargin() const
void setViewState(const gui_View &view_state)
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
void setFrustumScale(fpreal xsc, fpreal ysc)
void setAspectRatio(fpreal a)
fpreal getPz() const
const UT_Matrix4D & getProjectionMatrix() const
GLboolean r
Definition: glcorearb.h:1221
const UT_Matrix4D & getRotateMatrix() const
int getViewVersion() const
fpreal getPx() const
fpreal getFarClip() const
fpreal getOrthoWidth() const
const UT_Matrix3R & getCustomHomeRot() const
fpreal getWinSizeY() const
fpreal getZBufferNear() const
UT_Vector3D getP() const
void setTransformCallback(GRgetTransformCallback callback, void *data)
void getScreenWindow(fpreal &l, fpreal &r, fpreal &b, fpreal &t) const
UT_InclusiveRect getViewport() const
GA_API const UT_StringHolder area
GLenum clamp
Definition: glcorearb.h:1233
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
const UT_Matrix4D & getItransformMatrix()
int getLeftMargin() const