1 /* 2 Copyright (C) 2005-2007 Feeling Software Inc. 3 Portions of the code are: 4 Copyright (C) 2005-2007 Sony Computer Entertainment America 5 6 MIT License: http://www.opensource.org/licenses/mit-license.php 7 */ 8 9 #ifndef _FCD_FORCE_FIELD_H_ 10 #define _FCD_FORCE_FIELD_H_ 11 12 class FCDocument; 13 class FCDExtra; 14 class FCDForce; 15 16 #ifndef _FCD_FORCE_TYPED_H_ 17 #include "FCDocument/FCDForceTyped.h" 18 #endif // _FCD_FORCE_TYPED_H_ 19 #ifndef _FCD_ENTITY_H_ 20 #include "FCDocument/FCDEntity.h" 21 #endif // _FCD_ENTITY_H_ 22 23 /** 24 A COLLADA physics force field. 25 26 This class does not have any parameters in the COMMON profile. 27 You can use the custom extra tree to enter/retrieve your 28 specific customized information. 29 30 @ingroup FCDocument 31 */ 32 33 class FCOLLADA_EXPORT FCDForceField : public FCDEntity 34 { 35 private: 36 DeclareObjectType(FCDEntity); 37 DeclareParameterRef(FCDExtra, information, FC("Information")); 38 39 public: 40 /** Constructor. 41 @param document The COLLADA document that owns the force field. */ 42 FCDForceField(FCDocument* document); 43 44 /** Destructor. */ 45 virtual ~FCDForceField(); 46 47 /** Retrieves the extra tree for all the force field information. 48 @return The extra tree. */ GetInformation()49 inline FCDExtra* GetInformation() { return const_cast<FCDExtra*>(const_cast<const FCDForceField*>(this)->GetInformation()); } 50 const FCDExtra* GetInformation() const; 51 52 /** [INTERNAL] Set the information. 53 @param info The new information to set. */ SetInformation(FCDExtra * info)54 inline void SetInformation(FCDExtra* info){ information = info; } 55 56 /** Retrieves the entity class type. 57 @return The entity class type: FORCE_FIELD */ GetType()58 virtual Type GetType() const { return FORCE_FIELD; } 59 60 /** Clones the force field information. 61 @param clone The cloned force field. 62 If this pointer is NULL, a new force field is created and 63 you will need to release it manually. 64 @param cloneChildren Whether to recursively clone this entity's children. 65 @return The clone. */ 66 virtual FCDEntity* Clone(FCDEntity* clone = NULL, bool cloneChildren = false) const; 67 }; 68 69 #endif // _FCD_FORCE_FIELD_H_ 70