8 #include <osg\Referenced>
10 #include <xercesc\util\XercesDefs.hpp>
21 namespace APDYNAMICART
24 #define META_HoopShapeObject(name, menuName) \
26 name(const name& val); \
27 virtual void createMenu( MenuPtr parent ) const; \
28 virtual bool sliderChanged( const char* sliderID, float sliderPos ); \
29 virtual int load( XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* PoANode ); \
30 virtual void save( XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* Document, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* poaNode ); \
31 virtual osg::ref_ptr<HoopShape> clone() { return new name(*this); } \
32 virtual std::string getName() { return (menuName); }
44 virtual bool itemClicked(
const char* itemID ) {
return false; };
45 virtual bool sliderChanged(
const char* sliderID,
float sliderPos ) {
return false; };
46 virtual int load( XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode* PoANode ) = 0;
47 virtual void save( XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* Document, XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode* poaNode ) = 0;
54 virtual osg::ref_ptr<HoopShape>
clone() = 0;
57 virtual std::string
getName() = 0;
71 virtual std::string
getName() {
return "NullHoopShape"; }
72 virtual int load( XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode* PoANode ) {
73 err(
"Loading null object!");
return 1;
75 virtual void save( XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* Document, XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode* poaNode ) {
76 err(
"Saving null object!");
170 std::vector<std::string> shapes;
171 shapes.push_back(
"Ellipse");
172 shapes.push_back(
"Rectangle");
173 shapes.push_back(
"Rod");
174 shapes.push_back(
"Regular polygon");
175 shapes.push_back(
"Elongated Circle");
179 if(name ==
"Ellipse")
181 else if(name ==
"Rectangle")
183 else if(name ==
"Regular polygon")
185 else if(name ==
"Rod")
187 else if(name ==
"Elongated Circle")
189 else if(name ==
"Painted")