Brian Furtaw (brian++at++sgi.com)
Tue, 10 Dec 1996 14:00:16 -0500
Brian
On Dec 10, 1:47pm, Yann Andenmatten wrote:
> Subject: colors problem
> Hello,
>
> I've a problem (certainly easy) that I cannot solve.
>
> I work on a perfly-based application. I've different textured objects
> in a scene, and I want to add an axis system with one color by axis.
> I can see the colors only if I turn the lighting off.
>
> Does it exist a parameter so that my lines (witch should be green, blue
> and red) doesn't appear in white ? (it doesn't seem to be a highlighting
> problem)
>
> Thanks for help
>
> Yann Andenmatten
>
>
> PS : here's my code :
>
> // coordinate system
> axisX = new pfGeoSet();
> axisY = new pfGeoSet();
> axisZ = new pfGeoSet();
>
> /* Define the type of pfGeoSet */
> axisX->setPrimType(PFGS_LINES);
> axisY->setPrimType(PFGS_LINES);
> axisZ->setPrimType(PFGS_LINES);
>
> /* Set the coord of the lines */
> axisX->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, axisXcoord, NULL);
> axisY->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, axisYcoord, NULL);
> axisZ->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, axisZcoord, NULL);
>
> /* Set the color of the lines */
> axisX->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, axisXColor, NULL);
> axisY->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, axisYColor, NULL);
> axisZ->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, axisZColor, NULL);
>
> /* Set the number of lines in the pfGeoSet */
> axisX->setNumPrims(1);
> axisY->setNumPrims(1);
> axisZ->setNumPrims(1);
>
> char buf1[16];
> sprintf(buf1, "coordSysObject\0");
> coordSys = new pfGeode;
> coordSys->addGSet(axisX);
> coordSys->addGSet(axisY);
> coordSys->addGSet(axisZ);
> coordSys->setName (buf1);
>
> char buf2[15];
> sprintf(buf2, "coordSysCoord\0");
> coordSysDCS = new pfDCS;
> coordSysDCS->addChild (coordSys);
> coordSysDCS->setName(buf2);
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [][][] [][] [][][] [] > Ecole Polytechnique Federale de Lausanne
> [] [] [] [] [] > Swiss Federal Institute of Technology
> [][] [][][] [][] [] >
> [] [] [] [] > Yann Andenmatten, +41.22 693.58.50
> [][][] [] [] [][][] > yandenmat++at++di.epfl.ch
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Yann Andenmatten
-- o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-oBrian Furtaw (brian++at++sgi.com) VisSim Technical Consultant 12200-G Plum Orchard Drive Office: (301)572-3293 Fax: (301)872-3293 Silver Spring, Maryland 20904 OpenGL/ImageVision/OpenInventor/Performer ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:08 PDT