From: goble AT kin DOT on DOT net (David. E. Goble) Newsgroups: comp.os.msdos.djgpp Subject: help - need to draw a room in 3D Date: Fri, 17 Sep 1999 05:38:48 GMT Sender: goble AT kin DOT on DOT net (David. E. Goble) Organization: Ecology Research Center X-Newsreader: Forte Free Agent 1.0.82 NNTP-Posting-Host: 150.101.7.198 Message-ID: <37e1e188@duster.adelaide.on.net> X-Trace: 17 Sep 1999 16:06:56 +0950, 150.101.7.198 Lines: 56 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi All; I need to write a 3d visualisation program to display a room with some objects in it. I have DJGPP...etc, but I am only running win 3.x, I need to use opengl. Iam waiting for my copy of win95. My question is how do I go about filling the edge/vertex/surface arrays of the room and objects, in the mean time. I have an idea of what the room will look like, I just do not know how to turn the objects in my head to the structures below :< Can anyone help? The structure of the edge/vertex/surface arrays would be typedef struc { double x; double y; double z; } point3d; typedef struc { point3d world; /* world co-ords */ point3d eye; /* eye co-ords */ point screen; /* screen co-ords */ } vertex3d; typedef struc { int mapindex; /* index to the surface */ int noofvertices; /* # of vertices forming the surface */ int depthindex; /* to find depth of surface */ int color; /* color of surface */ } surface; typedef struc { vertex3d vertex[NO_OF_VERTICES]; surface sinfo[NO_OF_SURFACE]; int map{NO_OF_SURFACE_VERTICES]; } object; object room; object table; object light; object bed; --Regards : David. E. Goble goble AT kin DOT on DOT net http://www-mugc.cc.monash.edu.au/~degob1/goble Po Box 648 Kingscote Kangaroo Island South Australia 5223