Browse Source

Doc++

pull/7/head
Vladimír Vondruš 13 years ago
parent
commit
29806b9415
  1. 19
      src/Mesh.h
  2. 27
      src/Physics/ObjectShape.h
  3. 17
      src/Physics/ObjectShapeGroup.h
  4. 7
      src/SceneGraph/Animable.h
  5. 2
      src/SceneGraph/Drawable.h
  6. 2
      src/SceneGraph/Object.h

19
src/Mesh.h

@ -250,9 +250,9 @@ class MAGNUM_EXPORT Mesh {
* @see setProvokingVertex()
* @requires_gl32 %Extension @extension{ARB,provoking_vertex}. Older
* versions behave always like
* <tt>ProvokingMode::%LastVertexConvention</tt>.
* @ref Magnum::Mesh::ProvokingVertex "ProvokingVertex::LastVertexConvention".
* @requires_gl OpenGL ES behaves always like
* <tt>ProvokingMode::%LastVertexConvention</tt>.
* @ref Magnum::Mesh::ProvokingVertex "ProvokingVertex::LastVertexConvention".
*/
enum class ProvokingVertex: GLenum {
/** @brief Use first vertex of each polygon. */
@ -265,7 +265,7 @@ class MAGNUM_EXPORT Mesh {
/**
* @brief Set provoking vertex
*
* Initial value is <tt>ProvokingMode::%LastVertexConvention</tt>.
* Initial value is @ref ProvokingVertex "ProvokingVertex::LastVertexConvention".
* @see @fn_gl{ProvokingVertex}
* @requires_gl32 %Extension @extension{ARB,provoking_vertex}. Older
* versions behave always like the default.
@ -281,9 +281,8 @@ class MAGNUM_EXPORT Mesh {
* @brief Polygon mode
*
* @see setPolygonMode()
* @requires_gl OpenGL ES behaves always like
* <tt>PolygonMode::%Fill</tt>. See setPrimitive() for possible
* workaround.
* @requires_gl OpenGL ES behaves always like @ref Magnum::Mesh::PolygonMode "PolygonMode::Fill".
* See setPrimitive() for possible workaround.
*/
enum class PolygonMode: GLenum {
/**
@ -308,7 +307,7 @@ class MAGNUM_EXPORT Mesh {
/**
* @brief Set polygon drawing mode
*
* Initial value is `PolygonMode::%Fill`.
* Initial value is @ref PolygonMode "PolygonMode::Fill".
* @see @fn_gl{PolygonMode}
* @requires_gl OpenGL ES behaves always like the default. See
* setPrimitive() for possible workaround.
@ -332,13 +331,15 @@ class MAGNUM_EXPORT Mesh {
/**
* Offset lines.
* @requires_gl Only <tt>PolygonOffset::%Fill</tt> is supported.
* @requires_gl Only @ref Magnum::Mesh::PolygonOffsetMode "PolygonOffsetMode::Fill"
* is available in OpenGL ES.
*/
Line = GL_POLYGON_OFFSET_LINE,
/**
* Offset points.
* @requires_gl Only <tt>PolygonOffset::%Fill</tt> is supported.
* @requires_gl Only @ref Magnum::Mesh::PolygonOffsetMode "PolygonOffsetMode::Fill"
* is available in OpenGL ES.
*/
Point = GL_POLYGON_OFFSET_POINT
#endif

27
src/Physics/ObjectShape.h

@ -29,8 +29,25 @@ namespace Magnum { namespace Physics {
/**
@brief Object shape
Adds shape for collision detection to object.
@see ObjectShape2D, ObjectShape3D
Adds shape for collision detection to object. Each %ObjectShape is part of
some ObjectShapeGroup, which essentially maintains a set of objects which can
collide with each other.
@section ObjectShape-usage Usage
Add the feature to the object and some shape group (you can also use
ObjectShapeGroup::add() and ObjectShapeGroup::remove() later) and then set
desired object shape using setShape().
@code
Physics::ObjectShapeGroup3D shapes;
Object3D* object;
auto shape = new Physics::ObjectShape3D(object, &shapes);
shape->setShape(Physics::Sphere3D({}, 0.75f) || Physics::AxisAlignedBox3D({}, {3.0f, 1.5f, 2.0f}));
@endcode
@see @ref scenegraph, ObjectShape2D, ObjectShape3D, ObjectShapeGroup2D,
ObjectShapeGroup3D, DebugTools::ShapeRenderer
*/
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT ObjectShape: public SceneGraph::AbstractGroupedFeature<dimensions, ObjectShape<dimensions>> {
public:
@ -84,10 +101,16 @@ template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT ObjectShape: publi
return setShape(new T(std::move(shape)));
}
/**
* @brief Object shape group containing this shape
*
* If the shape doesn't belong to any group, returns `nullptr`.
*/
inline ObjectShapeGroup<dimensions>* group() {
return static_cast<ObjectShapeGroup<dimensions>*>(SceneGraph::AbstractGroupedFeature<dimensions, ObjectShape<dimensions>>::group());
}
/** @overload */
inline const ObjectShapeGroup<dimensions>* group() const {
return static_cast<const ObjectShapeGroup<dimensions>*>(SceneGraph::AbstractGroupedFeature<dimensions, ObjectShape<dimensions>>::group());
}

17
src/Physics/ObjectShapeGroup.h

@ -32,7 +32,8 @@ namespace Magnum { namespace Physics {
/**
@brief Group of object shapes
@see ObjectShapeGroup2D, ObjectShapeGroup3D
See ObjectShape for more information.
@see @ref scenegraph, ObjectShapeGroup2D, ObjectShapeGroup3D
*/
template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT ObjectShapeGroup: public SceneGraph::FeatureGroup<dimensions, ObjectShape<dimensions>> {
friend class ObjectShape<dimensions>;
@ -74,10 +75,20 @@ template<std::uint8_t dimensions> class MAGNUM_PHYSICS_EXPORT ObjectShapeGroup:
bool dirty;
};
/** @brief Group of two-dimensional shaped objects */
/**
@brief Group of two-dimensional shaped objects
See ObjectShape for more information.
@see ObjectShapeGroup3D
*/
typedef ObjectShapeGroup<2> ObjectShapeGroup2D;
/** @brief Group of three-dimensional shaped objects */
/**
@brief Group of three-dimensional shaped objects
See ObjectShape for more information.
@see ObjectShapeGroup2D
*/
typedef ObjectShapeGroup<3> ObjectShapeGroup3D;
}}

7
src/SceneGraph/Animable.h

@ -208,8 +208,13 @@ class MAGNUM_SCENEGRAPH_EXPORT Animable: public AbstractGroupedFeature<dimension
return this;
}
/**
* @brief %Animable group containing this animable
*
* If the animable doesn't belong to any group, returns `nullptr`.
*/
AnimableGroup<dimensions, T>* group();
const AnimableGroup<dimensions, T>* group() const;
const AnimableGroup<dimensions, T>* group() const; /**< @overload */
protected:
/**

2
src/SceneGraph/Drawable.h

@ -26,7 +26,7 @@ namespace Magnum { namespace SceneGraph {
/**
@brief %Drawable
Adds drawing feature to object. Each %Drawable is part of some DrawableGroup
Adds drawing function to the object. Each %Drawable is part of some DrawableGroup
and the whole group is drawn with particular camera using AbstractCamera::draw().
@section Drawable-usage Usage

2
src/SceneGraph/Object.h

@ -77,7 +77,7 @@ See @ref compilation-speedup-hpp for more information.
- @ref EuclideanMatrixTransformation2D "Object<EuclideanMatrixTransformation2D<GLfloat>>"
- @ref EuclideanMatrixTransformation3D "Object<EuclideanMatrixTransformation3D<GLfloat>>"
@see Scene, AbstractFeature, AbstractTransformation
@see Scene, AbstractFeature, AbstractTransformation, DebugTools::ObjectRenderer
*/
template<class Transformation> class Object: public AbstractObject<Transformation::Dimensions, typename Transformation::Type>, public Transformation
#ifndef DOXYGEN_GENERATING_OUTPUT

Loading…
Cancel
Save