19 #ifndef OST_GFX_PRIM_LIST_HH
20 #define OST_GFX_PRIM_LIST_HH
26 #include <boost/shared_ptr.hpp>
33 namespace ost {
namespace gfx {
42 pos(p), rad(r), col(c) {}
48 typedef std::vector<PointEntry> PointEntryList;
52 pos1(p1), pos2(p2), radius_1(r1), radius_2(r2), col1(c1), col2(c2) {}
54 float radius_1, radius_2;
58 typedef std::vector<LineEntry> LineEntryList;
159 void AddMesh(
float* v,
float* n,
float* c,
size_t nv,
unsigned int* i,
size_t ni);
170 unsigned int sphere_detail_;
171 unsigned int arc_detail_;
175 std::vector<IndexedVertexArray> vas_;
177 void prep_simple_va();
Three dimensional vector class, using Real precision.
main class for all graphic objects
virtual geom::AlignedCuboid GetBoundingBox(bool use_tf=true) const
returns the bounding box of this object
virtual void CustomRenderPov(PovState &pov)
virtual void OnRenderModeChange()
void SetArcDetail(unsigned int d)
unsigned int GetSphereDetail() const
void AddSphere(const geom::Vec3 &cen, float rad, const Color &col)
add sphere
virtual void ProcessLimits(geom::Vec3 &minc, geom::Vec3 &maxc, const geom::Transform &tf) const
adjust minimum and maximum extent based on graphical object
void SetRadius(float r)
defunct
unsigned int GetArcDetail() const
void SetColor(const Color &c)
set global prims color, overriding individual ones
void AddPoint(const geom::Vec3 &p, const Color &col)
add point
void SetDiameter(float d)
defunct
void AddLine(const geom::Vec3 &p1, const geom::Vec3 &p2, const Color &col1, const Color &col2)
add line
void Clear()
clear all prims
virtual geom::Vec3 GetCenter() const
get center
virtual void CustomRenderGL(RenderPass pass)
void AddCyl(const geom::Vec3 &p0, const geom::Vec3 &p1, float r1, float r2, const Color &col1, const Color &col2)
add cylinder
void AddMesh(float *v, float *n, float *c, size_t nv, unsigned int *i, size_t ni)
add triangle mesh
void SetSphereDetail(unsigned int d)
void AddText(const std::string &text, const geom::Vec3 &pos, const Color &col, float point_size)
add text
virtual void CustomPreRenderGL(bool flag)
PrimList(const String &name)
create new prim list
virtual void SetLineWidth(float w)
set line width
#define DLLEXPORT_OST_GFX
std::vector< TextPrim > TextPrimList
std::vector< CylinderPrim > CylinderPrimList
std::vector< SpherePrim > SpherePrimList