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 - kkray

Pages: [1]
1
Graphics / Chain of transformation, how to?
« on: January 03, 2011, 05:01:52 pm »
Oh, it's great! How soon? :)

2
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 11:40:16 pm »
I want sf::Sprite::SetMatrix :D

3
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 11:38:06 pm »
Oh noooo... :'(
What should I do?
I realy, realy need chain of transformations for sprites.

4
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 11:24:49 pm »
Hm.... I was going to inherit my class from sf::Drawable :)
In any case, I am going to try :)

5
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 10:59:32 pm »
Ok, thanks for answer :)
I'm going to write SpriteExt class with modified Move, Rotate, etc. methods, which will accumulate transformation, and in virtual draw method will use them as a chain. Most likely I will not write methods like GetPosition, becouse it will be hard work, and I dont need these methods for my task.

Should I expect some troubles between my SpriteExt and base SFMP-API ?

6
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 10:36:00 pm »

7
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 08:55:57 pm »
Quote from: "Laurent"
Quote
Also, I cant find a way to draw a quad from texture to quad on screen. It's impossible too?

Can't you do this with a sprite?


I cant, because I want to get rectangle from texture, and draw a quad(!), not rectangle.

(0,0),(w,0),(w,h),(0,h) --> (1,2),(3,4),(5,6),(7,8) for example. I want to get a way to render rects from texture to ANY quad on screen. This feature + vectors + matrixes = PROFIT! :)

And I dont want to write my own render-method, OGL is not my love :)

8
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 08:06:02 pm »
Try to call scale, rotate and scale again. Only one scale works. Order of command also doesnt matter :(

spr.Rotate and then spr.Scale are not equal to "rotate and THEN scale".

9
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 07:44:54 pm »
Quote from: "Groogy"
Sprite's don't affect the original image, they are just a set of values that will be used when it's protected sf::Drawable::Render method is called. So they don't do anything until the sprite is actually being drawn.

Yes, I know. So what? I dont understand you.

10
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 07:36:34 pm »
By the way, first time when I saw Sprote::Move, Rotate and Scale methods I thought that code like this:
Code: [Select]
spr.Scale( sx1,sy1 );
spr.Rotate( ang1 );
spr.Scale( sx2,sy2 );

means something like this:
Scale sprite, THEN rotate it and THEN scale it again. This would be wonderful :(

11
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 07:21:06 pm »
Oh.. I'm sorry to hear it.
Also, I cant find a way to draw a quad from texture to quad on screen. It's impossible too? :(

PopCapFramework has a best draw-function I've ever seen -- DrawImageTransform( TransfromMatrix ) where TransfromMatrix can be produced from other matrixes, and matrix-class has functions like "translate","scale","rotate". Do you plan to implement functions like this?

Or, maybe, just Quad-class with tex-coords, scr-coords, texture, z-buffer for vertices, colors and so on? So that we coold fill vertext data by mulitplication point-vectors on matrix.

12
Graphics / Chain of transformation, how to?
« on: January 02, 2011, 06:09:12 pm »
Hello everybody.

In my project I need to apply chain of transformation for object.
For example I need, in order:
1. scale
2. rotate
3. move
4. scale (AGAIN!)
5. rotate
6. move
...
n. scale
n+1. rotate
n+2. move
n+3. draw to the screen

I need this, becuse I have an hierarchy of objects, like a tree. And if parent moves, then all of childs must move too. The same for scaling, rotating and so on.

I found sf::Matrix3 class, which can be built from transformations and can be multiplied with other matrixes, but I don't understand how to apply my result matrix to the sprite.

Can you help me? What the best way to do it?

Pages: [1]
anything