00001 /* 00002 Copyright (C) 2005-2007 Feeling Software Inc. 00003 Portions of the code are: 00004 Copyright (C) 2005-2007 Sony Computer Entertainment America 00005 00006 MIT License: http://www.opensource.org/licenses/mit-license.php 00007 */ 00008 00015 #ifndef _FCD_GEOMETRY_H_ 00016 #define _FCD_GEOMETRY_H_ 00017 00018 #ifndef _FCD_ENTITY_H_ 00019 #include "FCDocument/FCDEntity.h" 00020 #endif // _FCD_ENTITY_H_ 00021 #ifndef _FU_DAE_ENUM_H_ 00022 #include "FUtils/FUDaeEnum.h" 00023 #endif // _FU_DAE_ENUM_H_ 00024 00025 class FCDocument; 00026 class FCDGeometryMesh; 00027 class FCDGeometrySpline; 00028 00053 class FCOLLADA_EXPORT FCDGeometry : public FCDEntity 00054 { 00055 private: 00056 DeclareObjectType(FCDEntity); 00057 00058 // Contains only one of the following, in order of importance. 00059 DeclareParameterRef(FCDGeometryMesh, mesh, FC("Mesh")); 00060 DeclareParameterRef(FCDGeometrySpline, spline, FC("Spline")); 00061 00062 public: 00066 FCDGeometry(FCDocument* document); 00067 00069 virtual ~FCDGeometry(); 00070 00074 void SetMesh(FCDGeometryMesh* data){ mesh = data; } 00075 void SetSpline(FCDGeometrySpline* data){ spline = data; } 00080 virtual Type GetType() const { return GEOMETRY; } 00081 00084 bool IsMesh() const { return mesh != NULL; } 00085 00089 FCDGeometryMesh* GetMesh() { return mesh; } 00090 const FCDGeometryMesh* GetMesh() const { return mesh; } 00095 FCDGeometryMesh* CreateMesh(); 00096 00099 bool IsSpline() const { return spline != NULL; } 00100 00104 FCDGeometrySpline* GetSpline() { return spline; } 00105 const FCDGeometrySpline* GetSpline() const { return spline; } 00110 FCDGeometrySpline* CreateSpline(); 00111 00112 00115 bool IsPSurface() const { return false; } 00116 00123 virtual FCDEntity* Clone(FCDEntity* clone = NULL, bool cloneChildren = false) const; 00124 }; 00125 00126 #endif // _FCD_GEOMETRY_H_