From: Andrew Preece (apreece++at++reading.sgi.com)
Date: 01/06/2000 03:52:46
Hi All,
I have a small test case here that creates a list of pfVec3's and then
requests
the array size once before the array is populated and once afterwards. The
first
request returns the correct size. The second request returns 0.
What have I done wrong ?
Andy.
#include <stdlib.h>
#include <stdio.h>
// Performer includes
#include <Performer/pf/pfChannel.h>
#include <Performer/pf/pfDCS.h>
#include <Performer/pf/pfLightSource.h>
#include <Performer/pf/pfGeode.h>
#include <Performer/pr/pfTexture.h>
#include <Performer/pr/pfGeoSet.h>
#include <Performer/pfutil.h>
#include <Performer/pfdu.h>
#include <Performer/pfui/pfiXformer.h>
int main (int argc, char *argv[])
{
pfInit() ;
pfConfig() ;
pfVec3 *verts = (pfVec3*) new(8*sizeof(pfVec3)) pfMemory;
fprintf( stderr, "Verts: %d.\n", pfGetSize( verts )) ;
verts[0].set(-3.0f, -3.0f, 3.0f);
fprintf( stderr, "Verts: %d.\n", pfGetSize( verts )) ;
verts[1].set( 3.0f, -3.0f, 3.0f);
verts[2].set( 3.0f, 3.0f, 3.0f);
verts[3].set(-3.0f, 3.0f, 3.0f);
verts[4].set(-3.0f, -3.0f, -3.0f);
verts[5].set( 3.0f, -3.0f, -3.0f);
verts[6].set( 3.0f, 3.0f, -3.0f);
verts[7].set(-3.0f, 3.0f, -3.0f);
}
Andy Preece
SGI Professional Services
Tel: (0118) 925 7061
Fax: (0118) 925 7569
mailto:apreece++at++reading.sgi.com
http://www.sgi.co.uk
This archive was generated by hypermail 2b29 : Thu Jan 06 2000 - 03:52:53 PST