'\" t .\" Title: s3d_rotate .\" Author: Simon Wunderlich .\" Generator: DocBook XSL Stylesheets .\" .\" Manual: s3d Manual .\" Source: s3d .\" Language: English .\" .TH "S3D_ROTATE" "3" "" "s3d" "s3d Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" s3d_rotate \- rotate object .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ s3d_rotate('u .BI "int s3d_rotate(int\ " "object" ", float\ " "x" ", float\ " "y" ", float\ " "z" ");" .SH "DESCRIPTION" .PP Rotate an object around the x, y and z\-axis respectively\&. x,y,z may have values between [0,360] degrees\&. .PP You will usually only rotate around one axis, leaving the unused fields on 0, I guess\&. If you want to rotate around more than one axis, please note: The order of the rotation applies is y\-axis, x\-axis, and then z\-axis\&. You can think of it as the earth position coordinates: x is the longitude, y is the latitude, and z is the rotation at this point of the earth around your bodies axis\&. (I wonder if that makes it any clearer ;) .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBWarning\fR .ps -1 .br .PP Rotate is absolute, not relative! .sp .5v .RE .sp .if n \{\ .RS 4 .\} .nf s3d_rotate(object, 90, 0, 0); s3d_rotate(object, 180, 0, 0); // object will be rotated 180 degrees around the x\-axis, not 270 degress! .fi .if n \{\ .RE .\} .SH "AUTHOR" .PP \fBSimon Wunderlich\fR .RS 4 Author of s3d .RE