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

« back to all changes in this revision

Viewing changes to COLLADAStreamWriter/include/COLLADASWInstanceGeometry.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
 
 
12
#ifndef __COLLADASTREAMWRITER_INSTANCE_GEOMETRY_H__
 
13
#define __COLLADASTREAMWRITER_INSTANCE_GEOMETRY_H__
 
14
 
 
15
#include "COLLADASWPrerequisites.h"
 
16
#include "COLLADASWElementWriter.h"
 
17
#include "COLLADASWBindMaterial.h"
 
18
#include "COLLADABUURI.h"
 
19
 
 
20
#include <string>
 
21
 
 
22
namespace COLLADASW
 
23
{
 
24
 
 
25
    /** Class to write an @a \<instance_geometry\> element to the stream*/
 
26
        class InstanceGeometry : public ElementWriter
 
27
    {
 
28
 
 
29
    private:
 
30
 
 
31
        /** To bind the materials. */
 
32
        BindMaterial mBindMaterial;
 
33
 
 
34
        /** The URL of the location of the object to instantiate.*/
 
35
        URI mUrl;
 
36
 
 
37
    public:
 
38
 
 
39
                /** Constructor
 
40
                @param The stream the instance geometry should be written to
 
41
                */
 
42
                InstanceGeometry ( StreamWriter * streamWriter ) 
 
43
            : ElementWriter ( streamWriter ), mBindMaterial ( streamWriter ) {}
 
44
 
 
45
                /** Destructor*/
 
46
                ~InstanceGeometry(){}
 
47
 
 
48
        /** Sets the url of the instance geometry*/
 
49
        void setUrl ( const URI& url )
 
50
        {
 
51
            mUrl=url;
 
52
        }
 
53
 
 
54
        /** Returns the url of the instance geometry*/
 
55
        const URI& getUrl()
 
56
        {
 
57
            return mUrl;
 
58
        }
 
59
 
 
60
        BindMaterial& getBindMaterial()
 
61
        {
 
62
            return mBindMaterial;
 
63
        }
 
64
 
 
65
        /** Adds the instance geometry to the stream*/
 
66
        void add();
 
67
 
 
68
    };
 
69
 
 
70
 
 
71
} //namespace COLLADASW
 
72
 
 
73
 
 
74
 
 
75
 
 
76
#endif //__COLLADASTREAMWRITER_INSTANCE_GEOMETRY_H__
 
77