From: Kejian Jin (kjin++at++CS.UCLA.EDU)
Date: 08/22/2002 08:07:04
I did not see any new geometry. In fact, I don't
want to see new geometry. I want the texture on
the surface. I think i may need to find out
all the coordinate of that particular node, or all
the polygon coordinates.
Is there any way to find out the polygon's coordinates
of a node? A list of coordinates describes
the polygon of that node. For example,
a particular node in wireframe is constructed
by several polygons. As long as i get the polygon
coord, it will be easy to map the texture on the polygon.
I don't know whether my approach is right or not.
Thanks.
ken
On Wed, 21 Aug 2002, Yair Kurzion wrote:
> Hello Ken !
>
> Do you see any new geometry (un-textured) on the screen ?
> If you see no new geometry, then you may have a bounding box/sphere problem.
> Try getting and printing the bounding sphere of your new geode.
>
> Otherwise, you probably have some graphic state problem. You try replacing
> your geode generating code with the function:
>
> build_box
>
> from the sample code:
>
> /usr/share/Performer/src/pguide/libpf/C/deleteTBox.c
>
> The function build_box creates a simple textured box and places it under a
> geode - much like what you are trying to do. I think texture.C is too condensed
> and may not be very easy to re-use.
>
> -yair
>
>
> >
> > Hi, performer,
> > I have problems in mapping a texture on the surface of an object.
> > I am doing the following, but it does not work.
> >
> > For example, I have a node named cup
> > Step1: pfNode* node = somedcs->find("cup", pfNode::getClassType());
> > Step2: then, I create geode node with all the texture and geoset.
> > geostate
> > some thing like that, gstate is the texture state, i have set it
> > according to texture.C in example.
> > gset->setGState(gstate);
> > pfGeode *geode1 = new pfGeode;
> > geode1->addGSet(gset);
> >
> > step3.
> > I add geode1 as a child of the "cup" node
> > node->addChild(geode1)
> > I don't know why the texture is not mapped on the surface of that cup.
> >
> > Could anyone help? Thank you very much in advance.
> >
> > ken
> >
> >
> > -----------------------------------------------------------------------
> > List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
> > -----------------------------------------------------------------------
> >
>
>
> --
> \_________ \_____ \__ \__ \_____
> \_________ \_____ \__ \__ \_____ Yair Kurzion
> \__ \__ \____\__ \__ yair++at++sgi.com
> \__ \__ \__ (650) 933-6502
> \__ \__ \__
> \__ \__ \__
>
This archive was generated by hypermail 2b29 : Thu Aug 22 2002 - 08:07:12 PDT