]> git.mxchange.org Git - simgear.git/blob - simgear/screen/ssgEntityArray.hxx
Use function argument in va_start instead of local variable.
[simgear.git] / simgear / screen / ssgEntityArray.hxx
1 #ifndef _SSG_ENTITY_ARRAY_HXX
2 #define _SSG_ENTITY_ARRAY_HXX
3
4 #ifdef HAVE_CONFIG_H
5 #  include <simgear_config.h>
6 #endif
7
8 #include <plib/ssg.h>
9
10
11 class ssgEntityArray : public ssgEntity
12 {
13     // The replicated child
14     ssgEntity *model ;
15
16     // The one transformation node
17     ssgTransform *pos;
18
19     // The list of locations and orientations
20     ssgVertexArray *locations;
21     ssgVertexArray *orientations;
22
23 protected:
24
25     virtual void copy_from ( ssgEntityArray *src, int clone_flags ) ;
26
27 public:
28
29     virtual void zeroSpareRecursive ();
30
31     virtual ssgBase *clone ( int clone_flags = 0 ) ;
32     ssgEntityArray (void) ;
33     virtual ~ssgEntityArray (void) ;
34
35     ssgEntity *getModel () const { return model ; }
36     void setModel        ( ssgEntity *entity ) { model = entity; }
37     void removeModel     () ;
38     void replaceModel    ( ssgEntity *new_entity ) ;
39
40     ssgVertexArray *getLocations () const { return locations; }
41     ssgVertexArray *getOrientations () const { return orientations; }
42
43     float *getLocation ( int i ) const { return locations->get( i ); }
44     float *getOrientation ( int i ) const { return orientations->get( i ); }
45     void addPlacement ( sgVec3 loc, sgVec3 orient );
46     virtual int getNumPlacements() const { return locations->getNum(); }
47     void removeAllPlacements();
48
49     ssgTransform *getPosTransform() { return pos; }
50
51     virtual const char *getTypeName(void) ;
52     virtual void cull          ( sgFrustum *f, sgMat4 m, int test_needed ) ;
53     virtual void isect         ( sgSphere  *s, sgMat4 m, int test_needed ) ;
54     virtual void hot           ( sgVec3     s, sgMat4 m, int test_needed ) ;
55     virtual void los           ( sgVec3     s, sgMat4 m, int test_needed ) ;
56     virtual void print         ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ;
57 #ifdef HAVE_PLIB_PSL
58     virtual void getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_vertices ) ;
59 #endif
60     virtual int load ( FILE *fd ) ;
61     virtual int save ( FILE *fd ) ;
62     virtual void recalcBSphere () ;
63 } ;
64
65
66 #endif // _SSG_ENTITY_ARRAY_HXX