le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
bset.h
Go to the documentation of this file.
1 
33 #ifndef LE_BSET_H
34 #define LE_BSET_H
35 
36 #include "global.h"
37 #include "config.h"
38 
39 #include "color.h"
40 #include "geometry.h"
41 
42 /*****************************************************************************/
43 typedef enum {
44  LE_BSET_EXIST = 0x01,
46 
47 /*****************************************************************************/
52 class LeBSet
53 {
54 public:
55  LeBSet();
56  LeBSet(int noBillboards);
57  ~LeBSet();
58 
59  void shadowCopy(LeBSet * copy) const;
60  void copy(LeBSet * copy) const;
61 
62  void basic();
63  void clear();
64 
65  void allocate(int noBillboards);
66  void deallocate();
67 
68  void transform(const LeMatrix &matrix);
69  void setMatrix(const LeMatrix &matrix);
70  void updateMatrix();
71 
72 // Overall positioning
78 // Static billboards data
80  float * sizes;
82  int * texSlots;
83  int * flags;
87 // Computed billboards data
89  bool allocated;
90 };
91 
92 #endif // LE_BSET_H
LeBSet()
Definition: bset.cpp:39
LeVertex scale
Definition: bset.h:75
void allocate(int noBillboards)
Allocate billboard set memory.
Definition: bset.cpp:144
void shadowCopy(LeBSet *copy) const
Duplicate the billboard set without copying its static data.
Definition: bset.cpp:78
float * sizes
Definition: bset.h:80
LightEngine 3D: General engine configuration file.
LightEngine 3D: Global helpers and definitions.
int * texSlots
Definition: bset.h:82
LeColor * shades
Definition: bset.h:88
void transform(const LeMatrix &matrix)
Apply a transformation matrix to the billboard set view matrix.
Definition: bset.cpp:190
void clear()
Clear the billboards flags.
Definition: bset.cpp:132
Represent an RGBA color.
Definition: color.h:42
void setMatrix(const LeMatrix &matrix)
Set the billboard set view matrix.
Definition: bset.cpp:201
int noBillboards
Definition: bset.h:85
Represent a vertex in 3D space.
Definition: geometry_scalar.h:46
Represent a 4x4 matrix to handle 3D transforms.
Definition: geometry_scalar.h:346
void updateMatrix()
Update the billboard set view matrix with position, scaling and angle vectors.
Definition: bset.cpp:210
LightEngine 3D: Color implementation.
int * flags
Definition: bset.h:83
~LeBSet()
Definition: bset.cpp:67
void copy(LeBSet *copy) const
Duplicate the billboard set.
Definition: bset.cpp:99
LE_BSET_FLAGS
Definition: bset.h:43
bool allocated
Definition: bset.h:89
LeVertex * places
Definition: bset.h:79
LeMatrix view
Definition: bset.h:73
Definition: bset.h:44
LightEngine 3D: Vertex / axis / plane / matrix objects.
LeVertex angle
Definition: bset.h:76
LeColor * colors
Definition: bset.h:81
void basic()
Set a basic configuration for the billboards.
Definition: bset.cpp:117
Contain and manage a billboard set.
Definition: bset.h:52
LeVertex pos
Definition: bset.h:74
void deallocate()
Deallocate billboard set memory.
Definition: bset.cpp:162