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

Author Topic: Vectors and scalar operators  (Read 30780 times)

0 Members and 3 Guests are viewing this topic.

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Vectors and scalar operators
« Reply #15 on: October 18, 2008, 04:58:07 pm »
ahh ok, who cares. i guess you wont get it. by the way, matrice classes would be nice but mostly useless in 2d applications.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Vectors and scalar operators
« Reply #16 on: October 19, 2008, 01:56:20 pm »
Quote from: "heishe"
ahh ok, who cares. i guess you wont get it.
Okay. I'm sure you are right, you must be right if you are debating like that... :roll:

Quote from: "heishe"
by the way, matrice classes would be nice but mostly useless in 2d applications.
Just because you never needed them? Okay, that is a really good reason.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

haydxn

  • Newbie
  • *
  • Posts: 5
    • View Profile
Vectors and scalar operators
« Reply #17 on: October 19, 2008, 02:36:24 pm »
Here's my take on it.

1) Prologue: I'm making no demands. I can take it as it is. I'm simply offering my personal/professional opinion.

2) If you do need things like dot product etc., you can program them yourself of course. But then you're going to have to either subclass Vector2f and use casts, or use public functions to perform the operations. Neither approach makes sensible use of OOP style; while I'm used to doing most of my coding in 'standard' C, when using a library designed to extensively use elegant classes, it seems a little jarring to not have it go all the way.

3) My personal feeling on this discussion is that arguments *against* putting functions in on the grounds of complexity are kinda redundant; there are currently no functions other than the mathematical operator overloads. What would there be to be scared of? Right now, the documentation doesn't even list those operators - if anything, that would be where the confusion comes from! [Going purely on the docs, Vector2f is nothing more than a 'Point' structure].

Anyway, that's my 3p. The point has been made already that libraries exist for this purpose. It's not a mathematical library, but the Vector classes do already do multiplication/addition etc.. already (some standard vector functions) I honestly see no valid argument against putting additional functions in other than that of priority (which is perfectly valid!).

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Vectors and scalar operators
« Reply #18 on: October 19, 2008, 03:31:51 pm »
Quote from: "Nexus"
Quote from: "heishe"
ahh ok, who cares. i guess you wont get it.
Okay. I'm sure you are right, you must be right if you are debating like that... :roll:

Quote from: "heishe"
by the way, matrice classes would be nice but mostly useless in 2d applications.
Just because you never needed them? Okay, that is a really good reason.


i already said what i had to say, theres no need to "debate" further. you get it or you dont.

and no, matrices classes would not be useless because I don't need them very often in 2d applications, but because almost nobody is going to need them . of course they would be a perfect addition, but laurent is better off using the time to implement that by implementing vector stuff which would actually be useful to most of sfml's users, who decide to go a little deeper with 2d (game-)programming.

by the way, i too, am not making demands. this is still on the suggestion level 8)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Vectors and scalar operators
« Reply #19 on: October 19, 2008, 10:42:55 pm »
Okay, sorry for misunderstanding you.

So I think we reached the end of the discussion... ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

blankthemuffin

  • Newbie
  • *
  • Posts: 1
    • View Profile
Vectors and scalar operators
« Reply #20 on: December 03, 2008, 10:08:39 pm »
In my opinion the Vector class is severely lacking, as others have mentioned. At the moment it may as well be a Point2 for the usefulness it provides. Vectors are an intrinsic part of 2D and 3D graphics and the argument that a newbie may be scared by a few extra member functions is extremely flawed. If a newbie is scared by vectors, no graphics library will ever hope to help them create things. As mentioned there is no great maths needed to be implemented, the entire additions could be restricted to

* Normalize ( Change to unit length )
* Dot product
* Cross product
* Norm (or length)

These things are not difficult to implement, nor are they difficult to understand, I myself have already added these functions my copy of DSFML in order to make use of the library. If this does not suit, the possibility of migrating this to a maths section of SFML, or even implementing an external mathematics library to handle the whole solution.

Things like n-dimensional vectors are largely useless with graphics related tasks, so I don't see why they're mentioned, however matrices are also useful, and this could also be added. At the moment I see the take on maths to be too newbie oriented, focusing on simplifying things they are going to have to learn anyway, rather than catering for more advanced users also.

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Vectors and scalar operators
« Reply #21 on: December 04, 2008, 09:12:49 am »
I totally agree that basic vector functionality should be added. Otherwise it should be renamed "Point" or "Coordinate", as "Vector" seems a little misleading for what it does..

 

anything