why .Net Matrix use float, but not double - DOTNET
This is a discussion on why .Net Matrix use float, but not double - DOTNET ; ..Net Matrix class use float to store data, and Graphics use it to map
points from logical to device.
My Geometry data is double , and when I use Graphics to draw them, I
have to translate. The effect is ...
-
why .Net Matrix use float, but not double
..Net Matrix class use float to store data, and Graphics use it to map
points from logical to device.
My Geometry data is double , and when I use Graphics to draw them, I
have to translate. The effect is not good as well when the data is too
big or too small. So I have to define my own Matrix class.
My question is : why .Net Matrix use float, but not double?
Thanks!
-
Re: why .Net Matrix use float, but not double
I am no expert at this, but my guess would be to reduce the amount of data
that is shifted around in with in the system where the system includes the
across the system bus. Considering that the majority of the processing is
carried out on the video card the data needs to be moved from system memory
to video memory. Now I am sure you would argue that GDI+ does not currently
have any or much hardware acceleration, but I guess the structures are
optimized for that eventuality.
--
Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor
"zade" <zhaohongchao> wrote in message
news:1177408497.259124.31970@r35g2000prh.googlegroups.com...
> .Net Matrix class use float to store data, and Graphics use it to map
> points from logical to device.
> My Geometry data is double , and when I use Graphics to draw them, I
> have to translate. The effect is not good as well when the data is too
> big or too small. So I have to define my own Matrix class.
> My question is : why .Net Matrix use float, but not double?
> Thanks!
>
-
Re: why .Net Matrix use float, but not double
I believe that at the time that the system was created floats were
considered as being enough and doubles had a performance hit for the
graphics cards that were _supposed_ to be accellerated for GDI+. At the end
of the day accelleration never materialised and GDI+ was never updated.
Even with floats however, the dimensions possible are impressive.
http://www.bobpowell.net/extents.htm
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"zade" <zhaohongchao> wrote in message
news:1177408497.259124.31970@r35g2000prh.googlegroups.com...
> .Net Matrix class use float to store data, and Graphics use it to map
> points from logical to device.
> My Geometry data is double , and when I use Graphics to draw them, I
> have to translate. The effect is not good as well when the data is too
> big or too small. So I have to define my own Matrix class.
> My question is : why .Net Matrix use float, but not double?
> Thanks!
>
Similar Threads
-
By Application Development in forum labview
Replies: 0
Last Post: 12-06-2007, 10:10 AM
-
By Application Development in forum c++
Replies: 1
Last Post: 06-08-2007, 02:51 PM
-
By Application Development in forum c++
Replies: 7
Last Post: 10-15-2006, 11:41 AM
-
By Application Development in forum Graphics
Replies: 19
Last Post: 10-04-2006, 02:44 PM
-
By Application Development in forum Java-Games
Replies: 2
Last Post: 02-21-2005, 02:07 AM