1 / 7

Assignment 2 Part 1 Help Note

Assignment 2 Part 1 Help Note. by TA. Bodypart – 人體骨架的基本單位,用來繪製 joint 與 bone 用 Posture – 儲存一個 frame 的資料 Motion – 儲存一整個 motion 的資料. BVHloader.cpp. BodyPart::Draw(Posture* pose) 把一個 frame 的資料餵進來, 利用那些資料來繪製關節點與骨頭 然後 recursively 去繪製它的子關節 BodyPart::UpdateGlobal(Posture* pose)

shirin
Download Presentation

Assignment 2 Part 1 Help Note

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assignment 2Part 1 Help Note by TA

  2. Bodypart – 人體骨架的基本單位,用來繪製joint與bone用 • Posture – 儲存一個frame的資料 • Motion – 儲存一整個motion的資料

  3. BVHloader.cpp • BodyPart::Draw(Posture* pose) • 把一個frame的資料餵進來, • 利用那些資料來繪製關節點與骨頭 • 然後recursively去繪製它的子關節 • BodyPart::UpdateGlobal(Posture* pose) • 在寫第二部分時才會需要呼叫 • 你會需要知道右手拳頭的global position

  4. Motion.cpp • Motion::Load(string name) • 打開bvh檔 • 一次讀一行 • 先建立骨架 • 呼叫 Motion::GenerateSkelton() • 讀frame數 &Sampling rate • 再讀motion data • 每一行呼叫一次 Motion::AddFrameData()

  5. Motion.cpp • Motion::GenerateSkelton(ifstream &inFile, BodyPart *node, BodyPart *prevNode) • 讀一個 joint/end site 的資訊 • OFFSET • Channel • 建立hierarchical 的骨架結構,並遞迴呼叫GenerateSkelton()

  6. Motion.cpp • Motion::AddFrameData(ifstream &inFile, BodyPart *node, int index) • 根據channel數量來讀入若干筆資料 • 注意尤拉角的順序 • 遞迴呼叫AddFrameData,丟入這個關節點的下一個子關節點(node->GetNextBodyPart(i))

  7. Motion.cpp • Motion::IK() • 第二部分才會需要呼叫 • Motion::BuildIKtree(Posture& p) • 第二部分才會需要呼叫

More Related