> > Hi,
> >
> > I have loaded an object (*.wrl file) using the VRMLloader.
> > I got its geometry like this
> >
> > GeometryArray childGeom = (GeometryArray) childShape.getGeometry();
> > // where childShape is its Shape3D
> >
> > Now in the VRML file I can see that the color of the object is
> > set for all its vertices.
> >
> > So, I want to access that array of colors for all its vertices.
> >
> > I tried to do this ...
> >
> > int vertexCount = childGeom.getVertexCount();
> > int initialColorIndex = childGeom.getInitialColorIndex();
> >
> The getInitialColorIndex() call is only valid for geometry created by
> reference. The current loader does not load by reference as it was
> written before by-ref existed.
> Check the value of initialColorIndex. You may find its not what ya want
> which is 0 if you want all the color values.
******* yes, I set it to 0, but still it says that there r no colors ??
> > Color3f[] colors = new Color3f[vertexCount];
> >
> > childGeom.getColors(initialColorIndex, colors);
> >
> > // but then I get an error here saying that there r no colors
> > // so then what happened to the colors that were in the VRML
> > // file. How can I get those colors ??
> > // in case the VRML file does not have any vertex color data
> > // then how can I do an initial check for that, ie whether
> > // there is Color3f[] data or not ??
> >
>
> We will be releasing an update to the loader in the near future(Shooting
> for April 20th). It will be available here when ready:
> www.web3d.org/TaskGroups/source/xj3d.html
>
> --
> Alan Hudson
> President: Yumetech, Inc. http://www.yumetech.com/
> Web3D Open Source Chair http://www.web3d.org/TaskGroups/source/
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
Tina Manoharan
I can see the light at the end of the tunnel. Yeah! I am getting there.
Work: Home:
------ ------
Heriot Watt University , PhD 89 Lothian Road
Dept. of Computing & Electrical Eng. Flat: 3f1
Riccarton, Edinburgh EH14 4AS Edinburgh EH3 9AW
Ph: 0131 449 5111 ext. 4197 (lab) Ph: 07801 069485 (mobile)
Ph: 0131 449 5111 ext. 4191 (office) Ph: 07740 959483 (mobile)
Ph: 0044 131 477 9043
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".