Basic Image AlgorithmS Library
2.8.0
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
Gui
CameraViewport.cpp
1
#include "CameraViewport.hh"
2
#include <Base/Common/W32Compat.hh>
3
#include <Base/Debug/Error.hh>
4
5
#include <iostream>
6
7
#ifdef BIAS_HAVE_OPENGL
8
# include <Gui/biasgl.h>
9
#endif // BIAS_HAVE_OPENGL
10
11
12
using namespace
std;
13
using namespace
BIAS;
14
15
16
CameraViewport::CameraViewport()
17
{
18
InitMembers();
19
}
20
21
CameraViewport::CameraViewport(
const
int
vx0,
const
int
vy0,
const
unsigned
int
vwidth,
const
unsigned
int
vheight )
22
: x0(vx0), y0(vy0), width(vwidth), height(vheight)
23
{}
24
25
void
CameraViewport::InitMembers
()
26
{
27
x0
=
y0
=0;
28
width
=
height
=256;
29
}
30
31
double
BIAS::CameraViewport::GetAspect
()
const
32
{
33
BIASASSERT(height!=0);
34
return
width / height;
35
}
36
37
38
std::ostream &
BIAS::CameraViewport::Print
(std::ostream & os)
const
39
{
40
os<<
"CameraViewport: "
<<endl
41
<<
"x0 "
<<x0<<endl
42
<<
"y0 "
<<y0<<endl
43
<<
"width "
<<width<<endl
44
<<
"height "
<<height<<endl
45
;
46
return
os;
47
}
48
49
50
#ifdef BIAS_HAVE_OPENGL
51
void
BIAS::CameraViewport::DisplayGL
()
const
52
{
53
glViewport(
54
(GLint)x0
55
,(GLint)y0
56
,(GLsizei)width
57
,(GLsizei)height
58
);
59
}
60
#endif // BIAS_HAVE_OPENGL
BIAS::CameraViewport::InitMembers
void InitMembers()
Definition:
CameraViewport.cpp:25
BIAS::CameraViewport::y0
int y0
Definition:
CameraViewport.hh:36
BIAS::CameraViewport::DisplayGL
void DisplayGL() const
Definition:
CameraViewport.cpp:51
BIAS::CameraViewport::x0
int x0
Definition:
CameraViewport.hh:35
BIAS::CameraViewport::GetAspect
double GetAspect() const
Definition:
CameraViewport.cpp:31
BIAS::CameraViewport::height
unsigned int height
Definition:
CameraViewport.hh:38
BIAS::CameraViewport::Print
std::ostream & Print(std::ostream &os=std::cout) const
Definition:
CameraViewport.cpp:38
BIAS::CameraViewport::width
unsigned int width
Definition:
CameraViewport.hh:37
Generated on Tue Feb 6 2018 02:01:38 for Basic Image AlgorithmS Library by
1.8.5