OpenSceneGraph 3.6.5
ImageOptions
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGDB_IMAGEOPTIONS
15#define OSGDB_IMAGEOPTIONS 1
16
17#include <osgDB/Options>
18
19namespace osgDB {
20
22{
23 public:
24
26
27 ImageOptions(const std::string& str);
28
41
42
44
47 {
49 windowX(0.0),
50 windowY(0.0),
51 windowWidth(1.0),
52 windowHeight(1.0) {}
53
54 void set(double x, double y, double w, double h)
55 {
56 windowX = x;
57 windowY = y;
58 windowWidth = w;
59 windowHeight = h;
60 }
61
62 double windowX;
63 double windowY;
66 };
67
70 {
72 windowX(0),
73 windowY(0),
74 windowWidth(0),
75 windowHeight(0) {}
76
77 void set(unsigned int x, unsigned int y, unsigned int w, unsigned int h)
78 {
79 windowX = x;
80 windowY = y;
81 windowWidth = w;
82 windowHeight = h;
83 }
84
85 unsigned int windowX;
86 unsigned int windowY;
87 unsigned int windowWidth;
88 unsigned int windowHeight;
89 };
90
97
104
107 {
109 _x(0.0),
110 _y(0.0),
111 _w(1.0),
112 _h(1.0) {}
113
114 void set(double x,double y, double w, double h)
115 {
116 _x = x;
117 _y = y;
118 _w = w;
119 _h = h;
120 }
121
122 double _x,_y,_w,_h;
123 protected:
124 virtual ~TexCoordRange() {}
125 };
126
127
128 // source
133
134 // destination
136
140
143
144 void init();
145
146};
147
148
149}
150
151#endif // OSGDB_IMAGEOPTIONS
The osgDB library provides support for reading and writing scene graphs, providing a plugin framework...
Definition Archive:24
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Base class for providing reference counted objects.
Definition Referenced:44
PixelWindow _destinationPixelWindow
Definition ImageOptions:139
ImageSamplingMode _sourceImageSamplingMode
Definition ImageOptions:129
ImageWindowMode _sourceImageWindowMode
Definition ImageOptions:130
PixelWindow _sourcePixelWindow
Definition ImageOptions:132
RatioWindow _sourceRatioWindow
Definition ImageOptions:131
ImageOptions(const std::string &str)
osg::ref_ptr< osg::Image > _destinationImage
Definition ImageOptions:135
ImageOptions(const ImageOptions &options, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition ImageOptions:29
ImageSamplingMode
Definition ImageOptions:99
@ CUBIC
Definition ImageOptions:102
@ LINEAR
Definition ImageOptions:101
@ NEAREST
Definition ImageOptions:100
META_Object(osgDB, ImageOptions)
GLenum _destinationDataType
Definition ImageOptions:141
ImageWindowMode
Definition ImageOptions:92
@ ALL_IMAGE
Definition ImageOptions:93
@ PIXEL_WINDOW
Definition ImageOptions:95
@ RATIO_WINDOW
Definition ImageOptions:94
GLenum _destinationPixelFormat
Definition ImageOptions:142
ImageWindowMode _destinationImageWindowMode
Definition ImageOptions:137
RatioWindow _destinationRatioWindow
Definition ImageOptions:138
RatioWindow stores the window (as ratios of 0.0 to 1.0) from the overall imagery from which to extrac...
Definition ImageOptions:47
void set(double x, double y, double w, double h)
Definition ImageOptions:54
double windowX
Definition ImageOptions:62
RatioWindow()
Definition ImageOptions:48
double windowHeight
Definition ImageOptions:65
double windowWidth
Definition ImageOptions:64
double windowY
Definition ImageOptions:63
PixelWindow stores the window (in exact pixels) from the overall imagery from which to extract the os...
Definition ImageOptions:70
void set(unsigned int x, unsigned int y, unsigned int w, unsigned int h)
Definition ImageOptions:77
unsigned int windowHeight
Definition ImageOptions:88
PixelWindow()
Definition ImageOptions:71
unsigned int windowWidth
Definition ImageOptions:87
unsigned int windowY
Definition ImageOptions:86
unsigned int windowX
Definition ImageOptions:85
virtual ~TexCoordRange()
Definition ImageOptions:124
void set(double x, double y, double w, double h)
Definition ImageOptions:114
double _y
Definition ImageOptions:122
double _w
Definition ImageOptions:122
double _h
Definition ImageOptions:122
TexCoordRange()
Definition ImageOptions:108
double _x
Definition ImageOptions:122
Options base class used for passing options into plugins to control their operation.
Definition Options:30
#define OSGDB_EXPORT
Definition Export:39

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.