~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to COLLADAStreamWriter/include/COLLADASWTexture.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of COLLADAStreamWriter.
 
5
 
 
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
 
9
*/
 
10
 
 
11
#ifndef __COLLADASTREAMWRITER_TEXTURE_H__
 
12
#define __COLLADASTREAMWRITER_TEXTURE_H__
 
13
 
 
14
#include "COLLADASWPrerequisites.h"
 
15
#include "COLLADASWElementWriter.h"
 
16
#include "COLLADASWExtraTechnique.h"
 
17
#include "COLLADASWColor.h"
 
18
#include "COLLADASWSampler.h"
 
19
#include <vector>
 
20
#include <map>
 
21
 
 
22
 
 
23
namespace COLLADASW
 
24
{
 
25
 
 
26
    class Texture : public BaseExtraTechnique
 
27
    {
 
28
 
 
29
    private:
 
30
 
 
31
        String mSid;
 
32
 
 
33
        /** the ID of the image element assigned to the texture. Required. */
 
34
        String mImageID;
 
35
 
 
36
        /** The surface. For possible type values see domFx_surface_type_enum in domTypes.h. Required. */
 
37
//        Surface mSurface;
 
38
 
 
39
        /** Declares the storage for the graphical representation of an object. */
 
40
        Sampler mSampler;
 
41
 
 
42
        /** texcoord.*/
 
43
        String mTexcoord;
 
44
 
 
45
        /** The name of the profile, if we want to add the texture as an extra technique tag. */
 
46
        String mProfileName;
 
47
 
 
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;
 
51
 
 
52
    public:
 
53
 
 
54
        /**Constructor that sets all required attributes and the default values for optional attributes.*/
 
55
        Texture ( const String &imageID, const String &sid="" );
 
56
 
 
57
        /**Constructor that creates an invalid texture.*/
 
58
        Texture();
 
59
 
 
60
        /** Destructor */
 
61
        ~Texture() {};
 
62
 
 
63
        /** Chick, if the Texture is valid*/
 
64
        bool isValid() const;
 
65
 
 
66
        /** Sets the texcoord. */
 
67
        void setTexcoord ( const String texcoord );
 
68
 
 
69
        /** Returns the texcoord*/
 
70
        const String& getTexcoord() const;
 
71
 
 
72
        /** Returns the image ID*/
 
73
        const String& getImageID() const;
 
74
 
 
75
        /** Returns the image ID*/
 
76
        const String& getImageId() const;
 
77
 
 
78
        void setImageId ( String imageId );
 
79
 
 
80
        /** Returns the surface. */
 
81
//        const Surface& getSurface() const;
 
82
 
 
83
        /** Returns the surface. */
 
84
//        void setSurface ( const Surface& surface );
 
85
 
 
86
        /** Declares the storage for the graphical representation of an object. */
 
87
        const Sampler& getSampler () const;
 
88
 
 
89
        /** Declares the storage for the graphical representation of an object. */
 
90
        void setSampler ( const Sampler& val );
 
91
 
 
92
        /** Returns the sid of the sampler used by this texture*/
 
93
        String getSamplerSid() const;
 
94
 
 
95
        /** Returns the sid of the surface used by this texture*/
 
96
        String getSurfaceSid() const;
 
97
 
 
98
        /** comparison operator*/
 
99
        bool operator== ( const Texture& other ) const;
 
100
 
 
101
        /**
 
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.
 
104
        */
 
105
        void setProfileName(const String& profileName)  { mProfileName = profileName; }
 
106
        /**
 
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.
 
109
        */
 
110
        const String& getProfileName() const { return mProfileName; }
 
111
 
 
112
        /**
 
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.
 
116
        */
 
117
        void setChildElementName(const String& childElementName)  { mChildElementName = childElementName; }
 
118
        /**
 
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.
 
122
        */
 
123
        const String& getChildElementName() const { return mChildElementName; }
 
124
 
 
125
    };
 
126
 
 
127
} //namespace COLLADASW
 
128
 
 
129
 
 
130
#endif //__COLLADASTREAMWRITER_TEXTURE_H__