Browse Source

SceneGraph: completed documentation review.

Worked around all Doxygen issues (they were for deprecated functionality
only, so shouldn't be much of a problem anyway).
pull/54/merge
Vladimír Vondruš 12 years ago
parent
commit
174bbc9e4b
  1. 2
      src/Magnum/SceneGraph/AbstractCamera.h
  2. 5
      src/Magnum/SceneGraph/AbstractObject.h
  3. 3
      src/Magnum/SceneGraph/AbstractTranslation.h
  4. 4
      src/Magnum/SceneGraph/AbstractTranslationRotation2D.h
  5. 11
      src/Magnum/SceneGraph/AbstractTranslationRotation3D.h
  6. 4
      src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h
  7. 4
      src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h
  8. 12
      src/Magnum/SceneGraph/Animable.h
  9. 2
      src/Magnum/SceneGraph/DualComplexTransformation.h
  10. 2
      src/Magnum/SceneGraph/DualQuaternionTransformation.h
  11. 2
      src/Magnum/SceneGraph/MatrixTransformation2D.h
  12. 2
      src/Magnum/SceneGraph/MatrixTransformation3D.h
  13. 28
      src/Magnum/SceneGraph/Object.h
  14. 11
      src/Magnum/SceneGraph/RigidMatrixTransformation2D.h
  15. 14
      src/Magnum/SceneGraph/RigidMatrixTransformation3D.h
  16. 2
      src/Magnum/SceneGraph/TranslationTransformation.h

2
src/Magnum/SceneGraph/AbstractCamera.h

@ -136,7 +136,7 @@ template<UnsignedInt dimensions, class T> class AbstractCamera: public AbstractF
protected:
/**
* @brief Constructor
* @param object Object holding the camera
* @param object %Object holding the camera
*/
explicit AbstractCamera(AbstractObject<dimensions, T>& object);

5
src/Magnum/SceneGraph/AbstractObject.h

@ -161,9 +161,8 @@ template<UnsignedInt dimensions, class T> class AbstractObject
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief transformationMatrices(const std::vector<std::reference_wrapper<AbstractObject<dimensions, T>>>&, const MatrixType&)
* @deprecated Use @ref Magnum::SceneGraph::AbstractObject::transformationMatrices(const std::vector<std::reference_wrapper<AbstractObject<dimensions, T>>>&, const MatrixType&) "transformationMatrices(const std::vector<std::reference_wrapper<AbstractObject<dimensions, T>>>&, const MatrixType&)" instead.
* @todoc The `ref` works when `const` is added, but then the quoted thing is not taken as a part of the reference. The `copybrief` doesn't parse the `const` at all. Doxygen I hate you.
* @copybrief transformationMatrices()
* @deprecated Use @ref Magnum::SceneGraph::AbstractObject::transformationMatrices() "transformationMatrices(const std::vector<std::reference_wrapper<AbstractObject<dimensions, T>>>&, const MatrixType&)" instead.
*/
CORRADE_DEPRECATED("use transformationMatrices(const std::vector<std::reference_wrapper<AbstractObject<dimensions, T>>>&, const MatrixType&) instead") std::vector<MatrixType> transformationMatrices(const std::vector<AbstractObject<dimensions, T>*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const;

3
src/Magnum/SceneGraph/AbstractTranslation.h

@ -43,7 +43,8 @@ transformation matrix, but it's possible to store translation in e.g. integral
coordinates while having floating-point transformation matrix.
@see @ref AbstractBasicTranslation2D, @ref AbstractBasicTranslation3D,
@ref AbstractTranslation2D, @ref AbstractTranslation3D, @ref scenegraph
@ref AbstractTranslation2D, @ref AbstractTranslation3D, @ref scenegraph,
@ref TranslationTransformation
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
template<UnsignedInt dimensions, class T, class TranslationType = T>

4
src/Magnum/SceneGraph/AbstractTranslationRotation2D.h

@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph {
/**
@brief Base transformation for two-dimensional scenes supporting translation and rotation
@see @ref AbstractTranslationRotation2D, @ref scenegraph, @ref AbstractBasicTranslationRotation3D
@see @ref AbstractTranslationRotation2D, @ref scenegraph,
@ref AbstractBasicTranslationRotation3D,
@ref BasicRigidMatrixTransformation2D, @ref BasicDualComplexTransformation
@todo Use AbstractBasicTransformation2D<T> when support for GCC 4.6 is dropped
*/
template<class T> class AbstractBasicTranslationRotation2D: public AbstractTranslation<2, T> {

11
src/Magnum/SceneGraph/AbstractTranslationRotation3D.h

@ -36,7 +36,10 @@ namespace Magnum { namespace SceneGraph {
/**
@brief Base transformation for three-dimensional scenes supporting translation and rotation
@see @ref AbstractTranslationRotation3D @ref scenegraph, @ref AbstractBasicTranslationRotation2D
@see @ref AbstractTranslationRotation3D @ref scenegraph,
@ref AbstractBasicTranslationRotation2D,
@ref BasicRigidMatrixTransformation3D,
@ref BasicDualQuaternionTransformation
@todo Use AbstractBasicTransformation3D<T> when support for GCC 4.6 is dropped
*/
template<class T> class AbstractBasicTranslationRotation3D: public AbstractTranslation<3, T> {
@ -66,7 +69,7 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractTrans
* @return Reference to self (for method chaining)
*
* In some implementations faster than calling
* `rotate(angle, Vector3::xAxis())`, see subclasses for more
* `rotate(angle, %Vector3::xAxis())`, see subclasses for more
* information.
*/
AbstractBasicTranslationRotation3D<T>& rotateX(Math::Rad<T> angle, TransformationType type = TransformationType::Global) {
@ -81,7 +84,7 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractTrans
* @return Reference to self (for method chaining)
*
* In some implementations faster than calling
* `rotate(angle, Vector3::yAxis())`, see subclasses for more
* `rotate(angle, %Vector3::yAxis())`, see subclasses for more
* information.
*/
AbstractBasicTranslationRotation3D<T>& rotateY(Math::Rad<T> angle, TransformationType type = TransformationType::Global) {
@ -96,7 +99,7 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractTrans
* @return Reference to self (for method chaining)
*
* In some implementations faster than calling
* `rotate(angle, Vector3::zAxis())`, see subclasses for more
* `rotate(angle, %Vector3::zAxis())`, see subclasses for more
* information.
*/
AbstractBasicTranslationRotation3D<T>& rotateZ(Math::Rad<T> angle, TransformationType type = TransformationType::Global) {

4
src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h

@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph {
/**
@brief Base transformation for two-dimensional scenes supporting translation, rotation and scaling
@see @ref AbstractTranslationRotationScaling2D, @ref scenegraph, @ref AbstractBasicTranslationRotationScaling2D
@see @ref AbstractTranslationRotationScaling2D, @ref scenegraph,
@ref AbstractBasicTranslationRotationScaling2D,
@ref BasicMatrixTransformation2D
*/
template<class T> class AbstractBasicTranslationRotationScaling2D: public AbstractBasicTranslationRotation2D<T> {
public:

4
src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h

@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph {
/**
@brief Base transformation for three-dimensional scenes supporting translation, rotation and scaling
@see @ref AbstractTranslationRotationScaling3D, @ref scenegraph, @ref AbstractBasicTranslationRotationScaling2D
@see @ref AbstractTranslationRotationScaling3D, @ref scenegraph,
@ref AbstractBasicTranslationRotationScaling2D,
@ref BasicMatrixTransformation3D
*/
template<class T> class AbstractBasicTranslationRotationScaling3D: public AbstractBasicTranslationRotation3D<T> {
public:

12
src/Magnum/SceneGraph/Animable.h

@ -56,7 +56,7 @@ enum class AnimationState: UnsignedByte {
Running
};
/** @debugoperator{Magnum::SceneGraph::Animable} */
/** @debugoperatorenum{Magnum::SceneGraph::AnimationState} */
Debug MAGNUM_SCENEGRAPH_EXPORT operator<<(Debug debug, AnimationState value);
/**
@ -68,9 +68,9 @@ Adds animation feature to object. Each %Animable is part of some
@section Animable-usage Usage
First thing is to add @ref Animable feature to some object and implement
animationStep(). You can do it conveniently using multiple inheritance (see
@ref scenegraph-features for introduction). Override @ref animationStep() to
implement your animation, the function provides both absolute animation
@ref animationStep(). You can do it conveniently using multiple inheritance
(see @ref scenegraph-features for introduction). Override @ref animationStep()
to implement your animation, the function provides both absolute animation
time and time delta. Example:
@code
typedef SceneGraph::Object<SceneGraph::MatrixTransformation3D> Object3D;
@ -92,8 +92,8 @@ class AnimableObject: public Object3D, SceneGraph::Animable3D {
Then add the object to your scene and some animation group. You can also use
@ref AnimableGroup::add() and @ref AnimableGroup::remove() instead of passing
the group in the constructor. The animation is initially in stopped state and
without repeat, see @ref setState(), @ref setRepeated() and @ref setRepeatCount()
for more information.
without repeat, see @ref setState(), @ref setRepeated() and
@ref setRepeatCount() for more information.
@code
Scene3D scene;
SceneGraph::AnimableGroup3D animables;

2
src/Magnum/SceneGraph/DualComplexTransformation.h

@ -48,7 +48,7 @@ template<class T> class BasicDualComplexTransformation: public AbstractBasicTran
/** @brief Underlying transformation type */
typedef Math::DualComplex<T> DataType;
/** @brief Object transformation */
/** @brief %Object transformation */
Math::DualComplex<T> transformation() const { return _transformation; }
/**

2
src/Magnum/SceneGraph/DualQuaternionTransformation.h

@ -48,7 +48,7 @@ template<class T> class BasicDualQuaternionTransformation: public AbstractBasicT
/** @brief Underlying transformation type */
typedef Math::DualQuaternion<T> DataType;
/** @brief Object transformation */
/** @brief %Object transformation */
Math::DualQuaternion<T> transformation() const { return _transformation; }
/**

2
src/Magnum/SceneGraph/MatrixTransformation2D.h

@ -47,7 +47,7 @@ template<class T> class BasicMatrixTransformation2D: public AbstractBasicTransla
/** @brief Underlying transformation type */
typedef Math::Matrix3<T> DataType;
/** @brief Object transformation */
/** @brief %Object transformation */
Math::Matrix3<T> transformation() const { return _transformation; }
/**

2
src/Magnum/SceneGraph/MatrixTransformation3D.h

@ -46,7 +46,7 @@ template<class T> class BasicMatrixTransformation3D: public AbstractBasicTransla
/** @brief Underlying transformation type */
typedef Math::Matrix4<T> DataType;
/** @brief Object transformation */
/** @brief %Object transformation */
Math::Matrix4<T> transformation() const { return _transformation; }
/**

28
src/Magnum/SceneGraph/Object.h

@ -104,13 +104,6 @@ template<class Transformation> class Object: public AbstractObject<Transformatio
friend class Containers::LinkedList<Object<Transformation>>;
friend class Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>;
#ifndef DOXYGEN_GENERATING_OUTPUT
Object(const Object<Transformation>&) = delete;
Object(Object<Transformation>&&) = delete;
Object<Transformation>& operator=(const Object<Transformation>&) = delete;
Object<Transformation>& operator=(Object<Transformation>&&) = delete;
#endif
public:
/** @brief Matrix type */
typedef typename DimensionTraits<Transformation::Dimensions, typename Transformation::Type>::MatrixType MatrixType;
@ -121,6 +114,12 @@ template<class Transformation> class Object: public AbstractObject<Transformatio
*/
explicit Object(Object<Transformation>* parent = nullptr);
/** @brief Copying is not allowed */
Object(const Object<Transformation>&) = delete;
/** @brief Moving is not allowed */
Object(Object<Transformation>&&) = delete;
/**
* @brief Destructor
*
@ -129,6 +128,12 @@ template<class Transformation> class Object: public AbstractObject<Transformatio
*/
~Object();
/** @brief Copying is not allowed */
Object<Transformation>& operator=(const Object<Transformation>&) = delete;
/** @brief Moving is not allowed */
Object<Transformation>& operator=(Object<Transformation>&&) = delete;
/**
* @{ @name Scene hierarchy
*
@ -253,9 +258,8 @@ template<class Transformation> class Object: public AbstractObject<Transformatio
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief transformationMatrices(const std::vector<std::reference_wrapper<Object<Transformation>>>&, const MatrixType&)
* @deprecated Use @ref Magnum::SceneGraph::Object::transformationMatrices(const std::vector<std::reference_wrapper<Object<Transformation>>>&, const MatrixType&) "transformationMatrices(const std::vector<std::reference_wrapper<Object<Transformation>>>&, const MatrixType&)" instead.
* @todoc fix this when Doxygen is sane (see this function in AbstractObject)
* @copybrief transformationMatrices()
* @deprecated Use @ref Magnum::SceneGraph::Object::transformationMatrices() "transformationMatrices(const std::vector<std::reference_wrapper<Object<Transformation>>>&, const MatrixType&)" instead.
*/
CORRADE_DEPRECATED("use transformationMatrices(const std::vector<std::reference_wrapper<Object<Transformation>>>&, const MatrixType&) instead") std::vector<MatrixType> transformationMatrices(const std::vector<Object<Transformation>*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const;
@ -282,8 +286,8 @@ template<class Transformation> class Object: public AbstractObject<Transformatio
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&)
* @deprecated Use @ref Magnum::SceneGraph::Object::transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&) "transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&)" instead.
* @copybrief transformations()
* @deprecated Use @ref Magnum::SceneGraph::Object::transformations() "transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&)" instead.
* @todoc fix this when Doxygen is sane (see related function in AbstractObject)
*/
CORRADE_DEPRECATED("use transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&) instead") std::vector<typename Transformation::DataType> transformations(const std::vector<Object<Transformation>*>& objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const;

11
src/Magnum/SceneGraph/RigidMatrixTransformation2D.h

@ -51,7 +51,7 @@ template<class T> class BasicRigidMatrixTransformation2D: public AbstractBasicTr
/** @brief Underlying transformation type */
typedef Math::Matrix3<T> DataType;
/** @brief Object transformation */
/** @brief %Object transformation */
Math::Matrix3<T> transformation() const { return _transformation; }
/**
@ -105,7 +105,8 @@ template<class T> class BasicRigidMatrixTransformation2D: public AbstractBasicTr
/**
* @copydoc AbstractTranslationRotationScaling2D::translate()
* Same as calling @ref transform() with @ref Math::Matrix3::translation().
* Same as calling @ref transform() with
* @ref Math::Matrix3::translation().
*/
Object<BasicRigidMatrixTransformation2D<T>>& translate(const Math::Vector2<T>& vector, TransformationType type = TransformationType::Global) {
return transformInternal(Math::Matrix3<T>::translation(vector), type);
@ -117,7 +118,8 @@ template<class T> class BasicRigidMatrixTransformation2D: public AbstractBasicTr
* @param type Transformation type
* @return Reference to self (for method chaining)
*
* Same as calling @ref transform() with @ref Math::Matrix3::rotation().
* Same as calling @ref transform() with
* @ref Math::Matrix3::rotation().
* @see @ref normalizeRotation()
*/
Object<BasicRigidMatrixTransformation2D<T>>& rotate(Math::Rad<T> angle, TransformationType type = TransformationType::Global) {
@ -131,7 +133,8 @@ template<class T> class BasicRigidMatrixTransformation2D: public AbstractBasicTr
* @param type Transformation type
* @return Reference to self (for method chaining)
*
* Same as calling @ref transform() with @ref Math::Matrix3::reflection().
* Same as calling @ref transform() with
* @ref Math::Matrix3::reflection().
*/
Object<BasicRigidMatrixTransformation2D<T>>& reflect(const Math::Vector2<T>& normal, TransformationType type = TransformationType::Global) {
return transformInternal(Math::Matrix3<T>::reflection(normal), type);

14
src/Magnum/SceneGraph/RigidMatrixTransformation3D.h

@ -50,7 +50,7 @@ template<class T> class BasicRigidMatrixTransformation3D: public AbstractBasicTr
/** @brief Underlying transformation type */
typedef Math::Matrix4<T> DataType;
/** @brief Object transformation */
/** @brief %Object transformation */
Math::Matrix4<T> transformation() const { return _transformation; }
/**
@ -131,7 +131,8 @@ template<class T> class BasicRigidMatrixTransformation3D: public AbstractBasicTr
* @param type Transformation type
* @return Reference to self (for method chaining)
*
* Same as calling @ref transform() with @ref Math::Matrix4::rotationX().
* Same as calling @ref transform() with
* @ref Math::Matrix4::rotationX().
* @see @ref normalizeRotation()
*/
Object<BasicRigidMatrixTransformation3D<T>>& rotateX(Math::Rad<T> angle, TransformationType type = TransformationType::Global) {
@ -144,7 +145,8 @@ template<class T> class BasicRigidMatrixTransformation3D: public AbstractBasicTr
* @param type Transformation type
* @return Reference to self (for method chaining)
*
* Same as calling @ref transform() with @ref Math::Matrix4::rotationY().
* Same as calling @ref transform() with
* @ref Math::Matrix4::rotationY().
* @see @ref normalizeRotation()
*/
Object<BasicRigidMatrixTransformation3D<T>>& rotateY(Math::Rad<T> angle, TransformationType type = TransformationType::Global) {
@ -157,7 +159,8 @@ template<class T> class BasicRigidMatrixTransformation3D: public AbstractBasicTr
* @param type Transformation type
* @return Reference to self (for method chaining)
*
* Same as calling @ref transform() with @ref Math::Matrix4::rotationZ().
* Same as calling @ref transform() with
* @ref Math::Matrix4::rotationZ().
* @see @ref normalizeRotation()
*/
Object<BasicRigidMatrixTransformation3D<T>>& rotateZ(Math::Rad<T> angle, TransformationType type = TransformationType::Global) {
@ -171,7 +174,8 @@ template<class T> class BasicRigidMatrixTransformation3D: public AbstractBasicTr
* @param type Transformation type
* @return Reference to self (for method chaining)
*
* Same as calling @ref transform() with @ref Math::Matrix4::reflection().
* Same as calling @ref transform() with
* @ref Math::Matrix4::reflection().
*/
Object<BasicRigidMatrixTransformation3D<T>>& reflect(const Math::Vector3<T>& normal, TransformationType type = TransformationType::Global) {
return transformInternal(Math::Matrix4<T>::reflection(normal), type);

2
src/Magnum/SceneGraph/TranslationTransformation.h

@ -62,7 +62,7 @@ class TranslationTransformation: public AbstractTranslation<dimensions, T, Trans
/** @brief Underlying transformation type */
typedef typename DimensionTraits<dimensions, TranslationType>::VectorType DataType;
/** @brief Object transformation */
/** @brief %Object transformation */
typename DimensionTraits<dimensions, TranslationType>::VectorType transformation() const { return _transformation; }
/**

Loading…
Cancel
Save