Improved the API documentation of sf::View

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1263 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2009-11-04 16:04:18 +00:00
parent 0f8b8d6c0f
commit 5d778b2bc4
3 changed files with 161 additions and 100 deletions

View file

@ -31,9 +31,6 @@
namespace sf
{
////////////////////////////////////////////////////////////
/// Default constructor
/// Constructs a default view of (0, 0, 1000, 1000)
////////////////////////////////////////////////////////////
View::View() :
myCenter (),
mySize (),
@ -46,8 +43,6 @@ myNeedInvUpdate(true)
}
////////////////////////////////////////////////////////////
/// Construct the view from a rectangle
////////////////////////////////////////////////////////////
View::View(const FloatRect& rectangle) :
myCenter (),
@ -61,8 +56,6 @@ myNeedInvUpdate(true)
}
////////////////////////////////////////////////////////////
/// Construct the view from its center and size
////////////////////////////////////////////////////////////
View::View(const Vector2f& center, const Vector2f& size) :
myCenter (center),
@ -75,8 +68,6 @@ myNeedInvUpdate(true)
}
////////////////////////////////////////////////////////////
/// Change the center of the view
////////////////////////////////////////////////////////////
void View::SetCenter(float x, float y)
{
@ -87,8 +78,6 @@ void View::SetCenter(float x, float y)
}
////////////////////////////////////////////////////////////
/// Change the center of the view
////////////////////////////////////////////////////////////
void View::SetCenter(const Vector2f& center)
{
@ -96,8 +85,6 @@ void View::SetCenter(const Vector2f& center)
}
////////////////////////////////////////////////////////////
/// Change the size of the view
////////////////////////////////////////////////////////////
void View::SetSize(float width, float height)
{
@ -108,8 +95,6 @@ void View::SetSize(float width, float height)
}
////////////////////////////////////////////////////////////
/// Change the size of the view
////////////////////////////////////////////////////////////
void View::SetSize(const Vector2f& size)
{
@ -117,8 +102,6 @@ void View::SetSize(const Vector2f& size)
}
////////////////////////////////////////////////////////////
/// Set the angle of rotation of the view
////////////////////////////////////////////////////////////
void View::SetRotation(float angle)
{
@ -130,8 +113,6 @@ void View::SetRotation(float angle)
}
////////////////////////////////////////////////////////////
/// Set the target viewport
////////////////////////////////////////////////////////////
void View::SetViewport(const FloatRect& viewport)
{
@ -139,20 +120,17 @@ void View::SetViewport(const FloatRect& viewport)
}
////////////////////////////////////////////////////////////
/// Reset the view to the given rectangle
////////////////////////////////////////////////////////////
void View::Reset(const FloatRect& rectangle)
{
myCenter = rectangle.GetCenter();
mySize = rectangle.GetSize();
myRotation = 0;
myNeedUpdate = true;
myNeedInvUpdate = true;
}
////////////////////////////////////////////////////////////
/// Get the center of the view
////////////////////////////////////////////////////////////
const Vector2f& View::GetCenter() const
{
@ -160,8 +138,6 @@ const Vector2f& View::GetCenter() const
}
////////////////////////////////////////////////////////////
/// Get the size of the view
////////////////////////////////////////////////////////////
const Vector2f& View::GetSize() const
{
@ -169,8 +145,6 @@ const Vector2f& View::GetSize() const
}
////////////////////////////////////////////////////////////
/// Get the current rotation
////////////////////////////////////////////////////////////
float View::GetRotation() const
{
@ -178,8 +152,6 @@ float View::GetRotation() const
}
////////////////////////////////////////////////////////////
/// Get the target viewport
////////////////////////////////////////////////////////////
const FloatRect& View::GetViewport() const
{
@ -187,8 +159,6 @@ const FloatRect& View::GetViewport() const
}
////////////////////////////////////////////////////////////
/// Move the view
////////////////////////////////////////////////////////////
void View::Move(float offsetX, float offsetY)
{
@ -196,8 +166,6 @@ void View::Move(float offsetX, float offsetY)
}
////////////////////////////////////////////////////////////
/// Move the view
////////////////////////////////////////////////////////////
void View::Move(const Vector2f& offset)
{
@ -205,8 +173,6 @@ void View::Move(const Vector2f& offset)
}
////////////////////////////////////////////////////////////
/// Rotate the view
////////////////////////////////////////////////////////////
void View::Rotate(float angle)
{
@ -214,8 +180,6 @@ void View::Rotate(float angle)
}
////////////////////////////////////////////////////////////
/// Resize the view rectangle to simulate a zoom / unzoom effect
////////////////////////////////////////////////////////////
void View::Zoom(float factor)
{
@ -223,8 +187,6 @@ void View::Zoom(float factor)
}
////////////////////////////////////////////////////////////
/// Get the projection matrix of the view
////////////////////////////////////////////////////////////
const Matrix3& View::GetMatrix() const
{
@ -239,8 +201,6 @@ const Matrix3& View::GetMatrix() const
}
////////////////////////////////////////////////////////////
/// Get the inverse projection matrix of the view
////////////////////////////////////////////////////////////
const Matrix3& View::GetInverseMatrix() const
{