Hello,
I want to create an objects with texture coordinates indices. In fact I
have to transform a VRML file into OSG file.
In my VRML file I have:
Group { children [
Shape {
appearance USE bati
geometry IndexedFaceSet {
solid FALSE
creaseAngle 0.7
coordIndex [
0, 1, 2, -1,
3, 4, 5, -1,
6, 7, 8, -1,
9, 10, 11, -1,
12, 13, 14, -1,
15, 16, 17, -1,
18, 19, 20, -1,
]
...
My little program is:
osg::UIntArray* texIndices = new osg::UIntArray;
for (noFac = 0; noFac < nbFac; noFac++) {
texIndices->push_back(3*noFac);
texIndices->push_back(3*noFac+1);
texIndices->push_back(3*noFac+2);
geometry -> setTexCoordIndices(0,texIndices);
}
And in my OSG file I obtain:
TexCoordIndices 0 UIntArray 678 {
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19
20
}
The problem is that I don't obtain the good result for the OSG file, the
texture is badly mapped !!
What's the problem in my synax ? Do I use correctly the setTexCoordIndices
?
Thanx
DUSSEL Dorian
Stagiaire Alcatel Alenia Space
Master Pro Télédétection/ Imagerie numérique
Université Paul Sabatier TOULOUSE
This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error,
please delete it and immediately notify the sender. Any use not in accord
with its purpose, any dissemination or disclosure, either whole or partial,
is prohibited except formal approval. The internet can not guarantee the
integrity of this message. ALCATEL ALENIA SPACE (and its subsidiaries)
shall (will) not therefore be liable for the message if modified.
Ce message et toutes les pieces jointes (ci-apres le "message") sont
etablis a l'intention exclusive de ses destinataires et sont confidentiels.
Si vous recevez ce message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce message non conforme a
sa destination, toute diffusion ou toute publication, totale ou partielle,
est interdite, sauf autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, ALCATEL ALENIA SPACE (et ses filiales)
decline(nt) toute responsabilite au titre de ce message, dans l'hypothese
ou il aurait ete modifie.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/