Click here to Skip to main content
15,888,121 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I need to draw a point in 3D using WPF. I am using class ScreenSpaceLines3D to draw a line in 3D, but I'm not able to draw point in 3D (while zooming). Can anybody help me? Some example code would be appreciated. :-)
Posted
Updated 24-Aug-11 21:25pm
v4
Comments
Sergey Alexandrovich Kryukov 24-Aug-11 13:54pm    
Not clear. By the way, size of a point is oxymoron. :-)
--SA
emsik 25-Aug-11 10:19am    
Sorry, I am just beginner looking for help. It is clear now? :-)

1 solution

 
Share this answer
 
Comments
emsik 24-Aug-11 16:10pm    
I already use that class, but I don't know and can't find how to modify it to "ScreenSpacePoints3D"?
Andrew Rissing 24-Aug-11 22:22pm    
Shooting from the hip here without actually trying, you could make the start/end points to be at the same. If that doesn't work, you might be better off making a sphere and just making it rather small. Just a few ideas.
emsik 25-Aug-11 3:39am    
I have tried both before posting of question. First, doesn't work. Second is possible but I don't know how to separately manage object (small cube/sphere) screen size while manipulating (zooming) of model. I have "points", "lines", areas and solids in model view, so I need constant "points" objects screen size, zoom only length of "lines" (I use ScreenSpaceLines3D for that) and use common zooming for areas and solids while model manipulating.

I found this
http://social.msdn.microsoft.com/Forums/en-SG/wpf/thread/07911e37-d291-42b8-a8c1-8383901dc702

but there is no source code.
Andrew Rissing 25-Aug-11 6:32am    
Well, you could tie into the event you're using to zoom and change the size of the sphere.

Or just leave it as is. Because if I zoomed in on a point, I would expect it to grow.
emsik 25-Aug-11 8:05am    
Hm, now you understand my problem and go through same ideas as I did :-) but:
1. How to get screen size of displayed object (say screen circle radius for sphere) and re-size object during zooming to have same screen size?
2. Is this idea good way with focus to performance, because I need to display thousands of "points" and other objects in 3D space?
3. Reason is that I want to draw some real solids and in addition to be able optionally draw wire-frame lines and also edges of solids, therefore I can't leave it. My "point" is not real size object, just geometric entity with its ID and three coordinates in space, but without dimension. I need just "dot" like 1pxl on screen to show user "there is a point/node N ID[x,y,z]"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900