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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - OldFangle

Pages: [1]
1
General / Re: Is " <T> " a convention always referring to Template?
« on: January 23, 2015, 08:20:41 am »
Thank you.
I'm new enough to both C++ and SFML that I don't always realise where I should first place a question about some code I don't understand.
Thanks for helping me.
OF

2
General / Is " <T> " a convention always referring to Template?
« on: January 22, 2015, 10:40:18 am »
Hi

Just to be clear on something as I read through my lessons: When Capital T (e.g. in <T> ) is used, is that an informal or even a formal 'reserved word' referring to Templates?

OF

3
General / Re: Need definition for Translate
« on: January 19, 2015, 09:20:23 am »
It sure has!  I'm glad to see some of that old math, I remember wondering at the time how I'd ever get a chance to use it.  It looked like fun at the time but the classroom wasn't and I forgot most of it due to daily un-use.  Forty years later, here we all are again.
I've been keeping this SFML textbook central, and as I come across something on which I'm unclear I head out to get more information on it.  That 'translate' thing was a special snag.  Thanks for taking the time.

Cheers
OF

4
General / Re: Need definition for Translate
« on: January 19, 2015, 08:52:35 am »
Thanks!

Yes, I tried 'Googling' it, using "C++ translate", I didn't recognise it as a Math feature.
The Wikipedia article at http://en.wikipedia.org/wiki/Translation_unit_%28programming%29  didn't lead to my sussing specifically that 'translate' means to move.  I saw scale(), rotate(), move(), mentioned elsewhere in the SFML documentation so I thought 'move' wasn't what translate() meant.

Anyway, thanks for the help!
OF

5
General / Re: Need definition for Translate
« on: January 19, 2015, 08:37:26 am »
Hi.  Thanks for writing.
Yes, this is one of the first things I found when I was looking for an explanation of what it is and what it does.
>>>
Transform& sf::Transform::translate(float x, float y)       

Combine the current transform with a translation.

This function returns a reference to *this, so that calls can be chained.
sf::Transform transform;
transform.translate(100, 200).rotate(45);

Parameters
    x   Offset to apply on X axis
    y   Offset to apply on Y axis

Returns
    Reference to *this

See also
    rotate, scale
<<<

So it's used when rotating and scaling, then.  If that's the explanation and there isn't any other, then thanks for pointing me back to this.  I guess the way to actually apply it will finally click for me when I've seen it used enough times that I can cross-reference the context(s) a little bit.

Thanks again
OF

6
General / Need definition for Translate
« on: January 19, 2015, 06:06:38 am »
Hi
I can't find the introductory definition for 'Translate' in the context of Transform.
I see many references to it, e.g.

          sf::Transform t;
          t.translate(10, 100);


But I'm not 'getting' it.  What does it do?  Does it add a value to a value, does it move something, is it needed for calculating other Transform functions such as rotate() or scale(), without which those functions could not work?  I started back at the main SFML page, opened every tutorial category until my search found the word, but even there, in the first mention of 'translate', I saw only a reference to it, not an actual explanation for it.

Thanks to whomever can bring me up to speed on this.
OF

Pages: [1]