![]() |
Blitz Support : |
From: Dirk Gregorius (dirk_at_[hidden])
Date: 2004-10-25 04:53:00
Thanx for the answer.
What about the affine transformations? What would be the most effective
solution to define some basic transformation matrices that than can
conviniently be composed?
-Dirk
----- Original Message -----
From: "Toby Walsh" <twalsh_at_[hidden]>
To: "Support list for Blitz++" <blitz-support_at_[hidden]>
Sent: Monday, October 25, 2004 5:51 AM
Subject: Re: [Blitz-support] Blitz++ in graphic application
> Hi Dirk,
>
> (1) I used Blitz++ for graphical stuff. There's no problem. I did stuff
> like vertices and indices stored in Arrays. You can then pass them to e.g.
> glVertexPointer etc by using the "data()" member function.
>
> (2) I did the math myself.
>
> (3) If you do use Blitz++ stuff to store all your data, you can wrap the
> data like I did - I typedef'd Array<..., 2> as Matrix (with the type as a
> suffix on Matrix like OpenGL does) and Array<..., 1> as Vector. Then you
> can change data representations later if you like.
>
> Toby
>
>
> At 03:19 PM 10/23/2004 +0200, you wrote:
>>Hi,
>>
>>in the coming semester I have to write a character animation system for a
>>small student project. I am wondering if I can use Blitz++ ( mainly
>>TinyVector and TinyMatrix ) for the affine transformations.
>>
>>1.) Did anybody used Blitz++ with OpenGL or DirectX? Are there any
>>problems passing a TinyMatrix<float, 4, 4> to one of the APIs?
>>
>>2.) Does Blitz++ support affine transformations? If not - how shall I
>>implement the basic transformations ( scale, rotation, translations, ... )
>>such that they can be concatenated efficently and can be written like
>>below. E. g.
>>
>>TinyMatrix<float, 4, 4> transform = translation( 0, 0, -3 ) * rotation_y
>>( 45 ) * translation( 0, 0, 3 );
>>
>>Can I write wrapper functions to implement the basic transformations or
>>should I better use the ListInitializer like in the transform example?
>>
>>3. ) I would be also nice to have support for some geometric objects like
>>lines, planes, boxes and so on? Would it be a good idea to implement them
>>on top of Blitz++? E.g.
>>
>>struct BBox
>>{
>> TinyVector3<float, 3> min, max;
>>}
>>
>>So the question is if Blitz++ is suited for a task like mine or if should
>>implement a small math library own my own that suits my needs.
>>
>>-Dirk
>>
>>
>>_______________________________________________
>>Blitz-support mailing list
>>Blitz-support_at_[hidden]
>>http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>
> Toby Walsh
> PhD Student
> School of Mechanical Engineering
> The University of Western Australia
> CRICOS provider no. 00126G
> Phone: +61 8 9488 3937
> Email: twalsh_at_[hidden]
>
>
> _______________________________________________
> Blitz-support mailing list
> Blitz-support_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support