Message-ID: <386717B0.EF1E4F98@ozemail.com.au> From: QarnoS Organization: Anti-Conservation Foundation of Australia X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Request for help with camera matrix. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 43 NNTP-Posting-Host: slmlb31p01.ozemail.com.au X-Trace: ozemail.com.au 946280191 210.84.136.129 (Mon, 27 Dec 1999 18:36:31 EST) NNTP-Posting-Date: Mon, 27 Dec 1999 18:36:31 EST Distribution: world Date: Mon, 27 Dec 1999 18:39:28 +1100 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, folks! I'm currently making a simple C++ 3d engine using Allegros 3D functions as a core, and have struck a problem which I'm hoping someone on this group can help me with. The engine itself runs perfectly; there is no problem with rendering of 3d objects, my problem is with camera movement, or more specifially, camera movement & rotation relative to it's current position and direction. I have created a C++ camera class, which controls every aspect of the camera. I have functions for *absolute* positioning and rotation of the camera, but also need functions for relative movements. These are the methods I'm trying to create: camera:: adjust_position(float forward, float right, float up); camera:: adjust_rotation(float xrot, float yrot, float zrot); What I need to know is, how do I Make relative movements & rotations of the camera, taking into account the current horizontal and vertical planes of the camera (ie: The front & up vectors)? I have an inkling I'm going to need to use an alignment matrix, but I just can't get it to work properly. I have tried to be as clear as possible, but if further clarification if require, please ask me! Thanks in advance for any help. -- QarnoS { Insert witty comment here } -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GO d- s:+ a--- c++(++++) UL P+ L+ E W+++ N++ o-- K---- w-- O? M-- V? PS PE Y-- PGP- t+(+++) 5-- X+(++) R* tv b DI-- D+ G-(--) e(*) h! !r(---) m ------END GEEK CODE BLOCK------