tags:

views:

20

answers:

1

Is there a lockbits equivalent of 2d in 3d in Windows Presentation Foundation to get direct pixel access ?
I understand you can paint a triangle at a time: 3d for the threst of us.
Wouldn't it be easier to paint in cubes instead of triangles ? (I need to paint a stack of images such as an mri sequence).

+1  A: 

The WriteableBitmap class allows you to access the pixels, I'm a bit unsure what you want with regards to 3d but you should be able to use a WriteableBitmap as the texture for each item and position them in 3D as required. For creating a stack of images 3D Panel and FluidKit's ElementFlow might be of interest to you.

Triangles are used because 3 points always make a flat surface this makes shading simpler and predictable plus you can make any shape if you use enough triangles.

If by painting in cubes you mean tiny cubes similar to how you use pixels in 2D these are known as Voxels they have their use-cases but most hardware and software are designed with polygons in mind.

Kris
What I was looking for was actually something like a <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.texture3d.aspx">3dtexture</a> in wpf. But your response was still very helpful. Thanksfor the links.
Naveen