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_ASSET_H__
12
#define __COLLADASTREAMWRITER_ASSET_H__
14
#include "COLLADASWPrerequisites.h"
15
#include "COLLADASWElementWriter.h"
21
/** A class to add an Asset to the stream*/
23
class Asset : public ElementWriter
27
/** Data related to a contributor that worked on the parent element.*/
31
String mAuthoringTool;
37
/** Descriptive information about unit of measure. Its optional attributes are:*/
41
* The name of the distance unit to use in the scene. For example,
42
* "meter", "centimeter", "inches", or "parsec". This can be the
43
* real name of a measurement, or an imaginary name.
48
* The length of one unit with respect to the meter.
49
* For example, 1.0 for the name "meter"; 1000 for the
50
* name "kilometer"; 0.3048 for the name "foot".
55
/*Descriptive information about the coordinate system
56
of the geometric data. All coordinates are right handed
57
by definition. Valid values are X_UP, Y_UP,
58
or Z_UP. This element specifies which axis is
59
considered upward, which is considered to the
60
right, and which is considered inward.*/
72
/** Data related to a contributor that worked on the parent element.*/
73
Contributor mContributor;
75
/** A list of words used as search criteria for the parent element.*/
78
/** Revision information for the parent element.*/
81
/** A description of the topical subject of the parent element.*/
84
/** Title information for the parent element.*/
87
/** Descriptive information about unit of measure. Its optional attributes are:*/
90
/* Descriptive information about the coordinate system of the geometric data.
91
All coordinates are right handed by definition. Valid values are X_UP, Y_UP,
92
or Z_UP. This element specifies which axis is considered upward, which is considered
93
to the right, and which is considered inward. */
94
UpAxisType mUpAxisType;
97
/** Constructor that sets the stream the asset should be written to*/
98
Asset ( StreamWriter * streamWriter );
100
/** Adds the asset to the stream, i.e. performes the actual writing*/
103
/** Returns a reference to the contributor of th asset*/
104
Contributor& getContributor()
109
/** Sets the list of words used as search criteria for the parent element.*/
110
void setKeywords ( const String& keywords )
112
mKeywords = keywords;
115
/** Returns a reference to the list of words used as search criteria for the parent element.*/
116
const String& getKeywords() const
122
/** Sets the revision information for the parent element.*/
123
void setRevision ( const String& revision )
125
mRevision = revision;
128
/** Returns a reference to the revision information for the parent element.*/
129
const String& getRevision() const
134
/** Sets the description of the topical subject of the parent element.*/
135
void setSubject ( const String& subject )
140
/** Returns a reference to the description of the topical subject of the parent element.*/
141
const String& getSubject() const
146
/** Sets the title information for the parent element.*/
147
void setTitle ( const String& title )
152
/** Returns a reference to the title information for the parent element.*/
153
const String& getTitle() const
158
/** Sets the unit used by the document
159
@param unit The unit to use.
161
void setUnit ( const Unit& unit )
167
* Sets the unit used by the document
168
* @param name The name of the unit to use. The name of the distance
169
* unit. For example, "meter", "centimeter", "inches", or
170
* "parsec". This can be the real name of a measurement,
171
* or an imaginary name.
172
* @param meter The length of one unit in meter.
173
* For example, 1.0 for the name "meter"; 1000 for the
174
* name "kilometer"; 0.3048 for the name "foot".
176
void setUnit ( const String& name, double meter )
179
mUnit.mMeter = meter;
182
/** Returns the unit*/
183
const Unit& getUnit()
188
/** Sets the up axis of the document*/
189
void setUpAxisType ( const UpAxisType& upAxisType )
191
mUpAxisType = upAxisType;
194
/** Returns the up axis*/
195
const UpAxisType& getUpAxisType()
203
} //namespace COLLADASW
207
#endif //__COLLADASTREAMWRITER_ASSET_H__