1 #ifndef _SSG_ENTITY_ARRAY_HXX
2 #define _SSG_ENTITY_ARRAY_HXX
7 class ssgEntityArray : public ssgEntity
9 // The replicated child
12 // The one transformation node
15 // The list of locations and orientations
16 ssgVertexArray *locations;
17 ssgVertexArray *orientations;
21 virtual void copy_from ( ssgEntityArray *src, int clone_flags ) ;
25 virtual void zeroSpareRecursive ();
27 virtual ssgBase *clone ( int clone_flags = 0 ) ;
28 ssgEntityArray (void) ;
29 virtual ~ssgEntityArray (void) ;
31 ssgEntity *getModel () { return model ; }
32 void setModel ( ssgEntity *entity ) { model = entity; }
34 void replaceModel ( ssgEntity *new_entity ) ;
36 ssgVertexArray *getLocations () { return locations; }
37 ssgVertexArray *getOrientations () { return orientations; }
39 float *getLocation ( int i ) { return locations->get( i ); }
40 float *getOrientation ( int i ) { return orientations->get( i ); }
41 void addPlacement ( sgVec3 loc, sgVec3 orient );
42 virtual int getNumPlacements() { return locations->getNum(); }
43 void removeAllPlacements();
45 ssgTransform *getPosTransform() { return pos; }
47 virtual const char *getTypeName(void) ;
48 virtual void cull ( sgFrustum *f, sgMat4 m, int test_needed ) ;
49 virtual void isect ( sgSphere *s, sgMat4 m, int test_needed ) ;
50 virtual void hot ( sgVec3 s, sgMat4 m, int test_needed ) ;
51 virtual void los ( sgVec3 s, sgMat4 m, int test_needed ) ;
52 virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ;
53 virtual void getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_vertices ) ;
54 virtual int load ( FILE *fd ) ;
55 virtual int save ( FILE *fd ) ;
56 virtual void recalcBSphere () ;
60 #endif // _SSG_ENTITY_ARRAY_HXX