Path: chuka.playstation.co.uk!news From: Robert Swan Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: What is a normal? Date: Mon, 17 Aug 1998 08:20:15 +0100 Organization: I wish! Lines: 23 Message-ID: <35D7D9AF.290D@mdx.ac.uk> References: <35D3F965.D5D79825@nospam.easynet.co.uk> <35D402A6.8830674@parny.force9.co.uk> <01bdc76a$e03e9320$230b0a0a@Angela1.intelligent-group.com> <35D42CF4.A08257E5@ndirect.co.uk> <35D43084.7E98EFAA@nospam.easynet.co.uk> <35D4306C.F7A1B5AF@ndirect.co.uk> <35D435D7.3A82@mdx.ac.uk> <01bdc829$a8f0a740$230b0a0a@Angela1.intelligent-group.com> NNTP-Posting-Host: nova.mdx.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (X11; I; SunOS 5.5 sun4u) Craig Graham wrote: > // Cross Product==Normal Vector > void CrossProduct(SVECTOR *a, SVECTOR *b, SVECTOR *c, SVECTOR *out) > { > SVECTOR ab,ac; > > ab.vx=b.vx-a.vx; ab.vy=b.vy-a.vy; ab.vz=b.vz-a.vz; > ac.vx=c.vx-a.vx; ac.vy=c.vy-a.vy; ac.vz=c.vz-a.vz; > > out->vx=ab.vy*ac.vz - ab.vz*ac.vy; > out->vy=ab.vz*ac.vx - ab.vx*ac.v.z; > out->vz=ab.vx*ac.vy - ab.vy*ac.vx; > } > > Then unify to length 4096 using the usual methods. Thanks, now rather than having to write the method myself I can use that, which will save a bit of time. At least that now means I can complete the tmd stuff in a few weeks. I have full confidence in what you say, considering youve done rather a bit yourself to do with modelling. Rob