00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _MULTIPHYSICSTOMULTIVISUALCOMPONENT_
00019 #define _MULTIPHYSICSTOMULTIVISUALCOMPONENT_
00020
00021 #include "game/BaseComponent.h"
00022 #include "game/ComponentFactory.h"
00023
00024 DEFINE_STL_TYPE(std::map<CONCAT(std::string, std::string)>, PhysicsVisualMap);
00025
00026 class MultiPhysicsToMultiVisualComponent : public BaseComponent
00027 {
00028 private:
00029 PhysicsVisualMap m_map;
00030 public:
00031 DEFAULT_COMPONENT_CONSTRUCTOR(BaseComponent, MultiPhysicsToMultiVisualComponent,,,);
00032
00033 void AddMapping(const std::string & bodyPartName, const std::string & visualName);
00034 void RemoveMapping(const std::string & bodyPartName);
00035
00036 virtual void Update(const int nDelta);
00037
00038 virtual bool FromAttribute(const Attribute* pRoot);
00039 virtual void ToStream(std::ostream& stream) const;
00040 virtual void FromStream(std::istream& stream);
00041 };
00042
00043 REGISTER_COMPONENT(MultiPhysicsToMultiVisualComponent, "component_mp2mv", "mp2mv");
00044
00045 #endif