29 #ifndef __X3DTEXTURE2DNODE_H__
30 #define __X3DTEXTURE2DNODE_H__
51 virtual void setValueFromString(
const string &s );
53 virtual string getValueAsString(
const string& separator =
" ");
55 virtual X3DTypes::X3DType
getX3DType() {
return X3DTypes::SFIMAGE; }
58 class H3DAPI_API UpdateTextureProperties:
public Field{
60 virtual void update();
65 typedef DependentSFNode< FieldRef<TextureProperties,
72 Inst< SFNode > _metadata = 0,
73 Inst< SFBool > _repeatS = 0,
74 Inst< SFBool > _repeatT = 0,
75 Inst< SFBool > _scaleToP2 = 0,
76 Inst< SFImage > _image = 0,
77 Inst< SFTextureProperties > _textureProperties = 0 );
81 virtual void render();
84 virtual void renderTextureProperties();
87 virtual GLuint64 getTextureHandle();
92 virtual void enableTexturing();
97 virtual void disableTexturing();
100 virtual GLint glInternalFormat(
Image *_image );
108 virtual void glTexImage(
Image *_image, GLenum _texture_target,
109 bool scale_to_power_of_two );
112 virtual void renderSubImage(
Image *_image, GLenum _texture_target,
113 int xoffset,
int yoffset,
114 int width,
int height );
118 virtual Image* renderToImage (
H3DInt32 _width,
H3DInt32 _height,
bool output_float_texture =
false );
120 virtual void setTextureWidth(
int _width );
122 virtual void setTextureHeight(
int _height );
179 virtual std::pair<H3DInt32,H3DInt32> getDefaultSaveDimensions ();
192 virtual GLenum glPixelFormat(
Image *_image );
197 bool mip_mapping_used;
Contains the DependentSFNode and DependentMFNode template classes.
Header file for H3DImageObject, X3D abstract texture scene-graph node.
Header file for H3DSingleTextureNode, X3D scene-graph node.
Header file for TextureProperties, X3D scene-graph node.
The Field class.
Definition: Field.h:46
The SFImage field is a field containing an Image pointer.
Definition: H3DImageObject.h:50
This abstract interface is inherited by all nodes that contains an SFImage object with an Image conta...
Definition: H3DImageObject.h:45
This abstract node type is the base type for all texture nodes that is defined by a single texture.
Definition: H3DSingleTextureNode.h:45
H3DUniquePtr< Field > propertyChanged
Field that gets an event when any of the X3D fields in the TextureProperties generates an event.
Definition: TextureProperties.h:369
A SFNode encapsulating an Image class.
Definition: X3DTexture2DNode.h:49
virtual X3DTypes::X3DType getX3DType()
Returns the X3DType of the field.
Definition: X3DTexture2DNode.h:55
This abstract node type is the base type for all node types which specify 2D sources for texture imag...
Definition: X3DTexture2DNode.h:46
H3DUniquePtr< SFBool > repeatT
If true the texture will repeat itself when the t texture coordinate is outside the range [0,...
Definition: X3DTexture2DNode.h:142
H3DUniquePtr< UpdateTextureProperties > updateTextureProperties
Field that will make sure that the texture properties changes are transferred to the texture when cha...
Definition: X3DTexture2DNode.h:170
H3DUniquePtr< SFBool > scaleToPowerOfTwo
If true the image used will be scaled so that the dimensions are a power of two if they are not.
Definition: X3DTexture2DNode.h:157
H3DUniquePtr< SFBool > repeatS
If true the texture will repeat itself when the s texture coordinate is outside the range [0,...
Definition: X3DTexture2DNode.h:132
H3DUniquePtr< SFTextureProperties > textureProperties
The textureProperties field contains a TextureProperties node which allows fine control over a textur...
Definition: X3DTexture2DNode.h:165
DependentSFNode< FieldRef< TextureProperties, Field, &TextureProperties::propertyChanged > > SFTextureProperties
The SFTextureProperties is dependent on the propertyChanged field of the contained TextureProperties.
Definition: X3DTexture2DNode.h:68
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: X3DTexture2DNode.h:173
H3DUniquePtr< Field > textureUpdated
Field which is used to trigger an update of the texture when it has been modified through some functi...
Definition: X3DTexture2DNode.h:188
H3DUniquePtr< Field > imageUpdated
Field to indicate image is modified C++ only field.
Definition: X3DTexture2DNode.h:183
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194