(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
PovRay.h
1 #pragma once
2 #include<string>
3 #include<strstream>
4 
5 
9 namespace graphicPR
10 {
19  class PovRay
20  {
21  public:
22 
24  class Point
25  {
26  public:
27  float x, y, z;
28  Point(float X = 0, float Y = 0, float Z = 0) :x(X), y(Y), z(Z) {}
29  std::string ToString() const
30  {
31  std::strstream sls;
32  sls << "<" << x << "," << z << "," << y << ">" << '\0';
33  return sls.str();
34  }
35  };
36 
38  class Color
39  {
40  public:
41  float r, g, b;
42  Color(float R = 1, float G = 0, float B = 0) :r(R), g(G), b(B) {}
43  std::string ToString() const
44  {
45  std::strstream sls;
46  sls << "rgb<" << r << "," << g << "," << b << ">" << '\0';
47  return sls.str();
48  }
49  };
50 
52  PovRay(const std::string & strFileName);
53 
55  void AxisEd();
57  void AxisTg();
58 
60  void Pov_StartEd();
62  void Pov_StartTg();
64  void Pov_End();
66  void SaveToFile();
67 
68  void Box(Point pA, Point pB, Color c);
69  void Sphere(Point centre, float rayon, Color c);
70  void Cylinder(Point pA, Point pB, float rayon, Color c);
71  void FaceXY(Point pA, Point pB);
72  void FaceZ(Point pA, Point pB);
73  public:
78  Color CSurface;
79 
80  int xmin;
81  int ymax;
82  int zmin;
83  int xmax;
84  int zmax;
85  int ymin;
86  std::string fileNamePovRay;
87  std::strstream ss;
88  };
89 
90 }
void Pov_StartTg()
Script header for Tg elements.
Definition: PovRay.cpp:131
Point LocationCamera
Camera location in the scene.
Definition: PovRay.h:75
the script description of a point in POV-Ray
Definition: PovRay.h:24
the script description of a color in POV-Ray
Definition: PovRay.h:38
void Pov_End()
Script closure.
Definition: PovRay.cpp:78
Point CameraLookAt
Point observed by the Camera into the scene.
Definition: PovRay.h:77
void SaveToFile()
Save the script into the file.
Definition: PovRay.cpp:325
PovRay(const std::string &strFileName)
For a script description stored into the file named strFileName.
Definition: PovRay.cpp:13
void AxisEd()
Script for Axis creation for Ed elements.
Definition: PovRay.cpp:84
void Pov_StartEd()
Script header for Ed elements.
Definition: PovRay.cpp:21
void AxisTg()
Script for Axis creation for Tg elements.
Definition: PovRay.cpp:189
Definition: PovRay.cpp:11
Used to generate POV-Ray scripts to draw 3D descriptions of polyEd and polyTg objects.
Definition: PovRay.h:19