Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoGLScreenDevice.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#pragma once
22
23#include <Inventor/SbString.h>
24#include <Inventor/SbVec.h>
25#include <Inventor/SbPImpl.h>
26
27SO_PIMPL_BASE_PUBLIC_DECLARATION(SoGLScreenDevice);
28
29class SoGLDevice;
30
49{
50 friend class SoGLDevice;
51
52 SO_PIMPL_BASE_PUBLIC_HEADER(SoGLScreenDevice);
53
54public:
55
60
65
69 unsigned int getColorDepth() const;
70
75
80
84 friend std::ostream& operator << ( std::ostream& os, const SoGLScreenDevice& dev )
85 {
86 return os << "[Name]: " << dev.getName().toLatin1() << "\n" << \
87 "[Physical size]: " << dev.getPhysicalSize()[0] << "mm * " << dev.getPhysicalSize()[1] << "mm" << "\n" << \
88 "[Resolution]: " << dev.getResolution()[0] << "px * " << dev.getResolution()[1] << "px" << "\n" << \
89 "[Color depth]: " << dev.getColorDepth();
90 }
91
92private:
93
98
102 virtual ~SoGLScreenDevice();
103};
Class for smart character strings.
Definition SbString.h:202
const char * toLatin1() const
Returns the string as a Latin-1/ASCII C string.
2D vector class.
Definition SbVec.h:76
2D vector class.
Definition SbVec.h:517
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL device ma...
Definition SoGLDevice.h:63
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> GL Screen device...
SbVec2i32 getResolution() const
Returns the device's resolution in pixels.
SbString getName() const
Returns an user presentable string representing the device.
friend std::ostream & operator<<(std::ostream &os, const SoGLScreenDevice &dev)
Prints information about this device.
SbVec2f getPhysicalSize() const
Returns the device's physical size (in millimeters).
unsigned int getColorDepth() const
Returns the number of bits per pixel of the device.
SoGLDevice * getGLDevice() const
Returns the SoGLDevice object on which the device is connected.