fix documentations

This commit is contained in:
Andrei Yankovich 2021-07-24 12:45:37 +03:00
parent 8e953b7159
commit 44e2dd98b0
3 changed files with 50 additions and 1 deletions

View File

@ -20,8 +20,32 @@ template <class Sun, class Moon>
/**
* @brief The Day class is template wrapper for the moon and sun objects.
* The moon and sun objects moving around world center for imitation of the day.
*
* ### Integration on the world.
* You need to add one object of this class in the IWorld::initWorldRules method.
* **Example:**
*
* ```cpp
* CRAWL::WorldRule *World::initWorldRules() {
using Day = CRAWL::Day<CRAWL::Sun, CRAWL::Moon>;
return new CRAWL::WorldRule {
{0, {
{registerObject<Day>(), 1},
}
},
{1000, {
{registerObject<Day>(), 1},
}
},
};
}
* ```
* @note All objects will be moving around this objects with radius. The Radius by default is 2000.
* @note This class automaticly sets ligth force for the light objects.
*
*
*/
class Day: public IWorldItem, public Claster
{

View File

@ -14,7 +14,9 @@
namespace CRAWL {
/**
* @brief The DefaultLight class This is default implementation of the wirld light.
* @brief The DefaultLight class This is default implementation of the world light.
* This object create uniform illumination for all world.
* For integration This object yo worl see the IWorld::initWorldRules method
*/
class DefaultLight final: public IWorldLight
{

View File

@ -18,6 +18,28 @@ namespace CRAWL {
* You need to create own qml file with light.
*
* @note If you wnat to create a new qml file the you need to inherit from the Light.qml file.
*
* ### Integration on the world.
* You need to add one object of this class in the IWorld::initWorldRules method.
* **Example:**
*
* ```cpp
* CRAWL::WorldRule *World::initWorldRules() {
return new CRAWL::WorldRule {
{0, {
{registerObject<MyLightObject>(), 1},
}
},
{1000, {
{registerObject<MyLightObject>(), 1},
}
},
};
}
* ```
*
* For integration This object you world see the IWorld::initWorldRules method
*/
class CRAWL_EXPORT IWorldLight: public ClasterItem
{
@ -30,6 +52,7 @@ class CRAWL_EXPORT IWorldLight: public ClasterItem
Q_PROPERTY(float shadowBias READ shadowBias WRITE setShadowBias NOTIFY shadowBiasChanged)
public:
IWorldLight(const QString& name,
const QString& viewTempalte = "qrc:/CrawlModule/Light.qml",
QObject *ptr = nullptr);