Re: [Plib-users] Vertex lists
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2000-03-24 20:57:18
|
Norman Vine wrote:
>
> vampman writes:
> >
> >How can get access to the vertex list from a ssgEntity?
> >
>
> ssgEntity *entity;
>
> if (entity->isAKindOf(ssgTypeLeaf()))
> {
> float *vertexList = ((ssgLeaf)entity)->getVertex(0);
> }
>
> You probably would be better off testing for ssgTypeVtxTable() ect
> but you should see the idea :)
Just to clarify, you really can't get a vertex list from an ssgEntity,
some ssgEntities are not geometric objects at all.
The most obvious example of an ssgEntity that doesn't have a vertex
list is an ssgBranch - but I've been thinking of creating a node type
that uses OpenAL to do spatialised 3D audio in an SSG scene graph for
example.
First you have to have an ssgLeaf of some kind. Norman's code
(above) checks that first - which is good.
--
Steve Baker http://web2.airmail.net/sjbaker1
sjb...@ai... (home) http://www.woodsoup.org/~sbaker
sj...@ht... (work)
|