http://www.sim.no/
http://www.coin3d.org/
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
include
Inventor
SbViewportRegion.h
1
#ifndef COIN_SBVIEWPORTREGION_H
2
#define COIN_SBVIEWPORTREGION_H
3
4
/**************************************************************************\
5
*
6
* This file is part of the Coin 3D visualization library.
7
* Copyright (C) by Kongsberg Oil & Gas Technologies.
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* ("GPL") version 2 as published by the Free Software Foundation.
12
* See the file LICENSE.GPL at the root directory of this source
13
* distribution for additional information about the GNU GPL.
14
*
15
* For using Coin with software that can not be combined with the GNU
16
* GPL, and for taking advantage of the additional benefits of our
17
* support services, please contact Kongsberg Oil & Gas Technologies
18
* about acquiring a Coin Professional Edition License.
19
*
20
* See http://www.coin3d.org/ for more information.
21
*
22
* Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23
* http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24
*
25
\**************************************************************************/
26
27
#include <stdio.h>
28
#include <Inventor/SbVec2s.h>
29
#include <Inventor/SbVec2f.h>
30
31
class
COIN_DLL_API
SbViewportRegion
{
32
public
:
33
SbViewportRegion
(
void
);
34
SbViewportRegion
(
short
width,
short
height);
35
SbViewportRegion
(
SbVec2s
winSize);
36
SbViewportRegion
(
const
SbViewportRegion
& vpReg);
37
38
void
setWindowSize(
short
width,
short
height);
39
void
setWindowSize(
SbVec2s
winSize);
40
void
setViewport(
float
left,
float
bottom,
41
float
width,
float
height);
42
void
setViewport(
SbVec2f
origin,
SbVec2f
size);
43
void
setViewportPixels(
short
left,
short
bottom,
44
short
width,
short
height);
45
void
setViewportPixels(
SbVec2s
origin,
SbVec2s
size);
46
const
SbVec2s
& getWindowSize(
void
)
const
;
47
const
SbVec2f
& getViewportOrigin(
void
)
const
;
48
const
SbVec2s
& getViewportOriginPixels(
void
)
const
;
49
const
SbVec2f
& getViewportSize(
void
)
const
;
50
const
SbVec2s
& getViewportSizePixels(
void
)
const
;
51
float
getViewportAspectRatio(
void
)
const
;
52
void
scaleWidth(
float
ratio);
53
void
scaleHeight(
float
ratio);
54
void
setPixelsPerInch(
float
ppi);
55
float
getPixelsPerInch(
void
)
const
;
56
float
getPixelsPerPoint(
void
)
const
;
57
friend
COIN_DLL_API
int
operator ==(
const
SbViewportRegion
& reg1,
58
const
SbViewportRegion
& reg2);
59
60
friend
COIN_DLL_API
int
operator !=(
const
SbViewportRegion
& reg1,
61
const
SbViewportRegion
& reg2);
62
63
void
print(FILE * file)
const
;
64
65
private
:
66
SbVec2s
winsize;
67
SbVec2f
vporigin;
68
SbVec2f
vpsize;
69
SbVec2s
vporigin_s;
70
SbVec2s
vpsize_s;
71
float
pixperinch;
72
};
73
74
COIN_DLL_API
int
operator ==
(
const
SbViewportRegion
& reg1,
const
SbViewportRegion
& reg2);
75
COIN_DLL_API
int
operator !=
(
const
SbViewportRegion
& reg1,
const
SbViewportRegion
& reg2);
76
77
#endif // !COIN_SBVIEWPORTREGION_H
Copyright © 1998-2010 by
Kongsberg Oil & Gas Technologies
. All rights reserved.
Generated on Mon Mar 17 2014 18:54:29 for Coin by
Doxygen
1.8.1.2.