2014年2月12日 星期三

WD WD10EZEX-08M2NA0 和 NVIDIA IDE SW 相衝

剛買了一顆 WD WD10EZEX-08M2NA0 硬碟,在 WinXP 下看不到,但用 WinXP 安裝光碟是看得到的,索性就把 WinXP 安裝到這顆硬碟,一開始一切正常,但安裝完一堆驅動程式後就開不了機了。

想說一個個找原因很麻煩,只好假設是儲存方面的驅動程式,重裝一次 WinXP,但沒裝 NVIDIA IDE SW,果然被我猜中。

為了進一步確認,一切裝好後,設好系統還原,再裝上 NVIDIA IDE SW,重開機後就進不了 WinXP 了,證明無誤。

只有 WinXP 的 NVIDIA IDE SW 有影響,在 Win7 無影響。





2014年2月4日 星期二

讓 KGS 落子有聲的 java 版本

在 KGS 下圍棋落子沒聲,經不斷嘗試,找到可讓 KGS 落子有聲的最新版本為

 Java SE Runtime Environment 6u31


先點 Accept License Agreement 再抓,註冊完就能抓取





2013年12月14日 星期六

OpenGL 呼叫擴增函數出現 Memory violation

一般 if(glewInit() != GLEW_NO_ERROR) 正確後就可以使用擴增函數(比如 glGenBuffers()),但若是將 glew.c 加入專案中,或是把 glew.c 編譯成靜態程式庫來使用,就得須把用到 OpenGL 的每個模組(exe 和 dll)都要呼叫一次 glewInit(),還有要記得在主程式(exe)已先做好 opengl context,才能讓 glewInit() 成功執行。

glewInit() 主要任務在從驅動程式中把擴增函數的位址抽出來,放好到函數指標供應用程式使用。

另外若是直接使用  glew.c 或靜態程式庫,還得在專案中加上前置識別字 GLEW_STATIC。



2013年11月17日 星期日

photoshop 中英對照

File 文件
1.New 新建
2.Open 打開
3.Open As 打開為
4.Open Recent 最近打開文件
5.Close 關閉
6.Save 存儲
7.Save As 存儲為
8.Save for Web 存儲為Web所用格式
9.Revert 恢復
10.Place 置入
11.Import 輸入
1 PDF Image PDF圖像導入
2 Annotations 注釋
12.Export 輸出
13.Manage Workflow 管理工作流程
1 Check In 登記
2 Undo Check Out 還原註銷
3 Upload To Server 上載到伺服器
4 Add To Workflow 添加到工作流程
5 Open From Workflow 從工作流程打開
14.Automate 自動
1 Batch 批次處理
2 Create Droplet 創建快捷批次處理
3 Conditional Mode Change 條件模式更改
4 Contact Sheet 聯繫表
5 Fix Image 限制圖像
6 Multi Page PDF to PSD 多頁面PDF檔到PSD檔
7 Picture package 圖片包
8 Web Photo Gallery Web照片畫廊
15.File Info 文件簡介
16.Print Options 列印選項
17.Page Setup 頁面設置
18.Print 列印
19.Jump to 跳轉到
20.Exit 退出
Edit 編輯

2013年10月27日 星期日

ODE教學<四>矩陣資料

The Matrix Details



The ODE library uses a 3x3 matrix in mathematical notation, i.e. row first, column second. However, internally ODE stores
its matrices as a 4x4 ordered matrix, padded with 0's. The good news is that the dBodyGetRotation function we used to 
retrieve the rotation matrix in DrawGeom above returns a 4x3 rotation matrix. So the ODEtoOGL function transposes the
elements over to the OpenGL order (column first, row second) and plugs in the position vector into the 12th, 13th and
14th elements. 

ODE教學<三>幾何繪圖

Drawing The Geoms

At the end of the SimLoop function, after advancing the simulation one step and then deleting the contact joints, we called a function called DrawGeom. This function serves as a generic rendering routine for all types of geoms, using a different rendering function for each class of geom. In keeping with the examples that came with the ODE library, the DrawGeom function takes four parameters. The first is the geom's ID, then its position vector, rotation matrix and lastly a flag used to toggle the rendering of the geoms axis aligned bounding box. 

ODE教學<二>模擬迴圈simLoop

The simulation loop

要更新每個模擬畫面的函數我們叫做SimLoop,簡單來說,他負責計算幾何物件的碰撞然後重新顯示目前的幾何形狀 

void SimLoop()
{
    // dSpaceCollide負責計算空間中兩個幾何物件的可能的碰撞,
    // 我們必須提供callback函數的位置讓他來計算這些資料。
    // callback函數負責在加入碰撞節點前,評估可能的交互作用,碰撞節點的群組叫做contactgroup
    // 這讓我們在把碰撞節點加入到群組前,可以設定其可能行為
    // 第二個參數則是個指標指向任何我們想傳入callback函數的資料。
    // 下個章節我們會講到nearCallback。
    dSpaceCollide(Space, 0, &nearCallback);

    // 現在我們使用dWorldQuickStep來進行進階的模擬,這是dWorldStep的快速版本,但精確度會稍低。
    // 除了World物件ID之外,我們也將step size傳入,每個 step 會根據一個固定的數字的最小step或迭代來
    //更新模擬。
    // 預設次數為 20 但妳可以用dWorldSetQuickStepNumIterations來改變數值
    dWorldQuickStep(World, 0.05);

    //移除所有world中已發生過的暫時性的碰撞節點
    dJointGroupEmpty(contactgroup);

    // 當我們呼掉 DrawGeom 時,會根據物件的幾何形狀來繪出畫面
    DrawGeom(Object.Geom[0], 0, 0, 0);
}

Callback函數