/usr/include/opencollada/COLLADAFramework/COLLADAFWFileInfo.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 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | /*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADAFramework.
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 __COLLADAFW_ASSET_H__
#define __COLLADAFW_ASSET_H__
#include "COLLADAFWPrerequisites.h"
#include "COLLADAFWPointerArray.h"
#include "COLLADABUURI.h"
namespace COLLADAFW
{
/**
Computers store vast amounts of information. An asset is a set of information that is organized into a
distinct collection and managed as a unit. A wide range of attributes describes assets so that the
information can be maintained and understood both by software tools and by humans. Asset information is
often hierarchical, where the parts of a large asset are divided into smaller pieces that are managed as
distinct assets themselves.
*/
class FileInfo
{
public:
typedef std::pair<String, String> ValuePair;
typedef PointerArray<ValuePair> ValuePairPointerArray;
public:
/** Descriptive information about unit of measure. Its optional attributes are:*/
class Unit
{
public:
static const double LINEAR_UNIT_KILOMETER;
static const double LINEAR_UNIT_METER;
static const double LINEAR_UNIT_DECIMETER;
static const double LINEAR_UNIT_CENTIMETER;
static const double LINEAR_UNIT_MILLIMETER;
static const double LINEAR_UNIT_FOOT;
static const double LINEAR_UNIT_INCH;
static const double LINEAR_UNIT_YARD;
static const String LINEAR_UNIT_KILOMETER_NAME;
static const String LINEAR_UNIT_METER_NAME;
static const String LINEAR_UNIT_DECIMETER_NAME;
static const String LINEAR_UNIT_CENTIMETER_NAME;
static const String LINEAR_UNIT_MILLIMETER_NAME;
static const String LINEAR_UNIT_FOOT_NAME;
static const String LINEAR_UNIT_INCH_NAME;
static const String LINEAR_UNIT_YARD_NAME;
static const String ANGULAR_UNIT_DEGREES_NAME;
static const String ANGULAR_UNIT_RADIANS_NAME;
static const String TIME_UNIT_FILM_NAME;
enum LinearUnit
{
KILOMETER,
METER,
DECIMETER,
CENTIMETER,
MILLIMETER,
FOOT,
INCH,
YARD,
UNKNOWN_LINEAR_UNIT
};
enum AngularUnit
{
DEGREES,
RADIANS,
UNKNOWN_ANGULAR_UNIT
};
enum TimeUnit
{
FILM,
UNKNOWN_TIME_UNIT
};
private:
/**
* The enum value for the linear unit.
*/
LinearUnit mLinearUnitUnit;
/**
* 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 mLinearUnitName;
/**
* How many real-world meters in one distance unit as a floating-point number.
* For example, 1.0 for the name "meter"; 1000 for the name "kilometer";
* 0.3048 for the name "foot".
*/
double mLinearUnitMeter;
/**
* The angular unit;
*/
String mAngularUnitName;
AngularUnit mAngularUnitUnit;
/**
* The time unit.
*/
String mTimeUnitName;
TimeUnit mTimeUnitUnit;
public:
Unit ()
: mLinearUnitUnit ( METER )
, mLinearUnitName ( LINEAR_UNIT_METER_NAME )
, mLinearUnitMeter ( LINEAR_UNIT_METER )
, mAngularUnitName ( ANGULAR_UNIT_DEGREES_NAME )
, mAngularUnitUnit ( DEGREES )
, mTimeUnitName ( TIME_UNIT_FILM_NAME )
, mTimeUnitUnit ( FILM )
{}
Unit ( String linearUnitName, double linearUnitMeter,
String angularUnitName, String timeUnitName = TIME_UNIT_FILM_NAME )
: mLinearUnitName ( linearUnitName )
, mLinearUnitMeter ( linearUnitMeter )
, mAngularUnitName ( angularUnitName )
, mTimeUnitName ( timeUnitName )
{
initializeLinearUnitUnit ( linearUnitMeter );
initializeAngularUnitUnitByName ( mAngularUnitName );
initializeTimeUnitUnitByName ( mTimeUnitName );
}
virtual ~Unit () {}
/**
* The enum value for the linear unit.
*/
const LinearUnit& getLinearUnitUnit () const { return mLinearUnitUnit; }
void setLinearUnitUnit ( const LinearUnit& val ) { mLinearUnitUnit = val; }
/**
* 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.
*/
const String& getLinearUnitName () const { return mLinearUnitName; }
void setLinearUnitName ( const String& val );
/**
* Initializes the linear unit unit with the specified enum value
* in depend of the given name.
*/
void initializeLinearUnitUnit ( const double val );
/**
* How many real-world meters in one distance unit as a floating-point number.
* For example, 1.0 for the name "meter"; 1000 for the name "kilometer";
* 0.3048 for the name "foot".
*/
const double getLinearUnitMeter () const { return mLinearUnitMeter; }
void setLinearUnitMeter ( const double val );
/**
* The angular unit;
*/
AngularUnit getAngularUnit () const { return mAngularUnitUnit; }
void setAngularUnit ( AngularUnit angularUnitUnit ) { mAngularUnitUnit = angularUnitUnit;}
/**
* The angular unit;
*/
const String& getAngularUnitName () const { return mAngularUnitName; }
void setAngularUnitName ( const String& val );
/**
* Initializes the angular unit unit with the specified enum value
* in depend of the given name.
*/
void initializeAngularUnitUnitByName ( const String& angularUnitName );
/**
* The time unit.
*/
const String& getTimeUnitName () const { return mTimeUnitName; }
void setTimeUnitName ( const String& val );
/**
* Initializes the time unit unit with the specified enum value
* in depend of the given name.
*/
void initializeTimeUnitUnitByName ( const String& timeUnitName );
};
/*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
};
static const String X_UP_STRING;
static const String Y_UP_STRING;
static const String Z_UP_STRING;
private:
/** 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;
/** A pair where you can hold file informations. */
ValuePairPointerArray mValuePairArray;
/** The absolute file uri.*/
COLLADABU::URI mAbsoluteFileUri;
public:
/** Constructor. */
FileInfo();
/** Destructor. */
virtual ~FileInfo();
/** A pair where you can hold file informations. */
void appendValuePair ( ValuePair* valuePair );
/** A pair where you can hold file informations. */
void appendValuePair ( const String& value1, const String& value2 );
/** A pair where you can hold file informations. */
const ValuePairPointerArray& getValuePairArray () const { return mValuePairArray; }
/** Sets the unit used by the document.
@param unit The unit to use.
*/
void setUnit ( const Unit& unit )
{
mUnit = unit;
}
/**
* Sets the linear unit.
*/
void setLinearUnit ( const String& linearUnit )
{
mUnit.setLinearUnitName ( linearUnit );
}
/**
* Sets the linear unit meter.
*/
void setLinearUnitMeter ( double linearUnitMeter )
{
mUnit.setLinearUnitMeter ( linearUnitMeter );
}
/** Returns the unit. */
Unit& getUnit()
{
return mUnit;
}
/** Returns the unit. */
const Unit& getUnit() const
{
return mUnit;
}
/** Sets the up axis of the document. */
void setUpAxisType ( UpAxisType upAxisType )
{
mUpAxisType = upAxisType;
}
/** Sets the up axis of the document. */
void setUpAxisType ( const String& upAxis );
/** Returns the up axis. */
UpAxisType getUpAxisType() const
{
return mUpAxisType;
}
/** Returns the absolute uri of the file.*/
const COLLADABU::URI& getAbsoluteFileUri() const { return mAbsoluteFileUri; }
/** Sets the absolute uri of the file.*/
void setAbsoluteFileUri( const COLLADABU::URI& absoluteFileUri) { mAbsoluteFileUri = absoluteFileUri; }
private:
/** Disable default copy ctor. */
FileInfo( const FileInfo& pre );
/** Disable default assignment operator. */
const FileInfo& operator= ( const FileInfo& pre );
};
} // namespace COLLADAFW
#endif // __COLLADAFW_ASSET_H__
|