Path: chuka.playstation.co.uk!chuka.playstation.co.uk!news From: Developer Support Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: vertex access for collision detection Date: Mon, 22 Sep 1997 07:40:53 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 34 Message-ID: <342612F5.36EB@interactive.sony.com> References: NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Richard Malka wrote: > > Hi, > > I want to access rotated/translated (i.e. world coordinate) vertices of > objects for collision detection. As I see it, the rotation/translation > matrices for an object get applied when GsSortObject is called. This then > rotates the vertices and stores them in a packet ready to send to the GPU. > It is thus no use looking at the TMD data because that always remains > constant - it just describes the shape of the object in local coordinates. > > Do I then have to 'manualy' apply the matrix transforms on my TMD data to > obtain the rotated/translated positions of the vertices I need for > collision detection? This would be annoying because it means I'll have to > write code to emulate the hierachy of transforms that are done > automatically for me at the moment. It would be nice to be able to read > the rotated/translated vertices that are (I pressume) in the packet (that > has been processed by GsSortObject) ready to go to the GPU, but I don't > think this is possible because we don't know the GPU packet data format. > > Is this correct? What would be the best way to obtain the > rotated/translated (i.e. world coordinate) values of vertices for > collision detection. > > Thanks, > Richard Use GSGetLw, all you need to do is supply the coordinate system your using and it will give you the transformation matrix from local coorinates to world coordinates. Then just use ApplyMatrix on your vertices to get there new positions. Stuar