资源简介
很好的学习HLSL学习资源
代码片段和文件信息
#include “Camera.h“
#include “D3Dbase.h“
XCamera::XEye::XEye():
m_EyePos(000)m_EyeTarget(00-1)m_Up(010)
{
}
void XCamera::yaw(float angle)
{
D3DXVECTOR3 vTDir = m_Eye.m_EyeTarget - m_Eye.m_EyePos;
D3DXVECTOR3 newDir;
float len = D3DXVec3Length(&vTDir);
D3DXVECTOR3 vDir;
D3DXVec3Normalize(&vDir&vTDir);
D3DXMATRIX matRot ;
D3DXMatrixRotationAxis(&matRot&m_Eye.m_Upangle);
D3DXVec3TransformCoord(&newDir&vDir&matRot);
newDir = newDir * len;
m_Eye.m_EyeTarget = m_Eye.m_EyePos + newDir;
}
void XCamera::pitch(float angle)
{
D3DXVECTOR3 vTDir = m_Eye.m_EyeTarget - m_Eye.m_EyePos;
float len = D3DXVec3Length(&vTDir);
D3DXVECTOR3 vDir;
D3DXVec3Normalize(&vDir&vTDir);
D3DXVECTOR3 vLeft;
D3DXVec3Cross(&vLeft
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4446 2006-02-04 19:41 GPU语言HLSL编写的案例\simpleVSLighting\Camera.cpp
文件 3939 2006-02-04 19:36 GPU语言HLSL编写的案例\simpleVSLighting\Camera.h
文件 5201 2006-03-19 23:10 GPU语言HLSL编写的案例\simpleVSLighting\D3Dba
文件 1292 2006-04-18 12:51 GPU语言HLSL编写的案例\simpleVSLighting\D3Dba
文件 5131 2006-03-13 23:26 GPU语言HLSL编写的案例\simpleVSLighting\D3DShader.cpp
文件 1504 2006-03-13 23:26 GPU语言HLSL编写的案例\simpleVSLighting\D3DShader.h
文件 6459 2006-03-14 22:08 GPU语言HLSL编写的案例\simpleVSLighting\FXShader.cpp
文件 1748 2006-03-14 21:51 GPU语言HLSL编写的案例\simpleVSLighting\FXShader.h
文件 6724 2007-05-29 09:55 GPU语言HLSL编写的案例\simpleVSLighting\main.cpp
文件 4816 2007-01-05 12:31 GPU语言HLSL编写的案例\simpleVSLighting\Mesh.cpp
文件 2188 2007-01-05 12:00 GPU语言HLSL编写的案例\simpleVSLighting\Mesh.h
文件 362 2006-03-13 22:43 GPU语言HLSL编写的案例\simpleVSLighting\ModelData.h
文件 921 2006-03-19 23:07 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting (1)
..A..H. 10752 2006-08-04 23:50 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting (2).suo
文件 503808 2007-11-02 12:07 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.exe
文件 932752 2007-05-29 09:55 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.ilk
文件 494592 2007-07-04 19:46 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.ncb
文件 921 2007-07-02 18:37 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.sln
文件 921 2006-03-19 23:07 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.sln.old
..A..H. 25600 2007-07-04 19:46 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.suo
..A..H. 10752 2006-08-04 23:50 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.suo.old
文件 4127 2006-03-19 23:09 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.vcproj
文件 4127 2006-03-19 23:09 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.vcproj.7.10.old
文件 1409 2007-01-08 17:17 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.vcproj.MIAOHW.miaohw.user
文件 1405 2007-05-29 10:18 GPU语言HLSL编写的案例\simpleVSLighting\simpleVSLighting.vcproj.SONY.miaohw.user
文件 3481 2007-05-29 10:05 GPU语言HLSL编写的案例\simpleVSLighting\simpVSlighting.fx
文件 47491 2006-03-11 19:55 GPU语言HLSL编写的案例\simpleVSLighting\teapot.jpg
文件 147660 2006-03-13 23:39 GPU语言HLSL编写的案例\simpleVSLighting\teapot.mesh
..A.SH. 5632 2006-04-18 12:17 GPU语言HLSL编写的案例\simpleVSLighting\Thumbs.db
文件 4653 2007-01-05 11:18 GPU语言HLSL编写的案例\simpleVSLighting\UpgradeLog.xm
............此处省略12个文件信息
- 上一篇:Proteus实验例程
- 下一篇:ArcView3.2
评论
共有 条评论