ソースを参照

Merge branch 'next' of https://github.com/blackberry-gaming/GamePlay into next-sgrenier

Steve Grenier 13 年 前
コミット
40ccf97b1a

+ 1 - 32
gameplay.doxyfile

@@ -689,38 +689,7 @@ INPUT_ENCODING         = UTF-8
 # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 
 # *.f90 *.f *.for *.vhd *.vhdl
 
-FILE_PATTERNS          = *.c \
-                         *.cc \
-                         *.cxx \
-                         *.cpp \
-                         *.c++ \
-                         *.d \
-                         *.java \
-                         *.ii \
-                         *.ixx \
-                         *.ipp \
-                         *.i++ \
-                         *.inl \
-                         *.h \
-                         *.hh \
-                         *.hxx \
-                         *.hpp \
-                         *.h++ \
-                         *.idl \
-                         *.odl \
-                         *.cs \
-                         *.php \
-                         *.php3 \
-                         *.inc \
-                         *.m \
-                         *.mm \
-                         *.dox \
-                         *.py \
-                         *.f90 \
-                         *.f \
-                         *.for \
-                         *.vhd \
-                         *.vhdl
+FILE_PATTERNS          = *.h
 
 # The RECURSIVE tag can be used to turn specify whether or not subdirectories 
 # should be searched for input files as well. Possible values are YES and NO. 

+ 12 - 2
gameplay/src/AnimationTarget.h

@@ -194,8 +194,18 @@ protected:
      */
     void cloneInto(AnimationTarget* target, NodeCloneContext &context) const;
 
-    TargetType _targetType;                     // The type of target this is.
-    unsigned char _animationPropertyBitFlag;    // Bit flag used to indicate which properties on the AnimationTarget are currently animating.
+    /**
+     * The target's type. 
+     *
+     * @see TargetType::SCALAR
+     * @see TargetType::TRANSFORM
+     */
+    TargetType _targetType;
+
+    /**
+     * Bit flag used to indicate which properties on the AnimationTarget are currently animating.
+     */ 
+    unsigned char _animationPropertyBitFlag;
 
 private:
 

+ 19 - 3
gameplay/src/CheckBox.h

@@ -44,6 +44,11 @@ public:
      */
     bool isChecked();
 
+    /**
+     * Sets whether the checkbox is checked.
+     *
+     * @param checked TRUE if the checkbox is checked; FALSE if the checkbox is not checked.
+     */
     void setChecked(bool checked);
 
     /**
@@ -124,10 +129,21 @@ protected:
      * @param clip The container position this control is relative to.
      */
     void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
+
+    /**
+     * Whether this checkbox is currently checked.
+     */
+    bool _checked;
 
-    bool _checked;      // Whether this checkbox is currently checked.
-    Vector2 _imageSize;  // The size to draw the checkbox icon, if different from its size in the texture.
-    Theme::ThemeImage* _image;
+    /**
+     * The size to draw the checkbox icon, if different from its size in the texture.
+     */
+    Vector2 _imageSize;
+
+    /**
+     * The Theme::ThemeImage to display for the checkbox.
+     */
+    Theme::ThemeImage* _image;
 
 private:
 

+ 9 - 2
gameplay/src/Container.h

@@ -231,8 +231,15 @@ protected:
      */
     void addControls(Theme* theme, Properties* properties);
 
-    Layout* _layout;                    // This container's layout.
-    std::vector<Control*> _controls;    // List of controls within this container.
+    /**
+     * The container's layout.
+     */
+    Layout* _layout;
+
+    /**
+     * List of controls within the container.
+     */
+    std::vector<Control*> _controls;
 
 private:
 

+ 78 - 7
gameplay/src/Control.h

@@ -93,6 +93,10 @@ public:
     class Listener
     {
     public:
+
+        /**
+         * Defines the Listener's event types.
+         */
         enum EventType
         {
             /**
@@ -266,7 +270,7 @@ public:
     /**
      * Set this control to fit vertically within its parent container.
      *
-     * @param autoWidth Whether to size this control to fit vertically within its parent container.
+     * @param autoHeight Whether to size this control to fit vertically within its parent container.
      */
     void setAutoHeight(bool autoHeight);
 
@@ -777,6 +781,13 @@ protected:
      */
     static State getState(const char* state);
 
+    /**
+     * Get a Theme::ThemeImage from its ID, for a given state.
+     *
+     * @param id The ID of the image to retrieve
+     * @param state The state to get this image from.
+     * @return The requested Theme::ThemeImage, or NULL if none was found.
+     */
     Theme::ThemeImage* getImage(const char* id, State state);
 
     /**
@@ -786,23 +797,83 @@ protected:
      */
     void notifyListeners(Listener::EventType eventType);
 
+    /**
+     * Gets the Alignment by string.
+     *
+     * @param alignment The string representation of the Alignment type.
+     * @return The Alignment enum value corresponding to the given string.
+     */
     static Alignment getAlignment(const char* alignment);
 
+    /** 
+     * The Control's ID.
+     */ 
     std::string _id;
-    State _state;           // Determines overlay used during draw().
-    Rectangle _bounds;      // Position, relative to parent container's clipping window, and desired size.
-    Rectangle _clipBounds;  // The position and size of this control, relative to parent container's bounds, including border and padding, after clipping.
-    Rectangle _textBounds;  // The position and size of this control's text area, before clipping.  Used for text alignment.
-    Rectangle _clip;        // Clipping window of this control's content, after clipping.
+
+    /**
+     * Determines overlay used during draw().
+     */
+    State _state;
+
+    /**
+     * Position, relative to parent container's clipping window, and desired size.
+     */
+    Rectangle _bounds;
+    
+    /**
+     * The position and size of this control, relative to parent container's bounds, including border and padding, after clipping.
+     */
+    Rectangle _clipBounds;
+    
+    /**
+     * The position and size of this control's text area, before clipping.  Used for text alignment.
+     */
+    Rectangle _textBounds;
+    
+    /**
+     * Clipping window of this control's content, after clipping.
+     */
+    Rectangle _clip;
+    
+    /**
+     * Flag for whether the Control is dirty.
+     */
     bool _dirty;
+    
+    /**
+     * Flag for whether the Control consume's touch events.
+     */
     bool _consumeTouchEvents;
+    
+    /**
+     * The Control's Alignmnet
+     */
     Alignment _alignment;
+    
+    /**
+     * Whether the Control's width is auto-sized.
+     */
     bool _autoWidth;
+    
+    /**
+     * Whether the Control's height is auto-sized.
+     */
     bool _autoHeight;
+    
+    /**
+     * The Control's Theme::Style.
+     */
     Theme::Style* _style;
+    
+    /**
+     * Listeners map of EventType's to a list of Listeners.
+     */
     std::map<Listener::EventType, std::list<Listener*>*>* _listeners;
 
-    float _opacity;         // Current opacity.
+    /**
+     * The current opacity of the control.
+     */
+    float _opacity;
 
 private:
 

+ 11 - 0
gameplay/src/Joint.h

@@ -97,8 +97,19 @@ private:
 
 protected:
 
+    /** 
+     * The Matrix representation of the Joint's bind pose.
+     */
     Matrix _bindPose;
+    
+    /** 
+     * Flag used to mark if the Joint's matrix is dirty.
+     */
     bool _jointMatrixDirty;
+    
+    /** 
+     * The number of MeshSkin's influencing the Joint.
+     */
     unsigned int _skinCount;
 };
 

+ 18 - 1
gameplay/src/Label.h

@@ -86,6 +86,12 @@ protected:
      */
     virtual void initialize(Theme::Style* style, Properties* properties);
 
+    /**
+     * Called when a label's properties change. Updates this label's internal rendering
+     * properties, such as its text viewport.
+     *
+     * @param clip The clipping rectangle of this label's parent container.
+     */
     void update(const Rectangle& clip);
 
     /**
@@ -95,8 +101,19 @@ protected:
      */
     void drawText(const Rectangle& clip);
 
-    std::string _text;      // The text displayed by this label.
+    /**
+     * The text displayed by this label.
+     */
+    std::string _text;
+
+    /**
+     * The font being used to display the label.
+     */
     Font* _font;
+    
+    /**
+     * The text color being used to display the label.
+     */
     Vector4 _textColor;
 
 private:

+ 90 - 0
gameplay/src/Node.h

@@ -638,30 +638,120 @@ protected:
      */
     struct UserData
     {
+        /**
+         * Constructor.
+         */
         UserData() : pointer(NULL), cleanupCallback(NULL) {}
+
+        /**
+         * A pointer to custom user data.
+         */
         void* pointer;
+
+        /** 
+         * Cleanup callback.
+         */
         void (*cleanupCallback)(void*);
     };
 
+    /**
+     * The Scene this node belongs to.
+     */
     Scene* _scene;
+
+    /**
+     * The Node's ID.
+     */ 
     std::string _id;
+
+    /**
+     * Pointer to the Node's first child.
+     */
     Node* _firstChild;
+    
+    /**
+     * Pointer to the Node's next child.
+     */
     Node* _nextSibling;
+    
+    /**
+     * Pointer to the Node's previous sibling.
+     */
     Node* _prevSibling;
+
+    /**
+     * Pointer to the Node's parent.
+     */
     Node* _parent;
+
+    /**
+     * The number of children belonging to the Node.
+     */
     unsigned int _childCount;
+
+    /**
+     * Node property flags. 
+     */ 
     unsigned int _nodeFlags;
+
+    /**
+     * Pointer to the Camera attached to the Node.
+     */
     Camera* _camera;
+
+    /**
+     * Pointer to the Light attached to the Node.
+     */ 
     Light* _light;
+
+    /**
+     * Pointer to the Model attached to the Node.
+     */
     Model* _model;
+    
+    /**
+     * Pointer to the Form attached to the Node.
+     */
     Form* _form;
+    
+    /**
+     * Pointer to the AudioSource attached to the Node.
+     */
     AudioSource* _audioSource;
+    
+    /**
+     * Pointer to the ParticleEmitter attached to the Node.
+     */
     ParticleEmitter* _particleEmitter;
+    
+    /**
+     * Pointer to the PhysicsCollisionObject attached to the Node.
+     */
     PhysicsCollisionObject* _collisionObject;
+    
+    /**
+     * World Matrix representation of the Node.
+     */
     mutable Matrix _world;
+
+    /**
+     * Dirty bits flag for the Node.
+     */
     mutable int _dirtyBits;
+    
+    /**
+     * A flag indicating if the Node's hierarchy has changed.
+     */ 
     bool _notifyHierarchyChanged;
+
+    /**
+     * The Bounding Sphere containing the Node.
+     */
     mutable BoundingSphere _bounds;
+
+    /**
+     * Pointer to custom UserData and cleanup call back that can be stored in a Node.
+     */
     UserData* _userData;
 };
 

+ 3 - 0
gameplay/src/ParticleEmitter.h

@@ -142,6 +142,9 @@ class ParticleEmitter : public Ref
 
 public:
 
+    /**
+     * Defines the types of texture blending 
+     */
     enum TextureBlending
     {
         BLEND_OPAQUE,

+ 6 - 0
gameplay/src/PhysicsCharacter.cpp

@@ -17,11 +17,17 @@ class ClosestNotMeConvexResultCallback : public btCollisionWorld::ClosestConvexR
 {
 public:
 
+    /**
+     * @see btCollisionWorld::ClosestConvexResultCallback::ClosestConvexResultCallback
+     */
     ClosestNotMeConvexResultCallback(PhysicsCollisionObject* me, const btVector3& up, btScalar minSlopeDot)
         : btCollisionWorld::ClosestConvexResultCallback(btVector3(0.0, 0.0, 0.0), btVector3(0.0, 0.0, 0.0)), _me(me), _up(up), _minSlopeDot(minSlopeDot)
     {
     }
 
+    /**
+     * @see btCollisionWorld::ClosestConvexResultCallback::addSingleResult
+     */
     btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult, bool normalInWorldSpace)
     {
         PhysicsCollisionObject* object = reinterpret_cast<PhysicsCollisionObject*>(convexResult.m_hitCollisionObject->getUserPointer());

+ 2 - 2
gameplay/src/PhysicsCharacter.h

@@ -152,9 +152,9 @@ public:
     void setRightVelocity(float velocity = 1.0f);
 
     /**
-     * Causes the character to jump with the specified initial upwards velocity.
+     * Causes the character to jump to the specified height.
      *
-     * @param velocity Initial jump velocity.
+     * @param height The amount to jump.
      */
     void jump(float height);
 

+ 9 - 1
gameplay/src/PhysicsCollisionObject.cpp

@@ -6,9 +6,14 @@
 namespace gameplay
 {
 
-// Internal class used to implement the collidesWith(PhysicsCollisionObject*) function.
+/**
+ * Internal class used to implement the collidesWith(PhysicsCollisionObject*) function.
+ */
 struct CollidesWithCallback : public btCollisionWorld::ContactResultCallback
 {
+    /**
+     * Called with each contact. Needed to implement collidesWith(PhysicsCollisionObject*).
+     */
     btScalar addSingleResult(btManifoldPoint& cp, 
         const btCollisionObject* a, int partIdA, int indexA, 
         const btCollisionObject* b, int partIdB, int indexB)
@@ -17,6 +22,9 @@ struct CollidesWithCallback : public btCollisionWorld::ContactResultCallback
         return 0.0f;
     }
 
+    /**
+     * The result of the callback.
+     */
     bool result;
 };
 

+ 12 - 0
gameplay/src/PhysicsCollisionObject.h

@@ -181,6 +181,7 @@ public:
      * Removes a collision listener.
      *
      * @param listener The listener to remove.
+     * @param object Optional collision object used to filter the collision event.
      */
     void removeCollisionListener(CollisionListener* listener, PhysicsCollisionObject* object = NULL);
 
@@ -215,8 +216,19 @@ protected:
     PhysicsMotionState* getMotionState() const;
 
     // Common member variables
+    /**
+     * Pointer to Node contained by this collision object.
+     */ 
     Node* _node;
+
+    /** 
+     * The PhysicsCollisionObject's motion state.
+     */
     PhysicsMotionState* _motionState;
+    
+    /**
+     * The PhysicsCollisionObject's collision shape.
+     */
     PhysicsCollisionShape* _collisionShape;
 
 };

+ 19 - 0
gameplay/src/PhysicsCollisionShape.h

@@ -49,9 +49,28 @@ public:
 
     public:
 
+        /**
+         * Constructor.
+         */
         Definition();
+
+        /** 
+         * Constructs a new Defintion that is a copy of the specified Definition.
+         *
+         * @param definition The Definition to copy.
+         */ 
         Definition(const Definition& definition);
+
+        /**
+         * Assigns the specified Definition as the Definition.
+         *
+         * @param definition The Definition to assign to the Definition.
+         */
         Definition& operator=(const Definition& definition);
+        
+        /**
+         * Destructor.
+         */
         ~Definition();
 
     private:

+ 11 - 0
gameplay/src/PhysicsConstraint.h

@@ -102,8 +102,19 @@ protected:
      */
     static Vector3 offsetByCenterOfMass(const Node* node, const Vector3& v);
 
+    /**
+     * Pointer to the one rigid body bound by this constraint.
+     */
     PhysicsRigidBody* _a;
+    
+    /**
+     * Pointer to the other rigid body bound by this constraint.
+     */
     PhysicsRigidBody* _b;
+    
+    /**
+     * Pointer to the Bullet constraint.
+     */
     btTypedConstraint* _constraint;
 };
 

+ 55 - 4
gameplay/src/PhysicsController.h

@@ -95,6 +95,7 @@ public:
      * @param a The first (possibly only) rigid body to constrain. If this is the only rigid
      *      body specified the constraint applies between it and the global physics world object.
      * @param b The second rigid body to constrain (optional).
+     * @return Pointer to the created PhysicsFixedConstraint object.
      */
     PhysicsFixedConstraint* createFixedConstraint(PhysicsRigidBody* a, PhysicsRigidBody* b = NULL);
 
@@ -105,6 +106,7 @@ public:
      * @param a The first (possibly only) rigid body to constrain. If this is the only rigid
      *      body specified the constraint applies between it and the global physics world object.
      * @param b The second rigid body to constrain (optional).
+     * @return Pointer to the created PhysicsGenericConstraint object.
      */
     PhysicsGenericConstraint* createGenericConstraint(PhysicsRigidBody* a, PhysicsRigidBody* b = NULL);
 
@@ -122,6 +124,7 @@ public:
      *      (in its local space) with respect to the constraint joint (optional).
      * @param translationOffsetB The translation offset for the second rigid body
      *      (in its local space) with respect to the constraint joint (optional).
+     * @return Pointer to the created PhysicsGenericConstraint object.
      */
     PhysicsGenericConstraint* createGenericConstraint(PhysicsRigidBody* a, const Quaternion& rotationOffsetA, const Vector3& translationOffsetA, 
                                                       PhysicsRigidBody* b = NULL, const Quaternion& rotationOffsetB = Quaternion(), const Vector3& translationOffsetB = Vector3());
@@ -140,6 +143,7 @@ public:
      *      (in its local space) with respect to the constraint joint (optional).
      * @param translationOffsetB The translation offset for the second rigid body
      *      (in its local space) with respect to the constraint joint (optional).
+     * @return Pointer to the created PhysicsHingeConstraint object.
      */
     PhysicsHingeConstraint* createHingeConstraint(PhysicsRigidBody* a, const Quaternion& rotationOffsetA, const Vector3& translationOffsetA,
                                                   PhysicsRigidBody* b = NULL, const Quaternion& rotationOffsetB = Quaternion(), const Vector3& translationOffsetB = Vector3());
@@ -152,6 +156,7 @@ public:
      * @param a The first (possibly only) rigid body to constrain. If this is the only rigid
      *      body specified the constraint applies between it and the global physics world object.
      * @param b The second rigid body to constrain (optional).
+     * @return Pointer to the created PhysicsSocketConstraint object.
      */
     PhysicsSocketConstraint* createSocketConstraint(PhysicsRigidBody* a, PhysicsRigidBody* b = NULL);
 
@@ -165,6 +170,7 @@ public:
      * @param b The second rigid body to constrain (optional).
      * @param translationOffsetB The translation offset for the second rigid body
      *      (in its local space) with respect to the constraint joint (optional).
+     * @return Pointer to the created PhysicsSocketConstraint object.
      */
     PhysicsSocketConstraint* createSocketConstraint(PhysicsRigidBody* a, const Vector3& translationOffsetA,
                                                     PhysicsRigidBody* b = NULL, const Vector3& translationOffsetB = Vector3());
@@ -177,6 +183,7 @@ public:
      * @param a The first (possibly only) rigid body to constrain. If this is the only rigid
      *      body specified the constraint applies between it and the global physics world object.
      * @param b The second rigid body to constrain (optional).
+     * @return Pointer to the created PhysicsSpringConstraint object.
      */
     PhysicsSpringConstraint* createSpringConstraint(PhysicsRigidBody* a, PhysicsRigidBody* b);
 
@@ -194,6 +201,7 @@ public:
      *      (in its local space) with respect to the constraint joint (optional).
      * @param translationOffsetB The translation offset for the second rigid body
      *      (in its local space) with respect to the constraint joint (optional).
+     * @return Pointer to the created PhysicsSpringConstraint object.
      */
     PhysicsSpringConstraint* createSpringConstraint(PhysicsRigidBody* a, const Quaternion& rotationOffsetA, const Vector3& translationOffsetA,          
                                                     PhysicsRigidBody* b, const Quaternion& rotationOffsetB, const Vector3& translationOffsetB);
@@ -224,7 +232,7 @@ public:
      * 
      * @param ray The ray to test intersection with.
      * @param distance How far along the given ray to test for intersections.
-     * @param result Optioanl pointer to a HitTest structure to store hit test result information in.
+     * @param result Optional pointer to a HitTest structure to store hit test result information in.
      * @return True if the ray test collided with a physics object, false otherwise.
      */
     bool rayTest(const Ray& ray, float distance, PhysicsController::HitResult* result = NULL);
@@ -237,6 +245,7 @@ public:
      *
      * @param object The collision object to test.
      * @param endPosition The end position of the sweep test, in world space.
+     * @param result Optional pointer to a HitTest structure to store hit test result information in.
      * @return True if the object intersects any other physics objects, false otherwise.
      */
     bool sweepTest(PhysicsCollisionObject* object, const Vector3& endPosition, PhysicsController::HitResult* result = NULL);
@@ -354,13 +363,55 @@ private:
     {
     public:
 
+        /** 
+         * DebugVertex.
+         */
         struct DebugVertex
         {
-            float x, y, z;
-            float r, g, b, a;
+            /**
+             * The x coordinate of the vertex.
+             */
+            float x;
+    
+            /**
+             * The y coordinate of the vertex.
+             */
+            float y;
+    
+            /**
+             * The z coordinate of the vertex.
+             */
+            float z;
+
+            /**
+             * The red color component of the vertex.
+             */
+            float r;
+    
+            /**
+             * The green color component of the vertex.
+             */
+            float g;
+    
+            /**
+             * The blue color component of the vertex.
+             */
+            float b;
+    
+            /**
+             * The alpha component of the vertex.
+             */
+            float a;
         };
 
-        DebugDrawer();        
+        /**
+         * Constructor.
+         */
+        DebugDrawer(); 
+
+        /** 
+         * Destructor.
+         */
         ~DebugDrawer();
         
         void begin(const Matrix& viewProjection);

+ 3 - 0
gameplay/src/PhysicsGhostObject.h

@@ -62,6 +62,9 @@ protected:
      */
     static PhysicsGhostObject* create(Node* node, Properties* properties);
 
+    /**
+     * Pointer to the Bullet ghost collision object.
+     */
     btPairCachingGhostObject* _ghostObject;
 };
 

+ 15 - 0
gameplay/src/RadioButton.h

@@ -131,9 +131,24 @@ protected:
      */
     static void clearSelected(const std::string& groupId);
 
+    /**
+     * The RadioButton's group ID.
+     */
     std::string _groupId;
+    
+    /**
+     * Whether the RadioButton is currently selected.
+     */
     bool _selected;
+    
+    /**
+     * The size at which the RadioButton's icon will be drawn.
+     */
     Vector2 _imageSize;
+
+    /**
+     * The ThemeImage to use for the RadioButton.
+     */ 
     Theme::ThemeImage* _image;
 
 private:

+ 19 - 0
gameplay/src/RenderState.h

@@ -357,10 +357,29 @@ private:
 
 protected:
 
+    /**
+     * Collection of MaterialParameter's to be applied to the gamplay::Effect.
+     */
     mutable std::vector<MaterialParameter*> _parameters;
+    
+    /**
+     * Map of IDs to AutoBindings.
+     */
     std::map<std::string, AutoBinding> _autoBindings;
+
+    /**
+     * The Node bound to the RenderState.
+     */
     Node* _nodeBinding;
+
+    /**
+     * The StateBlock of fixed-function render states that can be applied to the RenderState.
+     */
     mutable StateBlock* _state;
+
+    /**
+     * The RenderState's parent.
+     */
     RenderState* _parent;
 };
 

+ 37 - 2
gameplay/src/Scene.cpp

@@ -316,10 +316,45 @@ Material* createDebugMaterial()
     return material;
 }
 
+/**
+ * DebugVertex structure.
+ */
 struct DebugVertex
 {
-    float x, y, z;
-    float r, g, b, a;
+    /**
+     * The x coordinate of the vertex.
+     */
+    float x;
+
+    /**
+     * The y coordinate of the vertex.
+     */
+    float y;
+    
+    /**
+     * The z coordinate of the vertex.
+     */
+    float z;
+    
+    /** 
+     * The red color component of the vertex.
+     */
+    float r;
+
+    /** 
+     * The green color component of the vertex.
+     */
+    float g;
+    
+    /** 
+     * The blue color component of the vertex.
+     */
+    float b;
+    
+    /** 
+     * The alpha component of the vertex.
+     */
+    float a;
 };
 
 void drawDebugLine(MeshBatch* batch, const Vector3& point1, const Vector3& point2, const Vector3& color)

+ 38 - 2
gameplay/src/Slider.h

@@ -149,16 +149,52 @@ protected:
      */
     void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
 
-    void update(const Rectangle& clip);
-
+    /**
+     * Called when a slider's properties change. Updates this slider's internal rendering
+     * properties, such as its text viewport.
+     *
+     * @param clip The clipping rectangle of this slider's parent container.
+     */
+    void update(const Rectangle& clip); 
+
+    /**
+     * The minimum value for the Slider.
+     */
     float _min;
+    
+    /**
+     * The maximum value for the Slider
+     */
     float _max;
+    
+    /**
+     * The Slider's step size.
+     */
     float _step;
+    
+    /**
+     * The Slider's current value.
+     */
     float _value;
 
+    /**
+     * The image for the minimum slider value.
+     */
     Theme::ThemeImage* _minImage;
+    
+    /**
+     * The image for the maximum slider value.
+     */
     Theme::ThemeImage* _maxImage;
+    
+    /**
+     * The image for the slider track.
+     */
     Theme::ThemeImage* _trackImage;
+    
+    /**
+     * The image for the slider marker.
+     */
     Theme::ThemeImage* _markerImage;
 
 private:

+ 47 - 4
gameplay/src/SpriteBatch.cpp

@@ -45,12 +45,55 @@
 namespace gameplay
 {
 
-// Sprite vertex structured used for batching
+/**
+ * Sprite vertex structure used for batching.
+ */
 struct SpriteVertex
 {
-    float x, y, z;
-    float u, v;
-    float r, g, b, a;
+    /**
+     * The x coordinate of the vertex.
+     */
+    float x;
+    
+    /**
+     * The y coordinate of the vertex.
+     */
+    float y;
+    
+    /**
+     * The z coordinate of the vertex.
+     */
+    float z;
+
+    /**
+     * The u component of the (u, v) texture coordinates for the vertex.
+     */
+    float u;
+    
+    /**
+     * The v component of the (u, v) texture coordinates for the vertex.
+     */
+    float v;
+
+    /**
+     * The red color component of the vertex.
+     */
+    float r;
+    
+    /**
+     * The green color component of the vertex.
+     */
+    float g;
+    
+    /**
+     * The blue color component of the vertex.
+     */
+    float b;
+    
+    /**
+     * The alpha component of the vertex.
+     */
+    float a;
 };
 
 // Shared sprite effects

+ 19 - 0
gameplay/src/TextBox.h

@@ -122,10 +122,29 @@ protected:
      */
     void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
 
+    /**
+     * The current position of the TextBox's caret.
+     */
     Vector2 _caretLocation;
+
+    /**
+     * The index into the TextBox's string that the caret is.
+     */
     unsigned int textIndex;
+    
+    /**
+     * The last character that was entered into the TextBox.
+     */
     int _lastKeypress;
+
+    /**
+     * The font size to be used in the TextBox.
+     */
     unsigned int _fontSize;
+    
+    /**
+     * The Theme::Image for the TextBox's caret.
+     */
     Theme::ThemeImage* _caretImage;
 
 private:

+ 79 - 2
gameplay/src/Theme.h

@@ -155,15 +155,44 @@ public:
      */
     struct UVs
     {
+        /**
+         * Constructor.
+         */
         UVs();
 
+        /**
+         * Constructor
+         *
+         * @param u1 u component of the first UV coordinate.
+         * @param v1 v component of the first UV coordinate.
+         * @param u2 u component of the second UV coordinate.
+         * @param v2 v component of the second UV coordinate.
+         */
         UVs(float u1, float v1, float u2, float v2);
 
+        /**
+         * Get's an empty UVs.
+         */
         static const UVs& empty();
 
+        /**
+         * u component of the first UV coordinate.
+         */
         float u1;
+        
+        /**
+         * v component of the first UV coordinate.
+         */
         float v1;
+        
+        /**
+         * u component of the second UV coordinate.
+         */
         float u2;
+        
+        /**
+         * v component of the second UV coordinate.
+         */
         float v2;
     };
 
@@ -171,17 +200,53 @@ public:
      * Struct representing margin, border, and padding areas by
      * the width or height of each side.
      */
-    typedef struct SideRegions
+    struct SideRegions
     {
+        /** 
+         * Constructor.
+         */
         SideRegions() : top(0), bottom(0), left(0), right(0) {}
 
+        /**
+         * Gets an empty SideRegion.
+         */
         static const SideRegions& empty();
 
+        /**
+         * The top of the SideRegion.
+         */
         float top;
+        
+        /**
+         * The bottom of the SideRegion.
+         */
         float bottom;
+        
+        /**
+         * The left side of the SideRegion.
+         */
         float left;
+        
+        /**
+         * The right side of the SideRegion.
+         */
         float right;
-    } Margin, Border, Padding;
+    };
+    
+    /** 
+     * Struct representing margin areas by the width or height of each side.
+     */
+    typedef SideRegions Margin;
+    
+    /** 
+     * Struct representing border areas by the width or height of each side.
+     */
+    typedef SideRegions Border;
+    
+    /** 
+     * Struct representing padding areas by the width or height of each side.
+     */
+    typedef SideRegions Padding;
 
     /**
      * Class representing an image within the theme's texture atlas.
@@ -195,12 +260,24 @@ public:
 
     public:
 
+        /**
+         * Gets the ID of the ThemeImage.
+         */
         const char* getId() const;
 
+        /**
+         * Gets the UV coordinates for the ThemeImage.
+         */
         const UVs& getUVs() const;
 
+        /** 
+         * Gets the Rectangle region of the ThemeImage.
+         */
         const Rectangle& getRegion() const;
 
+        /** 
+         * Gets the color of the ThemeImage in a Vector4.
+         */
         const Vector4& getColor() const;
 
     private:

+ 38 - 1
gameplay/src/Transform.h

@@ -709,7 +709,7 @@ public:
      * Adds a transform listener.
      *
      * @param listener The listener to add.
-     * @param cookie An optional long value that is passed to the specified listener when it is called..
+     * @param cookie An optional long value that is passed to the specified listener when it is called.
      */
     void addListener(Transform::Listener* listener, long cookie = 0);
 
@@ -735,12 +735,26 @@ public:
 
 protected:
 
+    /**
+     * Transform Listener.
+     */
     struct TransformListener
     {
+        /**
+         * Listener for Transform events.
+         */
         Listener* listener;
+
+        /**
+         * An optional long value that is specified to the Listener's callback.
+         */
         long cookie;
     };
 
+    /**
+     * Defines the matrix dirty bits for marking the translation, scale and rotation
+     * components of the Transform.
+     */
     enum MatrixDirtyBits
     {
         DIRTY_TRANSLATION = 0x01,
@@ -766,11 +780,34 @@ protected:
      */
     void cloneInto(Transform* transform, NodeCloneContext &context) const;
 
+    /**
+     * The scale component of the Transform.
+     */
     Vector3 _scale;
+
+    /** 
+     * The rotation component of the Transform.
+     */
     Quaternion _rotation;
+    
+    /** 
+     * The translation component of the Transform.
+     */
     Vector3 _translation;
+    
+    /** 
+     * The Matrix representation of the Transform.
+     */
     mutable Matrix _matrix;
+    
+    /** 
+     * Matrix dirty bits flag.
+     */
     mutable char _matrixDirtyBits;
+    
+    /** 
+     * List of TransformListener's on the Transform.
+     */
     std::list<TransformListener>* _listeners;
 
 private:

+ 4 - 0
gameplay/src/VerticalLayout.h

@@ -69,6 +69,10 @@ protected:
      */
     void update(const Container* container);
 
+    /**
+     * Flag determining whether this layout will start laying out controls from the bottom of the container.
+     * The default is 'false' meaning controls will start at the top.
+     */
     bool _bottomToTop;
 
 private: