H3D::H3DImageObject::SFImage Class Reference

The SFImage field is a field containing an Image pointer. More...

#include <H3D/H3DImageObject.h>

Inheritance diagram for H3D::H3DImageObject::SFImage:

Inheritance graph

List of all members.

Public Member Functions

 SFImage ()
 Constructor.
virtual void beginEditing ()
 Call this function before doing any calls to any setPixel functions in order to record all the changes to the image.
virtual void endEditing ()
 Call this function after doing editing to the image in order to send an event that editing has been done.
void setEditedArea (int _min_x, int _min_y, int _min_z, int _max_x, int _max_y, int _max_z)
 Set the volume that has been edited manually.
virtual void setPixel (unsigned int x, unsigned int y, const RGBA &color)
 Set a pixel in the image.
virtual void setPixel (const Vec2f &tex_coord, const RGBA &color)
 Set a pixel in the image specified by a texture coordinate.
virtual void setPixel (unsigned int x, unsigned int y, unsigned int z, const RGBA &color)
 Set a pixel in the image.
virtual void setPixel (const Vec3f &tex_coord, const RGBA &color)
 Set a pixel in the image specified by a texture coordinate.
int xMin ()
 Returns the minimum value in x that has been changed by the setPixel functions.
int yMin ()
 Returns the minimum value in y that has been changed by the setPixel functions.
int zMin ()
 Returns the minimum value in z that has been changed by the setPixel functions.
int xMax ()
 Returns the maximum value in x that has been changed by the setPixel functions.
int yMax ()
 Returns the maximum value in y that has been changed by the setPixel functions.
int zMax ()
 Returns the maximum value in z that has been changed by the setPixel functions.
int xOffset ()
 Returns the offset in x of the changed part of the image.
int yOffset ()
 Returns the offset in y of the changed part of the image.
int zOffset ()
 Returns the offset in z of the changed part of the image.
int changedWidth ()
 Returns the width of the changed part of the image.
int changedHeight ()
 Returns the height of the changed part of the image.
int changedDepth ()
 Returns the depth of the changed part of the image.
bool imageChanged ()
 Returns true if the image has been updated with the setPixel functions.
void resetChanges ()
 Resets all variables that keep track of what part of the image has been updated.


Detailed Description

The SFImage field is a field containing an Image pointer.

The pointer will be reference counted by the SFImage field.


Member Function Documentation

virtual void H3D::H3DImageObject::SFImage::beginEditing (  )  [inline, virtual]

Call this function before doing any calls to any setPixel functions in order to record all the changes to the image.

int H3D::H3DImageObject::SFImage::changedDepth (  )  [inline]

Returns the depth of the changed part of the image.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::changedHeight (  )  [inline]

Returns the height of the changed part of the image.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::changedWidth (  )  [inline]

Returns the width of the changed part of the image.

Value is only valid if imageChanged() is true.

virtual void H3D::H3DImageObject::SFImage::endEditing (  )  [inline, virtual]

Call this function after doing editing to the image in order to send an event that editing has been done.

bool H3D::H3DImageObject::SFImage::imageChanged (  )  [inline]

Returns true if the image has been updated with the setPixel functions.

void H3D::H3DImageObject::SFImage::resetChanges (  )  [inline]

Resets all variables that keep track of what part of the image has been updated.

void H3DImageObject::SFImage::setPixel ( const Vec3f &  tex_coord,
const RGBA color 
) [virtual]

Set a pixel in the image specified by a texture coordinate.

The components from the color argument will be used depending on the image type as follows: LUMINANCE: color.r LUMINANCE_ALPHA: color.r, color.a RGB, BGR, VEC3: color.rgb RGBA, BGRA color.rgba Texture coordinates will be clamped to the range [0,1]

References setPixel(), and H3D::RefCountSField< RefClass, BaseField >::value.

void H3DImageObject::SFImage::setPixel ( unsigned int  x,
unsigned int  y,
unsigned int  z,
const RGBA color 
) [virtual]

Set a pixel in the image.

The components from the color argument will be used depending on the image type as follows: LUMINANCE: color.r LUMINANCE_ALPHA: color.r, color.a RGB, BGR, VEC3: color.rgb RGBA, BGRA color.rgba

References H3D::RefCountSField< RefClass, BaseField >::value.

void H3DImageObject::SFImage::setPixel ( const Vec2f &  tex_coord,
const RGBA color 
) [virtual]

Set a pixel in the image specified by a texture coordinate.

The components from the color argument will be used depending on the image type as follows: LUMINANCE: color.r LUMINANCE_ALPHA: color.r, color.a RGB, BGR, VEC3: color.rgb RGBA, BGRA color.rgba Texture coordinates will be clamped to the range [0,1]

References setPixel(), and H3D::RefCountSField< RefClass, BaseField >::value.

void H3DImageObject::SFImage::setPixel ( unsigned int  x,
unsigned int  y,
const RGBA color 
) [virtual]

Set a pixel in the image.

The components from the color argument will be used depending on the image type as follows: LUMINANCE: color.r LUMINANCE_ALPHA: color.r, color.a RGB, BGR, VEC3: color.rgb RGBA, BGRA color.rgba

References H3D::RefCountSField< RefClass, BaseField >::value.

Referenced by setPixel().

int H3D::H3DImageObject::SFImage::xMax (  )  [inline]

Returns the maximum value in x that has been changed by the setPixel functions.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::xMin (  )  [inline]

Returns the minimum value in x that has been changed by the setPixel functions.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::xOffset (  )  [inline]

Returns the offset in x of the changed part of the image.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::yMax (  )  [inline]

Returns the maximum value in y that has been changed by the setPixel functions.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::yMin (  )  [inline]

Returns the minimum value in y that has been changed by the setPixel functions.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::yOffset (  )  [inline]

Returns the offset in y of the changed part of the image.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::zMax (  )  [inline]

Returns the maximum value in z that has been changed by the setPixel functions.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::zMin (  )  [inline]

Returns the minimum value in z that has been changed by the setPixel functions.

Value is only valid if imageChanged() is true.

int H3D::H3DImageObject::SFImage::zOffset (  )  [inline]

Returns the offset in z of the changed part of the image.

Value is only valid if imageChanged() is true.


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

Generated on Fri Nov 7 10:30:17 2008 for H3D API by  doxygen 1.5.7