69 if (&rhs==
this)
return *
this;
88 void getViewport(
int& x,
int& y,
int& width,
int& height)
const
96 void getViewport(
double& x,
double& y,
double& width,
double& height)
const
#define COMPARE_StateAttribute_Parameter(parameter)
COMPARE_StateAttribute_Parameter macro is a helper for implementing the StatateAtribute::compare(....
Definition StateAttribute:69
#define COMPARE_StateAttribute_Types(TYPE, rhs_attribute)
COMPARE_StateAttribute_Types macro is a helper for implementing the StateAtribute::compare(....
Definition StateAttribute:57
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Matrixd Matrix
Definition Matrix:27
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
static Matrixd scale(const Vec3f &sv)
Definition Matrixd:458
static Matrixd translate(const Vec3f &dv)
Definition Matrixd:475
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
@ VIEWPORT
Definition StateAttribute:155
void setViewport(value_type x, value_type y, value_type width, value_type height)
Definition Viewport:79
value_type & y()
Definition Viewport:107
double value_type
Definition Viewport:30
value_type & width()
Definition Viewport:110
Viewport(const Viewport &vp, const CopyOp ©op=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
Definition Viewport:42
value_type x() const
Definition Viewport:105
value_type & height()
Definition Viewport:113
double aspectRatio() const
Return the aspectRatio of the viewport, which is equal to width/height.
Definition Viewport:121
value_type _y
Definition Viewport:141
virtual void apply(State &state) const
apply the OpenGL state attributes.
value_type _width
Definition Viewport:142
value_type _height
Definition Viewport:143
const osg::Matrix computeWindowMatrix() const
Compute the Window Matrix which takes projected coords into Window coordinates.
Definition Viewport:129
value_type y() const
Definition Viewport:108
value_type height() const
Definition Viewport:114
value_type _x
Definition Viewport:140
Viewport(value_type x, value_type y, value_type width, value_type height)
Definition Viewport:34
value_type width() const
Definition Viewport:111
virtual int compare(const StateAttribute &sa) const
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Definition Viewport:52
value_type & x()
Definition Viewport:104
META_StateAttribute(osg, Viewport, VIEWPORT)
bool valid() const
Definition Viewport:116
#define OSG_EXPORT
Definition Export:39