ultimatepp/uppdev/CtrlLibTest/Model.h
cxl 61e458d786 Syncing uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@599 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-11-05 08:55:40 +00:00

34 lines
No EOL
798 B
C++

class ModelMesh : public Moveable<ModelMesh>
{
public:
ModelMesh() : vboid(0), iboid(0) { }
bool Load(String file, VBOLibrary &lib, Point3f scale);
void Draw();
private:
bool alphasort;
GLuint vbo;
GLuint ibo;
void Scale(Vector<Vertex> &v, Vector<Vertex> &tri, Point3f scale)
};
class Billboard : public Moveable<Billboard>
{
public:
Billboard() : depth(0.0f), sz(1.0f), texture(0.0f) { }
void Set(Point3f position, float size, RGBA col, GLuint texture);
void SetDepth(Point3f camera_pos);
void DoState(GLuint last_texture);
operator>(const Billboard &b) const { return depth > b.depth; }
operator<(const Billboard &b) const { return depth < b.depth; }
private:
GLuint texture;
RGBA color;
float depth;
Point3f pos;
float sz;
};