SFML community forums
Help => Graphics => Topic started by: gsaurus on March 13, 2010, 12:56:47 pm
-
I think Rect should be part of the System package instead. It's an utility like Vector2/3 (and like other shapes and geometric concepts that I guess will come on SFML2, independent of the drawing stuff).
I'm using a model-view-controller approach, I use Rect on my model but I would like to keep model not linking to sfml-graphics :wink:
-
You don't have to link to sfml-graphics, sf::Rect is a template so its code is entirely included (nothing is compiled in sfml-graphics) :D
-
oh, I forgot that :lol:
I still think it makes more sense under System folder, but in practice it's irrelevant :wink:
-
I still think it makes more sense under System folder
I'm not sure, it's really related to the graphics module. In my opinion Vector2 would also be better in the graphics module, but it is too close to Vector3 which is used in the audio module, so I chose to gather them in the same module.
-
Well, it's related to Graphics on SFML, but users can use it for several purposes. Shapes and vectors are math concepts independent from display concepts, it's all about geometry.
For SFML and probably most applications using it, it isn't needed outside graphics stuff. But I use vector2 and 3 for everything on my logics that needs vectors, and may use other shapes (polygons will be of great use) in case you make them independent from drawable.
I understand that it's not the main purpose of them, but since it's there, and since they don't rely on graphics, they can be used outside for the most varied purposes.
-
I understand your point of view. I'll think about it later, I have some modifications to make to Rect and Vector classes anyway ;)
-
Btw, is sf::Rect going to be modified to include Width/Height instead of Right/Bottom? (discussion happened weeks before)
-
I still don't know. This is an option that I'll consider.