Repository navigation
Expand file tree
/
Copy path3dweave.cpp
More file actions
66 lines (52 loc) · 1.3 KB
/
Copy path3dweave.cpp
File metadata and controls
66 lines (52 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include "../Core/PrecompiledHeaders.h"
#include "../Core/TexGen.h"
#ifdef USE_RENDERER
#include "../Renderer/PrecompiledHeaders.h"
#include "../Renderer/TexGenRenderer.h"
#endif
using namespace TexGen;
int main()
{
CTextileWeave3D Textile(8, 4, 5, 7);
Textile.AddYLayers(0, 1);
Textile.AddYLayers(2, 1);
Textile.AddYLayers(4, 1);
Textile.AddYLayers(6, 1);
Textile.AddXLayers();
Textile.AddYLayers();
Textile.AddXLayers();
Textile.AddYLayers();
Textile.AddXLayers();
Textile.AddYLayers();
Textile.PushUp(0, 0);
Textile.PushUp(1, 0);
Textile.PushDown(4, 0);
Textile.PushUp(7, 0);
Textile.PushUp(1, 1);
Textile.PushUp(2, 1);
Textile.PushUp(3, 1);
Textile.PushDown(6, 1);
Textile.PushDown(0, 2);
Textile.PushUp(3, 2);
Textile.PushUp(4, 2);
Textile.PushUp(5, 2);
Textile.PushDown(2, 3);
Textile.PushUp(5, 3);
Textile.PushUp(6, 3);
Textile.PushUp(7, 3);
Textile.SetYarnWidths(4);
Textile.SetYarnHeights(1);
//# Add the textile to our TexGen singleton
TEXGEN.AddTextile(Textile);
//# Create a domain and add it our TexGen singleton
Textile.AssignDefaultDomain();
#ifdef USE_RENDERER
//# Get and instance of the CTexGenRenderer to render the textile
CTexGenRenderer Renderer;
//# Render our textile
Renderer.RenderTextile();
// # Start rendering
Renderer.Start();
#endif
return 0;
};