X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=helper.c;fp=helper.c;h=68907c8f6f7b4d64007db1b77a6d73305615e2f8;hp=b13e8f9041b1a9dbe0c7785dc3f5c0cc13fd2ed1;hb=ae7da963e8c91eb4463b8c9f60d0b82c4a2155ce;hpb=ce19686e699c3fb014add29642c23ed17586fa88;ds=sidebyside diff --git a/helper.c b/helper.c index b13e8f9..68907c8 100644 --- a/helper.c +++ b/helper.c @@ -321,4 +321,21 @@ void drawAxisLines() { glDisable(GL_BLEND); glEnable(GL_LIGHTING); glEnable(GL_TEXTURE_2D); +} + +void addSceneObject(int id) { + // **NOTE: Currently only adds the teapot + + nObjects += 1; // New object in scene + + sceneObjs[nObjects].mesh = -1; + sceneObjs[nObjects].texture = -1; + sceneObjs[nObjects].x = 0; + sceneObjs[nObjects].y = 0; + sceneObjs[nObjects].z = 0; + + sceneObjs[nObjects].scale = (vector*)calloc( 3, sizeof(vector[0]) ); + + sceneObjs[nObjects].rotation.parameter = 0; + sceneObjs[nObjects].rotation.vect = (vector*)calloc( 3, sizeof(vector[0]) ); } \ No newline at end of file