This project is read-only.
1

Closed

Grid

description

Add a grid to the 3d view. Mimic what is seen in 3dsmax (see attached screenshot). Make colored axis lines for world axes (red, green, blue).
 
Update: The grid should be aware of the model size and adjust itself accordingly so that it's not either super-tiny or super-huge, in relation to the size of the model.

file attachments

Closed Aug 7, 2011 at 12:56 AM by adamkane
Nicely done!

comments

halfpint1170 wrote Jul 22, 2011 at 6:18 AM

Does unassigned mean anyone or wait until you assign?

adamkane wrote Jul 22, 2011 at 7:11 AM

@Halfpint: Yeah, only work on stuff that you're assigned to. But let me know if there are any unassigned things that you particularly want to work on. Thanks.

wrote Jul 23, 2011 at 6:01 AM

steve_hazen wrote Jul 23, 2011 at 4:01 PM

Would you like a grid that automatically changes line spacing as the camera position gets to certain distances (or FOV angles) from origin? (similar to 3ds max). I think this would be relatively easy if I use line primitives and include all possible line vertices in a single vertex buffer but only render the portion of the buffer that would coincide with a camera distance range and/or FOV.

adamkane wrote Jul 23, 2011 at 4:52 PM

@Steve: Your call. That does sound pretty good though. Thanks.

steve_hazen wrote Jul 23, 2011 at 7:05 PM

Added basic grid, will improve it by adding dynamic increment functionality soon.

Changed arcball instance modifier in ModelViewControl from 'private' to 'internal' so grid could have access to camera matrices for rendering. If you want to keep these private, we should either expose the view/proj to the project or register camera into service container (or other way) for access..

added grid instance and draw call to ModelViewControl class

halfpint1170 wrote Jul 23, 2011 at 7:11 PM

you would add your grid as im about to update my world axes... seems like the grid is conflicting with the world axes a little

adamkane wrote Jul 23, 2011 at 7:31 PM

@Steve: Go ahead and keep the arcball instance in ModelViewerControl as 'internal' or 'public'. Thanks.

steve_hazen wrote Jul 23, 2011 at 7:37 PM

@halfpint1170 hi Ronnie, did you get the world axes sorted out? if not, what are the symptoms?

steve_hazen wrote Jul 23, 2011 at 7:42 PM

looks like they are z-fighting. probably it would be best to merge these two tasks. I can make my center grid lines the proper color and simply add a 3rd axis. What do you think?

halfpint1170 wrote Jul 23, 2011 at 7:42 PM

ya i got it you updated yours as i was about to update mine. And so far I have been passing the camera into the draw functions as needed simply because I like that style vs having things accessed from other classes.

adamkane wrote Jul 24, 2011 at 9:36 PM

@Steve: This is a good idea: "I can make my center grid lines the proper color and simply add a 3rd axis.". Go for it. Thanks.

wrote Jul 24, 2011 at 9:39 PM

wrote Jul 24, 2011 at 9:41 PM

adamkane wrote Jul 26, 2011 at 3:27 PM

@Steve: Also, please add a menustrip item for: View > Grid. This should be a checked/unchecked toggle, which enables, disables the drawing of the grid. Thanks.

wrote Jul 26, 2011 at 11:40 PM

wrote Jul 28, 2011 at 10:18 PM

wrote Aug 2, 2011 at 11:12 PM

wrote Aug 3, 2011 at 12:53 AM

ScottLaForge wrote Aug 3, 2011 at 4:08 AM

The grid now adjusts to the model size.

wrote Aug 7, 2011 at 12:56 AM

wrote Feb 13, 2013 at 10:34 PM

wrote May 16, 2013 at 3:10 AM