1 module armos.graphics.entity;
2 
3 import armos.graphics;
4 
5 /++
6 +/
7 class Entity {
8     public{
9         ///
10         Entity draw(in PolyRenderMode renderMode){
11             _material.begin;
12             armos.graphics.currentRenderer.draw(_mesh, renderMode, true, true, true);
13             _material.end;
14             return this;
15         };
16         
17         ///
18         Entity draw(){
19             draw(currentStyle.polyRenderMode);
20             return this;
21         };
22         
23         /++
24             entityをワイヤフレームで描画します.
25         +/
26         Entity drawWireFrame(){
27             draw(armos.graphics.PolyRenderMode.WireFrame);
28             return this;
29         };
30 
31         /++
32             entityの頂点を点で描画します.
33         +/
34         Entity drawVertices(){
35             draw(armos.graphics.PolyRenderMode.Points);
36             return this;
37         };
38 
39         /++
40             meshの面を塗りつぶして描画します.
41         +/
42         Entity drawFill(){
43             draw(armos.graphics.PolyRenderMode.Fill);
44             return this;
45         };
46         
47         ///
48         Entity mesh(armos.graphics.Mesh m){
49             _mesh = m;
50             return this;
51         }
52         
53         ///
54         Entity material(armos.graphics.Material m){
55             _material = m;
56             return this;
57         }
58         
59         ///
60         armos.graphics.Mesh mesh(){
61             return _mesh;
62         }
63         
64         ///
65         armos.graphics.Material material(){
66             return _material;
67         }
68     }//public
69 
70     private{
71         armos.graphics.Mesh _mesh;
72         armos.graphics.Material _material;
73     }//private
74 }//class Entity