Page 1 of 1

Can't get vertices...

PostPosted: Sun Aug 19, 2012 9:49 am
by Sirius
Hi, I'm using PyHSPlasma to load and parse a PRP.
I've never worked with it before, so I'm just running it in Python's command line for now, and learning to retrieve the data from this PRP.
I've managed to correctly load a file, get the sceneobjects, get the draw interface for this sceneobject, find the icicle in the Drawables Spans, etc. So far, everything is fine.

Now, I would like to get the vertices from one of the plGBufferGroup. So, I try to use the getVertices() command of this plGBufferGroup, and there I have a problem.

From what I see in the source file from libHSPlasma at github, getVertices() take three arguments: the vertex group Idx, the start id, and the number of vertices (count).
So, if I set start to 0, and count to any number, it returns me every vertices from (start) until (end - count). Isn't this supposed to return vertices from (start) to (start+count) ? (at least that's what I believe when looking at the source file)
And if I try to set start to any non-null value, then the console prints something like "This application has requested the Runtime to end it in an unusual way" and crashes. I tried with two different PRPs but both crashes.

I believe I am doing something wrong, but can't figure out what...
Could someone help me ? Thanks in advance.

Re: Can't get vertices...

PostPosted: Sun Aug 26, 2012 6:39 pm
by Stucuk
I can't comment on PyHSPlasma but your likely going to want every vertex as you will need to use the index list/buffer/whatever to work out how to render the geometry.

Re: Can't get vertices...

PostPosted: Mon Aug 27, 2012 2:10 am
by Sirius
And that's exactly what I did since I needed to store vertices in a group of three for each face :) I wasn't yet sure about how I was going to get all the data, and having a function that might crash the script bothered me. Still, it works fine now, it just uses more memory since I am loading vertices I won't use.

Thanks for your reply !

Re: Can't get vertices...

PostPosted: Fri Aug 31, 2012 7:14 am
by Branan
Could you file this in the issue tracker for libHSPlasma please? https://github.com/H-uru/libhsplasma/issues/new

Re: Can't get vertices...

PostPosted: Sat Sep 01, 2012 9:15 am
by Sirius
Ok, I added it here.