91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

openGL下雨現象模擬 openGL下雨現象模擬 openGL下雨現象模擬

資源截圖

代碼片段和文件信息

//==============================================================
//==============================================================
//=?camera.cpp?=================================================
//=?Original?coders:?Trent?Polack?(trent@voxelsoft.com) ???=
//==============================================================
//=?The?routines?for?the?CCAMERA?class
//==============================================================
//==============================================================


//--------------------------------------------------------------
//--------------------------------------------------------------
//-?HEADERS?AND?LIBRARIES?--------------------------------------
//--------------------------------------------------------------
//--------------------------------------------------------------
#include?“camera.h“


//--------------------------------------------------------------
//--------------------------------------------------------------
//-?DEFINITIONS?------------------------------------------------
//--------------------------------------------------------------
//--------------------------------------------------------------

//--------------------------------------------------------------
//?Name: CCAMERA::ComputeViewMatrix?-?public
//?Description: Compute?the?information?for?the?camera
//?Arguments: -fTimeDelta:?amount?to?interpolate?from?last?frame
// ?(defaults?to?1.0f)
//?Return?Value: None
//--------------------------------------------------------------
void?CCAMERA::ComputeViewMatrix(?float?fTimeDelta?)
{
if(?(?m_fYaw>=360.0f)?||?(?m_fYaw<=-360.0f?)?)
m_fYaw=?0.0f;

if(?m_fPitch>60.0f?)
m_fPitch=?60.0f;
if(?m_fPitch<-60.0f?)
m_fPitch=?-60.0f;
?????
float?cosYaw??=?cosf(?DEG_TO_RAD(?m_fYaw?)?);
float?sinYaw??=?sinf(?DEG_TO_RAD(?m_fYaw?)?);
float?sinPitch=?sinf(?DEG_TO_RAD(?m_fPitch?)?);
float?cosPitch=?cosf(?DEG_TO_RAD(?m_fPitch?)?);

m_vecForward[0]=?sinYaw?*?cosPitch;
m_vecForward[1]=?sinPitch;
m_vecForward[2]=?cosPitch?*?-cosYaw;

m_vecLookAt=?m_vecEyePos?+?m_vecForward;

m_vecSide=?m_vecForward.CrossProduct(?m_vecUp?);
}

//--------------------------------------------------------------
//?Name: CCAMERA::CalculateViewFrustum?-?public
//?Description: Calculate?the?planes?that?make-up?the?viewing?m_viewFrustum
//?Arguments: None
//?Return?Value: None
//--------------------------------------------------------------
void?CCAMERA::CalculateViewFrustum(?void?)
{
float?fPMtrx[16]; //projection?matrix
float?fMMtrx[16]; //modelview?matrix
float?clip[16];
float?fNorm;

/*?Get?the?current?PROJECTION?matrix?from?OpenGL?*/
glGetFloatv(?GL_PROJECTION_MATRIX?fPMtrx?);

/*?Get?the?current?MODELVIEW?matrix?from?OpenGL?*/
glGetFloatv(?GL_MODELVIEW_MATRIX?fMMtrx?);

/*?Combine?the?two?matrices?(multiply?projection?by?modelview)?*/
clip[?0]=?fMMtrx[?0]*fPMtrx[?0]?+?fMMtrx[?1]*fPMtrx[?4]?+?fMMtrx[?2]*fPMtrx[?8]?+?fMMtr

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????11358??2002-06-19?08:36??openGL下雨現象模擬\base?Code\camera.cpp

?????文件???????4169??2002-06-19?08:36??openGL下雨現象模擬\base?Code\camera.h

?????文件?????149998??2002-06-19?08:36??openGL下雨現象模擬\base?Code\glext.h

?????文件??????20435??2002-06-19?08:36??openGL下雨現象模擬\base?Code\gl_app.cpp

?????文件??????10949??2002-06-19?08:36??openGL下雨現象模擬\base?Code\gl_app.h

?????文件??????17732??2002-06-19?08:36??openGL下雨現象模擬\base?Code\image.cpp

?????文件???????8311??2002-06-19?08:36??openGL下雨現象模擬\base?Code\image.h

?????文件???????4673??2002-06-19?08:36??openGL下雨現象模擬\base?Code\log.cpp

?????文件???????4401??2002-06-19?08:36??openGL下雨現象模擬\base?Code\log.h

?????文件??????15431??2002-06-19?08:36??openGL下雨現象模擬\base?Code\math_ops.cpp

?????文件??????10776??2002-06-19?08:36??openGL下雨現象模擬\base?Code\math_ops.h

?????文件???????5306??2002-06-19?08:36??openGL下雨現象模擬\base?Code\timer.h

?????文件?????197493??2002-06-19?08:36??openGL下雨現象模擬\Data\clouds.tga

?????文件?????183247??2002-06-19?08:36??openGL下雨現象模擬\Data\clouds2.tga

?????文件?????787022??2002-06-19?08:37??openGL下雨現象模擬\Data\detailMap.tga

?????文件???????3032??2002-06-19?08:37??openGL下雨現象模擬\Data\flare.tga

?????文件?????263169??2002-06-19?08:37??openGL下雨現象模擬\Data\height1.RAW

?????文件?????197659??2002-06-19?08:37??openGL下雨現象模擬\Data\highestTile.tga

?????文件?????197659??2002-06-19?08:37??openGL下雨現象模擬\Data\HighTile.tga

?????文件?????197659??2002-06-19?08:37??openGL下雨現象模擬\Data\lowestTile.tga

?????文件?????197430??2002-06-19?08:37??openGL下雨現象模擬\Data\lowTile.tga

?????文件?????207720??2002-06-19?08:37??openGL下雨現象模擬\Data\nightsky.tga

?????文件?????166025??2002-06-19?08:37??openGL下雨現象模擬\Data\reflection_map.tga

?????文件?????173337??2002-06-19?08:37??openGL下雨現象模擬\Data\skybox_back.tga

?????文件?????195567??2002-06-19?08:37??openGL下雨現象模擬\Data\skybox_bottom.tga

?????文件?????178963??2002-06-19?08:37??openGL下雨現象模擬\Data\skybox_front.tga

?????文件?????182295??2002-06-19?08:37??openGL下雨現象模擬\Data\skybox_left.tga

?????文件?????179635??2002-06-19?08:37??openGL下雨現象模擬\Data\skybox_right.tga

?????文件?????138808??2002-06-19?08:37??openGL下雨現象模擬\Data\skybox_top.tga

?????文件?????196203??2002-06-19?08:37??openGL下雨現象模擬\Data\water1.tga

............此處省略50個文件信息

評論

共有 條評論

相關資源