Point entity works. Default colours are sensible.
[Procustean.git] / src / TextShape.h
blob72d2b38be42059d1c93b1a92dff011de78b94eb0
2 #ifndef TEXT_SHAPE_H_DEFINED
3 #define TEXT_SHAPE_H_DEFINED
5 class TextShape : public Shape
7 std::string string_;
8 GFont::Ref font_;
9 float size_;
11 public:
13 TextShape(const std::string text, GFont::Ref font, float size = 0.1f);
16 virtual Shape::Type type() const;
18 virtual void render(class RenderDevice* rd,
19 const CoordinateFrame& cframe,
20 Color4 solidColor = Color4(.5,.5,0,.5),
21 Color4 wireColor = Color3::black());
23 /** Surface area of the outside of this object. */
24 virtual float area() const = 0;
26 /** Volume of the interior of this object. */
27 virtual float volume() const = 0;
29 /** Center of mass for this object. */
30 virtual Vector3 center() const = 0;
32 /** Bounding sphere of this object. */
33 virtual Sphere boundingSphere() const = 0;
35 /** Bounding axis aligned box of this object. */
36 virtual AABox boundingAABox() const = 0;
38 /** A point selected uniformly at random with respect to the
39 surface area of this object. Not available on the Plane or
40 Ray, which have infinite extent. The normal has unit length
41 and points out of the surface. */
42 virtual void getRandomSurfacePoint(Vector3& P,
43 Vector3& N = Vector3::dummy) const = 0;
45 /** A point selected uniformly at random with respect to the
46 volume of this object. Not available on objects with infinite
47 extent.*/
48 virtual Vector3 randomInteriorPoint() const = 0;
52 #endif