[gameprogrammer] Re: c++ template problem

  • From: Felde Norbert <fenor@xxxxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Tue, 21 Jul 2009 14:02:58 +0200

Now I have a template with T and N template parameter for type and dimension. This is the parent class for template classes that only have the T parameter, so I can implement the dimension specific things in theirs own class. I do not need the ... argument handling in the constructor because every class has its own, just the operator= has to be implemented in every subclass ( I think the copy construcor has to be too, but I did not made it yet).


As I see it works.

Thanks
fenor


Nicolas Goy írta:

On Jul 18, 2009, at 11:17 PM, Brian wrote:

This sounds like overkill. Most people use 2 vector types, 2D and 3D.

I agree, but don't forget 4D for homogeneous transformation.

Also, as the math is different (you can't cross product 2d vectors), it doesn't really make sense to have something generic.

My two cents

--
kuon
Crazy programmer Bear.
http://kuon.goyman.com


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html





---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: