2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAStreamWriter.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
11
#ifndef __COLLADASTREAMWRITER_TEXTURE_H__
12
#define __COLLADASTREAMWRITER_TEXTURE_H__
14
#include "COLLADASWPrerequisites.h"
15
#include "COLLADASWElementWriter.h"
16
#include "COLLADASWExtraTechnique.h"
17
#include "COLLADASWColor.h"
18
#include "COLLADASWSampler.h"
26
class Texture : public BaseExtraTechnique
33
/** the ID of the image element assigned to the texture. Required. */
36
/** The surface. For possible type values see domFx_surface_type_enum in domTypes.h. Required. */
39
/** Declares the storage for the graphical representation of an object. */
45
/** The name of the profile, if we want to add the texture as an extra technique tag. */
48
/** The name of the child element, if we have set a profile name and we want
49
to add the texture as an extra technique tag under a child element.*/
50
String mChildElementName;
54
/**Constructor that sets all required attributes and the default values for optional attributes.*/
55
Texture ( const String &imageID, const String &sid="" );
57
/**Constructor that creates an invalid texture.*/
63
/** Chick, if the Texture is valid*/
66
/** Sets the texcoord. */
67
void setTexcoord ( const String texcoord );
69
/** Returns the texcoord*/
70
const String& getTexcoord() const;
72
/** Returns the image ID*/
73
const String& getImageID() const;
75
/** Returns the image ID*/
76
const String& getImageId() const;
78
void setImageId ( String imageId );
80
/** Returns the surface. */
81
// const Surface& getSurface() const;
83
/** Returns the surface. */
84
// void setSurface ( const Surface& surface );
86
/** Declares the storage for the graphical representation of an object. */
87
const Sampler& getSampler () const;
89
/** Declares the storage for the graphical representation of an object. */
90
void setSampler ( const Sampler& val );
92
/** Returns the sid of the sampler used by this texture*/
93
String getSamplerSid() const;
95
/** Returns the sid of the surface used by this texture*/
96
String getSurfaceSid() const;
98
/** comparison operator*/
99
bool operator== ( const Texture& other ) const;
102
* Set the name of the profile, if we want to add the texture as an extra technique tag.
103
* @param profileName Name of the extra technique profile.
105
void setProfileName(const String& profileName) { mProfileName = profileName; }
107
* Get the name of the profile, if we want to add the texture as an extra technique tag.
108
* @return mProfileName Name of the extra technique profile.
110
const String& getProfileName() const { return mProfileName; }
113
* Set the name of the child element, if we have set a profile name and we want
114
* to add the texture as an extra technique tag under a child element.
115
* @param childElementName Name of the child element.
117
void setChildElementName(const String& childElementName) { mChildElementName = childElementName; }
119
* Get the name of the child element, if we have set a profile name and we want
120
* to add the texture as an extra technique tag under a child element.
121
* @return childElementName Name of the child element.
123
const String& getChildElementName() const { return mChildElementName; }
127
} //namespace COLLADASW
130
#endif //__COLLADASTREAMWRITER_TEXTURE_H__