[GRASSLIST:9255] Re: 3D blocks again

Ing.Peter Misovic peter.misovic at gmail.com
Wed Nov 30 02:43:30 EST 2005


Hi Hamish.
In regard of blocks creating we have changed following :
float CubeVertices[8][3] = {
    {-1.0,-1.0,-1.0},
    {1.0,-1.0,-1.0},
    {1.0,1.0,-1.0},
    {-1.0,1.0,-1.0},
    {-1.0,-1.0,1.0},
    {1.0,-1.0,1.0},
    {1.0,1.0,1.0},
    {-1.0,1.0,1.0}
};

as

float CubeVertices[8][3] = {
    {-2.0,-2.0,-1.0},
    {2.0,-2.0,-1.0},
    {2.0,2.0,-1.0},
    {-2.0,2.0,-1.0},
    {-2.0,-2.0,1.0},
    {2.0,-2.0,1.0},
    {2.0,2.0,1.0},
    {-2.0,2.0,1.0}
};


And now it is ok .


Thank you,

Peto




On 11/16/05, Ing.Peter Misovic <peter.misovic at gmail.com> wrote:
> Hallo Hamish
>
> On 11/16/05, Hamish <hamish_nospam at yahoo.com> wrote:
> > > We got the answer with hint that only hacking NVIZ code is the right
> > > possible way how to add new symbol INTO NVIZ tool.
> > ..
> > > Where are the symbols from NVIZ ? In Mesa ?
> >
> > They are mostly in lib/ogsf/gsd_objs.c. I have just added cube and
> > wire-frame box objects in 6.1-cvs.
> >
> > If anyone wants to add more they are made by OpenGL calls, but it is
> > pretty simple to copy an existing one and modify the copy.
> > Edit visualization/nviz/scripts/panel_site.tcl to add to the menu.
> >
> > I also activated a 3D asterisk and gyroscope that were already defined
> > in the ogsf libs.
>
> great
>
> > (see attached image)
> >
> >
> > > In short : we compute some geostat. parameters for mining production.
> > > We split main mining unit into small minining units (500 000) - blocks
> > > (based on geostat computing). As I have already written, for every
> > > block X,Y,Z as coordinates of centroid are available; width, length
> > > and height are known. We only need generate those boxes and display
> > > them in 3D. Our main task is find - HOW TO - store them like 3D
> > > objects in PostGIS and import into GRASS - no way (as I know, but I
> > > hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
> > > for my question : Doeas gdal suport 3D GML objects ? etc. etc.
> >
> > Note the above NVIZ icons will probably not be of a known calibrated
> > scale and you will need to adjust until it looks right.
>
> Yes, OK.
>
> > If you want the boxes to be exactly the correct size (e.g. to use with
> > 3d rasters), you will have to follow the example Jachym posted for
> > defining 3D 'faces' using v.in.ascii.
>
> Yes that's what I want to test as first :)
>
> > The vector ascii format is described here:
> > http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass6/doc/vector/vector.html#ascii
> >
> > If you want the vector points' boxes to be semi-transparent, you will
> > have to learn a little OpenGL and edit gsd_objs.c by hand.
>
> OK.
>
> >
> >
> > Hamish
> >
>
>
> Thank you Hamish and Jachym, first of all I'm going to combine hints
> of you both. Nice day.
>
> Peter
>
>
>
> >
> >
>




More information about the grass-user mailing list