Fixed header <iterator> missing in the voip sample

Minor additions to the API documentation of the drawable classes

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1520 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-05-13 11:00:29 +00:00
parent aade008582
commit aaf080368b
9 changed files with 307 additions and 129 deletions

View file

@ -34,8 +34,6 @@
namespace sf
{
////////////////////////////////////////////////////////////
/// Default constructor
////////////////////////////////////////////////////////////
Drawable::Drawable(const Vector2f& position, const Vector2f& scale, float rotation, const Color& color) :
myPosition (position),
myScale (scale),
@ -49,8 +47,6 @@ myInvMatrixUpdated(false)
}
////////////////////////////////////////////////////////////
/// Virtual destructor
////////////////////////////////////////////////////////////
Drawable::~Drawable()
{
@ -58,8 +54,6 @@ Drawable::~Drawable()
}
////////////////////////////////////////////////////////////
/// Set the position of the object (take 2 values)
////////////////////////////////////////////////////////////
void Drawable::SetPosition(float x, float y)
{
@ -68,8 +62,6 @@ void Drawable::SetPosition(float x, float y)
}
////////////////////////////////////////////////////////////
/// Set the position of the object (take a 2D vector)
////////////////////////////////////////////////////////////
void Drawable::SetPosition(const Vector2f& position)
{
@ -78,8 +70,6 @@ void Drawable::SetPosition(const Vector2f& position)
}
////////////////////////////////////////////////////////////
/// Set the X position of the object
////////////////////////////////////////////////////////////
void Drawable::SetX(float x)
{
@ -90,8 +80,6 @@ void Drawable::SetX(float x)
}
////////////////////////////////////////////////////////////
/// Set the Y position of the object
////////////////////////////////////////////////////////////
void Drawable::SetY(float y)
{
@ -102,8 +90,6 @@ void Drawable::SetY(float y)
}
////////////////////////////////////////////////////////////
/// Set the scale of the object (take 2 values)
////////////////////////////////////////////////////////////
void Drawable::SetScale(float factorX, float factorY)
{
@ -112,8 +98,6 @@ void Drawable::SetScale(float factorX, float factorY)
}
////////////////////////////////////////////////////////////
/// Set the scale of the object (take a 2D vector)
////////////////////////////////////////////////////////////
void Drawable::SetScale(const Vector2f& scale)
{
@ -122,8 +106,6 @@ void Drawable::SetScale(const Vector2f& scale)
}
////////////////////////////////////////////////////////////
/// Set the X scale factor of the object
////////////////////////////////////////////////////////////
void Drawable::SetScaleX(float factor)
{
@ -137,8 +119,6 @@ void Drawable::SetScaleX(float factor)
}
////////////////////////////////////////////////////////////
/// Set the Y scale factor of the object
////////////////////////////////////////////////////////////
void Drawable::SetScaleY(float factor)
{
@ -152,10 +132,6 @@ void Drawable::SetScaleY(float factor)
}
////////////////////////////////////////////////////////////
/// Set the local origin of the object, in coordinates relative to the
/// top-left of the object (take 2 values).
/// The default origin is (0, 0)
////////////////////////////////////////////////////////////
void Drawable::SetOrigin(float x, float y)
{
@ -167,10 +143,6 @@ void Drawable::SetOrigin(float x, float y)
}
////////////////////////////////////////////////////////////
/// Set the local origin of the object, in coordinates relative to the
/// top-left of the object (take a 2D vector).
/// The default origin is (0, 0)
////////////////////////////////////////////////////////////
void Drawable::SetOrigin(const Vector2f& origin)
{
@ -178,8 +150,6 @@ void Drawable::SetOrigin(const Vector2f& origin)
}
////////////////////////////////////////////////////////////
/// Set the orientation of the object
////////////////////////////////////////////////////////////
void Drawable::SetRotation(float angle)
{
@ -192,9 +162,6 @@ void Drawable::SetRotation(float angle)
}
////////////////////////////////////////////////////////////
/// Set the color of the object.
/// The default color is white
////////////////////////////////////////////////////////////
void Drawable::SetColor(const Color& color)
{
@ -202,9 +169,6 @@ void Drawable::SetColor(const Color& color)
}
////////////////////////////////////////////////////////////
/// Set the blending mode for the object.
/// The default blend mode is Blend::Alpha
////////////////////////////////////////////////////////////
void Drawable::SetBlendMode(Blend::Mode mode)
{
@ -212,8 +176,6 @@ void Drawable::SetBlendMode(Blend::Mode mode)
}
////////////////////////////////////////////////////////////
/// Get the position of the object
////////////////////////////////////////////////////////////
const Vector2f& Drawable::GetPosition() const
{
@ -221,8 +183,6 @@ const Vector2f& Drawable::GetPosition() const
}
////////////////////////////////////////////////////////////
/// Get the current scale of the object
////////////////////////////////////////////////////////////
const Vector2f& Drawable::GetScale() const
{
@ -230,8 +190,6 @@ const Vector2f& Drawable::GetScale() const
}
////////////////////////////////////////////////////////////
/// Get the origin of the object
////////////////////////////////////////////////////////////
const Vector2f& Drawable::GetOrigin() const
{
@ -239,8 +197,6 @@ const Vector2f& Drawable::GetOrigin() const
}
////////////////////////////////////////////////////////////
/// Get the orientation of the object
////////////////////////////////////////////////////////////
float Drawable::GetRotation() const
{
@ -248,8 +204,6 @@ float Drawable::GetRotation() const
}
////////////////////////////////////////////////////////////
/// Get the color of the object
////////////////////////////////////////////////////////////
const Color& Drawable::GetColor() const
{
@ -257,8 +211,6 @@ const Color& Drawable::GetColor() const
}
////////////////////////////////////////////////////////////
/// Get the current blending mode
////////////////////////////////////////////////////////////
Blend::Mode Drawable::GetBlendMode() const
{
@ -266,9 +218,6 @@ Blend::Mode Drawable::GetBlendMode() const
}
////////////////////////////////////////////////////////////
/// Move the object of a given offset (take 2 values)
///
////////////////////////////////////////////////////////////
void Drawable::Move(float offsetX, float offsetY)
{
@ -276,8 +225,6 @@ void Drawable::Move(float offsetX, float offsetY)
}
////////////////////////////////////////////////////////////
/// Move the object of a given offset (take a 2D vector)
////////////////////////////////////////////////////////////
void Drawable::Move(const Vector2f& offset)
{
@ -285,8 +232,6 @@ void Drawable::Move(const Vector2f& offset)
}
////////////////////////////////////////////////////////////
/// Scale the object (take 2 values)
////////////////////////////////////////////////////////////
void Drawable::Scale(float factorX, float factorY)
{
@ -294,8 +239,6 @@ void Drawable::Scale(float factorX, float factorY)
}
////////////////////////////////////////////////////////////
/// Scale the object (take a 2D vector)
////////////////////////////////////////////////////////////
void Drawable::Scale(const Vector2f& factor)
{
@ -303,8 +246,6 @@ void Drawable::Scale(const Vector2f& factor)
}
////////////////////////////////////////////////////////////
/// Rotate the object
////////////////////////////////////////////////////////////
void Drawable::Rotate(float angle)
{
@ -312,18 +253,13 @@ void Drawable::Rotate(float angle)
}
////////////////////////////////////////////////////////////
/// Transform a point from global coordinates into local coordinates
/// (ie it applies the inverse of object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
Vector2f Drawable::TransformToLocal(const Vector2f& point) const
{
return GetInverseMatrix().Transform(point);
}
////////////////////////////////////////////////////////////
/// Transform a point from local coordinates into global coordinates
/// (ie it applies the object's origin, translation, rotation and scale to the point)
////////////////////////////////////////////////////////////
Vector2f Drawable::TransformToGlobal(const Vector2f& point) const
{
@ -331,8 +267,6 @@ Vector2f Drawable::TransformToGlobal(const Vector2f& point) const
}
////////////////////////////////////////////////////////////
/// Get the transform matrix of the drawable
////////////////////////////////////////////////////////////
const Matrix3& Drawable::GetMatrix() const
{
@ -347,8 +281,6 @@ const Matrix3& Drawable::GetMatrix() const
}
////////////////////////////////////////////////////////////
/// Get the inverse transform matrix of the drawable
////////////////////////////////////////////////////////////
const Matrix3& Drawable::GetInverseMatrix() const
{
@ -363,8 +295,6 @@ const Matrix3& Drawable::GetInverseMatrix() const
}
////////////////////////////////////////////////////////////
/// Draw the object into the specified render target
////////////////////////////////////////////////////////////
void Drawable::Draw(RenderTarget& target, Renderer& renderer) const
{