Your message
To: [email protected]
Subject: Re: [Opensg-users] copy lines from a geometry
Sent: Wed, 8 Jun 2005 00:20:14 +1000
did not reach the following recipient(s):
c=AU;a= ;p=DSTO;o=SA1;dda:[EMAIL PROTECTED]; on Wed, 8 Jun 2005 00:21:08 +1000
The recipient name is not recognized
The MTS-ID of the original message is: c=au;a=
;p=dsto;l=EDNEX5010506071421J84PSVGG
MSEXCH:IMS:DSTO:SA1:EDNEX501 0 (000C05A6) Unknown Recipient
--- Begin Message ---
[email protected] schrieb am 07.06.05 15:35:16:
Hi Dirk,
>Hi Andi,
>
>On Tue, 2005-06-07 at 15:08 +0200, Andreas Brüning wrote:
>
> i have a geometry with a lot of lines. There are only lines. I loaded
> it from a vrml- file. I want to copy the points of every line in a
> multimap, so in the end, there are two points in every entry of the
> multimap. How can i get the points of every line? Can i get them with
> the primitiv- Iterator?
>Yup, only the PrimitiveIterator will give you lines. You need to find
>the Geometry Node with those lines first (either looking for the name or
>walking the tree, see 10loading.cpp) and then run a PrimtiveIterator on
>it. You can start with the following snippet (after testIterators.cpp):
>
>PrimitiveIterator pi;
>
>for ( pi = g->beginPrimitives(); pi != g->endPrimitives(); ++pi )
>{
>std::cerr << "Primitive " << pi.getIndex() << ": "
><< Geometry::mapType( pi.getType() ) << " with "
><< pi.getLength() << " points" << std::endl;
>for ( j = 0; j < pi.getLength(); j++ )
>{
>std::cerr << "Point " << j << ": " << pi.getPositionIndex( j )
><< ": " << pi.getPosition( j );
>}
>}
>
>If you find primitives of type 1,2 or 3 (GL_LINES, GL_LINE_LOOP,
>GL_LINE_STRIP), those are lines. How to interpret the points and how to
>split it into 2-point lines depends on the type, see an OpenGL book for
>that.
>
>Hope it helps
>
>Dirk
thanks for your quick help.
It works, but there is only one point: pi.getPostion(j); for each entry. Where
i can find the other? If i put the j- Point and the j+1 point together, i see
only the half of the modell. With the snippet, i found out, that there is one
primitive with lines and nearly 15000 points. When i check the vrml-
Modell(which i load), there are 15000 lines. Where i can find the other half?
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
<http://img.web.de/p.gif>
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: <http://f.web.de/?mc=021193>
http://f.web.de/?mc=021193
------------------------------------------------------- This SF.Net email is
sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast
can you ride your desk chair down the office luge track? If you want to score
the big prize, get to know the little guy. Play to win an NEC 61" plasma
display: http://www.necitguy.com/?r
_______________________________________________ Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
--- End Message ---