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

  • 大小: 27.01MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2024-01-30
  • 語言: 其他
  • 標簽: 歐拉操作??

資源簡介

課程的大作業,歐拉操作的代碼,希望給大家帶來幫助

資源截圖

代碼片段和文件信息

/**?KempoApi:?The?Turloc?Toolkit?*****************************/
/**?*????*??????????????????????????????????????????????????**/
/**?**??**??Filename:?ArcBall.cpp???????????????????????????**/
/**???**????Version:??Common????????????????????????????????**/
/**???**????????????????????????????????????????????????????**/
/**?????????????????????????????????????????????????????????**/
/**??Arcball?class?for?mouse?manipulation.??????????????????**/
/**?????????????????????????????????????????????????????????**/
/**?????????????????????????????????????????????????????????**/
/**?????????????????????????????????????????????????????????**/
/**?????????????????????????????????????????????????????????**/
/**??????????????????????????????(C)?1999-2003?Tatewake.com?**/
/**???History:??????????????????????????????????????????????**/
/**???08/17/2003?-?(TJG)?-?Creation?????????????????????????**/
/**???09/23/2003?-?(TJG)?-?Bug?fix?and?optimization?????????**/
/**???09/25/2003?-?(TJG)?-?Version?for?NeHe?basecode?users??**/
/**?????????????????????????????????????????????????????????**/
/*************************************************************/

#include?“ArcBall.h“????????????????????????????????????????????//?ArcBall?header

//Arcball?sphere?constants:
//Diameter?is???????2.0f
//Radius?is?????????1.0f
//Radius?squared?is?1.0f

void?ArcBall_t::_mapToSphere(const?Point2fT*?NewPt?Vector3fT*?NewVec)?const
{
????Point2fT?TempPt;
????GLfloat?length;

????//Copy?paramter?into?temp?point
????TempPt?=?*NewPt;

????//Adjust?point?coords?and?scale?down?to?range?of?[-1?...?1]
????TempPt.s.X??=????????(TempPt.s.X?*?this->AdjustWidth)??-?1.0f;
????TempPt.s.Y??=?1.0f?-?(TempPt.s.Y?*?this->AdjustHeight);

????//Compute?the?square?of?the?length?of?the?vector?to?the?point?from?the?center
????length??????=?(TempPt.s.X?*?TempPt.s.X)?+?(TempPt.s.Y?*?TempPt.s.Y);

????//If?the?point?is?mapped?outside?of?the?sphere...?(length?>?radius?squared)
????if?(length?>?1.0f)
????{
????????GLfloat?norm;

????????//Compute?a?normalizing?factor?(radius?/?sqrt(length))
????????norm????=?1.0f?/?FuncSqrt(length);

????????//Return?the?“normalized“?vector?a?point?on?the?sphere
????????NewVec->s.X?=?TempPt.s.X?*?norm;
????????NewVec->s.Y?=?TempPt.s.Y?*?norm;
????????NewVec->s.Z?=?0.0f;
????}
????else????//Else?it‘s?on?the?inside
????{
????????//Return?a?vector?to?a?point?mapped?inside?the?sphere?sqrt(radius?squared?-?length)
????????NewVec->s.X?=?TempPt.s.X;
????????NewVec->s.Y?=?TempPt.s.Y;
????????NewVec->s.Z?=?FuncSqrt(1.0f?-?length);
????}
}

//Create/Destroy
ArcBall_t::ArcBall_t(GLfloat?NewWidth?GLfloat?NewHeight)
{
????//Clear?initial?values
????this->StVec.s.X?????=
????this->StVec.s.Y?????=?
????this->StVec.s.Z?????=?

????this->EnVec.s.X?????=
????this->EnVec.s.Y?????=?
????this->EnVec.s.Z?????=?0.0f;

????//Set?initial?bounds
????this->setBounds(NewWidth?NewHeight);
}

//Mouse?down
void????ArcBall_t::c

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-10-21?14:12??Euler\
?????目錄???????????0??2015-10-21?14:12??Euler\Debug\
?????目錄???????????0??2015-10-21?14:07??Euler\ipch\
?????目錄???????????0??2015-10-21?14:07??Euler\ipch\subwindow-eeaa3bd8\
?????文件????33357824??2015-10-21?14:07??Euler\ipch\subwindow-eeaa3bd8\subwindow-2a6698ee.ipch
?????文件????33357824??2015-10-21?14:07??Euler\ipch\subwindow-eeaa3bd8\subwindow-62a39b68.ipch
?????目錄???????????0??2015-10-21?14:07??Euler\Release\
?????文件???????42496??2011-10-30?18:52??Euler\Release\Euler_v1_3.exe
?????文件??????560128??2011-10-30?18:52??Euler\Release\subwindow.pdb
?????目錄???????????0??2015-10-21?14:05??Euler\subwindow\
?????文件?????8834048??2011-10-30?18:52??Euler\subwindow.ncb
?????文件????28856320??2015-10-21?14:12??Euler\subwindow.sdf
?????文件?????????894??2015-10-21?14:05??Euler\subwindow.sln
?????文件?????????893??2011-10-24?18:52??Euler\subwindow.sln.old
?????文件???????42496??2015-10-21?14:12??Euler\subwindow.suo
?????文件???????38912??2011-10-30?18:52??Euler\subwindow.suo.old
?????文件????????4350??2011-10-27?21:21??Euler\subwindow\arcball.cpp
?????文件???????18372??2015-10-21?14:07??Euler\subwindow\arcball.h
?????目錄???????????0??2015-10-21?14:12??Euler\subwindow\Debug\
?????文件???????35232??2015-10-21?14:12??Euler\subwindow\Debug\arcball.obj
?????文件???????15470??2011-10-28?23:05??Euler\subwindow\Debug\BuildLog.htm
?????文件????????1758??2015-10-21?14:12??Euler\subwindow\Debug\cl.command.1.tlog
?????文件???????35840??2015-10-21?14:12??Euler\subwindow\Debug\CL.read.1.tlog
?????文件?????????972??2015-10-21?14:12??Euler\subwindow\Debug\CL.write.1.tlog
?????文件???????????2??2015-10-21?14:12??Euler\subwindow\Debug\link.command.1.tlog
?????文件???????????2??2015-10-21?14:12??Euler\subwindow\Debug\link.read.1.tlog
?????文件???????????2??2015-10-21?14:12??Euler\subwindow\Debug\link.write.1.tlog
?????文件??????338684??2015-10-21?14:12??Euler\subwindow\Debug\Main.obj
?????文件??????????65??2011-10-28?23:05??Euler\subwindow\Debug\mt.dep
?????文件?????????538??2015-10-21?14:12??Euler\subwindow\Debug\rc.command.1.tlog
?????文件????????2590??2015-10-21?14:12??Euler\subwindow\Debug\rc.read.1.tlog
............此處省略51個文件信息

評論

共有 條評論