From: Tomlinson, Gordon (Gordon.Tomlinson++at++ca.com)
Date: 08/22/2002 08:41:33
HI
Look Manual pages and examples for the following
pfGetNumGSets
pfGetGSet
pfGeoSet
pfQueryGSet
PFQGSET_NUM_VERTS
pfGetGSetPrimType
pfGetGSetAttrLists
pfGetGSetAttrLists allows you to get the Normal's, Colors, Vertex coords and Texture coords
Regards
Gordon.
_________________________________________________________________
Gordon Tomlinson
Development Manager
Urban Simulation Products.
MultiGen-Paradigm
"a Computer Associates Company"
Suite 200, 16415 Addison Road, Addison, TX 75001 USA
Tel: 972 380 9798 ext 309 Fax: 972 380 9468
Email: gordon.tomlinson++at++ca.com
-----Original Message-----
From: Kejian Jin [mailto:kjin++at++cs.ucla.edu]
Sent: Thursday, August 22, 2002 10:07 AM
To: Yair Kurzion
Cc: info-performer++at++sgi.com
Subject: Re: [info-performer] how to do texture mapping on Scene graph
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
> \__ \__ \__
> \__ \__ \__
>
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Thu Aug 22 2002 - 08:41:49 PDT