ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/entity.h
(Generate patch)

Comparing libgender/entity.h (file contents):
Revision 1.31 by root, Thu Nov 4 04:46:58 2004 UTC vs.
Revision 1.32 by root, Sat Nov 6 00:44:50 2004 UTC

1#ifndef ENTITY_H 1#ifndef ENTITY_H
2#define ENTITY_H 2#define ENTITY_H
3 3
4#include <vector> 4#include <vector>
5 5
6#include <iostream>
6#include "opengl.h" 7#include "opengl.h"
7 8
8#include "util.h" 9#include "util.h"
9#include "oct.h" 10#include "oct.h"
10#include "view.h" 11#include "view.h"
85 void update (); 86 void update ();
86 void draw (view &ctx); 87 void draw (view &ctx);
87 geometry_sphere (material *m, GLfloat radius) : m(m), radius(radius) { update (); }; 88 geometry_sphere (material *m, GLfloat radius) : m(m), radius(radius) { update (); };
88}; 89};
89 90
91struct geometry_indexed_2d : geometry
92{
93 material *m;
94
95 GLenum type;
96
97 vertex_buffer vb;
98 index_buffer ib;
99
100 void draw (view &ctx);
101
102 template <typename vertex, typename index>
103 geometry_indexed_2d (material *m, GLenum type, const vector<vertex> &v, const vector<index> &i)
104 : m(m)
105 {
106 vb.set (v);
107 //ib.set (i);
108
109 //bbox.reset ();
110 //for (typename vector<vertex>::const_iterator i = v.begin () ; i != v.end (); ++i)
111 // bbox.add (i->v);
112 }
113
114};
115
90///////////////////////////////////////////////////////////////////////////// 116/////////////////////////////////////////////////////////////////////////////
91 117
92struct geometry_filter : geometry 118struct geometry_filter : geometry
93{ 119{
94protected: 120protected:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines