|
hipp
1.0
|
The PaintableTexture class allows modifications of the pixel data in a texture on the fly, allowing for the user to paint in a texture. More...
#include <PaintableTexture.h>
Classes | |
| class | DrawingModeField |
| class | PainterField |
Public Member Functions | |
| PaintableTexture (Inst< DisplayList > _displayList=0, Inst< SFNode > _metadata=0, Inst< SFBool > _repeatS=0, Inst< SFBool > _repeatT=0, Inst< SFBool > _scaleToP2=0, Inst< SFImage > _image=0, Inst< SFTextureProperties > _textureProperties=0, Inst< SFInt32 > _width=0, Inst< SFInt32 > _height=0, Inst< PainterField > _paintAtTexCoord=0, Inst< SFBool > _isHaptic=0, Inst< SFBool > _isInContact=0, Inst< DrawingModeField > _isInDrawingMode=0, Inst< SFBool > _mouseButtonIsPressed=0, Inst< SFBool > _mainButtonIsPressed=0) | |
| Constructor. | |
| ~PaintableTexture (void) | |
| Destructor. | |
| virtual void | initialize () |
| void | flushHapticPoints () |
| void | drawHapticPoints (wxPoint pos) |
| Cairo::RefPtr< Cairo::Context > | beginDraw () |
| void | endDraw () |
| void | setDefaultBackground () |
| void | setDefaultForeground () |
| void | setEvtHandler (wxEvtHandler *evtHandler) |
| virtual Field * | getField (const string &name) |
| void | savePenOptions (bool *white, int *width) |
| void | loadPenOptions () |
Public Attributes | |
| Cairo::RefPtr< Cairo::Context > | context |
| Cairo::RefPtr < Cairo::ImageSurface > | surface |
| FIBITMAP * | png |
| FreeImageImage * | fii |
| std::deque< wxPoint > | bufPoints |
| auto_ptr< SFInt32 > | width |
| auto_ptr< SFInt32 > | height |
| auto_ptr< PainterField > | paintAtTexCoord |
| auto_ptr< SFBool > | isHaptic |
| auto_ptr< SFBool > | isInContact |
| auto_ptr< DrawingModeField > | isInDrawingMode |
| auto_ptr< SFBool > | mainButtonIsPressed |
| auto_ptr< SFBool > | mouseButtonIsPressed |
| wxSize | windowSize |
Static Public Attributes | |
| static const Cairo::Format | visual_format = Cairo::FORMAT_ARGB32 |
| static const Cairo::Format | haptic_format = Cairo::FORMAT_A8 |
| static H3DNodeDatabase | database |
| The H3DNodeDatabase for this node. | |
Protected Attributes | |
| wxEvtHandler * | evtHandler |
| vector< wxPoint * > | points |
| bool * | penWhitePtr |
| int * | penWidthPtr |
The PaintableTexture class allows modifications of the pixel data in a texture on the fly, allowing for the user to paint in a texture.
The width and height fields are initializeOnly fields for setting the resolution of the image in pixels.
Painting will occur when the paintAtTexCoord field receives an event
| PaintableTexture::PaintableTexture | ( | Inst< DisplayList > | _displayList = 0, |
| Inst< SFNode > | _metadata = 0, |
||
| Inst< SFBool > | _repeatS = 0, |
||
| Inst< SFBool > | _repeatT = 0, |
||
| Inst< SFBool > | _scaleToP2 = 0, |
||
| Inst< SFImage > | _image = 0, |
||
| Inst< SFTextureProperties > | _textureProperties = 0, |
||
| Inst< SFInt32 > | _width = 0, |
||
| Inst< SFInt32 > | _height = 0, |
||
| Inst< PainterField > | _paintAtTexCoord = 0, |
||
| Inst< SFBool > | _isHaptic = 0, |
||
| Inst< SFBool > | _isInContact = 0, |
||
| Inst< DrawingModeField > | _isInDrawingMode = 0, |
||
| Inst< SFBool > | _mouseButtonIsPressed = 0, |
||
| Inst< SFBool > | _mainButtonIsPressed = 0 |
||
| ) |
Constructor.
| PaintableTexture::~PaintableTexture | ( | void | ) |
Destructor.
| Cairo::RefPtr< Cairo::Context > PaintableTexture::beginDraw | ( | ) |
| void PaintableTexture::drawHapticPoints | ( | wxPoint | pos | ) |
| void PaintableTexture::endDraw | ( | ) |
| void PaintableTexture::flushHapticPoints | ( | ) |
| Field * PaintableTexture::getField | ( | const string & | name | ) | [virtual] |
| void PaintableTexture::initialize | ( | ) | [virtual] |
Initializes the texture to the specified resolution and background color.
| void PaintableTexture::loadPenOptions | ( | ) |
| void PaintableTexture::savePenOptions | ( | bool * | white, |
| int * | width | ||
| ) |
| void PaintableTexture::setDefaultBackground | ( | ) |
| void PaintableTexture::setDefaultForeground | ( | ) |
| void PaintableTexture::setEvtHandler | ( | wxEvtHandler * | evtHandler | ) |
| std::deque<wxPoint> H3D::PaintableTexture::bufPoints |
| Cairo::RefPtr<Cairo::Context> H3D::PaintableTexture::context |
H3DNodeDatabase PaintableTexture::database [static] |
The H3DNodeDatabase for this node.
wxEvtHandler* H3D::PaintableTexture::evtHandler [protected] |
| FreeImageImage* H3D::PaintableTexture::fii |
const Cairo::Format H3D::PaintableTexture::haptic_format = Cairo::FORMAT_A8 [static] |
| auto_ptr<SFInt32> H3D::PaintableTexture::height |
The height of the image to paint(number of pixels).
Default value: 128
| auto_ptr<SFBool> H3D::PaintableTexture::isHaptic |
Indicates whether or not the texture is haptic.
Default value: false
| auto_ptr<SFBool> H3D::PaintableTexture::isInContact |
Indicated whether or not the haptic pointer is in contact with the texture.
Default value: empty
Indicates whether or not the user is currently drawing a new curve
Default value: false
| auto_ptr<SFBool> H3D::PaintableTexture::mainButtonIsPressed |
Indicates whether or not the main button is pressed
Default value: false
| auto_ptr<SFBool> H3D::PaintableTexture::mouseButtonIsPressed |
Indicates whether or not the mouse button is pressed
Default value: false
When an event is received on this field the pixel with the given texture coordinate will be painted.
Default value: RGBA( 0, 0, 0, 1 )
bool* H3D::PaintableTexture::penWhitePtr [protected] |
int* H3D::PaintableTexture::penWidthPtr [protected] |
| FIBITMAP* H3D::PaintableTexture::png |
vector<wxPoint*> H3D::PaintableTexture::points [protected] |
| Cairo::RefPtr<Cairo::ImageSurface> H3D::PaintableTexture::surface |
const Cairo::Format H3D::PaintableTexture::visual_format = Cairo::FORMAT_ARGB32 [static] |
| auto_ptr<SFInt32> H3D::PaintableTexture::width |
The width of the image to paint(number of pixels).
Default value: 128
1.7.5.1