ogre 源码 二 property

来源:互联网 发布:rete算法原理视频 编辑:程序博客网 时间:2024/06/05 03:00

在Components下  2个h文件 一个cpp文件

 

/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/

Copyright (c) 2000-2012 Torus Knot Software Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __OGRE_PROPERTY_H__
#define __OGRE_PROPERTY_H__

#include "OgrePropertyPrerequisites.h"
#include "OgreAny.h"
#include "OgreIteratorWrappers.h"
#include "OgreString.h"
#include "OgreException.h"
#include "OgreVector2.h"
#include "OgreVector3.h"
#include "OgreVector4.h"
#include "OgreColourValue.h"
#include "OgreQuaternion.h"
#include "OgreMatrix3.h"
#include "OgreMatrix4.h"

#include <boost/bind.hpp>
#include <boost/function.hpp>
/** \addtogroup Optional Components
*  @{
*/
/** \addtogroup Property
*  @{
*/

/** @file
 OGRE's property system allows you to associate values of arbitrary type with
 names, and have those values exposed via a self-describing interface. Unlike
 Ogre::StringInterface, the values are passed as their native types without
 needing conversion to or from strings; they are simply wrapped in an Ogre::Any
 and casts are performed to access them.
 @par
 Property values are actually not stored in this system; instead the property
 definitions reference getter & setter methods which provide the 'backing' for
 the property. This means you can directly expose features of your classes as properties
 without any duplication.
 @par
 There are two aspects to exposing a property on your class. One is exposing
 the definition of the property (PropertyDef), which should be shared between
 all instances and probably stored in a static PropertyDefMap somewhere. The second
 is the instance 'wiring' which ensures that a call to set a property calls
 a method on this particular instance of the class; this is formed by a number of
 Property instances, contained in a PropertySet. Each Property has an explicit
 binding to getter and setter instance methods.
 @par
 So, here's an example of setting up properties on an instance:

 @code
 // Make sure the property definition is created
 // propertyDefs is a variable of type PropertyDefMap, shared between instances
 PropertyDefMap::iterator defi = propertyDefs.find("name");
 if (defi == propertyDefs.end())
 {
  defi = propertyDefs.insert(PropertyDefMap::value_type("name",
   PropertyDef("name",
    "The name of the object.", PROP_STRING))).first;
 }
 // This has established the property definition, and its description.
 // Now, we need to 'wire' a property instance for this object instance
 // We assume the class is called 'Foo' and the instance is pointed to by a variable called 'inst'
 // 'props' is a PropertySet, specific to the instance
 props.addProperty(
  OGRE_NEW Property<String>(&(defi->second),
   boost::bind(&Foo::getName, inst),
   boost::bind(&Foo::setName, inst, _1)));

 @endcode

*/

/** @} */
/** @} */
namespace Ogre
{
 /** \addtogroup Optional Components
 *  @{
 */
 /** \addtogroup Property
 *  @{
 */

 /// The type of a property
 enum PropertyType
 {
  PROP_SHORT = 0,
  PROP_UNSIGNED_SHORT = 1,
  PROP_INT = 2,
  PROP_UNSIGNED_INT = 3,
  PROP_LONG = 4,
  PROP_UNSIGNED_LONG = 5,
  PROP_REAL = 6,
  PROP_STRING = 7,
  PROP_VECTOR2 = 8,
  PROP_VECTOR3 = 9,
  PROP_VECTOR4 = 10,
  PROP_COLOUR = 11,
  PROP_BOOL = 12,
  PROP_QUATERNION = 13,
  PROP_MATRIX3 = 14,
  PROP_MATRIX4 = 15,

  PROP_UNKNOWN = 999
 };

 /** Definition of a property of an object.
 @remarks
 This definition is shared between all instances of an object and therefore
 has no value. Property contains values.
 */
 class _OgrePropertyExport PropertyDef : public PropertyAlloc
 {
 public:

  /* Construct a property.
  @param name The name of the property
  @param desc A (potentially) long description of the property
  @param pType The type of the property
  */
  PropertyDef(const String& name, const String& desc, PropertyType pType)
   : mName(name), mDesc(desc), mType(pType) {}

  /// Get the name of the property
  const String& getName() const { return mName; }

  /// Get the description of the property
  const String& getDescription() const { return mDesc; }

  /// Get the type of the property
  PropertyType getType() const { return mType; }

  /// Get a string name of a property type
  static const String& getTypeName(PropertyType theType);

  static PropertyType getTypeForValue(const short& val) { return PROP_SHORT; }
  static PropertyType getTypeForValue(const unsigned short& val) { return PROP_UNSIGNED_SHORT; }
  static PropertyType getTypeForValue(const int& val) { return PROP_INT; }
  static PropertyType getTypeForValue(const unsigned int& val) { return PROP_UNSIGNED_INT; }
  static PropertyType getTypeForValue(const long& val) { return PROP_LONG; }
  static PropertyType getTypeForValue(const unsigned long& val) { return PROP_UNSIGNED_LONG; }
  static PropertyType getTypeForValue(const Real& val) { return PROP_REAL; }
  static PropertyType getTypeForValue(const String& val) { return PROP_STRING; }
  static PropertyType getTypeForValue(const Vector2& val) { return PROP_VECTOR2; }
  static PropertyType getTypeForValue(const Vector3& val) { return PROP_VECTOR3; }
  static PropertyType getTypeForValue(const Vector4& val) { return PROP_VECTOR4; }
  static PropertyType getTypeForValue(const ColourValue& val) { return PROP_COLOUR; }
  static PropertyType getTypeForValue(const bool& val) { return PROP_BOOL; }
  static PropertyType getTypeForValue(const Quaternion& val) { return PROP_QUATERNION; }
  static PropertyType getTypeForValue(const Matrix3& val) { return PROP_MATRIX3; }
  static PropertyType getTypeForValue(const Matrix4& val) { return PROP_MATRIX4; }

 protected:
  // no default construction
  PropertyDef() {}

  String mName;
  String mDesc;
  PropertyType mType;

 };

 /// Map from property name to shared definition
 typedef map<String, PropertyDef>::type PropertyDefMap;

 /** Base interface for an instance of a property.
 */
 class _OgrePropertyExport PropertyBase : public PropertyAlloc
 {
 public:
  /// Constructor
  PropertyBase(PropertyDef* def) : mDef(def) {}
  virtual ~PropertyBase() {}

  /// Get the name of the property
  const String& getName() const { return mDef->getName(); }

  /// Get the description of the property
  const String& getDescription() const { return mDef->getDescription(); }

  /// Get the type of the property
  PropertyType getType() const { return mDef->getType(); }

  /// Return the current value as an Any
  virtual Ogre::Any getValue() const = 0;

 protected:
  // disallow default construction
  PropertyBase() {}
  PropertyDef* mDef;

 };

 /** Property instance with passthrough calls to a given object. */
 template <typename T>
 class Property : public PropertyBase
 {
 public:
  typedef T value_type;
  typedef boost::function< T (void) > getter_func;
  typedef boost::function< void (T) > setter_func;

  /** Construct a property which is able to directly call a given
  getter and setter on a specific object instance, via functors.
  */
  Property(PropertyDef* def, getter_func getter, setter_func setter)
   : PropertyBase(def)
   , mGetter(getter)
   , mSetter(setter)
  {
  }

  /** Set the property value.
  */
  virtual void set(T val)
  {
   mSetter(val);
  }

  virtual T get() const
  {
   return mGetter();
  }

  Ogre::Any getValue() const
  {
   return Ogre::Any(get());
  }

 protected:
  // disallow default construction
  Property() {}
  ~Property() {}

  getter_func mGetter;
  setter_func mSetter;
 };

 /** A simple structure designed just as a holder of property values between
 the instances of objects they might target. There is just enough information
 here to be able to interpret the results accurately but no more.
 */
 struct PropertyValue
 {
  PropertyType propType;
  Ogre::Any val;
 };
 /// Defines a transferable map of properties using wrapped value types (Ogre::Any)
 typedef map<String, PropertyValue>::type PropertyValueMap;


 /** Defines a complete set of properties for a single object instance.
 */
 class _OgrePropertyExport PropertySet : public PropertyAlloc
 {
 public:
  PropertySet();
  ~PropertySet();

  /** Adds a property to this set.
  @remarks
  The PropertySet is responsible for deleting this object.
  */
  void addProperty(PropertyBase* prop);

  /** Gets the property object for a given property name.
  @remarks
  Note that this property will need to be cast to a templated property
  compatible with the type you will be setting. You might find the
  overloaded set and get<type> methods quicker if
  you already know the type.
  */
  PropertyBase* getProperty(const String& name) const;

  /** Reports whether this property set contains a named property. */
  bool hasProperty(const String& name) const;

        /** Removes the named property from the property set. */
        void removeProperty(const String& name);

  typedef map<String, PropertyBase*>::type PropertyMap;
  typedef Ogre::MapIterator<PropertyMap> PropertyIterator;
  /// Get an iterator over the available properties
  PropertyIterator getPropertyIterator();

  /** Gets an independently usable collection of property values from the
  current state.
  */
  PropertyValueMap getValueMap() const;

  /** Sets the current state from a given value map.
  */
  void setValueMap(const PropertyValueMap& values);

  /** Get a named property value.
  */
  template<typename T>
  void getValue(const String& name, T& value) const
  {
   getPropertyImpl(name, value, PropertyDef::getTypeForValue(value));
  }

  /** Set a named property value (via pointer to avoid copy).
  */
  template<typename T>
  void setValue(const String& name, const T* value)
  {
   setPropertyImpl(name, *value, PropertyDef::getTypeForValue(*value));
  }
  /** Set a named property value.
  */
  template<typename T>
  void setValue(const String& name, T value)
  {
   setPropertyImpl(name, value, PropertyDef::getTypeForValue(value));
  }
  /** Special-case char*, convert to String automatically.
  */
  void setValue(const String& name, const char* pChar)
  {
   String v(pChar);
   setPropertyImpl(name, v, PROP_STRING);
  }


 protected:
  PropertyMap mPropertyMap;

  /// Set a named property value, internal implementation (type match required)
  template <typename T>
  void setPropertyImpl(const String& name, const T& val, PropertyType typeCheck)
  {
   PropertyBase* baseProp = getProperty(name);
   if (baseProp->getType() != typeCheck)
   {
    StringUtil::StrStreamType msg;
    msg << "Property error: type passed in: '" << PropertyDef::getTypeName(typeCheck)
     << "', type of property: '" << PropertyDef::getTypeName(baseProp->getType()) << "'";
    OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, msg.str(), "PropertySet::setPropertyImpl");
   }
   static_cast<Property<T>*>(baseProp)->set(val);
  }

  /// Set a named property value, internal implementation (type match required)
  template <typename T>
  void getPropertyImpl(const String& name, T& refVal, PropertyType typeCheck) const
  {
   PropertyBase* baseProp = getProperty(name);
   if (baseProp->getType() != typeCheck)
   {
    StringUtil::StrStreamType msg;
    msg << "Property error: type requested: '" << PropertyDef::getTypeName(typeCheck)
     << "', type of property: '" << PropertyDef::getTypeName(baseProp->getType()) << "'";
    OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, msg.str(), "PropertySet::getPropertyImpl");
   }
   refVal = static_cast<Property<T>*>(baseProp)->get();
  }

 };

 /** @} */
 /** @} */

}

#endif

 

/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/

Copyright (c) 2000-2012 Torus Knot Software Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/

#ifndef __Ogre_Property_Prereq_H__
#define __Ogre_Property_Prereq_H__

#include "OgrePrerequisites.h"

namespace Ogre
{

 typedef GeneralAllocatedObject PropertyAlloc;

}

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
# if defined( OGRE_STATIC_LIB )
#    define _OgrePropertyExport
#   else
#    if defined( OGRE_PROPERTY_EXPORTS )
#        define _OgrePropertyExport __declspec( dllexport )
#    else
#           if defined( __MINGW32__ )
#               define _OgrePropertyExport
#           else
#            define _OgrePropertyExport __declspec( dllimport )
#           endif
#    endif
# endif
#elif defined ( OGRE_GCC_VISIBILITY )
#   define _OgrePropertyExport __attribute__ ((visibility("default")))
#else
# define _OgrePropertyExport
#endif


#endif

 

/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/

Copyright (c) 2000-2012 Torus Knot Software Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#include "OgreStableHeaders.h"
#include "OgreProperty.h"

#include "OgreStringConverter.h"

#include <istream>

namespace Ogre
{
 //---------------------------------------------------------------------
 //---------------------------------------------------------------------
 const String& PropertyDef::getTypeName(PropertyType theType)
 {
  static const String sPropNames[] = {
   "short",
   "unsigned short",
   "int",
   "unsigned int",
   "long",
   "unsigned long",
   "Real",
   "String",
   "Vector2",
   "Vector3",
   "Vector4",
   "ColourValue",
   "bool",
   "Quaternion",
   "Matrix3",
   "Matrix4"
  };

  return sPropNames[(int)theType];
 }
 //---------------------------------------------------------------------
 //---------------------------------------------------------------------
 PropertySet::PropertySet()
 {

 }
 //---------------------------------------------------------------------
 PropertySet::~PropertySet()
 {
  for (PropertyMap::iterator i = mPropertyMap.begin(); i != mPropertyMap.end(); ++i)
  {
   OGRE_DELETE i->second;
  }
  mPropertyMap.clear();
 }
 //---------------------------------------------------------------------
 void PropertySet::addProperty(PropertyBase* prop)
 {
  std::pair<PropertyMap::iterator, bool> retPair =
   mPropertyMap.insert(PropertyMap::value_type(prop->getName(), prop));
  if (!retPair.second)
   OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, "Duplicate property entry!",
    "PropertySet::addProperty");
 }
 //---------------------------------------------------------------------
 bool PropertySet::hasProperty(const String& name) const
 {
  PropertyMap::const_iterator i = mPropertyMap.find(name);
  return i != mPropertyMap.end();
 }
 //---------------------------------------------------------------------
 PropertyBase* PropertySet::getProperty(const String& name) const
 {
  PropertyMap::const_iterator i = mPropertyMap.find(name);
  if (i != mPropertyMap.end())
   return i->second;
  else
   OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, "Property not found!",
    "PropertySet::getProperty");
 }
    //---------------------------------------------------------------------
    void PropertySet::removeProperty(const String& name)
    {
        mPropertyMap.erase(name);
    }
 //---------------------------------------------------------------------
 PropertySet::PropertyIterator PropertySet::getPropertyIterator()
 {
  return PropertyIterator(mPropertyMap.begin(), mPropertyMap.end());
 }
 //---------------------------------------------------------------------
 PropertyValueMap PropertySet::getValueMap() const
 {
  PropertyValueMap ret;
  for (PropertyMap::const_iterator i = mPropertyMap.begin(); i != mPropertyMap.end(); ++i)
  {
   PropertyValue val;
   val.propType = i->second->getType();
   switch(val.propType)
   {
   case PROP_SHORT:
    val.val = Ogre::Any(static_cast<Property<short>*>(i->second)->get());
    break;
   case PROP_UNSIGNED_SHORT:
    val.val = Ogre::Any(static_cast<Property<unsigned short>*>(i->second)->get());
    break;
   case PROP_INT:
    val.val = Ogre::Any(static_cast<Property<int>*>(i->second)->get());
    break;
   case PROP_UNSIGNED_INT:
    val.val = Ogre::Any(static_cast<Property<unsigned int>*>(i->second)->get());
    break;
   case PROP_LONG:
    val.val = Ogre::Any(static_cast<Property<long>*>(i->second)->get());
    break;
   case PROP_UNSIGNED_LONG:
    val.val = Ogre::Any(static_cast<Property<unsigned long>*>(i->second)->get());
    break;
   case PROP_REAL:
    val.val = Ogre::Any(static_cast<Property<Real>*>(i->second)->get());
    break;
   case PROP_STRING:
    val.val = Ogre::Any(static_cast<Property<String>*>(i->second)->get());
    break;
   case PROP_VECTOR2:
    val.val = Ogre::Any(static_cast<Property<Ogre::Vector2>*>(i->second)->get());
    break;
   case PROP_VECTOR3:
    val.val = Ogre::Any(static_cast<Property<Ogre::Vector3>*>(i->second)->get());
    break;
   case PROP_VECTOR4:
    val.val = Ogre::Any(static_cast<Property<Ogre::Vector4>*>(i->second)->get());
    break;
   case PROP_COLOUR:
    val.val = Ogre::Any(static_cast<Property<Ogre::ColourValue>*>(i->second)->get());
    break;
   case PROP_BOOL:
    val.val = Ogre::Any(static_cast<Property<bool>*>(i->second)->get());
    break;
   case PROP_QUATERNION:
    val.val = Ogre::Any(static_cast<Property<Ogre::Quaternion>*>(i->second)->get());
    break;
   case PROP_MATRIX3:
    val.val = Ogre::Any(static_cast<Property<Ogre::Matrix3>*>(i->second)->get());
    break;
   case PROP_MATRIX4:
    val.val = Ogre::Any(static_cast<Property<Ogre::Matrix4>*>(i->second)->get());
    break;
            case PROP_UNKNOWN:
            default:
                break;
   };
   ret[i->second->getName()] = val;
  }

  return ret;


 }
 //---------------------------------------------------------------------
 void PropertySet::setValueMap(const PropertyValueMap& values)
 {
  for (PropertyValueMap::const_iterator i = values.begin(); i != values.end(); ++i)
  {
   PropertyMap::iterator j = mPropertyMap.find(i->first);
   if (j != mPropertyMap.end())
   {
    // matching properties
    // check type
    if (j->second->getType() != i->second.propType)
    {
     StringUtil::StrStreamType msg;
     msg << "Property " << i->first << " mismatched type; incoming type: '"
      << PropertyDef::getTypeName(i->second.propType) << "', property type: '"
      << PropertyDef::getTypeName(j->second->getType()) << "'";
     OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, msg.str(), "PropertySet::setValueMap");
    }
    switch(i->second.propType)
    {
    case PROP_SHORT:
     static_cast<Property<short>*>(j->second)->set(Ogre::any_cast<short>(i->second.val));
     break;
    case PROP_UNSIGNED_SHORT:
     static_cast<Property<short>*>(j->second)->set(Ogre::any_cast<unsigned short>(i->second.val));
     break;
    case PROP_INT:
     static_cast<Property<int>*>(j->second)->set(Ogre::any_cast<int>(i->second.val));
     break;
    case PROP_UNSIGNED_INT:
     static_cast<Property<int>*>(j->second)->set(Ogre::any_cast<unsigned int>(i->second.val));
     break;
    case PROP_LONG:
     static_cast<Property<long>*>(j->second)->set(Ogre::any_cast<long>(i->second.val));
     break;
    case PROP_UNSIGNED_LONG:
     static_cast<Property<long>*>(j->second)->set(Ogre::any_cast<unsigned long>(i->second.val));
     break;
    case PROP_REAL:
     static_cast<Property<Real>*>(j->second)->set(Ogre::any_cast<Real>(i->second.val));
     break;
    case PROP_STRING:
     static_cast<Property<String>*>(j->second)->set(Ogre::any_cast<String>(i->second.val));
     break;
    case PROP_VECTOR2:
     static_cast<Property<Ogre::Vector2>*>(j->second)->set(Ogre::any_cast<Ogre::Vector2>(i->second.val));
     break;
    case PROP_VECTOR3:
     static_cast<Property<Ogre::Vector3>*>(j->second)->set(Ogre::any_cast<Ogre::Vector3>(i->second.val));
     break;
    case PROP_VECTOR4:
     static_cast<Property<Ogre::Vector4>*>(j->second)->set(Ogre::any_cast<Ogre::Vector4>(i->second.val));
     break;
    case PROP_COLOUR:
     static_cast<Property<Ogre::ColourValue>*>(j->second)->set(Ogre::any_cast<Ogre::ColourValue>(i->second.val));
     break;
    case PROP_BOOL:
     static_cast<Property<bool>*>(j->second)->set(Ogre::any_cast<bool>(i->second.val));
     break;
    case PROP_QUATERNION:
     static_cast<Property<Ogre::Quaternion>*>(j->second)->set(Ogre::any_cast<Ogre::Quaternion>(i->second.val));
     break;
    case PROP_MATRIX3:
     static_cast<Property<Ogre::Matrix3>*>(j->second)->set(Ogre::any_cast<Ogre::Matrix3>(i->second.val));
     break;
    case PROP_MATRIX4:
     static_cast<Property<Ogre::Matrix4>*>(j->second)->set(Ogre::any_cast<Ogre::Matrix4>(i->second.val));
     break;
                case PROP_UNKNOWN:
                default:
                    break;
                       
    };


   }
  }


 }

}

 

 

 

 


 

原创粉丝点击