Rumba C++ SDK
MeshBuilder.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2020
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 #pragma once
16 
17 #include "Mesh.h"
18 
19  namespace maquina
20  {
22  {
23  public:
24  MeshBuilder();
25  MeshBuilder& lattice( int x_steps, int y_steps, int z_steps );
26  MeshBuilder& line(const Imath::V3f& v0, const Imath::V3f& v1);
27  MeshBuilder& polyline(const gsl::span<Imath::V3f>& positions, bool wrap = false );
28  MeshBuilder& triangle(const Imath::V3f& v0, const Imath::V3f& v1, const Imath::V3f& v2);
29  MeshBuilder& quad(const Imath::V3f& v0, const Imath::V3f& v1, const Imath::V3f& v2, const Imath::V3f& v3);
30  MeshBuilder& cube(int subdiv_x_axis, int subdiv_y_axis, int subdiv_z_axis);
31  MeshBuilder& cone(int subdiv_axis, float radius, float length);
32  MeshBuilder& cylinder(int subdiv_axis, float radius, float length, bool cap = true);
33  MeshBuilder& circle(int subdiv_axis, float radius);
34  MeshBuilder& sphere(int subdiv_axis, int subdiv_height, float radius);
35  MeshBuilder& torus(int subdiv_axis, int subdiv_height, float radius, float section_radius);
36  MeshBuilder& capsule(int subdiv_axis, int subdiv_height, float radius, float length);
37  MeshBuilder& color(float r, float g, float b);
38  MeshBuilder& red();
39  MeshBuilder& green();
40  MeshBuilder& blue();
41  MeshBuilder& ffooff();
42  MeshBuilder& translate(float x, float y, float z);
43  MeshBuilder& rotate(const Imath::V3f& axis, float angle);
44  MeshBuilder& scale(float x, float y, float z);
45  MeshBuilder& transform(const Imath::M44f& matrix);
46  MeshBuilder& push();
47  MeshBuilder& pop();
48  Mesh build();
49 
50  std::shared_ptr<Impl> _impl;
51  };
52  }
The y component of a vector value.
Definition: ImathFrame.h:42
The x component of a vector value.
Definition: ImathFrame.h:43
A mesh value.
Definition: Mesh.h:33
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
Definition: MeshBuilder.h:21
#define MAQUINA_EXPORT
Definition: Export.h:31
Box< Vec3< S > > transform(const Box< Vec3< S > > &box, const Matrix44< T > &m)
Definition: ImathBoxAlgo.h:158
The z component of a vector value.
std::shared_ptr< Impl > _impl
Definition: MeshBuilder.h:50