21 const size_t IShape::N_Circle = 24;
30 std::vector<kvector_t> 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}};
39 static constexpr
double delta_angle = 2.0 * M_PI / IShape::N_Circle;
40 std::vector<kvector_t> result(IShape::N_Circle);
41 for (
size_t i = 0; i < IShape::N_Circle; ++i) {
42 double angle = i * delta_angle;
43 double x = r_x * std::cos(angle);
44 double y = r_y * std::sin(angle);
std::vector< kvector_t > RectangleVertices(double length, double width, double z)
Helper functions to construct lists of vertices.
std::vector< kvector_t > EllipseVertices(double r_x, double r_y, double z)
Generate vertices of centered ellipse with given semi-axes at height z.
Defines interface IShape.
std::vector< kvector_t > m_vertices
List of vertices initialized during construction.
virtual std::vector< kvector_t > vertices() const
Retrieves a list of the vertices constituting this concrete shape.