/usr/include/opencollada/COLLADASaxFrameworkLoader/COLLADASaxFWLInputShared.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 | /*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADASaxFrameworkLoader.
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 __COLLADASAXFWL_INPUT_SHARED_H__
#define __COLLADASAXFWL_INPUT_SHARED_H__
#include "COLLADASaxFWLPrerequisites.h"
#include "COLLADASaxFWLInputUnshared.h"
// TODO
#include "COLLADAFWConstants.h"
#include <COLLADABUURI.h>
namespace COLLADASaxFWL
{
/**
* Declares the input semantics of a data source and connects a consumer to that source.
* Note: There are two <input> variants; see also "<input> (unshared)."
* The <input> element declares the input connections to a data source that a consumer requires.
* A data source is a container of raw data that lacks semantic meaning so that the data can be
* reused within the document. To use the data, a consumer declares a connection to it with the
* desired semantic information.
* The <source> and <input> elements are part of the COLLADA dataflow model. This model is also
* known as stream processing, pipe, or producer-consumer. An input connection is the dataflow
* path from a <source> to a sink (the dataflow consumers, which are <input>�s parents, such as
* <polylist>).
* In COLLADA, all inputs are driven by index values. A consumer samples an input by supplying
* an index value to an input. Some consumers have multiple inputs that can share the same
* index values. Inputs that have the same offset attribute value are driven by the same index
* value from the consumer. This is an optimization that reduces the total number of indexes
* that the consumer must store. These inputs are described in this section as shared inputs but
* otherwise operate in the same manner as unshared inputs.
*/
class InputShared : public InputUnshared
{
private:
/** The offset into the list of indices defined by the parent element�s <p> or
<v> subelement. If two <input> elements share the same offset, they are
indexed the same. This is a simple form of compression for the list of
indices and also defines the order in which the inputs are used. Required. */
unsigned long long mOffset;
/** Which inputs to group as a single set. This is helpful when multiple inputs
share the same semantics. Optional. */
unsigned long long mSet;
public:
/**
* Default-Constructor.
*/
InputShared () :
InputUnshared ()
, mOffset ( 0 )
, mSet ( 0 )
{}
/**
* Constructor.
* @param semantic The semantic of the @a \<input\> element.
* @param source The source of the @a \<input\> element.
* @param offset The offset of the @a \<input\> element.
* @param set The set of the @a \<input\> element.
*/
InputShared ( InputSemantic::Semantic semantic, const COLLADABU::URI& source, unsigned long long offset = 0, unsigned long long set = 0 )
: InputUnshared ( semantic, source )
, mOffset ( offset )
, mSet ( set )
{}
/**
* Constructor.
* @param semantic The semantic of the @a \<input\> element.
* @param source The source of the @a \<input\> element.
* @param offset The offset of the @a \<input\> element.
* @param set The set of the @a \<input\> element.
*/
InputShared ( const String& semantic, const String& source, unsigned long long offset = 0, unsigned long long set = 0 )
: InputUnshared ( semantic, source )
, mOffset ( offset )
, mSet ( set )
{}
/** Destructor. */
virtual ~InputShared() {}
/** The offset into the list of indices defined by the parent element�s <p> or
<v> subelement. If two <input> elements share the same offset, they are
indexed the same. This is a simple form of compression for the list of
indices and also defines the order in which the inputs are used. Required. */
unsigned long long getOffset () const { return mOffset; }
void setOffset ( unsigned long long val ) { mOffset = val; }
/** Which inputs to group as a single set. This is helpful when multiple inputs
share the same semantics. Optional. */
unsigned long long getSet () const { return mSet; }
void setSet ( unsigned long long val ) { mSet = val; }
};
/** Pointer to an array of input elements. */
typedef COLLADAFW::ArrayPrimitiveType<InputShared*> InputSharedArray;
}
#endif // __COLLADASAXFWL_INPUT_SHARED_H__
|