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

資源簡介

opengl超級寶典中的例程所用到的math3d庫,包括math3d.h和math3d.cpp

資源截圖

代碼片段和文件信息

//?math3d.cpp
//?Math3D?Library?version?0.95

/*?Copyright?(c)?2007-2009?Richard?S.?Wright?Jr.
?All?rights?reserved.
?
?Redistribution?and?use?in?source?and?binary?forms?with?or?without?modification
?are?permitted?provided?that?the?following?conditions?are?met:
?
?Redistributions?of?source?code?must?retain?the?above?copyright?notice?this?list
?of?conditions?and?the?following?disclaimer.
?
?Redistributions?in?binary?form?must?reproduce?the?above?copyright?notice?this?list
?of?conditions?and?the?following?disclaimer?in?the?documentation?and/or?other
?materials?provided?with?the?distribution.
?
?Neither?the?name?of?Richard?S.?Wright?Jr.?nor?the?names?of?other?contributors?may?be?used
?to?endorse?or?promote?products?derived?from?this?software?without?specific?prior
?written?permission.
?
?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS?“AS?IS“?AND?ANY
?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE?IMPLIED?WARRANTIES
?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE?ARE?DISCLAIMED.?IN?NO?EVENT
?SHALL?THE?COPYRIGHT?OWNER?OR?CONTRIBUTORS?BE?LIABLE?FOR?ANY?DIRECT?INDIRECT
?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES?(INCLUDING?BUT?NOT?LIMITED
?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;?LOSS?OF?USE?DATA?OR?PROFITS;?OR
?BUSINESS?INTERRUPTION)?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN
?CONTRACT?STRICT?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN
?ANY?WAY?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE.
?*/

//?Implementation?file?for?the?Math3d?library.?The?C-Runtime?has?math.h?these?routines
//?are?meant?to?suppliment?math.h?by?adding?geometry/math?routines
//?useful?for?graphics?simulation?and?physics?applications?(3D?stuff).
//?This?library?is?meant?to?be?useful?on?Win32?Mac?OS?X?various?Linux/Unix?distros
//?and?mobile?platforms.?Although?designed?with?OpenGL?in?mind?there?are?no?OpenGL
//?dependencies.?Other?than?standard?math?routines?the?only?other?outside?routine
//?used?is?memcpy?(for?faster?copying?of?vector?arrays).
//?Most?of?the?library?is?inlined.?Some?functions?however?are?here?as?I?judged?them
//?too?big?to?be?inlined?all?over?the?place...?nothing?prevents?anyone?from?changing
//?this?if?it?better?fits?their?project?requirements.
//?Richard?S.?Wright?Jr.

//?Most?functions?are?in-lined...?and?are?defined?here
#include?“math3d.h“


////////////////////////////////////////////////////////////
//?LoadIdentity
//?For?3x3?and?4x4?float?and?double?matricies.
//?3x3?float
void?m3dLoadIdentity33(M3DMatrix33f?m)
{
????//?Don‘t?be?fooled?this?is?still?column?major
????static?M3DMatrix33f?????identity?=?{?1.0f?0.0f?0.0f?
????????0.0f?1.0f?0.0f
????????0.0f?0.0f?1.0f?};
????
????memcpy(m?identity?sizeof(M3DMatrix33f));
}

//?3x3?double
void?m3dLoadIdentity33(M3DMatrix33d?m)
{
????//?Don‘t?be?fooled?this?is?still?column?majo

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????33392??2014-05-06?21:46??math3d\math3d.cpp
?????文件???????29011??2014-05-06?21:46??math3d\math3d.h
?????目錄???????????0??2014-05-19?15:50??math3d\

評論

共有 條評論