openGL下雨现象模拟
openGL下雨现象模拟
openGL下雨现象模拟
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11358 2002-06-19 08:36 openGL下雨现象模拟ase Codecamera.cpp
文件 4169 2002-06-19 08:36 openGL下雨现象模拟ase Codecamera.h
文件 149998 2002-06-19 08:36 openGL下雨现象模拟ase Codeglext.h
文件 20435 2002-06-19 08:36 openGL下雨现象模拟ase Codegl_app.cpp
文件 10949 2002-06-19 08:36 openGL下雨现象模拟ase Codegl_app.h
文件 17732 2002-06-19 08:36 openGL下雨现象模拟ase Codeimage.cpp
文件 8311 2002-06-19 08:36 openGL下雨现象模拟ase Codeimage.h
文件 4673 2002-06-19 08:36 openGL下雨现象模拟ase Codelog.cpp
文件 4401 2002-06-19 08:36 openGL下雨现象模拟ase Codelog.h
文件 15431 2002-06-19 08:36 openGL下雨现象模拟ase Codemath_ops.cpp
文件 10776 2002-06-19 08:36 openGL下雨现象模拟ase Codemath_ops.h
文件 5306 2002-06-19 08:36 openGL下雨现象模拟ase Code imer.h
文件 197493 2002-06-19 08:36 openGL下雨现象模拟Dataclouds.tga
文件 183247 2002-06-19 08:36 openGL下雨现象模拟Dataclouds2.tga
文件 787022 2002-06-19 08:37 openGL下雨现象模拟DatadetailMap.tga
文件 3032 2002-06-19 08:37 openGL下雨现象模拟Dataflare.tga
文件 263169 2002-06-19 08:37 openGL下雨现象模拟Dataheight1.RAW
文件 197659 2002-06-19 08:37 openGL下雨现象模拟DatahighestTile.tga
文件 197659 2002-06-19 08:37 openGL下雨现象模拟DataHighTile.tga
文件 197659 2002-06-19 08:37 openGL下雨现象模拟DatalowestTile.tga
文件 197430 2002-06-19 08:37 openGL下雨现象模拟DatalowTile.tga
文件 207720 2002-06-19 08:37 openGL下雨现象模拟Data
ightsky.tga
文件 166025 2002-06-19 08:37 openGL下雨现象模拟Data
eflection_map.tga
文件 173337 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_back.tga
文件 195567 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_bottom.tga
文件 178963 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_front.tga
文件 182295 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_left.tga
文件 179635 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_right.tga
文件 138808 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_top.tga
文件 196203 2002-06-19 08:37 openGL下雨现象模拟Datawater1.tga
............此处省略50个文件信息
//==============================================================
//==============================================================
//= 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下雨现象模拟a
文件 4169 2002-06-19 08:36 openGL下雨现象模拟a
文件 149998 2002-06-19 08:36 openGL下雨现象模拟a
文件 20435 2002-06-19 08:36 openGL下雨现象模拟a
文件 10949 2002-06-19 08:36 openGL下雨现象模拟a
文件 17732 2002-06-19 08:36 openGL下雨现象模拟a
文件 8311 2002-06-19 08:36 openGL下雨现象模拟a
文件 4673 2002-06-19 08:36 openGL下雨现象模拟a
文件 4401 2002-06-19 08:36 openGL下雨现象模拟a
文件 15431 2002-06-19 08:36 openGL下雨现象模拟a
文件 10776 2002-06-19 08:36 openGL下雨现象模拟a
文件 5306 2002-06-19 08:36 openGL下雨现象模拟a
文件 197493 2002-06-19 08:36 openGL下雨现象模拟Dataclouds.tga
文件 183247 2002-06-19 08:36 openGL下雨现象模拟Dataclouds2.tga
文件 787022 2002-06-19 08:37 openGL下雨现象模拟DatadetailMap.tga
文件 3032 2002-06-19 08:37 openGL下雨现象模拟Dataflare.tga
文件 263169 2002-06-19 08:37 openGL下雨现象模拟Dataheight1.RAW
文件 197659 2002-06-19 08:37 openGL下雨现象模拟DatahighestTile.tga
文件 197659 2002-06-19 08:37 openGL下雨现象模拟DataHighTile.tga
文件 197659 2002-06-19 08:37 openGL下雨现象模拟DatalowestTile.tga
文件 197430 2002-06-19 08:37 openGL下雨现象模拟DatalowTile.tga
文件 207720 2002-06-19 08:37 openGL下雨现象模拟Data
ightsky.tga
文件 166025 2002-06-19 08:37 openGL下雨现象模拟Data
eflection_map.tga
文件 173337 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_back.tga
文件 195567 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_bottom.tga
文件 178963 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_front.tga
文件 182295 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_left.tga
文件 179635 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_right.tga
文件 138808 2002-06-19 08:37 openGL下雨现象模拟Dataskybox_top.tga
文件 196203 2002-06-19 08:37 openGL下雨现象模拟Datawater1.tga
............此处省略50个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)