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
Light.h
Package: g.rar [view]
Upload User: laitongbao
Upload Date: 2021-02-20
Package Size: 8176k
Code Size: 1k
Category:
Shot Game
Development Platform:
Visual C++
- #pragma once
- #include "NodeObject.h"
- /*
- 灯光类:继承NodeObject
- */
- class Light : public NodeObject
- {
- friend class TransitionController;
- friend class ShaderController;
- friend class FileController;
- friend class SceneTree;
- public:
- Light(Light& light);
- Light(TCHAR* name, VECTOR3 pos = VECTOR3(),float mutiple=1,DWORD diffuseColor=0xffffffff);
- Light(TCHAR* name,LIG_TYPE type, DWORD diffuseColor,DWORD specularColor,
- DWORD ambientColor, float mutiple ,VECTOR3 pos ,
- VECTOR3 direction,float range );
- void Enable(bool enable);
- virtual ~Light();
- void SetDirection(VECTOR3 direction);
- VECTOR3 GetDirection()const;
- void SetDiffuseColor(DWORD color);
- DWORD GetDiffuseColor()const;
- void SetSpecularColor(DWORD color);
- DWORD GetSpecularColor()const;
- void SetAmbientColor(DWORD color);
- DWORD GetAmbientColor()const;
- void SetLightType(LIG_TYPE type);
- LIG_TYPE GetLightType()const;
- void SetMutiple(float mut);
- float GetMutiple()const;
- void SetRange(float range);
- float GetRange()const;
- void DrawObject(){}; //绘制虚拟物体(灯)********没有实现
- void PreDraw();//设置灯光
- void CleanUp();
- private:
- static int ID;//公有ID
- int m_ID;//私有ID
- LIG_TYPE m_lightType;
- float m_mutiple;
- D3DXVECTOR3 m_vecDirection;
- D3DLIGHT9 m_light;
- bool enable;
- };