[X3D-Public] update index in XED xhtml

Felipe Bordeu Weldt felipe.bordeu at ec-nantes.fr
Sat Nov 17 02:37:53 PST 2012


I found the function that normally does what I am looking for. From the book "X3D , Extensible 3D Graphics for web Authors" from Don Brutzman & Leonard Daly. Page 359:

"Nevertheless, an additional set_index field with accessType inputOnly is also
provided so that index values might be changed at runtime and the geometry can be
animated"

But how do I access to this field from javascript? 

Thanks. 
Felipe


Le 14 nov. 2012 à 13:26, Felipe Bordeu a écrit :

> hi everybody,
> 
> I'm trying to setup a X3D context (in a xhtml page) with points and index generated from a javascript.
> 
> the X3D part of my xhtml webpage is very simple
> 
> <X3D  xmlns='http://www.web3d.org/specifications/x3d-namespace' id='someUniqueId' showStat='true' showLog='true' x='0px' y='0px' >
>  <Scene >
>    <Shape>
>      <IndexedTriangleSet id='PXDMFFACES' DEF='VTKindex0001' solid='false' ccw='true' index='0 1 3 0 2 4'>
>        <Coordinate id='PXDMFPOINTS' DEF='VTKcoordinates0001' point='0 0 0 1 0 0 0 1 0 0 0 1 1 1 1'/>
>      </IndexedTriangleSet>
>  </Shape>
> </Scene>
> 
> the, javascript I use this line to change the points:
> 
> document.getElementById('PXDMFPOINTS').setAttribute( "point", myGeometry );
> 
> this workt great.
> 
> but this line does not work.
> 
> document.getElementById('PXDMFFACES').setAttribute( "index", myTopology );
> 
> What is the correct way to update index of a shape from javascript
> 
> ps: using firefox16.0.2 in linux64
> 
> Thanks
> Felipe
> 
> -- 
> 
> Felipe Bordeu Weldt
> Ingénieur de Recherche
> -------------------------------------
> Tél. : 33 (0)2 40 37 16 57
> Fax. : 33 (0)2 40 74 74 06
> Felipe.Bordeu at ec-nantes.fr
> Institut GeM - UMR CNRS 6183
> École Centrale Nantes
> 1 Rue de La Noë, 44321 Nantes, FRANCE
> -------------------------------------
> 
> 
> _______________________________________________
> X3D-Public mailing list
> X3D-Public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

Felipe Bordeu Weldt
Ingénieur de Recherche
-------------------------------------
Tél. : 33 (0)2 40 37 16 57
Fax. : 33 (0)2 40 74 74 06
Felipe.Bordeu at ec-nantes.fr
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20121117/160c5f88/attachment.html>


More information about the X3D-Public mailing list