00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00020 #ifndef _FCD_GEOMETRY_POLYGONS_INPUT_H_
00021 #define _FCD_GEOMETRY_POLYGONS_INPUT_H_
00022
00023 #ifndef __FCD_OBJECT_H_
00024 #include "FCDocument/FCDObject.h"
00025 #endif // __FCD_OBJECT_H_
00026 #ifndef _FU_PARAMETER_H_
00027 #include "FUtils/FUParameter.h"
00028 #endif // _FU_PARAMETER_H_
00029
00030 class FCDGeometrySource;
00031 class FCDGeometryPolygons;
00032
00047 class FCOLLADA_EXPORT FCDGeometryPolygonsInput : public FCDObject, FUTracker
00048 {
00049 private:
00050 DeclareObjectType(FCDObject);
00051
00052 FCDGeometryPolygons* parent;
00053 DeclareParameterPtr(FCDGeometrySource, source, FC("Data Source"));
00054 DeclareParameter(int32, FUParameterQualifiers::SIMPLE, set, FC("Input Set"));
00055 DeclareParameter(uint32, FUParameterQualifiers::SIMPLE, offset, FC("Stream Offset"));
00056 DeclareParameterList(UInt32, indices, FC("Data Indices"));
00057
00058 public:
00063 FCDGeometryPolygonsInput(FCDocument* document, FCDGeometryPolygons* parent);
00064
00066 ~FCDGeometryPolygonsInput();
00067
00073 FUDaeGeometryInput::Semantic GetSemantic() const;
00074
00080 FCDGeometrySource* GetSource() { return source; }
00081 const FCDGeometrySource* GetSource() const { return source; }
00085 void SetSource(FCDGeometrySource* source);
00086
00090 inline void SetOffset(uint32 _offset) { offset = _offset; }
00091
00094 inline uint32 GetOffset() const { return offset; }
00095
00101 inline int32 GetSet() const { return set; }
00102
00108 inline void SetSet(int32 _set) { set = _set; }
00109
00113 inline bool OwnsIndices() const { return !indices.empty(); }
00114
00119 void SetIndices(const uint32* indices, size_t count);
00120
00124 void SetIndexCount(size_t count);
00125
00129 void ReserveIndexCount(size_t count);
00130
00135 void AddIndex(uint32 index);
00136
00141 void AddIndices(const UInt32List& indices);
00142
00145 uint32* GetIndices() { return const_cast<uint32*>(const_cast<const FCDGeometryPolygonsInput*>(this)->GetIndices()); }
00146 const uint32* GetIndices() const;
00150 size_t GetIndexCount() const;
00151
00152 private:
00153
00154 virtual void OnObjectReleased(FUTrackable* object);
00155
00156
00157 FUParameterUInt32List& FindIndices() { return const_cast<FUParameterUInt32List&>(const_cast<const FCDGeometryPolygonsInput*>(this)->FindIndices()); }
00158 const FUParameterUInt32List& FindIndices() const;
00159 };
00160
00161 #endif // _FCD_GEOMETRY_POLYGONS_INPUT_H_