50 #ifndef TEXTUREDATA_HH
51 #define TEXTUREDATA_HH
54 #include "TextureParameters.hh"
57 #include <QStringList>
58 #include <ACG/GL/gl.hh>
64 enum TextureType { UNSET = 1 << 0,
68 HALFEDGEBASED = 1 << 2,
72 MULTITEXTURE = 1 << 4 };
98 void filename( QString _name ) {
filename_ = _name; };
102 void id(
int _id ) {
id_ = _id; };
103 int id() {
return id_; };
106 void glName( GLuint _glName ) {
glName_ = _glName; };
107 GLuint glName() {
return glName_; };
110 void name( QString _name ) {
name_ = _name; };
111 QString name() {
return name_; };
113 void visibleName( QString _name ) {
visibleName_ = _name; };
117 void dimension( uint _dimension ) {
dimension_ = _dimension; };
121 void enabled(
bool _enabled ) {
enabled_ = _enabled; };
122 bool enabled() {
return enabled_; };
124 void disable(){
enabled_ =
false; };
126 void hidden(
bool _hidden ) {
hidden_ = _hidden; };
127 bool hidden() {
return hidden_; };
128 void hide() {
hidden_ =
true; };
130 void dirty(
bool _dirty ) {
dirty_ = _dirty; };
131 bool dirty() {
return dirty_; };
132 void clean() {
dirty_ =
false; };
133 void setDirty() {
dirty_ =
true; };
139 void type( TextureType _type ) {
type_ = _type; };
140 TextureType type( ) {
return type_; };
224 bool enableTexture(QString _textureName,
bool _exclusive =
false);
230 int addTexture ( QString _textureName , QString _filename , uint _dimension, GLuint _glName );
239 bool setImage( QString _textureName ,
int _id );
273 std::map< int, GLuint> textureMap_;
274 std::map< int, std::string> propertyMap_;
291 #endif //TEXTUREDATA_HH
QString visibleName_
Name visible in the gui.
bool isEnabled(QString _textureName)
Check if a texture is enabled.
TextureData()
Constructor.
bool dirty_
does this texture need an update?
bool addMultiTexture(QString _textureName)
Adds a new multiTexture ( This texture will only contain a list of enabled textures for multitexturin...
std::vector< Texture > & textures()
Get reference to the texture vector.
bool hidden_
Hidden flag ( If this texture belongs to a multitexture, it will be hidden in the context menu ) ...
~TextureData()
Destructor.
std::map< int, GLuint > * textureMap()
Get pointer to the textureMap.
QString indexMappingProperty_
int addTexture(QString _textureName, QString _filename, uint _dimension, GLuint _glName)
Add a Texture.
TexParameters parameters
Parameters of the texture.
Texture & texture(QString _textureName)
Get the texture object.
virtual PerObjectData * copyPerObjectData()
Copy Function.
int nextInternalID_
internal id for the next texture
QString filename_
Filename of the texture.
bool enableTexture(QString _textureName, bool _exclusive=false)
Enable a given texture.
QStringList multiTextureList
If this is a multiTexture, the list will contain all textures for this multi Texture node...
std::map< int, std::string > * propertyMap()
Get pointer to the propertyMap.
int getTextureIndex(QString _textureName)
Get the index of a given texture.
bool setImage(QString _textureName, int _id)
Stores the given image in the texture information.
QString name_
Texture Name.
void disableTexture(QString _textureName)
Disable a given texture.
bool textureExists(QString _textureName)
Check if a texture exists.
int textureImageId_
The image used as the texture ( Ids are handled by the ImageStore )
std::vector< Texture > textures_
vector containing all textures of an object
TextureType type_
Texture Type.