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

資源簡介

寫畢業論文,從國外網站找到的液體流動仿真這方面的材料,這個是比較好的一個,可以運行,使用對比學習

資源截圖

代碼片段和文件信息

/*
??FLUIDS?v.1?-?SPH?Fluid?Simulator?for?CPU?and?GPU
??Copyright?(C)?2008.?Rama?Hoetzlein?http://www.rchoetzlein.com

??ZLib?license
??This?software?is?provided?‘as-is‘?without?any?express?or?implied
??warranty.??In?no?event?will?the?authors?be?held?liable?for?any?damages
??arising?from?the?use?of?this?software.

??Permission?is?granted?to?anyone?to?use?this?software?for?any?purpose
??including?commercial?applications?and?to?alter?it?and?redistribute?it
??freely?subject?to?the?following?restrictions:

??1.?The?origin?of?this?software?must?not?be?misrepresented;?you?must?not
?????claim?that?you?wrote?the?original?software.?If?you?use?this?software
?????in?a?product?an?acknowledgment?in?the?product?documentation?would?be
?????appreciated?but?is?not?required.
??2.?Altered?source?versions?must?be?plainly?marked?as?such?and?must?not?be
?????misrepresented?as?being?the?original?software.
??3.?This?notice?may?not?be?removed?or?altered?from?any?source?distribution.
*/

#include?
#include?
#include?
#include?
#include?

#include?“common_defs.h“

#ifdef?BUILD_CUDA
#include?“fluid_system_host.cuh“
#endif
#include?“fluid_system.h“
#include?“gl_helper.h“

#ifdef?_MSC_VER //?Windows
#include?
#else //?Linux
#include?
#endif

bool?bTiming?=?false;
bool?bRec?=?false;
int?mframe?=?0;

//?Globals
FluidSystem psys;

float?window_width??=?1024;
float?window_height?=?768;

Vector3DF cam_from?cam_angs?cam_to; //?Camera?stuff
Vector3DF obj_from?obj_angs?obj_dang;
Vector3DF light[2]?light_to[2]; //?Light?stuff
float light_fov?cam_fov;

int psys_rate?=?0; //?Particle?stuff
int psys_freq?=?1;
int psys_demo?=?0;
int psys_nmax?=?4096;

bool bHelp?=?false; //?Toggles
int iShade?=?1;
int iClrMode?=?0;
bool bPntDraw?=?false;
bool????bPause?=?false;

//?View?matricies
float?view_matrix[16]; //?View?matrix?(V)
float?model_matrix[16]; //?Model?matrix?(M)
float?proj_matrix[16]; //?Projective?matrix

//?Mouse?control
#define?DRAG_OFF 0 //?mouse?states
#define?DRAG_LEFT 1
#define?DRAG_RIGHT 2
int last_x?=?-1?last_y?=?-1; //?mouse?vars
int mode?=?0;
int dragging?=?0;
int psel;

GLuint screen_id;
GLuint depth_id;


//?Different?things?we?can?move?around
#define?MODE_CAM 0
#define?MODE_CAM_TO 1
#define?MODE_OBJ 2
#define?MODE_OBJPOS 3
#define?MODE_OBJGRP 4
#define?MODE_LIGHTPOS 5

#define?MODE_DOF 6

GLuint?screenBufferobject;
GLuint?depthBufferobject;
GLuint?envid;

void?drawScene?(?float*?viewmat?bool?bShade?)
{
if?(?iShade?<=?1?&&?bShade?)?{
glEnable?(?GL_LIGHT0?);
GLfloat?diff[4];
GLfloat?spec[4];
GLfloat?shininess?=?60.0;

diff[0]?=?0.8f;?diff[1]?=?0.8f;?diff[2]?=?0.8f;?diff[3]?=?1.0f;
spec[0]?=?1.0f;?spec[1]?=?1.0f;?spec[2]?=?1.0f;?spec[3]?=?1.0f;
glMaterialfv?(GL_FRONT_AND_BACK?GL_DIFFUSE?&diff[

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-03-29?10:24??fluids_v2\
?????文件????????2342??2009-10-19?18:30??fluids_v2\READ_ME.txt
?????目錄???????????0??2013-03-29?10:22??fluids_v2\common\
?????目錄???????????0??2013-03-29?10:22??fluids_v2\common\GL\
?????文件??????720794??2009-10-19?18:30??fluids_v2\common\GL\glee.c
?????文件??????603316??2009-10-19?18:30??fluids_v2\common\GL\glee.h
?????文件??????382527??2009-10-19?18:30??fluids_v2\common\GL\glext.h
?????文件?????????639??2009-10-19?18:30??fluids_v2\common\GL\glut.h
?????文件?????????911??2009-10-19?18:30??fluids_v2\common\common_defs.h
?????文件?????????681??2009-10-19?18:30??fluids_v2\common\freeglut.h
?????文件????????7324??2009-10-19?18:30??fluids_v2\common\freeglut_ext.h
?????文件???????23980??2009-10-20?02:48??fluids_v2\common\freeglut_std.h
?????文件???????12246??2009-10-19?18:30??fluids_v2\common\geomx.cpp
?????文件????????4306??2009-10-19?18:30??fluids_v2\common\geomx.h
?????文件???????13360??2009-10-19?18:30??fluids_v2\common\gl_helper.cpp
?????文件????????1791??2009-10-19?18:30??fluids_v2\common\gl_helper.h
?????文件???????43334??2009-10-19?18:30??fluids_v2\common\image.cpp
?????文件????????4450??2009-10-19?18:30??fluids_v2\common\image.h
?????文件???????70037??2009-10-19?18:30??fluids_v2\common\matrix-inline.h
?????文件???????79956??2009-10-19?18:30??fluids_v2\common\matrix.cci
?????文件??????????25??2009-10-19?18:30??fluids_v2\common\matrix.cpp
?????文件???????14445??2009-10-19?18:30??fluids_v2\common\matrix.h
?????文件???????14952??2009-10-19?18:30??fluids_v2\common\mdebug.cpp
?????文件????????3131??2009-10-19?18:30??fluids_v2\common\mdebug.h
?????文件???????27529??2009-10-19?18:30??fluids_v2\common\mesh.cpp
?????文件????????4352??2009-10-19?18:30??fluids_v2\common\mesh.h
?????文件????????1325??2009-10-19?18:30??fluids_v2\common\mesh_info.h
?????文件???????15492??2009-10-19?18:30??fluids_v2\common\mtime.cpp
?????文件????????7977??2009-10-19?18:30??fluids_v2\common\mtime.h
?????文件??????????22??2009-10-19?18:30??fluids_v2\common\particle.cpp
?????文件??????????76??2009-10-19?18:30??fluids_v2\common\particle.h
............此處省略34個文件信息

評論

共有 條評論