Skip to content

Commit

Permalink
Doxygen: added module Gfx/Particle, fixed warnings, added override
Browse files Browse the repository at this point in the history
…keyword.

There were many broken @copydoc/@Copyref directives - removed in favor of simple member group explaining where the API is from.
  • Loading branch information
ohlidalp authored and Petr Ohlídal committed Apr 9, 2022
1 parent 0ad35b7 commit 580b6b5
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 53 deletions.
3 changes: 3 additions & 0 deletions doc/doxygen/Modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@

/// @defgroup Camera Camera
/// Camera control and logic.

/// @defgroup Particle Particle
/// Customizations of OGRE particle system: visuals + game logic.
6 changes: 6 additions & 0 deletions source/main/gfx/particle/ExtinguishableFireAffector.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@

namespace Ogre {

/// @addtogroup Gfx
/// @{

/// @addtogroup Particle
/// @{

/** This class defines a ParticleAffector which deflects particles.
@remarks
This affector (see ParticleAffector) offers a simple (and inaccurate) physical deflection.
Expand Down
10 changes: 10 additions & 0 deletions source/main/gfx/particle/ExtinguishableFireAffectorFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@

namespace Ogre {

/// @addtogroup Gfx
/// @{

/// @addtogroup Particle
/// @{

/** Factory class for DeflectorPlaneAffector. */
class ExtinguishableFireAffectorFactory : public ParticleAffectorFactory
{
Expand All @@ -48,4 +54,8 @@ class ExtinguishableFireAffectorFactory : public ParticleAffectorFactory
/** Allow external access to the mFactories iterator */
affectorIterator getAffectorIterator() { return affectorIterator(mAffectors.begin(), mAffectors.end()); }
};

/// @} // addtogroup Particle
/// @} // addtogroup Gfx

} // namespace Ogre
9 changes: 9 additions & 0 deletions source/main/gfx/particle/FireExtinguisherAffector.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@

namespace Ogre {

/// @addtogroup Gfx
/// @{

/// @addtogroup Particle
/// @{

/** This class defines a ParticleAffector which deflects particles.
@remarks
This affector (see ParticleAffector) offers a simple (and inaccurate) physical deflection.
Expand Down Expand Up @@ -71,6 +77,9 @@ class FireExtinguisherAffector : public ParticleAffector
Real mEffectiveness;
};

/// @} // addtogroup Particle
/// @} // addtogroup Gfx

} // namespace Ogre

#endif //USE_ANGELSCRIPT
12 changes: 11 additions & 1 deletion source/main/gfx/particle/FireExtinguisherAffectorFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@

namespace Ogre {

/// @addtogroup Gfx
/// @{

/// @addtogroup Particle
/// @{


/** Factory class for DeflectorPlaneAffector. */
class FireExtinguisherAffectorFactory : public ParticleAffectorFactory
{
Expand All @@ -40,5 +47,8 @@ class FireExtinguisherAffectorFactory : public ParticleAffectorFactory
return p;
}
};
} // namespace Ogre

/// @} // addtogroup Particle
/// @} // addtogroup Gfx

} // namespace Ogre
13 changes: 12 additions & 1 deletion source/main/gfx/particle/OgreParticleCustomParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
#include <OgreParticle.h>

namespace Ogre {

/// @addtogroup Gfx
/// @{

/// @addtogroup Particle
/// @{

/// custom visual data for shader renderer
class ParticleCustomParam : public ParticleVisualData
{
Expand All @@ -19,6 +26,10 @@ class ParticleCustomParam : public ParticleVisualData

Vector4 paramValue;
};
}

/// @} // addtogroup Particle
/// @} // addtogroup Gfx

} // namespace Ogre

#endif // __OGRE_PARTICLE_CUSTOM_PARAM_H__
92 changes: 41 additions & 51 deletions source/main/gfx/particle/OgreShaderParticleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
#include <OgreVector2.h>

namespace Ogre {

/// @addtogroup Gfx
/// @{

/// @addtogroup Particle
/// @{

/** Specialisation of ParticleSystemRenderer to render particles using
a custom shaders.
@remarks
Expand Down Expand Up @@ -172,52 +179,34 @@ namespace Ogre {
bool getVertexFormatTimeFragmentInv() const { return mVertexFormatTimeFragmentInv; }

//////////////////////////////////////////////////////////////////////////
// ParticleSystemRenderer interface
/// @copydoc ParticleSystemRenderer::getType
virtual const String& getType(void) const;
/// @copydoc ParticleSystemRenderer::_updateRenderQueue
virtual void _updateRenderQueue(RenderQueue* queue, Ogre::list<Particle*>::type& currentParticles, bool cullIndividually);
/// @copydoc ParticleSystemRenderer::visitRenderables
virtual void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables = false);
/// @copydoc ParticleSystemRenderer::_setMaterial
virtual void _setMaterial(MaterialPtr& mat);
/// @copydoc ParticleSystemRenderer::_notifyCurrentCamera
virtual void _notifyCurrentCamera(Camera* cam);
/// @copydoc ParticleSystemRenderer::_notifyParticleRotated
virtual void _notifyParticleRotated(void);
/// @copydoc ParticleSystemRenderer::_notifyParticleResized
virtual void _notifyParticleResized(void);
/// @copydoc ParticleSystemRenderer::_notifyParticleQuota
virtual void _notifyParticleQuota(size_t quota);
/// @copydoc ParticleSystemRenderer::_notifyAttached
virtual void _notifyAttached(Node* parent, bool isTagPoint = false);
/// @copydoc ParticleSystemRenderer::_notifyDefaultDimensions
virtual void _notifyDefaultDimensions(Real width, Real height);
/// @copydoc ParticleSystemRenderer::_createVisualData
virtual ParticleVisualData* _createVisualData(void);
/// @copydoc ParticleSystemRenderer::_destroyVisualData
virtual void _destroyVisualData(ParticleVisualData* vis);
/// @copydoc ParticleSystemRenderer::setRenderQueueGroup
virtual void setRenderQueueGroup(uint8 queueID);
/// @copydoc ParticleSystemRenderer::setKeepParticlesInLocalSpace
virtual void setKeepParticlesInLocalSpace(bool keepLocal);
/// @copydoc ParticleSystemRenderer::_getSortMode
virtual SortMode _getSortMode(void) const;
/// @name Ogre::ParticleSystemRenderer interface
/// @{
virtual const String& getType(void) const override;
virtual void _updateRenderQueue(RenderQueue* queue, Ogre::list<Particle*>::type& currentParticles, bool cullIndividually) override;
virtual void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables = false) override;
virtual void _setMaterial(MaterialPtr& mat) override;
virtual void _notifyCurrentCamera(Camera* cam) override;
virtual void _notifyParticleRotated(void) override;
virtual void _notifyParticleResized(void) override;
virtual void _notifyParticleQuota(size_t quota) override;
virtual void _notifyAttached(Node* parent, bool isTagPoint = false) override;
virtual void _notifyDefaultDimensions(Real width, Real height) override;
virtual ParticleVisualData* _createVisualData(void) override;
virtual void _destroyVisualData(ParticleVisualData* vis) override;
virtual void setRenderQueueGroup(uint8 queueID) override;
virtual void setKeepParticlesInLocalSpace(bool keepLocal) override;
virtual SortMode _getSortMode(void) const override;
/// @}

//////////////////////////////////////////////////////////////////////////
// Ogre::Renderable interface
/// @copydoc Renderable::getMaterial
virtual const MaterialPtr& getMaterial(void) const;
/// @copydoc Renderable::getRenderOperation
virtual void getRenderOperation(RenderOperation& op);
/// @copydoc Renderable::getNumWorldTransforms
//virtual unsigned short getNumWorldTransforms(void) const;
/// @copydoc Renderable::getWorldTransforms
virtual void getWorldTransforms(Matrix4* xform) const;
/// @copydoc Renderable::getSquaredViewDepth
virtual Real getSquaredViewDepth(const Camera* cam) const;
/// @copydoc Renderable::getLights
virtual const LightList& getLights(void) const;
/// @name Ogre::Renderable interface
/// @{
virtual const MaterialPtr& getMaterial(void) const override;
virtual void getRenderOperation(RenderOperation& op) override;
virtual void getWorldTransforms(Matrix4* xform) const override;
virtual Real getSquaredViewDepth(const Camera* cam) const override;
virtual const LightList& getLights(void) const override;
/// @}

private:
const String rendererTypeName = "shader";
Expand Down Expand Up @@ -245,15 +234,16 @@ namespace Ogre {
class ShaderParticleRendererFactory : public ParticleSystemRendererFactory
{
public:
/// @copydoc FactoryObj::getType
const String& getType() const;
/// @copydoc FactoryObj::createInstance
ParticleSystemRenderer* createInstance( const String& name );
/// @copydoc FactoryObj::destroyInstance
void destroyInstance( ParticleSystemRenderer* inst);
const String& getType() const override;
ParticleSystemRenderer* createInstance( const String& name ) override;
void destroyInstance( ParticleSystemRenderer* inst) override;
private:
const String rendererTypeName = "shader";
};
}

/// @} // addtogroup Particle
/// @} // addtogroup Gfx

} // namespace Ogre

#endif // __OGRE_SHADER_PARTICLE_RENDERER_H__

0 comments on commit 580b6b5

Please # to comment.