Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
camera.h
Package: Camera_r.rar [view]
Upload User: szxjsk
Upload Date: 2022-06-16
Package Size: 35k
Code Size: 1k
Category:
OpenGL program
Development Platform:
C/C++
- //***************************************************************************
- //
- // Advanced CodeColony Camera
- // Philipp Crocoll, 2003
- //
- //***************************************************************************
- #include <glglut.h> // Need to include it here because the GL* types are required
- #define PI 3.1415926535897932384626433832795
- #define PIdiv180 (PI/180.0)
- /////////////////////////////////
- //Note: All angles in degrees //
- /////////////////////////////////
- struct SF3dVector //Float 3d-vect, normally used
- {
- GLfloat x,y,z;
- };
- struct SF2dVector
- {
- GLfloat x,y;
- };
- SF3dVector F3dVector ( GLfloat x, GLfloat y, GLfloat z );
- class CCamera
- {
- private:
- GLfloat RotatedX, RotatedY, RotatedZ;
- public:
- CCamera(); //inits the values (Position: (0|0|0) Target: (0|0|-1) )
- void Render ( void ); //executes some glRotates and a glTranslate command
- //Note: You should call glLoadIdentity before using Render
- void Move ( SF3dVector Direction );
- void RotateX ( GLfloat Angle );
- void RotateY ( GLfloat Angle );
- void RotateZ ( GLfloat Angle );
- void MoveForward ( GLfloat Distance );
- void MoveUpward ( GLfloat Distance );
- void StrafeRight ( GLfloat Distance );
- SF3dVector ViewDir;
- SF3dVector RightVector;
- SF3dVector UpVector;
- SF3dVector Position;
- };