Prechádzať zdrojové kódy

Modifying some comments to be more Doxygen-friendly.

Adam Blake 14 rokov pred
rodič
commit
9f1fa900cf

+ 0 - 4
gameplay/src/DepthStencilTarget.cpp

@@ -1,7 +1,3 @@
-/**
- * DepthStencilTarget.cpp
- */
-
 #include "Base.h"
 #include "Base.h"
 #include "DepthStencilTarget.h"
 #include "DepthStencilTarget.h"
 
 

+ 58 - 49
gameplay/src/ParticleEmitter.h

@@ -39,52 +39,55 @@ class Node;
  * simply set the minimum to the same value as the maximum for that property or set its
  * simply set the minimum to the same value as the maximum for that property or set its
  * variance to the zero vector.
  * variance to the zero vector.
  *
  *
- * Scalar Properties:
+ * <h2>Scalar properties:</h2>
  *
  *
- * Begin-Size: 
+ * Begin-Size: \n
  * The size of a newly emitted particle.
  * The size of a newly emitted particle.
  *
  *
- * End-Size: 
+ * End-Size: \n
  * The size of a particle at the end of its lifetime.  A particle's size will
  * The size of a particle at the end of its lifetime.  A particle's size will
  * interpolate linearly between its begin-size and end-size over its lifetime.
  * interpolate linearly between its begin-size and end-size over its lifetime.
  *
  *
- * Energy: 
+ * Energy: \n
  * The length of time a particle will remain alive for.
  * The length of time a particle will remain alive for.
  *
  *
- * Vector properties:
+ * RotationSpeedPerParticle: \n
+ * The speed and direction a particle will spin.  Since particles are
+ * rendered as billboards, no axis of rotation can be specified per particle.
+ * Each particles rotates around their center points, around the z-axis in
+ * screen space.
+ *
+ * RotationSpeed:\n
+ * The speed a particle will spin around its RotationAxis in world space.
+ * (See RotationAxis under "Vector properties" below.)
+ *
+ *
+ * <h2>Vector properties:</h2>
  * 
  * 
- * Initial Position: 
+ * Initial Position: \n
  * The position of a new particle at the moment it is emitted, relative
  * The position of a new particle at the moment it is emitted, relative
  * to the node its ParticleEmitter is set on.  This property is unique
  * to the node its ParticleEmitter is set on.  This property is unique
  * in that the initial positions of new particles can be restricted to
  * in that the initial positions of new particles can be restricted to
  * fit within an ellipsoidal domain; see setEllipsoid().
  * fit within an ellipsoidal domain; see setEllipsoid().
  *
  *
- * Initial Velocity: 
+ * Initial Velocity: \n
  * The velocity of a new particle at the moment it is emitted.  This
  * The velocity of a new particle at the moment it is emitted.  This
  * property is measured in world coordinates per second and modifies
  * property is measured in world coordinates per second and modifies
  * a particle's current position each time ParticleEmitter::update()
  * a particle's current position each time ParticleEmitter::update()
  * is called.
  * is called.
  *
  *
- * Acceleration:
+ * Acceleration:\n
  * The particle's change in velocity, measured in world coordinates per second.
  * The particle's change in velocity, measured in world coordinates per second.
  * This property modifies a particle's current position each time 
  * This property modifies a particle's current position each time 
  * ParticleEmitter::update() is called.
  * ParticleEmitter::update() is called.
  *
  *
- * Color: 
+ * Color: \n
  * The color of a particle at the end of its lifetime.  A particle's color
  * The color of a particle at the end of its lifetime.  A particle's color
  * will interpolate linearly between its begin-color and end-color over its lifetime.
  * will interpolate linearly between its begin-color and end-color over its lifetime.
  *
  *
- * RotationSpeedPerParticle: 
- * The speed and direction a particle will spin.  Since particles are
- * rendered as billboards, no axis of rotation can be specified per particle.
- * Each particles rotates around their center points, around the z-axis in
- * screen space.
- *
- * RotationAxis: 
- * The rotation axis at which the emmiter emits particles around.
- *
- * RotationSpeed:
- * The speed at which the 
+ * RotationAxis: \n
+ * An axis in world space around which all particles will spin, allowing for tornado and
+ * spiral effects.
  *
  *
  * The vector properties Initial Position, Initial Velocity and Acceleration can be set to
  * The vector properties Initial Position, Initial Velocity and Acceleration can be set to
  * orbit around the origin of a node a ParticleEmitter is set on by that node's rotation matrix.
  * orbit around the origin of a node a ParticleEmitter is set on by that node's rotation matrix.
@@ -96,7 +99,7 @@ class Node;
  * order for gravity to continue to act in the same direction on water particles, no matter
  * order for gravity to continue to act in the same direction on water particles, no matter
  * what direction they were originally aimed.
  * what direction they were originally aimed.
  * 
  * 
- * Rendering properties:
+ * <h2>Rendering properties:</h2>
  *
  *
  * Particles are rendered as screen-facing billboards -- that is, the ParticleEmitter's texture
  * Particles are rendered as screen-facing billboards -- that is, the ParticleEmitter's texture
  * is used to render particles as images that always face the camera.  For the simplest case,
  * is used to render particles as images that always face the camera.  For the simplest case,
@@ -105,29 +108,35 @@ class Node;
  * for each particle, or to render each particle as a sprite that animates through the frames
  * for each particle, or to render each particle as a sprite that animates through the frames
  * over the course of its lifetime.
  * over the course of its lifetime.
  *
  *
- * Frame Count: The number of individual images / frames contained in the texture.
+ * Frame Count: \n
+ * The number of individual images / frames contained in the texture.
  *
  *
- * Texture Coordinates: The coordinates within the texture used to render a specific frame.
- *                      Using a texture that places the frames together, without padding,
- *                      in left-to-right top-to-bottom order is recommended, as there is a utility
- *                      method for generating the texture coordinates for such a texture atlas /
- *                      sprite-map.  See setSpriteFrameCoords().
+ * Texture Coordinates: \n
+ * The coordinates within the texture used to render a specific frame.
+ * Using a texture that places the frames together, without padding,
+ * in left-to-right top-to-bottom order is recommended, as there is a utility
+ * method for generating the texture coordinates for such a texture atlas /
+ * sprite-map.  See setSpriteFrameCoords().
  *
  *
- * Sprite Animating: Set this to enable sprite animation.
+ * Sprite Animating: \n
+ * Set this to enable sprite animation.
  *
  *
- * Sprite Looped: If sprites are set to loop, each frame will last for the emitter's frameDuration.
- *                If sprites are set not to loop, the animation will be timed so that the last frame
- *                finishes just as a particle dies.  This setting has no effect if the sprite is not
- *                animating.
+ * Sprite Looped: \n
+ * If sprites are set to loop, each frame will last for the emitter's frameDuration.
+ * If sprites are set not to loop, the animation will be timed so that the last frame
+ * finishes just as a particle dies.  This setting has no effect if the sprite is not
+ * animating.
  *
  *
- * Sprite Random Offset: New particles are created with one of the sprite frames in the emitter's texture.
- *                       If a maximum offset is set, a random frame from 0 to maxOffset will be selected.
- *                       If sprite animation is disabled and this offset is set to Frame Count, each
- *                       particle will use one of the sprite frames for its entire lifetime.
+ * Sprite Random Offset: \n
+ * New particles are created with one of the sprite frames in the emitter's texture.
+ * If a maximum offset is set, a random frame from 0 to maxOffset will be selected.
+ * If sprite animation is disabled and this offset is set to Frame Count, each
+ * particle will use one of the sprite frames for its entire lifetime.
  *
  *
- * Blend Mode: Sets the blend mode used by this particle emitter.  The given blend factors will
- *             be set before rendering the particle system and then will be reset to their original
- *             values.  Accepts the same symbolic constants as glBlendFunc().
+ * Blend Mode: \n
+ * Sets the blend mode used by this particle emitter.  The given blend factors will
+ * be set before rendering the particle system and then will be reset to their original
+ * values.  Accepts the same symbolic constants as glBlendFunc().
  *
  *
  */
  */
 class ParticleEmitter : public Ref
 class ParticleEmitter : public Ref
@@ -429,15 +438,15 @@ public:
     float getRotationPerParticleSpeedMax() const;
     float getRotationPerParticleSpeedMax() const;
 
 
     /**
     /**
-    * Sets the rotation for the emiiter with a speed and emitter axis at which a particle rotates around its
-    * rotation axis in space at its speed, measured in radians per second. 
-    * This should not be confused with a particle's rotation per particle.
-    *
-    * @param axis The base rotation axis of emitted particles.
-    * @param axisVariance The variance of the rotation axis of emitted particles.
-    * @param speedMin The minimum rotation speed of emitted particles.
-    * @param speedMax The maximum rotation speed of emitted particles.
-    */
+     * Sets a rotation axis in world space around which all particles will spin,
+     * as well as the minimum and maximum rotation speed around this axis.
+     * This should not be confused with rotation speed per particle.
+     *
+     * @param axis The base rotation axis of emitted particles.
+     * @param axisVariance The variance of the rotation axis of emitted particles.
+     * @param speedMin The minimum rotation speed of emitted particles.
+     * @param speedMax The maximum rotation speed of emitted particles.
+     */
    void setRotation(float speedMin, float speedMax, const Vector3& axis, const Vector3& axisVariance);
    void setRotation(float speedMin, float speedMax, const Vector3& axis, const Vector3& axisVariance);
 
 
     /**
     /**
@@ -597,7 +606,7 @@ private:
     /**
     /**
      * Destructor.
      * Destructor.
      */
      */
-    virtual ~ParticleEmitter();
+    ~ParticleEmitter();
 
 
     /**
     /**
      * Sets the node that this emitter is attached to.
      * Sets the node that this emitter is attached to.

+ 90 - 84
gameplay/src/Properties.h

@@ -24,100 +24,106 @@ namespace gameplay
  *
  *
  * Here's an example of a simple
  * Here's an example of a simple
  * file that uses all the available features of the markup language:
  * file that uses all the available features of the markup language:
- *
- * --- File Start: example.properties ---
- *
- * // This is a comment.
- *
- * // This property is in the default namespace:
- * integerProperty = 5
- *
- * // This line defines a namespace of type "mynamespace" without an ID:
- * mynamespace
- * {
- *      // This namespace can be retrieved by searching for its ID, "spriteTexture":
- *      texture spriteTexture 
- *      {
- *          fileName = sprite.png
- *          width = 64
- *          height = 64
- *      }
- *
- *      // This property is in the "space" namespace:
- *      booleanProperty = true
- *
- *      // It's legal to have a name without a value if you leave out the '=' character:
- *      foo
- *
- *      // In fact, the '=' character is optional if you'd rather write:
- *      bar 23
- *
- *      // But don't write this or you'll get an error:
- *      // illegalProperty =
- *
- *      // Or this:
- *      // = 15
- *
- *      // Properties objects let you retrieve values as various types.
- *      floatProperty = 3.333
- *      stringProperty = This is a string.
- *      vector3Property = 1.0, 5.0, 3.55
- *      colorProperty = 1.0, 0.4, 0.0, 1.0
- * }
- * --- File End ---
- *
+ 
+\verbatim
+--- File Start: example.properties ---
+ 
+// This is a comment.
+ 
+// This property is in the default namespace:
+integerProperty = 5
+ 
+// This line defines a namespace of type "mynamespace" without an ID:
+mynamespace
+{
+    // This namespace can be retrieved by searching for its ID, "spriteTexture":
+    texture spriteTexture 
+    {
+        fileName = sprite.png
+        width = 64
+        height = 64
+    }
+ 
+    // This property is in the "space" namespace:
+    booleanProperty = true
+ 
+    // It's legal to have a name without a value if you leave out the '=' character:
+    foo
+ 
+    // In fact, the '=' character is optional if you'd rather write:
+    bar 23
+ 
+    // But don't write this or you'll get an error:
+    // illegalProperty =
+ 
+    // Or this:
+    // = 15
+ 
+    // Properties objects let you retrieve values as various types.
+    floatProperty = 3.333
+    stringProperty = This is a string.
+    vector3Property = 1.0, 5.0, 3.55
+    colorProperty = 1.0, 0.4, 0.0, 1.0
+}
+--- File End ---
+\endverbatim
+ 
  * Retrieving information out of a file like this could be done in two ways.  If the
  * Retrieving information out of a file like this could be done in two ways.  If the
  * available namespaces and name/value pairs are known in advance they can be queried by ID or name.
  * available namespaces and name/value pairs are known in advance they can be queried by ID or name.
  * For example, if the namespace "spriteTexture" and its properties are required then they can
  * For example, if the namespace "spriteTexture" and its properties are required then they can
  * be retrieved with a call to getNamespace() followed by calls to getString() and getInt().
  * be retrieved with a call to getNamespace() followed by calls to getString() and getInt().
  * A namespace is stored and retrieved as a Properties object.
  * A namespace is stored and retrieved as a Properties object.
  * Reading the spriteTexture properties out of the file above in this way could be done with the following code:
  * Reading the spriteTexture properties out of the file above in this way could be done with the following code:
- *
- *      // Create the top-level Properties object.
- *      Properties* properties = Properties::create("example.properties");
- *      // Retrieve the "spriteTexture" namespace.
- *      Properties* spriteTexture = properties->getNamespace("spriteTexture");
- *
- *      // Get the values of known texture properties out of the namespace.
- *      const char* fileName = spriteTexture->getString("fileName");
- *      int width = spriteTexture->getInt("width");
- *      int height = spriteTexture->getInt("height");
- *
- *      // Deleting the top-level Properties object will clean up all nested namespaces.
- *      SAFE_DELETE(properties);
- *
+ 
+\verbatim
+// Create the top-level Properties object.
+Properties* properties = Properties::create("example.properties");
+// Retrieve the "spriteTexture" namespace.
+Properties* spriteTexture = properties->getNamespace("spriteTexture");
+ 
+// Get the values of known texture properties out of the namespace.
+const char* fileName = spriteTexture->getString("fileName");
+int width = spriteTexture->getInt("width");
+int height = spriteTexture->getInt("height");
+ 
+// Deleting the top-level Properties object will clean up all nested namespaces.
+SAFE_DELETE(properties);
+\endverbatim
+
  * On the other hand, if the structure of the file is not known in advance its 
  * On the other hand, if the structure of the file is not known in advance its 
  * namespaces and name/value pairs can be retrieved one by one using the getNextNamespace()
  * namespaces and name/value pairs can be retrieved one by one using the getNextNamespace()
  * and getNextProperty() methods.  The following method prints the contents of any properties file
  * and getNextProperty() methods.  The following method prints the contents of any properties file
  * to the console:
  * to the console:
- *
- * void printProperties(Properties* properties)
- * {
- *     // Print the name and ID of the current namespace.
- *     const char* spacename = properties->getNamespace();
- *     const char* id = properties->getID();
- *     WARN_VARG("Namespace: %s  ID: %s\n{", spacename, id);
- *
- *     // Print all properties in this namespace.
- *     const char* name = properties->getNextProperty();
- *     const char* value = NULL;
- *     while (name != NULL)
- *     {
- *         value = properties->getString(name);
- *         WARN_VARG("%s = %s", name, value);
- *         name = properties->getNextProperty();
- *     }
- *     WARN("}\n");
- *
- *     // Print the properties of every namespace within this one.
- *     Properties* space = properties->getNextNamespace();
- *     while (space != NULL)
- *     {
- *         printProperties(space);
- *         space = properties->getNextNamespace();
- *     }
- *  }
- *
+ 
+\verbatim
+void printProperties(Properties* properties)
+{
+    // Print the name and ID of the current namespace.
+    const char* spacename = properties->getNamespace();
+    const char* id = properties->getID();
+    WARN_VARG("Namespace: %s  ID: %s\n{", spacename, id);
+ 
+    // Print all properties in this namespace.
+    const char* name = properties->getNextProperty();
+    const char* value = NULL;
+    while (name != NULL)
+    {
+        value = properties->getString(name);
+        WARN_VARG("%s = %s", name, value);
+        name = properties->getNextProperty();
+    }
+    WARN("}\n");
+ 
+    // Print the properties of every namespace within this one.
+    Properties* space = properties->getNextNamespace();
+    while (space != NULL)
+    {
+        printProperties(space);
+        space = properties->getNextNamespace();
+    }
+}
+\endverbatim
+
  * Note that this method does not keep track of the namespace hierarchy, but could be
  * Note that this method does not keep track of the namespace hierarchy, but could be
  * modified to do so.  Also note that nothing in a properties file indicates the type
  * modified to do so.  Also note that nothing in a properties file indicates the type
  * of a property. If the type is unknown, its string can be retrieved and interpreted
  * of a property. If the type is unknown, its string can be retrieved and interpreted

+ 0 - 4
gameplay/src/RenderState.h

@@ -1,7 +1,3 @@
-/**
- * RenderState.h
- */
-
 #ifndef RENDERSTATE_H_
 #ifndef RENDERSTATE_H_
 #define RENDERSTATE_H_
 #define RENDERSTATE_H_
 
 

+ 0 - 4
gameplay/src/RenderTarget.cpp

@@ -1,7 +1,3 @@
-/**
- * RenderTarget.cpp
- */
-
 #include "Base.h"
 #include "Base.h"
 #include "RenderTarget.h"
 #include "RenderTarget.h"