Đang chuẩn bị liên kết để tải về tài liệu:
Character Animation with Direct3D- P9

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Character Animation with Direct3D- P9:This book is primarily aimed at teaching indie and hobby game developers how to create character animation with Direct3D. Also, the seasoned professional game developer may find some interesting things in this book. You will need a solid understanding of the C++ programming language as well as general object-oriented programming skills. | 146 Character Animation with Direct3D Create Rigid Body btRigidBody body new btRigidBody mass ms cs localInertia Add the new body to the dynamics world pDynamicsWorld- addRigidBody body Then to run the simulation all you need to do is call the stepSimulation function each frame like this pDynamicsWorld- stepSimulation deltaTime That s it The rigid body you have now created will be simulated each frame colliding with other rigid bodies etc. However you still won t see anything on the screen because the box is nothing but a logical representation. You need to hook up the current motion state of the rigid body to a mesh. In the next example I create a rigid body for the Oriented Bounding Box OBB class that was covered in the previous chapter. So each frame the rigid body is updated using the Bullet physics library and then rendered using DirectX like this void OBB Render Get Motion state from rigid body btMotionState ms m_pBody- getMotionState if ms NULL return Convert the motion state to a DX matrix and use it to set the world transform pEffect- SetMatrix matW BT2DX_MATRIX ms Render the mesh as usual using whichever lighting technique D3DXHANDLE hTech pEffect- GetTechniqueByName Lighting pEffect- SetTechnique hTech pEffect- Begin NULL NULL pEffect- BeginPass 0 m_pMesh- DrawSubset 0 pEffect- EndPass pEffect- End You ll find the source code for the first example using the Bullet physics engine in Example 7.1. lease purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Chapter 7 Ragdoll Simulation 147 Constraints After that little detour of getting to know the Bullet physics library it is time to get back to what I was trying to achieve in this chapter ragdoll animation You need to choose some of the major bones of the character and create a physical representation for them that can be simulated in the physics engine. Then as the ragdoll is simulated the position and orientation are updated for the bones using the transforms taken from the rigid bodies .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.