Просмотр исходного кода

Added some Physics documentation

BearishSun 9 лет назад
Родитель
Сommit
756231e928

+ 6 - 0
BansheeCore/Include/BsCharacterController.h

@@ -7,6 +7,10 @@
 
 namespace BansheeEngine
 {
+	/** @addtogroup Physics
+	 *  @{
+	 */
+
 	/** 
 	 * Controls climbing behaviour for a capsule character controller. Normally the character controller will not
 	 * automatically climb when heights are greater than the assigned step offset. However due to the shape of the capsule
@@ -274,4 +278,6 @@ namespace BansheeEngine
 	{
 		CharacterController* controller; /**< Controller that was touched. */
 	};
+
+	/** @} */
 }

+ 5 - 1
BansheeCore/Include/BsCorePrerequisites.h

@@ -67,13 +67,17 @@
  */
 
 /** @defgroup Application-Core Application
- *  Entry point into the application.
+ *  Entry point into the application and other general application functionality.
  */
 
 /** @defgroup Components-Core Components
   *	Built-in components (elements that may be attached to scene objects).
   */
 
+/** @defgroup Physics Physics
+ *	Functionality for dealing with physics: colliders, triggers, rigidbodies, joints, scene queries, etc.
+ */
+
 /** @} */
 
 #define BS_MAX_MULTIPLE_RENDER_TARGETS 8

+ 120 - 8
BansheeCore/Include/BsD6Joint.h

@@ -7,68 +7,180 @@
 
 namespace BansheeEngine
 {
+	/** @addtogroup Physics
+	 *  @{
+	 */
+
+	/** 
+	 * Represents the most customizable type of joint. This joint type can be used to create all other built-in joint 
+	 * types, and to design your own custom ones, but is less intuitive to use. Allows a specification of a linear 
+	 * constraint (e.g. for slider), twist constraint (rotating around X) and swing constraint (rotating around Y and Z).
+	 * It also allows you to constrain limits to only specific axes or completely lock specific axes.
+	 */
 	class BS_CORE_EXPORT D6Joint : public Joint
 	{
 	public:
+		/** Specifies axes that the D6 joint can constrain motion on. */
 		enum class Axis
 		{
-			X, Y, Z, Twist, SwingY, SwingZ, Count
+			X, /**< Movement on the X axis. */
+			Y, /**< Movement on the Y axis. */
+			Z, /**< Movement on the Z axis. */
+			Twist, /**< Rotation around the X axis. */
+			SwingY, /**< Rotation around the Y axis. */
+			SwingZ, /**< Rotation around the Z axis. */
+			Count
 		};
 
+		/** Specifies type of constraint placed on a specific axis. */
 		enum class Motion
 		{
-			Locked, Limited, Free, Count
+			Locked, /**< Axis is immovable. */
+			Limited, /**< Axis will be constrained by the specified limits. */
+			Free, /**< Axis will not be constrained. */
+			Count
 		};
 
+		/** Type of drives that can be used for moving or rotating bodies attached to the joint. */
 		enum class DriveType
 		{
-			X, Y, Z, Swing, Twist, SLERP, Count
+			X, /**< Linear movement on the X axis using the linear drive model. */
+			Y, /**< Linear movement on the Y axis using the linear drive model. */
+			Z, /**< Linear movement on the Z axis using the linear drive model. */
+			/**
+			 * Rotation around the Y axis using the twist/swing angular drive model. Should not be used together with 
+			 * SLERP mode. 
+			 */
+			Swing, 
+			/** 
+			 * Rotation around the Z axis using the twist/swing angular drive model. Should not be used together with 
+			 * SLERP mode. 
+			 */
+			Twist,
+			/** 
+			 * Rotation using spherical linear interpolation. Uses the SLERP angular drive mode which performs rotation
+			 * by interpolating the quaternion values directly over the shortest path (applies to all three axes, which
+			 * they all must be unlocked).
+			 */
+			SLERP, 
+			Count
 		};
 
+		/** 
+		 * Specifies parameters for a drive that will attempt to move the joint bodies to the specified drive position and
+		 * velocity.
+		 */
 		struct Drive
 		{
-			float stiffness = 0.0f;
-			float damping = 0.0f;
-			float forceLimit = FLT_MAX;
-			bool acceleration = false;
-
 			bool operator==(const Drive& other) const
 			{
 				return stiffness == other.stiffness && damping == other.damping && forceLimit == other.forceLimit &&
 					acceleration == other.acceleration;
 			}
+
+			/** Spring strength. Force proportional to the position error. */
+			float stiffness = 0.0f;
+
+			/** Damping strength. Force propertional to the velocity error. */
+			float damping = 0.0f;
+
+			/** Maximum force the drive can apply. */
+			float forceLimit = FLT_MAX;
+
+			/** 
+			 * If true the drive will generate acceleration instead of forces. Acceleration drives are easier to tune as
+			 * they account for the masses of the actors to which the joint is attached.
+			 */
+			bool acceleration = false;
 		};
 
 	public:
 		virtual ~D6Joint() { }
 
+		/** 
+		 * Returns motion constrain for the specified axis. 
+		 *
+		 * @see	setMotion
+		 */
 		virtual Motion getMotion(Axis axis) const = 0;
+
+		/** 
+		 * Allows you to constrain motion of the specified axis. Be aware that when setting drives for a specific axis
+		 * you must also take care not to constrain its motion in a conflicting way (e.g. you cannot add a drive that
+		 * moves the joint on X axis, and then lock the X axis).
+		 *
+		 * Unlocking translations degrees of freedom allows the bodies to move along the subset of the unlocked axes.
+		 * (e.g. unlocking just one translational axis is the equivalent of a slider joint.)
+		 *
+		 * Angular degrees of freedom are partitioned as twist (around X axis) and swing (around Y and Z axes). Different
+		 * effects can be achieves by unlocking their various combinations: 
+		 *  - If a single degree of angular freedom is unlocked it should be the twist degree as it has extra options for
+		 *    that case (e.g. for a hinge joint).
+		 *  - If both swing degrees are unlocked but twist is locked the result is a zero-twist joint. 
+		 *  - If one swing and one twist degree of freedom are unlocked the result is a zero-swing joint (e.g. an arm
+		 *    attached at the elbow)
+		 *  - If all angular degrees of freedom are unlocked the result is the same as the spherical joint.
+		 */
 		virtual void setMotion(Axis axis, Motion motion) = 0;
 
+		/** Returns the current rotation of the joint around the X axis. */
 		virtual Radian getTwist() const = 0;
+
+		/** Returns the current rotation of the joint around the Y axis. */
 		virtual Radian getSwingY() const = 0;
+
+		/** Returns the current rotation of the joint around the Z axis. */
 		virtual Radian getSwingZ() const = 0;
 
+		/** Returns the linear limit used for constraining translation degrees of freedom. */
 		virtual LimitLinear getLimitLinear() const = 0;
+
+		/** Sets the linear limit used for constraining translation degrees of freedom. */
 		virtual void setLimitLinear(const LimitLinear& limit) = 0;
 		
+		/** Returns the angular limit used for constraining the twist (rotation around X) degree of freedom. */
 		virtual LimitAngularRange getLimitTwist() const = 0;
+
+		/** Sets the angular limit used for constraining the twist (rotation around X) degree of freedom. */
 		virtual void setLimitTwist(const LimitAngularRange& limit) = 0;
 
+		/** Returns the angular limit used for constraining the swing (rotation around Y and Z) degree of freedom. */
 		virtual LimitConeRange getLimitSwing() const = 0;
+
+		/** Sets the angular limit used for constraining the swing (rotation around Y and Z) degree of freedom. */
 		virtual void setLimitSwing(const LimitConeRange& limit) = 0;
 	
+		/**
+		 * Returns a drive that will attempt to move the specified degree(s) of freedom to the wanted position and velocity. 
+		 */
 		virtual Drive getDrive(DriveType type) const = 0;
+
+		/**
+		 * Sets a drive that will attempt to move the specified degree(s) of freedom to the wanted position and velocity. 
+		 */
 		virtual void setDrive(DriveType type, const Drive& drive) = 0;
 
+		/** Returns the drive's target position relative to the joint's first body. */
 		virtual Vector3 getDrivePosition() const = 0;
+
+		/** Returns the drive's target rotation relative to the joint's first body. */
 		virtual Quaternion getDriveRotation() const = 0;
+
+		/** Sets the drive's target position and rotation relative to the joint's first body. */
 		virtual void setDriveTransform(const Vector3& position, const Quaternion& rotation) = 0;
 
+		/** Returns the drive's target linear velocity. */
 		virtual Vector3 getDriveLinearVelocity() const = 0;
+
+		/** Returns the drive's target angular velocity. */
 		virtual Vector3 getDriveAngularVelocity() const = 0;
+
+		/** Sets the drive's target linear and angular velocities. */
 		virtual void setDriveVelocity(const Vector3& linear, const Vector3& angular) = 0;
 
+		/** Creates a new D6 joint. */
 		static SPtr<D6Joint> create();
 	};
+
+	/** @} */
 }

+ 40 - 0
BansheeCore/Include/BsFJoint.h

@@ -8,30 +8,70 @@
 
 namespace BansheeEngine
 {
+	/** @addtogroup Physics
+	 *  @{
+	 */
+
+	/** Specifies first or second body referenced by a Joint. */
 	enum class JointBody
 	{
 		A, B
 	};
 
+	/** @cond INTERNAL */
+
+	/** Provides common functionality used by all Joint types. */
 	class BS_CORE_EXPORT FJoint
 	{
 	public:
 		virtual ~FJoint() { }
 
+		/** Returns one of the bodies managed by the joint. */
 		virtual Rigidbody* getBody(JointBody body) const = 0;
+
+		/** Sets a body managed by the joint. One of the bodies must be movable (i.e. non-kinematic). */
 		virtual void setBody(JointBody body, Rigidbody* value) = 0;
 
+		/** Returns the position of a body relative to the joint. */
 		virtual Vector3 getPosition(JointBody body) const = 0;
+
+		/** Returns the rotation of a body relative to the joint. */
 		virtual Quaternion getRotation(JointBody body) const = 0;
+
+		/** Sets the position and rotation of a body relative to the joint. */
 		virtual void setTransform(JointBody body, const Vector3& position, const Quaternion& rotation) = 0;
 
+		/** 
+		 * Returns the maximum force the joint can apply before breaking. Broken joints no longer participate in physics 
+		 * simulation. 
+		 */
 		virtual float getBreakForce() const = 0;
+
+		/** 
+		 * Sets the maximum force the joint can apply before breaking. Broken joints no longer participate in physics 
+		 * simulation. 
+		 */
 		virtual void setBreakForce(float force) = 0;
 
+		/** 
+		 * Returns the maximum torque the joint can apply before breaking. Broken joints no longer participate in physics 
+		 * simulation. 
+		 */
 		virtual float getBreakTorque() const = 0;
+
+		/** 
+		 * Sets the maximum torque the joint can apply before breaking. Broken joints no longer participate in physics 
+		 * simulation. 
+		 */
 		virtual void setBreakTorque(float torque) = 0;
 
+		/** Checks whether collisions between the two bodies managed by the joint are enabled. */
 		virtual bool getEnableCollision() const = 0;
+
+		/** Sets whether collision between the two bodies managed by the joint are enabled. */
 		virtual void setEnableCollision(bool value) = 0;
 	};
+
+	/** @endcond */
+	/** @} */
 }

+ 180 - 29
BansheeCore/Include/BsJoint.h

@@ -7,35 +7,73 @@
 
 namespace BansheeEngine
 {
+	/** @addtogroup Physics
+	 *  @{
+	 */
+
+	/** 
+	 * Base class for all Joint types. Joints constrain how two rigidbodies move relative to one another (e.g. a door 
+	 * hinge). One of the bodies in the joint must always be movable (i.e. non-kinematic).
+	 */
 	class BS_CORE_EXPORT Joint
 	{
 	public:
 		virtual ~Joint() { }
 
+		/** @copydoc FJoint::getBody */
 		inline Rigidbody* getBody(JointBody body) const;
+
+		/** @copydoc FJoint::setBody */
 		inline void setBody(JointBody body, Rigidbody* value);
 
+		/** @copydoc FJoint::getPosition */
 		inline Vector3 getPosition(JointBody body) const;
+
+		/** @copydoc FJoint::getRotation */
 		inline Quaternion getRotation(JointBody body) const;
+
+		/** @copydoc FJoint::setTransform */
 		inline void setTransform(JointBody body, const Vector3& position, const Quaternion& rotation);
 
+		/** @copydoc FJoint::getBreakForce */
 		inline float getBreakForce() const;
+
+		/** @copydoc FJoint::setBreakForce */
 		inline void setBreakForce(float force);
 
+		/** @copydoc FJoint::getBreakTorque */
 		inline float getBreakTorque() const;
+
+		/** @copydoc FJoint::setBreakTorque */
 		inline void setBreakTorque(float torque);
 
+		/** @copydoc FJoint::getEnableCollision */
 		inline bool getEnableCollision() const;
+
+		/** @copydoc FJoint::setEnableCollision */
 		inline void setEnableCollision(bool value);
 
+		/** Triggered when the joint's break force or torque is exceeded. */
 		Event<void()> onJointBreak;
 	protected:
 		FJoint* mInternal = nullptr;
 	};
 
+	/** 
+	 * Controls spring parameters for a physics joint limits. If a limit is soft (body bounces back due to restition when 
+	 * the limit is reached) the spring will pull the body back towards the limit using the specified parameters.
+	 */
 	struct Spring
 	{
+		/** Constructs a spring with no force. */
 		Spring() { }
+
+		/** 
+		 * Constructs a spring. 
+		 *
+		 * @param	stiffness	Spring strength. Force proportional to the position error.
+		 * @param	damping		Damping strength. Force propertional to the velocity error.
+		 */
 		Spring(float stiffness, float damping)
 			:stiffness(stiffness), damping(damping)
 		{ }
@@ -45,21 +83,72 @@ namespace BansheeEngine
 			return stiffness == other.stiffness && damping == other.damping;
 		}
 
+		/** Spring strength. Force proportional to the position error. */
 		float stiffness = 0.0f;
+
+		/** Damping strength. Force propertional to the velocity error. */
 		float damping = 0.0f;
 	};
 
-	struct LimitLinearRange
+	/** Contains common values used by all Joint limit types. */
+	struct LimitCommon
 	{
+		LimitCommon(float contactDist = -1.0f)
+			:contactDist(contactDist)
+		{ }
+
+		LimitCommon(const Spring& spring, float restitution = 0.0f)
+			:spring(spring), restitution(restitution)
+		{ }
+
+		/** 
+		 * Distance from the limit at which it becomes active. Allows the solver to activate earlier than the limit is
+		 * reached to avoid breaking the limit.
+		 */
+		float contactDist = -1.0f;
+
+		/**
+		 * Controls how do objects react when the limit is reached, values closer to zero specify non-ellastic collision,
+		 * while those closer to one specify more ellastic (i.e bouncy) collision. Must be in [0, 1] range.
+		 */
+		float restitution = 0.0f;
+
+		/** Spring that controls how are the bodies pulled back towards the limit when they breach it. */
+		Spring spring;
+	};
+
+	/** Represents a joint limit between two distance values. Lower value must be less than the upper value. */
+	struct LimitLinearRange : LimitCommon
+	{
+		/** Constructs an empty limit. */
 		LimitLinearRange()
 		{ }
 
+		/**
+		 * Constructs a hard limit. Once the limit is reached the movement of the attached bodies will come to a stop.
+		 * 
+		 * @param	lower		Lower distance of the limit. Must be less than @p upper.
+		 * @param	upper		Upper distance of the limit. Must be more than @p lower.
+		 * @param	contactDist	Distance from the limit at which it becomes active. Allows the solver to activate earlier
+		 *						than the limit is reached to avoid breaking the limit. Specify -1 for the default.
+		 */
 		LimitLinearRange(float lower, float upper, float contactDist = -1.0f)
-			:lower(lower), upper(upper), contactDist(contactDist)
+			:LimitCommon(contactDist), lower(lower), upper(upper)
 		{ }
 
-		LimitLinearRange(float lower, float upper, const Spring& spring)
-			:lower(lower), upper(upper), spring(spring)
+		/**
+		 * Constructs a soft limit. Once the limit is reached the bodies will bounce back according to the resitution
+		 * parameter and will be pulled back towards the limit by the provided spring.
+		 * 
+		 * @param	lower		Lower distance of the limit. Must be less than @p upper.
+		 * @param	upper		Upper distance of the limit. Must be more than @p lower.
+		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
+		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
+		 *						collision. Must be in [0, 1] range.
+		 */
+		LimitLinearRange(float lower, float upper, const Spring& spring, float restitution = 0.0f)
+			:LimitCommon(spring, restitution), lower(lower), upper(upper)
 		{ }
 
 		bool operator==(const LimitLinearRange& other) const
@@ -68,24 +157,43 @@ namespace BansheeEngine
 				restitution == other.restitution && spring == other.spring;
 		}
 
-		float lower = 0.0f;
+		/** Lower distance of the limit. Must be less than #upper. */
+		float lower = 0.0f; 
+
+		/** Upper distance of the limit. Must be more than #lower. */
 		float upper = 0.0f;
-		float contactDist = -1.0f;
-		float restitution = 0.0f;
-		Spring spring;
 	};
 
-	struct LimitLinear
+	/** Represents a joint limit between zero a single distance value. */
+	struct LimitLinear : LimitCommon
 	{
+		/** Constructs an empty limit. */
 		LimitLinear()
 		{ }
 
+		/**
+		 * Constructs a hard limit. Once the limit is reached the movement of the attached bodies will come to a stop.
+		 * 
+		 * @param	extent		Distance at which the limit becomes active. 
+		 * @param	contactDist	Distance from the limit at which it becomes active. Allows the solver to activate earlier
+		 *						than the limit is reached to avoid breaking the limit. Specify -1 for the default.
+		 */
 		LimitLinear(float extent, float contactDist = -1.0f)
-			:extent(extent),  contactDist(contactDist)
+			:LimitCommon(contactDist), extent(extent)
 		{ }
 
-		LimitLinear(float extent,const Spring& spring)
-			:extent(extent), spring(spring)
+		/**
+		 * Constructs a soft limit. Once the limit is reached the bodies will bounce back according to the resitution
+		 * parameter and will be pulled back towards the limit by the provided spring.
+		 * 
+		 * @param	extent		Distance at which the limit becomes active. 
+		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
+		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
+		 *						collision. Must be in [0, 1] range.
+		 */
+		LimitLinear(float extent, const Spring& spring, float restitution = 0.0f)
+			:LimitCommon(spring, restitution), extent(extent)
 		{ }
 
 		bool operator==(const LimitLinear& other) const
@@ -94,23 +202,42 @@ namespace BansheeEngine
 				spring == other.spring;
 		}
 
+		/** Distance at which the limit becomes active. */
 		float extent = 0.0f;
-		float contactDist = -1.0f;
-		float restitution = 0.0f;
-		Spring spring;
 	};
 
-	struct LimitAngularRange
+	/** Represents a joint limit between two angles. */
+	struct LimitAngularRange : LimitCommon
 	{
+		/** Constructs an empty limit. */
 		LimitAngularRange()
 		{ }
 
+		/**
+		 * Constructs a hard limit. Once the limit is reached the movement of the attached bodies will come to a stop.
+		 * 
+		 * @param	lower		Lower angle of the limit. Must be less than @p upper.
+		 * @param	upper		Upper angle of the limit. Must be more than @p lower.
+		 * @param	contactDist	Distance from the limit at which it becomes active. Allows the solver to activate earlier
+		 *						than the limit is reached to avoid breaking the limit. Specify -1 for the default.
+		 */
 		LimitAngularRange(Radian lower, Radian upper, float contactDist = -1.0f)
-			:lower(lower), upper(upper), contactDist(contactDist)
+			:LimitCommon(contactDist), lower(lower), upper(upper)
 		{ }
 
-		LimitAngularRange(Radian lower, Radian upper, const Spring& spring)
-			:lower(lower), upper(upper), spring(spring)
+		/**
+		 * Constructs a soft limit. Once the limit is reached the bodies will bounce back according to the resitution
+		 * parameter and will be pulled back towards the limit by the provided spring.
+		 * 
+		 * @param	lower		Lower angle of the limit. Must be less than @p upper.
+		 * @param	upper		Upper angle of the limit. Must be more than @p lower.
+		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
+		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
+		 *						collision. Must be in [0, 1] range.
+		 */
+		LimitAngularRange(Radian lower, Radian upper, const Spring& spring, float restitution = 0.0f)
+			:LimitCommon(spring, restitution), lower(lower), upper(upper)
 		{ }
 
 		bool operator==(const LimitAngularRange& other) const
@@ -119,24 +246,46 @@ namespace BansheeEngine
 				restitution == other.restitution && spring == other.spring;
 		}
 
+		/** Lower angle of the limit. Must be less than #upper. */
 		Radian lower = Radian(0.0f);
+
+		/** Upper angle of the limit. Must be less than #lower. */
 		Radian upper = Radian(0.0f);
-		float contactDist = -1.0f;
-		float restitution = 0.0f;
-		Spring spring;
 	};
 
-	struct LimitConeRange
+	/** Represents a joint limit that contraints movement to within an elliptical cone. */
+	struct LimitConeRange : LimitCommon
 	{
+		/** Constructs a limit with a 45 degree cone. */
 		LimitConeRange()
 		{ }
 
+		/**
+		 * Constructs a hard limit. Once the limit is reached the movement of the attached bodies will come to a stop.
+		 * 
+		 * @param	yLimitAngle		Y angle of the cone. Movement is constrainted between 0 and this angle on the Y axis.
+		 * @param	zLimitAngle		Z angle of the cone. Movement is constrainted between 0 and this angle on the Z axis.
+		 * @param	contactDist		Distance from the limit at which it becomes active. Allows the solver to activate 
+		 *							earlier than the limit is reached to avoid breaking the limit. Specify -1 for the 
+		 *							default.
+		 */
 		LimitConeRange(Radian yLimitAngle, Radian zLimitAngle, float contactDist = -1.0f)
-			:yLimitAngle(yLimitAngle), zLimitAngle(zLimitAngle), contactDist(contactDist)
+			:LimitCommon(contactDist), yLimitAngle(yLimitAngle), zLimitAngle(zLimitAngle)
 		{ }
 
-		LimitConeRange(Radian yLimitAngle, Radian zLimitAngle, const Spring& spring)
-			:yLimitAngle(yLimitAngle), zLimitAngle(zLimitAngle), spring(spring)
+		/**
+		 * Constructs a soft limit. Once the limit is reached the bodies will bounce back according to the resitution
+		 * parameter and will be pulled back towards the limit by the provided spring.
+		 * 
+		 * @param	yLimitAngle	Y angle of the cone. Movement is constrainted between 0 and this angle on the Y axis.
+		 * @param	zLimitAngle	Z angle of the cone. Movement is constrainted between 0 and this angle on the Z axis.
+		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
+		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
+		 *						collision. Must be in [0, 1] range.
+		 */
+		LimitConeRange(Radian yLimitAngle, Radian zLimitAngle, const Spring& spring, float restitution = 0.0f)
+			:LimitCommon(spring, restitution), yLimitAngle(yLimitAngle), zLimitAngle(zLimitAngle)
 		{ }
 
 		bool operator==(const LimitConeRange& other) const
@@ -145,10 +294,12 @@ namespace BansheeEngine
 				contactDist == other.contactDist && restitution == other.restitution && spring == other.spring;
 		}
 
+		/** Y angle of the cone. Movement is constrainted between 0 and this angle on the Y axis. */
 		Radian yLimitAngle = Radian(Math::PI * 0.5f);
+
+		/** Z angle of the cone. Movement is constrainted between 0 and this angle on the Z axis. */
 		Radian zLimitAngle = Radian(Math::PI * 0.5f);
-		float contactDist = -1.0f;
-		float restitution = 0.0f;
-		Spring spring;
 	};
+
+	/** @} */
 }

+ 1 - 1
MBansheeEngine/PhysicsMaterial.cs

@@ -54,7 +54,7 @@ namespace BansheeEngine
 
         /// <summary>
         /// Controls "bounciness" of an object during a collision. Value of 1 means the collision is elastic, and value
-        /// of 0 means the value is inelastic.
+        /// of 0 means the value is inelastic. Must be in [0, 1] range.
         /// </summary>
         public float Restitution
         {