Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Simple Questions  (Read 1396 times)

0 Members and 1 Guest are viewing this topic.

BeautiCode

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Simple Questions
« 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.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Simple Questions
« Reply #1 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
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Simple Questions
« Reply #2 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.  ;)
SFML / OS X developer

BeautiCode

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Simple Questions
« Reply #3 on: November 24, 2014, 08:57:06 am »
Alright then, and thank you. :)