30 std::vector<R3> result = {{length / 2.0, width / 2.0, z},
31 {-length / 2.0, width / 2.0, z},
32 {-length / 2.0, -width / 2.0, z},
33 {length / 2.0, -width / 2.0, z}};
42 double angle = i * delta_angle;
43 double x = r_x * std::cos(angle);
44 double y = r_y * std::sin(angle);
45 result[i] = R3(x, y, z);
63 std::vector<R3> result;
66 double angle = i * delta_angle;
67 double y = r_y * std::cos(angle);
68 double z = r_z * std::sin(angle) - z_b;
70 if (0 <= z && z <= (z_t - z_b)) {
71 result.push_back(R3(x, y, z));
74 double alpha_t = atan(z_t / sqrt(r_z * r_z - z_t * z_t) * r_z / r_y);
75 double alpha_b = atan(z_b / sqrt(r_z * r_z - z_b * z_b) * r_z / r_y);
77 double y_t = r_y * std::cos(alpha_t);
78 double y_b = r_y * std::cos(alpha_b);
80 result.push_back(R3(x, y_t, z_t - z_b));
81 result.push_back(R3(x, -y_t, z_t - z_b));
82 result.push_back(R3(x, y_b, 0));
83 result.push_back(R3(x, -y_b, 0));
std::vector< R3 > EllipseVerticesXtrunc(double x, double r_y, double r_z, double z_b, double z_t)
Generate vertices of centered vertical ellipse with given semi-axes at position x and truncation heig...
std::vector< R3 > EllipseVerticesZ(double r_x, double r_y, double z)
Generate vertices of centered horizontal ellipse with given semi-axes at height z.
std::vector< R3 > RectangleVertices(double length, double width, double z)
Helper functions to construct lists of vertices.
Defines interface IShape3D.
virtual std::vector< R3 > vertices() const
Retrieves a list of the vertices constituting this concrete shape.
std::vector< R3 > m_vertices
List of vertices initialized during construction.
static const size_t N_Circle