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

  • 大小: 107KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-07
  • 語言: 其他
  • 標簽:

資源簡介

橢球的碰撞檢測 純算法實現 你可以仔細想、閱讀代碼 雖然有些難懂 但成果會很大 堅持

資源截圖

代碼片段和文件信息

//-----------------------------------------------------------------------------
//???????????Name:?ogl_basic_collision.cpp
//?????????Author:?Kevin?Harris
//??Last?Modified:?02/01/05
//????Description:?As?you?may?or?may?not?know?truly?accurate?collision
//?????????????????detection?between?two?3D?objects?can?only?be?done?by
//?????????????????performing?an?intersection?test?on?every?triangle?in?the
//?????????????????first?object?against?every?triangle?of?the?other?object.
//?????????????????Obviously?it‘s?too?wasteful?to?just?go?around?blindly
//?????????????????performing?this?costly?procedure?on?every?object?in?the
//?????????????????scene?against?every?other?object.?To?save?us?considerable
//?????????????????CPU?cycles?we‘ll?calculate?and?assign?a?bounding?sphere
//?????????????????for?each?of?our?3D?objects?so?we?can?perform?a?quick?check
//?????????????????to?see?whether?or?not?the?two?objects?are?even?close?to?one
//?????????????????another?and?require?further?testing.?In?short?if?the?two
//?????????????????bounding?spheres?of?our?objects?overlap?then?there?exists
//?????????????????a?possible?collision?and?we?need?investigate?further?by
//?????????????????checking?triangles.?If?the?two?spheres?don‘t?overlap?a
//?????????????????collision?is?not?possible?and?we?can?move?on.
//
//?Note:?Most?of?the?math?used?in?this?sample?is?based?on?a?small?paper
//?written?by?Gary?Simmons?which?is?one?of?the?instructors?at
//?www.gameinstitute.com.?I‘ve?included?the?paper?with?the?sample?for?reference.
//?Please?see?it?for?further?details.
//
//???Control?Keys:?F1?-?Toggle?bounding?sphere?visibility
//?????????????????F2?-?Toggle?triangle?motion
//
//?????????????????Up?????????-?View?moves?forward
//?????????????????Down???????-?View?moves?backward
//?????????????????Left???????-?View?strafes?left
//?????????????????Right??????-?View?strafes?Right
//?????????????????Left?Mouse?-?Perform?looking
//?????????????????Mouse??????-?Look?about?the?scene
//-----------------------------------------------------------------------------

#define?STRICT
#define?WIN32_LEAN_AND_MEAN

#include?
#include?
#include?
#include?
#include?
using?namespace?std;
#include?
#include?
#include?“resource.h“
#include?“geometry.h“
#include?“matrix4x4f.h“
#include?“vector3f.h“

//-----------------------------------------------------------------------------
//?SYMBOLIC?CONSTANTS
//-----------------------------------------------------------------------------
enum?Collision
{
????COLLISION_NO
????COLLISION_YES
????COLLISION_NOT_CHECKED
};

//-----------------------------------------------------------------------------
//?STRUCTS
//-----------------------------------------------------------------------------
struct?triangle
{
????vector3f?v0;
????vector3f?v1;
????vector3f?v2;
????vector3f?vNormal;

????//?Bounding?sphere
????vector3f?vCenter

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

?????文件???????7406??2003-10-07?09:50??ogl_basic_collision\codesampler.ico

?????文件??????84480??2001-04-16?09:16??ogl_basic_collision\dot_product.doc

?????文件??????51885??2005-01-27?18:19??ogl_basic_collision\geometry.h

?????文件???????8993??2005-02-01?16:59??ogl_basic_collision\matrix4x4f.h

?????文件??????29990??2005-10-04?22:20??ogl_basic_collision\ogl_basic_collision.cpp

?????文件???????4612??2005-02-01?11:08??ogl_basic_collision\ogl_basic_collision.dsp

?????文件?????110592??2005-10-12?23:25??ogl_basic_collision\ogl_basic_collision.exe

?????文件???????3058??2003-10-07?10:46??ogl_basic_collision\ogl_basic_collision.rc

?????文件???????5261??2005-02-01?12:32??ogl_basic_collision\ogl_basic_collision.vcproj

?????文件???????1000??2002-05-02?22:30??ogl_basic_collision\resource.h

?????文件???????4746??2005-03-24?21:34??ogl_basic_collision\vector3f.h

?????目錄??????????0??2009-04-20?12:44??ogl_basic_collision

-----------?---------??----------?-----??----

???????????????312023????????????????????12


評論

共有 條評論

相關資源