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
Normal.cpp
Package: 3dexplorerTest.rar [view]
Upload User: hkb425
Upload Date: 2007-06-16
Package Size: 34191k
Code Size: 1k
Category:
Game Engine
Development Platform:
Visual C++
- // Normal.cpp: implementation of the CNormal class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "Normal.h"
- #include <math.h>
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CNormal::CNormal()
- {
- ///////////////////////////////////////////////////////
- ///////////////// 3dExplorer Normal
- ///////////////////////////////////////////////////////
- for(int xrot=0;xrot<10;xrot++)
- for(int yrot=0;yrot<36;yrot++)
- {
- //////Y axis angle=xrot*10*0.017453292f
- m_3dENormal[xrot*36+yrot][1]=sinf(xrot*0.17453292f);
- float xz;
- if(xrot==9)xz=0;
- else
- xz=cosf(xrot*0.17453292f);
- //////X
- if(yrot==18)m_3dENormal[xrot*36+yrot][0]=0;
- else
- m_3dENormal[xrot*36+yrot][0]=-xz*sinf(yrot*0.17453292f);
- //////Z
- if(yrot==9 || yrot==27)m_3dENormal[xrot*36+yrot][2]=0;
- else
- m_3dENormal[xrot*36+yrot][2]=-xz*cosf(yrot*0.17453292f);
- }
- }
- CNormal::~CNormal()
- {
- }