亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vector3d_class.as

?? 這是《Flash MX編程與創意實現》的源代碼
?? AS
字號:
/*
  Vector3d Class 
  Oct. 29, 2002
  (c) 2002 Robert Penner
  
  This is a custom object designed to represent vectors and points
  in three-dimensional space. Vectors can added together,
  scaled, rotated, and otherwise manipulated with these methods.

  Dependencies: Math.sinD(), Math.cosD(), Math.acosD() (included below)
  
  Discussed in Chapter 5 of 
  Robert Penner's Programming Macromedia Flash MX
  
  http://www.robertpenner.com/profmx
  http://www.amazon.com/exec/obidos/ASIN/0072223561/robertpennerc-20
*/

/*
  These three trigonometric functions are required for Vector
  The full set of these functions is in trig_functions_degrees.as
*/
Math.sinD = function (angle) {
	return Math.sin (angle * (Math.PI / 180));
};

Math.cosD = function (angle) {
	return Math.cos (angle * (Math.PI / 180));
};

Math.acosD = function (ratio) {
	return Math.acos (ratio) * (180 / Math.PI);
};

/////////////////////////////////////////////////////////////

_global.Vector3d = function (x, y, z) {
    this.x = x;
    this.y = y;
    this.z = z;
};

Vector3d.prototype.toString = function () {
    var x = Math.round (this.x * 1000) / 1000;
    var y = Math.round (this.y * 1000) / 1000;
    var z = Math.round (this.z * 1000) / 1000;
    return "[" + x + ", " + y + ", " + z + "]";
};

Vector3d.prototype.reset = function (x, y, z) {
    this.constructor (x, y, z);
};

Vector3d.prototype.getClone = function () {
    with (this) return new constructor (x, y, z);
};

Vector3d.prototype.equals = function (v) {
    with (this) return (x == v.x && y == v.y && z == v.z)
};

Vector3d.prototype.plus = function (v) {
    with (this) {
        x += v.x;
        y += v.y;
        z += v.z;
    }
};

Vector3d.prototype.plusNew = function (v) {
    with (this) return new constructor (x + v.x, y + v.y, z + v.z);
};

Vector3d.prototype.minus = function (v) {
    with (this) {
        x -= v.x;
        y -= v.y;
        z -= v.z;
    }
};

Vector3d.prototype.minusNew = function (v) {
    with (this) return new constructor (x - v.x, y - v.y, z - v.z);    
};

Vector3d.prototype.negate = function () {
    with (this) {
        x = -x;
        y = -y;
        z = -z;
    }
};

Vector3d.prototype.negateNew = function () {
    with (this) return new constructor (-x, -y, -z);    
};

Vector3d.prototype.scale = function (s) {
    with (this) {
        x *= s;
        y *= s;
        z *= s;
    }
};

Vector3d.prototype.scaleNew = function (v) {
    with (this) return new constructor (x * v.x, y * v.y, z * v.z);    
};

Vector3d.prototype.getLength = function () {
    with (this) return Math.sqrt (x*x + y*y + z*z);
};

Vector3d.prototype.setLength = function (len) {
	var r = this.getLength();
	if (r) this.scale (len / r);
	else this.x = len;
};

Vector3d.prototype.dot = function (v) {
    with (this) return x * v.x + y * v.y + z * v.z;
};

Vector3d.prototype.cross = function (v) {
    with (this) {
        var cx = y * v.z - z * v.y;
        var cy = z * v.x - x * v.z;
        var cz = x * v.y - y * v.x;
        return new constructor (cx, cy, cz);
    }
};

Vector3d.prototype.getPerspective = function (viewDist) {
    if (viewDist == undefined) viewDist = 300;
    return viewDist / (this.z + viewDist);
};

Vector3d.prototype.persProject = function (p) {
    with (this) {
        if (p == undefined) p = getPerspective(); 
        x *= p;
        y *= p;
        z = 0; 
    }
};

Vector3d.prototype.persProjectNew = function (p) {
    with (this) {
        if (p == undefined) p = getPerspective(); 
        return new constructor (p * x, p * y, 0);
    }
};

Vector3d.prototype.rotateX = function (angle) {
    with (Math) {
        var ca = cosD (angle);
        var sa = sinD (angle);
    }
    with (this) {
        var tempY = y * ca - z * sa;
        var tempZ = y * sa + z * ca;
        y = tempY;
        z = tempZ;
    }
};

Vector3d.prototype.rotateXTrig = function (ca, sa) {
    with (this) {
        var tempY = y * ca - z * sa;
        var tempZ = y * sa + z * ca;
        y = tempY;
        z = tempZ;
    }
};

Vector3d.prototype.rotateY = function (angle) {
    with (Math) {
        var ca = cosD (angle);
        var sa = sinD (angle);
    }
    with (this) {
        var tempX = x * ca + z * sa;
        var tempZ = x * -sa + z * ca;
        x = tempX;
        z = tempZ;
    }
};

Vector3d.prototype.rotateYTrig = function (ca, sa) {
    with (this) {
        var tempX = x * ca + z * sa;
        var tempZ = x * -sa + z * ca;
        x = tempX;
        z = tempZ;
    }
};


Vector3d.prototype.rotateZ = function (angle) {
    with (Math) {
        var ca = cosD (angle);
        var sa = sinD (angle);
    }
    with (this) {
        var tempX = x * ca - y * sa;
        var tempY = x * sa + y * ca;
        x = tempX;
        y = tempY;
    }
};

Vector3d.prototype.rotateZTrig = function (ca, sa) {
    with (this) {
        var tempX = x * ca - y * sa;
        var tempY = x * sa + y * ca;
        x = tempX;
        y = tempY;
    }
};

Vector3d.prototype.rotateXY = function (a, b) {
    with (Math) {
        var ca = cosD (a), sa = sinD (a);
        var cb = cosD (b), sb = sinD (b);
    }
    with (this) {
        // x-axis rotation
        var rz = y * sa + z * ca;
        y = y * ca - z * sa;
        // y-axis rotation
        z = x * -sb + rz * cb;
        x = x * cb + rz * sb;
    }
};

Vector3d.prototype.rotateXYTrig = function (ca, sa, cb, sb) {
    with (this) {
        // x-axis rotation
        var rz = y * sa + z * ca;
        y = y * ca - z * sa;
        // y-axis rotation
        z = x * -sb + rz * cb;
        x = x * cb + rz * sb;
    }
};

Vector3d.prototype.rotateXYZ = function (a, b, c) {
    with (Math) {
        var ca = cosD (a), sa = sinD (a);
        var cb = cosD (b), sb = sinD (b);
        var cc = cosD (c), sc = sinD (c);
    }
    with (this) {
        // x-axis rotation
        var ry = y * ca - z * sa;
        var rz = y * sa + z * ca;
        // y-axis rotation
        var rx = x * cb + rz * sb;
        z = x * -sb + rz * cb;
        // z-axis rotation
        x = rx * cc - ry * sc;
        y = rx * sc + ry * cc;
    }
};

Vector3d.prototype.rotateXYZTrig = function (ca, sa, cb, sb, cc, sc) {
    with (this) {
        // x-axis rotation
        var ry = y * ca - z * sa;
        var rz = y * sa + z * ca;
        // y-axis rotation
        var rx = x * cb + rz * sb;
        z = x * -sb + rz * cb;
        // z-axis rotation
        x = rx * cc - ry * sc;
        y = rx * sc + ry * cc;
    }
};

trace (">> Vector3d class loaded");







?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜av一区二区三区| 日本欧美一区二区三区| 亚洲黄色小说网站| 喷水一区二区三区| gogo大胆日本视频一区| 日韩欧美国产三级| 亚洲天天做日日做天天谢日日欢| 日日摸夜夜添夜夜添国产精品 | 精品久久久久久久久久久久久久久| 中文一区在线播放 | 亚洲你懂的在线视频| 免费在线欧美视频| 91成人免费在线| 国产欧美久久久精品影院| 亚洲动漫第一页| 成人精品国产一区二区4080| 日韩免费电影一区| 丝袜亚洲精品中文字幕一区| 99免费精品在线| 国产精品丝袜一区| 久久精品国产久精国产爱| 在线一区二区三区四区| 国产精品丝袜久久久久久app| 美女网站色91| 欧美一区二区三区思思人| 亚洲精品中文在线| 成人a免费在线看| 国产精品丝袜久久久久久app| 国产在线一区二区| 欧美一区二区三区播放老司机| 亚洲精品欧美在线| 在线免费观看日韩欧美| 亚洲欧美日本在线| 色综合久久久久网| 亚洲免费资源在线播放| 成人黄色片在线观看| 久久精品人人做人人综合| 激情六月婷婷综合| 日韩欧美国产系列| 国产又粗又猛又爽又黄91精品| 日韩一区二区在线看| 久久精品国产一区二区三区免费看| 欧美高清www午色夜在线视频| 午夜伊人狠狠久久| 欧美精品第1页| 日本美女一区二区三区| 欧美不卡123| 国产成人精品一区二区三区网站观看| 亚洲丝袜制服诱惑| 99re热视频精品| 亚洲欧洲av在线| 欧美三级中文字幕在线观看| 天堂va蜜桃一区二区三区| 欧美一区二区大片| 久久不见久久见免费视频7| 久久噜噜亚洲综合| 99vv1com这只有精品| 亚洲欧美另类在线| 678五月天丁香亚洲综合网| 久久黄色级2电影| 国产精品视频看| 欧美色综合影院| 奇米一区二区三区av| 国产亚洲一二三区| 欧美亚州韩日在线看免费版国语版| 亚洲国产精品久久久男人的天堂| 在线电影一区二区三区| 国内久久婷婷综合| 亚洲欧美日韩国产综合| 日韩欧美国产麻豆| av男人天堂一区| 蜜桃av噜噜一区| 中文字幕制服丝袜成人av| 欧美色图在线观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 亚洲男人的天堂av| 欧美mv日韩mv| 欧美日韩一二三区| 国产精品一区二区果冻传媒| 亚洲欧洲制服丝袜| 日韩一卡二卡三卡| av电影在线不卡| 五月综合激情婷婷六月色窝| 国产精品视频免费看| 欧美一级艳片视频免费观看| 国产成人av一区二区三区在线观看| 亚洲成人777| 久久久亚洲精品一区二区三区 | 精品视频在线看| 国内精品在线播放| 中文字幕日本不卡| 91免费版在线| 蜜乳av一区二区| 亚洲精品国产一区二区三区四区在线| 欧美日韩一区三区| 一本一道久久a久久精品| 久久国产精品99精品国产 | 欧美在线观看一区二区| 亚洲一区二区三区自拍| 久久蜜桃av一区二区天堂| 欧美艳星brazzers| 国产在线观看一区二区| 亚洲国产一二三| 亚洲欧美日韩成人高清在线一区| 日韩精品资源二区在线| 69精品人人人人| 欧美亚洲综合另类| 色婷婷综合久久| 国产成人午夜片在线观看高清观看| 久久精品99久久久| 亚洲国产精品久久久男人的天堂| 亚洲黄色免费网站| 亚洲婷婷国产精品电影人久久| 国产精品理伦片| 国产亚洲一区二区三区四区 | 亚洲乱码一区二区三区在线观看| 国产日韩欧美精品一区| 久久精品在线免费观看| 欧美一级理论性理论a| 欧美一级理论片| 欧美一区二区国产| 精品免费一区二区三区| 欧美精品乱码久久久久久按摩| 91精品国产综合久久蜜臀| 欧美性大战久久久| 在线观看日韩精品| 一本久久综合亚洲鲁鲁五月天 | 午夜不卡在线视频| 人禽交欧美网站| 日本视频中文字幕一区二区三区| 美日韩一区二区三区| 五月天婷婷综合| 国产乱码字幕精品高清av| 国产在线视频一区二区三区| av一区二区三区在线| 国产成人在线观看免费网站| 不卡一区二区三区四区| 波多野结衣中文字幕一区| 在线精品亚洲一区二区不卡| 亚洲一区二区视频| 九九精品视频在线看| 国产不卡高清在线观看视频| 懂色一区二区三区免费观看 | 欧美调教femdomvk| 老司机午夜精品| 国产在线观看一区二区 | 一区二区三区中文免费| 亚洲欧美日韩中文播放 | 韩国成人在线视频| 国产福利一区二区三区视频在线 | 夜夜嗨av一区二区三区四季av| 一区二区三区资源| 日韩av一级片| 久久精品二区亚洲w码| 国产二区国产一区在线观看| 国产成人在线观看| 97久久精品人人做人人爽50路| 欧美狂野另类xxxxoooo| 日韩欧美一级精品久久| 亚洲免费在线电影| 蜜芽一区二区三区| 99国产精品视频免费观看| 日韩电影在线免费观看| 99久久精品国产观看| 日韩精品一区二区三区四区| 亚洲视频一区在线| 韩国成人在线视频| 色拍拍在线精品视频8848| 国产欧美日韩综合精品一区二区| 亚洲欧美偷拍三级| 精品一区二区三区久久| 国产精品一区免费在线观看| 色吊一区二区三区| 国产丝袜美腿一区二区三区| 一区二区三区波多野结衣在线观看| 日韩福利视频导航| 国产精品一级片在线观看| 欧美亚洲一区三区| 国产亚洲一区字幕| 亚洲超丰满肉感bbw| 国产一区二区精品久久91| 欧美性感一类影片在线播放| 亚洲天堂免费看| 国内成+人亚洲+欧美+综合在线| 欧美高清视频在线高清观看mv色露露十八 | 91免费看`日韩一区二区| 久久综合一区二区| 亚洲国产精品一区二区www在线 | 日韩精品在线网站| 午夜私人影院久久久久| 99这里只有精品| 欧美精品一区在线观看| 亚洲四区在线观看| 色欧美88888久久久久久影院| 2019国产精品| 日本欧美韩国一区三区| 经典一区二区三区| 欧美精品第1页| 日韩高清中文字幕一区| 色悠久久久久综合欧美99|