SFML community forums

Help => General => Topic started by: BeautiCode on November 24, 2014, 08:50:56 am

Title: Simple Questions
Post by: BeautiCode on November 24, 2014, 08:50:56 am
Hello, I thought that instead of making a new thread each time I'd just ask my simple questions on this thread and wait to see if someone checks it and answers it.
So for any future questions, I'll post it here.
Any ways,
What's the difference between getlocalbounds and getglobalbounds?
I really want to get a full understanding in the simplest terms possible.
Title: Re: Simple Questions
Post by: Hapax on November 24, 2014, 08:54:42 am
Quote
The function is named getGlobalBounds because it returns the bounding box of the entity in the global coordinates system, ie. with all its transformations (position, rotation, scale) applied.

There's another function that returns the bounding box of the entity in its local coordinates system (without transformations applied): getLocalBounds. This function can be used to get the initial size of an entity, for example, or to perform more specific calculations.
Source (http://sfml-dev.org/tutorials/2.1/graphics-transform.php#bounding-boxes)
Title: Re: Simple Questions
Post by: Hiura on November 24, 2014, 08:56:00 am
This will help you: https://github.com/SFML/SFML/wiki/FAQ#graphics-bounds

PS: Please, DO open a new thread for each question with a proper title. If someone has later the same question he/she can use a search engine easily to find it. Like you before posting your next question. It saves time for everybody.  ;)
Title: Re: Simple Questions
Post by: BeautiCode on November 24, 2014, 08:57:06 am
Alright then, and thank you. :)