PIXNET Logo登入

遊戲人生 人生遊戲

跳到主文

如果工作是玩樂就太好了

部落格全站分類:攝影寫真

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 6月 29 週三 201116:14
  • DirectX D3DXMatrixLookAtLH 介紹

 
從世界坐標系到觀察坐標系的變換,該變換時攝像機變換至坐標系原點並使攝像機光軸沿著z軸正方向。
視圖坐標的變換矩陣可以通過如下的D3DX函數計算得到:
D3DXMATRIX *WINAPI D3DXMatrixLookAtLH(
    D3DXMATRIX *pOut,
    CONST D3DXVECTOR3 *pEye,
    CONST D3DXVECTOR3 *pAt,
    CONST D3DXVECTOR3 *pUp
);
*pOut  // 指向返回的視圖矩陣   
這個函數用來控制攝影機,用來控制視圖矩陣的。
pEye 攝影機位置,觀察的方向。// 照相機在世界坐標系的位置   
pAt 參數指定照相機所觀察的世界坐標系中的一個目標點,攝影機的前進和後退,向左或向右。向上或向下。
pUp 參數指定3D世界中的上方向,通常設Y軸正方向為上方向,即取值為(0,1,0)。
指針 D3DXMATRIX結構,結果該運算。
pEye [in]:
Pointer to the D3DXVECTOR3 structure that defines the eye point. This value is used in translation.
指針 D3DXVECTOR3結構,它定義了eye位置。這個值用於位移。
pAt [in]:
Pointer to the D3DXVECTOR3 structure that defines the camera look-at target.
指針 D3DXVECTOR3結構,它定義了相機注目目標。
pUp [in]
Pointer to the D3DXVECTOR3 structure that defines the current world's up, usually [0, 1, 0].
指針 D3DXVECTOR3結構,它定義了當前世界座標向上的向量,一般[0,1,0]。
Return Value
回傳值
Type: D3DXMATRIX
Pointer to a D3DXMATRIX structure that is a left-handed, look-at matrix.
指針 D3DXVECTOR3結構,它定義了左手矩陣和視圖矩陣
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(269)

  • 個人分類:DirectX
▲top
  • 6月 29 週三 201112:21
  • DirectX LPDIRECT3DDEVICE9 Function & Member

 
SetVertexShader專門設置可編程渲染管道的Shader程序,vs(vertex  
shader)用SetVertexShader來傳入。

(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(116)

  • 個人分類:DirectX
▲top
  • 6月 13 週一 201115:21
  • DirectX Bump Mapping

bumpmap2.gif

Bump Mapping



 Bump mapping is very much like Texture Mapping. However, where Texture
Mapping added colour to a polygon, Bump Mapping adds, what appears to be surface
roughness. This can have a dramatic effect on the look of a polygonal object.
Bump Mapping can add minute detail to an object which would otherwise require a
large number of polygons. Note that the polygon is still physically flat, but
appears to a be bumpy. 
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(241)

  • 個人分類:DirectX
▲top
  • 5月 29 週日 201112:55
  • C# 統一發票對獎程式

011.png
因為一個好朋友的老婆的建議,所以我馬上又寫了一個"統一發票對獎程式"。
希望大家喜歡^^
下載網址:
http://redtreeonline.com/other/fapu.exe
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(1,455)

  • 個人分類:C#
▲top
  • 5月 28 週六 201110:06
  • C# 限制textbox只能輸入數字 record

方法一:
this.texBox.KeyPress += new KeyPressEventHandler(HandleKeyPress);
private void HandleKeyPress(object sender, KeyPressEventArgs e)
        {
            if (!char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar))
                e.Handled = true;
        }
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(4,793)

  • 個人分類:C#
▲top
  • 5月 21 週六 201112:59
  • Corona physics.setGravity()

physics.setGravity()
Description:
Sets the x,y components of the global gravity vector, in units of m/s2. The default is ( 0, 9.8 ) to simulate standard Earth gravity, pointing downwards on the y-axis.
設置 x,y分量的全球重力載體,單位 m/s2。默認為(0,9.8)的標準來模擬地球引力,向下在Y軸。
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(137)

  • 個人分類:Corona
▲top
  • 5月 21 週六 201112:56
  • Corona physics.setScale()

physics.setScale()
Description:說明:
Sets the internal pixels-per-meter ratio that is used in converting between onscreen Corona coordinates and simulated physics coordinates. This should be done only once, before any physical objects are instantiated.
設置內部像素的每米的比例,用於在屏幕上的Corona坐標之間的轉換和模擬物理坐標。這項工作應該只有一次,在任何物理對象被實例化。
Changing this value has no visual consequences, and simply affects the accuracy of the physical model. The Box2D engine is tuned for simulating medium-sized objects between 0.1m and 10m in size, so it works best when the objects in your game are mapped to physical properties that fall roughly within this range.
改變這個值沒有視覺的後果,影響了準確性和簡單的物理模型。該 Box2D的發動機調整為模擬中等大小的物體之間的0.1米和10米的大小,因此它最適合當你的遊戲中的對象映射到物理特性大致屬於這個範圍之內。
The default scaling value is 30, which means that the optimal 0.1m to 10m range corresponds to visible sprites between 3 and 300 pixels in size, which should cover most typical iPhone content. For higher-resolution devices like iPad, Android, or iPhone 4, you may wish to increase this value to 60 or more.
默認縮放值是30,這意味著最佳0.1米至10米範圍對應於可見精靈3至300像素的大小,它應該包括最典型的iPhone內容。對於高解析度設備如iPad的,Android,或iPhone4,您可能希望增加該值到60以上。
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(60)

  • 個人分類:Corona
▲top
  • 5月 21 週六 201101:28
  • Corona body.isBullet

 
body.isBullet
Description:
A boolean for whether the body should be treated as a “bullet”. Bullets are subject to continuous collision detection, rather than periodic collision detection at world timesteps. This is more computationally expensive, but it prevents fast-moving objects from passing through solid barriers. The default is false.
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(42)

  • 個人分類:Corona
▲top
  • 5月 20 週五 201117:27
  • Corona body.angularDamping

body.angularDamping
Description:
The numerical value for how much the body's rotation should be damped. The default is zero.
其數值為多少身體的轉動應阻尼。默認是零。
如果:
*.angularDamping = 0.8 -- stops balls from spinning forever 從紡紗永遠停止球
Syntax:
body.angularDamping
Example:
myBody.angularDamping = 5
local d = myBody.angularDamping
Returns:
Number
Remarks:
Supported on operating systems and platforms for build numbers shown:
Mac OS X:Build 2010.222
Windows: Build 2010.222
iOS: Build 2010.222
Android: Build 2010.222
Related:
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(57)

  • 個人分類:Corona
▲top
  • 5月 20 週五 201117:23
  • Corona body.linearDamping

body.linearDamping
The numerical value for how much the body's linear motion is damped. The default is zero.
其數值為多少身體的直線運動被抑制。默認是零。
如果:
*.linearDamping = 0.3 --可以模擬摩擦毛氈
Syntax:
body.linearDamping
Example:
myBody.linearDamping = 5
local d = myBody.linearDamping
Returns:
Number
Remarks:
Supported on operating systems and platforms for build numbers shown:
Mac OS X:Build 2010.222
Windows: Build 2010.222
iOS: Build 2010.222
Android: Build 2010.222
Related:
(繼續閱讀...)
文章標籤

createps 發表在 痞客邦 留言(0) 人氣(97)

  • 個人分類:Corona
▲top
«1...45620»

最新文章

  • 中華電信、無線IP分享器和網路交換器如何連接
  • 把大容量的照片縮小, 圖片壓縮
  • 如何在Facebook建立應用程式
  • C# 網卡實體位置 record
  • C# 透過 WMI 取得硬碟序號 ( 物理 / 邏輯磁碟) record
  • C# ComboBox的MaxDropDownItems 沒反應 record
  • XNA 3D動畫,模型變型 record
  • C# 讀取大的圖檔時發生記憶體不足的問題。(轉載) record
  • C# 取得檔案類型 record
  • C# 是否為JPG檔案 record

文章精選

個人資訊

createps
暱稱:
createps
分類:
攝影寫真
好友:
累積中
地區:

熱門文章

  • (37,170)C# 取亂數 record
  • (20,934)C# 十進制轉各進制,再轉回來 record
  • (16,199)C# Dictionary用法 record
  • (15,017)C# lock record
  • (11,660)C# 字串變數, 如何包含雙引號或反斜線 record
  • (8,748)C# 取得目前時間:年 月 日 record
  • (5,849)C# ListView record
  • (2,213)C# 開啟執行檔 record
  • (1,266)VB和C# 字串比較 record
  • (253)用1-52數字表示撲克牌的每一張牌 record

文章分類

  • 網路硬體 (1)
  • Facebook (1)
  • 懷孕 (1)
  • 程式使用 (1)
  • XNA 4.0 (2)
  • DirectX (15)
  • Corona (29)
  • Lua (2)
  • Unity3D (3)
  • OS (2)
  • 輸入法 (1)
  • 大易 (1)
  • VB.NET (2)
  • Shader (1)
  • 技巧 (2)
  • 笑話 (1)
  • 創業 (4)
  • FTP (2)
  • SQL (1)
  • 歌曲 (4)
  • 物理 (1)
  • Apple (3)
  • Game (1)
  • Game (1)
  • C++ (4)
  • XNA (12)
  • GRD3 (1)
  • 喜歡的歌 (1)
  • C# (87)
  • 國外旅遊 (2)
  • 未分類文章 (1)

最新留言

  • [22/06/15] 訪客 於文章「中華電信、無線IP分享器和網路交換器如何...」留言:
    你好 為什麼我根據你的接法使用後 Wi-fi能使用 但是在交...
  • [22/04/15] 訪客 於文章「C# 大樂透對獎程式...」留言:
    回饋您這方面資訊,我是從 PTT搜尋引擎的排名,看...
  • [18/05/31] dwchen52 於文章「C# 讀取大的圖檔時發生記憶體不足的問題...」留言:
    謝謝你的建議,讓解決我的問題....
  • [18/05/11] y257574 於文章「把大容量的照片縮小, 圖片壓縮 ...」留言:
    x5PKD9ozVGQUIn5R1奢侈品仿牌,保固說到做到,...
  • [15/09/01] 菁 於文章「iphone 在首頁新增資料夾...」留言:
    謝謝您!...
  • [15/08/16] 訪客 於文章「C# 大樂透對獎程式...」留言:
    你好,我剛剛做出來了,原來我犯了一個很不該犯的錯誤… 因為...
  • [15/08/16] 訪客 於文章「C# 大樂透對獎程式...」留言:
    是的,我也是這麼想的,用f11看了幾次程式跑的流程… 很抱...
  • [15/08/15] 訪客 於文章「C# 大樂透對獎程式...」留言:
    你好,目前我在學寫程式 老師上課的範例 在中了幾號碼那邊...
  • [15/03/08] 俴 誏 ? 闚 於文章「把大容量的照片縮小, 圖片壓縮 ...」留言:
    比們地要點重他一並開物我不工問得到時多點要為上 氣~質...
  • [15/02/25] 訪客 於文章「C# 大樂透對獎程式...」留言:
    大大可以私密教我寫兌獎嗎?我剩下兌獎了 其他都好了...

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: