diff --git a/doc/changelog.dox b/doc/changelog.dox index a70beb94c..c0b33648c 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -160,6 +160,16 @@ See also: bootstrap project for using Magnum together with wxWidgets (see [mosra/magnum-bootstrap#19](https://github.com/mosra/magnum-bootstrap/pull/19)) +@subsubsection changelog-latest-new-scenegraph SceneGraph library + +- Added @ref SceneGraph::AbstractObject::Type / + @ref SceneGraph::AbstractFeature::Type / + @ref SceneGraph::AbstractFeatureGroup::Type typedefs and + @ref SceneGraph::AbstractObject::Dimensions / + @ref SceneGraph::AbstractFeature::Dimensions / + @ref SceneGraph::AbstractFeatureGroup::Dimensions constants for querying + underlying type and dimension template parameters + @subsubsection changelog-latest-new-shaders Shaders library - Normal texture support in @ref Shaders::Phong diff --git a/src/Magnum/SceneGraph/AbstractFeature.h b/src/Magnum/SceneGraph/AbstractFeature.h index be25dab58..509d8f9f4 100644 --- a/src/Magnum/SceneGraph/AbstractFeature.h +++ b/src/Magnum/SceneGraph/AbstractFeature.h @@ -136,6 +136,13 @@ template class AbstractFeature #endif { public: + /** @brief Object transformation underlying type */ + typedef T Type; + + enum: UnsignedInt { + Dimensions = dimensions /**< Dimension count */ + }; + /** * @brief Constructor * @param object Object holding this feature diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index 2c69cd973..390c0a654 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -78,12 +78,19 @@ template class AbstractObject #endif { public: + /** @brief Transformation underlying type */ + typedef T Type; + /** @brief Matrix type */ typedef MatrixTypeFor MatrixType; - /** @brief Feature object type */ + /** @brief Feature type */ typedef AbstractFeature FeatureType; + enum: UnsignedInt { + Dimensions = dimensions /**< Dimension count */ + }; + /* This isn't protected because having virtual destructor here is better than having it duplicated in all Object specializations */ explicit AbstractObject(); diff --git a/src/Magnum/SceneGraph/FeatureGroup.h b/src/Magnum/SceneGraph/FeatureGroup.h index 8139f2822..dca984bd4 100644 --- a/src/Magnum/SceneGraph/FeatureGroup.h +++ b/src/Magnum/SceneGraph/FeatureGroup.h @@ -43,15 +43,24 @@ namespace Magnum { namespace SceneGraph { See @ref FeatureGroup. */ template class AbstractFeatureGroup { - template friend class FeatureGroup; + public: + /** @brief Object transformation underlying type */ + typedef T Type; + + enum: UnsignedInt { + Dimensions = dimensions /**< Dimension count */ + }; + + private: + template friend class FeatureGroup; - explicit AbstractFeatureGroup(); - virtual ~AbstractFeatureGroup(); + explicit AbstractFeatureGroup(); + virtual ~AbstractFeatureGroup(); - void add(AbstractFeature& feature); - void remove(AbstractFeature& feature); + void add(AbstractFeature& feature); + void remove(AbstractFeature& feature); - std::vector>> _features; + std::vector>> _features; }; /**