Hi Everybody,

I am trying to extraxt vertices and indices 
from a Geometry into an Array and just cant 
get the clue, please somebody help me out, 
I guess its pretty simple:

NodePtr node;

NodeCorePtr core = node->getCore();

string type(core->getTypeName());

if (type == "Geometry") { // BTW: can I do this faster?
 
   GeometryPtr geo = GeometryPtr::dcast(core);

///???

// and now I am lost.
// where I want to get to is something like this:

int num_vertices;
float* vertices[];
geo->getVertices(num_vertices, vertices);

int num_indices;
int* indices[];
geo->getIndices(num_indices, indices);


How can I copy the 
vertex and index data from the Geometry 
into the two arrays? I guess something 
similar should happen when the opengl 
content is actually being drawn. But I 
cant find it. please help me. 

Thank You in Advance, Georg.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to