[gameprogrammer] Re: c++ template problem
- From: Roman Hwang <hwang.roman@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 21 Jul 2009 22:16:37 +0900
Hello.
I'm not a professional, but I think vectors must be as efficient and
optimized as possible.
And inheritance is too much in this case.
Thanks,
Roma
On Tue, Jul 21, 2009 at 9:02 PM, Felde Norbert<fenor@xxxxxxxxxxx> wrote:
> 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
>
>
>
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
Other related posts: