Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: 3D Object Size (Vertices section of PLY file) Date: Mon, 30 Mar 1998 12:17:34 +0100 Organization: Intelligent Research Lines: 60 Message-ID: <351F7F4E.CD3FB3D4@hinge.mistral.co.uk> References: <6f9emu$f1o27@chuka.playstation.co.uk> <6fnrcc$6ne6@chuka.playstation.co.uk> NNTP-Posting-Host: 194.131.235.3 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.03 [en] (Win95; I) Steve Dunn wrote: > Think I've got it sussed, > To make a 'bounding collision box', > I've decided the best course of action > to get the object 'size' is > to poke around and come up with an x,y,z > size from the Vertices section of the > ply file associated with the particular > RSD file. > Though documentation sais the 'vertices' > section contains the X,Y,Z co-ords of > the vertices, one line for each vertex. > I have found that this is in fact > incorrect. > The format I've stumbled across is.. X, > Z, Y. > Try it for yourself. Create a > 200x200x50 cube,convert it, and look at > the vertices in the ply file. It is > definitely X,Z,Y. > > Anyway, more to point, is there a way to > get these dimensions from the resulting > .tmd file ? > > Additionally, I should point out that > this is all in aid of collision > detection. If anyone can turn me > around and kick me in the direction of a > nice sample with collision detection I'd > be very happy indeed. > > Any help appreciated. > > Steve Steve, the tmd member of a GsDOBJ2 structure points to the TMD objects header. It's structure is something like: typedef struct { SVECTOR *vertices; // pointer to an array with n_verts //elements with the vertex coords in it long n_verts; NORMAL *norms; long n_norms; PRIMITIVE *prims; long n_prims; long scale; } TMD_OBJECT; I may have got this in the wrong order as I've not got my machine here, but that's the contents of the structure... Craig.