44 #ifndef TEXTUREDATA_HH 45 #define TEXTUREDATA_HH 48 #include "TextureParameters.hh" 51 #include <QStringList> 52 #include <ACG/GL/gl.hh> 58 enum TextureType { UNSET = 1 << 0,
62 HALFEDGEBASED = 1 << 2,
66 MULTITEXTURE = 1 << 4 };
92 void filename( QString _name ) {
filename_ = _name; };
96 void id(
int _id ) {
id_ = _id; };
97 int id() {
return id_; };
100 void glName( GLuint _glName ) {
glName_ = _glName; };
101 GLuint glName() {
return glName_; };
104 void name( QString _name ) {
name_ = _name; };
105 QString name() {
return name_; };
107 void visibleName( QString _name ) {
visibleName_ = _name; };
111 void dimension( uint _dimension ) {
dimension_ = _dimension; };
115 void enabled(
bool _enabled ) {
enabled_ = _enabled; };
116 bool enabled() {
return enabled_; };
118 void disable(){
enabled_ =
false; };
120 void hidden(
bool _hidden ) {
hidden_ = _hidden; };
121 bool hidden() {
return hidden_; };
122 void hide() {
hidden_ =
true; };
124 void dirty(
bool _dirty ) {
dirty_ = _dirty; };
125 bool dirty() {
return dirty_; };
126 void clean() {
dirty_ =
false; };
127 void setDirty() {
dirty_ =
true; };
133 void type( TextureType _type ) {
type_ = _type; };
134 TextureType type( ) {
return type_; };
210 bool textureExists(QString _textureName);
214 bool isEnabled(QString _textureName);
218 bool enableTexture(QString _textureName,
bool _exclusive =
false);
221 void disableTexture(QString _textureName);
224 int addTexture ( QString _textureName , uint _dimension, GLuint _glName ){
return addTexture ( _textureName , QString(
"Invalid") , _dimension, _glName );}
227 int addTexture ( QString _textureName , QString _filename , uint _dimension, GLuint _glName );
230 int addTexture (
Texture _texture, GLuint _glName );
233 bool addMultiTexture( QString _textureName );
236 bool setImage( QString _textureName ,
int _id );
250 Texture& texture(QString _textureName);
253 std::vector< Texture >& textures();
261 std::map< int, GLuint >* textureMap();
266 std::map< int, std::string >* propertyMap();
270 std::map< int, GLuint> textureMap_;
271 std::map< int, std::string> propertyMap_;
282 int getTextureIndex(QString _textureName);
288 #endif //TEXTUREDATA_HH
int addTexture(QString _textureName, uint _dimension, GLuint _glName)
Add a Texture without file backing.
QStringList multiTextureList
If this is a multiTexture, the list will contain all textures for this multi Texture node...
QString name_
Texture Name.
TextureType type_
Texture Type.
TexParameters parameters
Parameters of the texture.
virtual PerObjectData * copyPerObjectData()
Copy Function.
bool dirty_
does this texture need an update?
int textureImageId_
The image used as the texture ( Ids are handled by the ImageStore )
bool hidden_
Hidden flag ( If this texture belongs to a multitexture, it will be hidden in the context menu ) ...
QString filename_
Filename of the texture.
QString visibleName_
Name visible in the gui.
QString indexMappingProperty_
std::vector< Texture > textures_
vector containing all textures of an object
int nextInternalID_
internal id for the next texture