# osg::DrawPixels Class Reference

DrawPixels is an osg::Drawable subclass which encapsulates the drawing of images using glDrawPixels. More...

Inheritance diagram for osg::DrawPixels:

[legend]
List of all members.

## Public Member Functions

| DrawPixels ()
| DrawPixels (const DrawPixels &drawimage, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
| Copy constructor using CopyOp to manage deep vs shallow copy.
virtual Object * | cloneType () const
| Clone the type of an object, with Object* return type.
virtual Object * | clone (const CopyOp &copyop) const
| Clone an object, with Object* return type.
virtual bool | isSameKindAs (const Object *obj) const
virtual const char * | libraryName () const
| return the name of the object's library.
virtual const char * | className () const
| return the name of the object's class type.
void | setPosition (const osg::Vec3 &position)
osg::Vec3 & | getPosition ()
const osg::Vec3 & | getPosition () const
void | setImage (osg::Image *image)
osg::Image * | getImage ()
const osg::Image * | getImage () const
void | setUseCompleteImage ()
void | setSubImageDimensions (unsigned int offsetX, unsigned int offsetY, unsigned int width, unsigned int height)
void | getSubImageDimensions (unsigned int &offsetX, unsigned int &offsetY, unsigned int &width, unsigned int &height) const
bool | getUseSubImage () const
virtual void | drawImplementation (State &state) const
| draw directly ignoring an OpenGL display list which could be attached.

## Protected Member Functions

DrawPixels & | operator= (const DrawPixels &)
virtual | ~DrawPixels ()
virtual bool | computeBound () const
| compute the bounding box of the drawable.

## Protected Attributes

Vec3 | _position
ref_ptr< Image > | _image
bool | _useSubImage
unsigned int | _offsetX
unsigned int | _offsetY
unsigned int | _width
unsigned int | _height

## Detailed Description

DrawPixels is an osg::Drawable subclass which encapsulates the drawing of images using glDrawPixels.

## Constructor & Destructor Documentation

DrawPixels::DrawPixels | ( |  | ) |

DrawPixels::DrawPixels | ( | const DrawPixels & | drawimage,
|  | const CopyOp & | copyop = `CopyOp::SHALLOW_COPY`
| ) |

| Copy constructor using CopyOp to manage deep vs shallow copy.

DrawPixels::~DrawPixels | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

virtual const char* osg::DrawPixels::className | ( |  | ) | const`[inline, virtual]`

| return the name of the object's class type. Must be defined by derived classes. Reimplemented from osg::Drawable.

virtual Object* osg::DrawPixels::clone | ( | const CopyOp & | copyop | ) | const`[inline, virtual]`

| Clone an object, with Object* return type. Must be defined by derived classes. Implements osg::Object.

virtual Object* osg::DrawPixels::cloneType | ( |  | ) | const`[inline, virtual]`

| Clone the type of an object, with Object* return type. Must be defined by derived classes. Implements osg::Object.

bool DrawPixels::computeBound | ( |  | ) | const`[protected, virtual]`

| compute the bounding box of the drawable. Method must be implemented by subclasses. Reimplemented from osg::Drawable.

void DrawPixels::drawImplementation | ( | State & | state | ) | const`[virtual]`

| draw directly ignoring an OpenGL display list which could be attached. This is the internal draw method which does the drawing itself, and is the method to override when deriving from Drawable. Implements osg::Drawable.

const osg::Image* osg::DrawPixels::getImage | ( |  | ) | const`[inline]`

osg::Image* osg::DrawPixels::getImage | ( |  | ) | `[inline]`

const osg::Vec3& osg::DrawPixels::getPosition | ( |  | ) | const`[inline]`

osg::Vec3& osg::DrawPixels::getPosition | ( |  | ) | `[inline]`

void DrawPixels::getSubImageDimensions | ( | unsigned int & | offsetX,
|  | unsigned int & | offsetY,
|  | unsigned int & | width,
|  | unsigned int & | height
| ) | const

bool osg::DrawPixels::getUseSubImage | ( |  | ) | const`[inline]`

virtual bool osg::DrawPixels::isSameKindAs | ( | const Object * | obj | ) | const`[inline, virtual]`

| Reimplemented from osg::Drawable.

virtual const char* osg::DrawPixels::libraryName | ( |  | ) | const`[inline, virtual]`

| return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. Reimplemented from osg::Drawable.

DrawPixels& osg::DrawPixels::operator= | ( | const DrawPixels & |  | ) | `[inline, protected]`

void osg::DrawPixels::setImage | ( | osg::Image * | image | ) | `[inline]`

void DrawPixels::setPosition | ( | const osg::Vec3 & | position | ) |

void DrawPixels::setSubImageDimensions | ( | unsigned int | offsetX,
|  | unsigned int | offsetY,
|  | unsigned int | width,
|  | unsigned int | height
| ) |

void osg::DrawPixels::setUseCompleteImage | ( |  | ) | `[inline]`

## Member Data Documentation

unsigned int osg::DrawPixels::_height `[protected]`

ref_ptr<Image> osg::DrawPixels::_image `[protected]`

unsigned int osg::DrawPixels::_offsetX `[protected]`

unsigned int osg::DrawPixels::_offsetY `[protected]`

Vec3 osg::DrawPixels::_position `[protected]`

bool osg::DrawPixels::_useSubImage `[protected]`

unsigned int osg::DrawPixels::_width `[protected]`

The documentation for this class was generated from the following files:

- DrawPixels
- DrawPixels.cpp