diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-01-12 01:00:56 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-01-12 01:00:56 +0100 |
commit | 91e4ffec239c198c9c4652dc50812165813fe79f (patch) | |
tree | 0f85ceedb3c2edac68ab34b8b5baaf903ce28935 /main.cpp | |
parent | bdce9a52170f1a3535c290a379e4cb9f509614ec (diff) | |
download | termgl-91e4ffec239c198c9c4652dc50812165813fe79f.tar.gz |
cObject3D should displaya wiremesh of Object composed of vectors
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 31 |
1 files changed, 27 insertions, 4 deletions
@@ -7,6 +7,7 @@ #include "cObject.h" #include "cObjectHandler.h" #include "cInput.h" +#include "cObject3D.h" #include "testobject.h" @@ -15,14 +16,14 @@ int main() cRender render(' ', _COL_DEFAULT, 30,30); cObjectHandler handler(&render); cObject ver(30,1); - testobject obj; + cObject3D obj(20,20); cInput input; - render.render(); + int iobj = handler.createObject((cObject*)&obj); - handler.moveObject(iobj, {10,10}, _MOVE_ABSOLUTE); + handler.moveObject(iobj, {40,10}, _MOVE_ABSOLUTE); ver.drawPoint('v', {0,0}, true, _COL_WHITE); ver.drawPoint(VERSION + 48, {1,0}, true, _COL_WHITE); @@ -32,7 +33,28 @@ int main() int iver = handler.createObject(&ver); handler.moveObject(iver, {0,0}, _MOVE_ABSOLUTE); - while(1) + /*obj.addVector({0,0,0}, {5,0,0}, '#', _COL_RED); + obj.addVector({5,0,0}, {0,5,0}, '#', _COL_RED); + obj.addVector({0,0,0}, {0,5,0}, '#', _COL_RED); + obj.addVector({0,5,0}, {5,0,0}, '#', _COL_RED);*/ + + obj.addVector({0,0,0}, {0,0,5}, '#', _COL_RED); + obj.addVector({5,0,0}, {0,0,5}, '#', _COL_RED); + obj.addVector({0,5,0}, {0,0,5}, '#', _COL_RED); + obj.addVector({5,5,0}, {0,0,5}, '#', _COL_RED); + + /*obj.addVector({0,0,5}, {5,0,0}, '#', _COL_RED); + obj.addVector({5,0,5}, {0,5,0}, '#', _COL_RED); + obj.addVector({0,0,5}, {0,5,0}, '#', _COL_RED); + obj.addVector({0,5,5}, {5,0,0}, '#', _COL_RED);*/ + + obj.write(); + + handler.write(); + render.render(); + + while(1); + /*while(1) { sInputEvent ie = input.poll(); if(ie.type != _EVENT_NULL) @@ -75,6 +97,7 @@ int main() usleep(10*1000); } } + */ /*cRender a(' ', _COL_DEFAULT, 20,20); cInput in; |