/usr/include/opencollada/COLLADAStreamWriter/COLLADASWAsset.h is in opencollada-dev 0.1.0~20140703.ddf8f47+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | /*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADAStreamWriter.
Licensed under the MIT Open Source License,
for details please see LICENSE file or the website
http://www.opensource.org/licenses/mit-license.php
*/
#ifndef __COLLADASTREAMWRITER_ASSET_H__
#define __COLLADASTREAMWRITER_ASSET_H__
#include "COLLADASWPrerequisites.h"
#include "COLLADASWElementWriter.h"
namespace COLLADASW
{
/** A class to add an Asset to the stream*/
class Asset : public ElementWriter
{
public:
/** Data related to a contributor that worked on the parent element.*/
struct Contributor
{
String mAuthor;
String mAuthoringTool;
String mComments;
String mCopyright;
String mSourceData;
};
/** Descriptive information about unit of measure. Its optional attributes are:*/
struct Unit
{
/**
* The name of the distance unit to use in the scene. For example,
* "meter", "centimeter", "inches", or "parsec". This can be the
* real name of a measurement, or an imaginary name.
*/
String mName;
/**
* The length of one unit with respect to the meter.
* For example, 1.0 for the name "meter"; 1000 for the
* name "kilometer"; 0.3048 for the name "foot".
*/
double mMeter;
};
/*Descriptive information about the coordinate system
of the geometric data. All coordinates are right handed
by definition. Valid values are X_UP, Y_UP,
or Z_UP. This element specifies which axis is
considered upward, which is considered to the
right, and which is considered inward.*/
enum UpAxisType
{
NONE,
X_UP,
Y_UP,
Z_UP
};
private:
/** Data related to a contributor that worked on the parent element.*/
Contributor mContributor;
/** A list of words used as search criteria for the parent element.*/
String mKeywords;
/** Revision information for the parent element.*/
String mRevision;
/** A description of the topical subject of the parent element.*/
String mSubject;
/** Title information for the parent element.*/
String mTitle;
/** Descriptive information about unit of measure. Its optional attributes are:*/
Unit mUnit;
/* Descriptive information about the coordinate system of the geometric data.
All coordinates are right handed by definition. Valid values are X_UP, Y_UP,
or Z_UP. This element specifies which axis is considered upward, which is considered
to the right, and which is considered inward. */
UpAxisType mUpAxisType;
public:
/** Constructor that sets the stream the asset should be written to*/
Asset ( StreamWriter * streamWriter );
/** Adds the asset to the stream, i.e. performes the actual writing*/
void add();
/** Returns a reference to the contributor of th asset*/
Contributor& getContributor()
{
return mContributor;
}
/** Sets the list of words used as search criteria for the parent element.*/
void setKeywords ( const String& keywords )
{
mKeywords = keywords;
}
/** Returns a reference to the list of words used as search criteria for the parent element.*/
const String& getKeywords() const
{
return mKeywords;
}
/** Sets the revision information for the parent element.*/
void setRevision ( const String& revision )
{
mRevision = revision;
}
/** Returns a reference to the revision information for the parent element.*/
const String& getRevision() const
{
return mRevision;
}
/** Sets the description of the topical subject of the parent element.*/
void setSubject ( const String& subject )
{
mSubject = subject;
}
/** Returns a reference to the description of the topical subject of the parent element.*/
const String& getSubject() const
{
return mSubject;
}
/** Sets the title information for the parent element.*/
void setTitle ( const String& title )
{
mTitle = title;
}
/** Returns a reference to the title information for the parent element.*/
const String& getTitle() const
{
return mTitle;
}
/** Sets the unit used by the document
@param unit The unit to use.
*/
void setUnit ( const Unit& unit )
{
mUnit = unit;
}
/**
* Sets the unit used by the document
* @param name The name of the unit to use. The name of the distance
* unit. For example, "meter", "centimeter", "inches", or
* "parsec". This can be the real name of a measurement,
* or an imaginary name.
* @param meter The length of one unit in meter.
* For example, 1.0 for the name "meter"; 1000 for the
* name "kilometer"; 0.3048 for the name "foot".
*/
void setUnit ( const String& name, double meter )
{
mUnit.mName = name;
mUnit.mMeter = meter;
}
/** Returns the unit*/
const Unit& getUnit()
{
return mUnit;
}
/** Sets the up axis of the document*/
void setUpAxisType ( const UpAxisType& upAxisType )
{
mUpAxisType = upAxisType;
}
/** Returns the up axis*/
const UpAxisType& getUpAxisType()
{
return mUpAxisType;
}
};
} //namespace COLLADASW
#endif //__COLLADASTREAMWRITER_ASSET_H__
|