Browse Source

Trade: improved documentation, removed redundancy.

pull/277/head
Vladimír Vondruš 13 years ago
parent
commit
261e7cbdc5
  1. 19
      src/Trade/ObjectData2D.h
  2. 19
      src/Trade/ObjectData3D.h

19
src/Trade/ObjectData2D.h

@ -38,16 +38,21 @@ namespace Magnum { namespace Trade {
/** /**
@brief Two-dimensional object data @brief Two-dimensional object data
Provides access to object transformation and hierarchy. See also Provides access to object transformation and hierarchy.
MeshObjectData2D, which is specialized for objects with mesh instance type. @see MeshObjectData2D, ObjectData3D
@see ObjectData3D
*/ */
class MAGNUM_EXPORT ObjectData2D { class MAGNUM_EXPORT ObjectData2D {
public: public:
/** @brief Instance type */ /** @brief Type of instance held by this object */
enum class InstanceType: UnsignedByte { enum class InstanceType: UnsignedByte {
Camera, /**< Camera instance (see CameraData) */ Camera, /**< Camera instance (see CameraData) */
Mesh, /**< Three-dimensional mesh instance (see MeshData2D) */
/**
* Three-dimensional mesh instance. The data can be cast to
* MeshObjectData2D to provide more information.
*/
Mesh,
Empty /**< Empty */ Empty /**< Empty */
}; };
@ -90,10 +95,8 @@ class MAGNUM_EXPORT ObjectData2D {
/** /**
* @brief Instance type * @brief Instance type
* @return Type of instance held by this object
* *
* If the instance is of type InstanceType::Mesh, the instance can be * @see instance()
* casted to MeshObjectData2D and provide more information.
*/ */
InstanceType instanceType() const { return _instanceType; } InstanceType instanceType() const { return _instanceType; }

19
src/Trade/ObjectData3D.h

@ -38,17 +38,22 @@ namespace Magnum { namespace Trade {
/** /**
@brief Three-dimensional object data @brief Three-dimensional object data
Provides access to object transformation and hierarchy. See also Provides access to object transformation and hierarchy.
MeshObjectData3D, which is specialized for objects with mesh instance type. @see MeshObjectData3D, ObjectData2D
@see ObjectData2D
*/ */
class MAGNUM_EXPORT ObjectData3D { class MAGNUM_EXPORT ObjectData3D {
public: public:
/** @brief Instance type */ /** @brief Type of instance held by this object */
enum class InstanceType: UnsignedByte { enum class InstanceType: UnsignedByte {
Camera, /**< Camera instance (see CameraData) */ Camera, /**< Camera instance (see CameraData) */
Light, /**< Light instance (see LightData) */ Light, /**< Light instance (see LightData) */
Mesh, /**< Three-dimensional mesh instance (see MeshData3D) */
/**
* Three-dimensional mesh instance. The data can be cast to
* MeshObjectData3D to provide more information.
*/
Mesh,
Empty /**< Empty */ Empty /**< Empty */
}; };
@ -91,10 +96,8 @@ class MAGNUM_EXPORT ObjectData3D {
/** /**
* @brief Instance type * @brief Instance type
* @return Type of instance held by this object
* *
* If the instance is of type InstanceType::Mesh, the instance can be * @see instance()
* casted to MeshObjectData3D and provide more information.
*/ */
InstanceType instanceType() const { return _instanceType; } InstanceType instanceType() const { return _instanceType; }

Loading…
Cancel
Save