TAILIEUCHUNG - 3D Graphics with OpenGL ES and M3G- P39

3D Graphics with OpenGL ES and M3G- P39:Mobile phones are the new vehicle for bringing interactive graphics technologies to consumers. Graphics that in the 1980s was only seen in industrial flight simulators and at the turn of the millennium in desktop PCs and game consoles is now in the hands of billions of people. This book is about the technology underpinnings of mobile threedimensional graphics, the newest and most rapidly advancing area of computer graphics. | 364 THE M3G SCENE GRAPH CHAPTER 15 Table RayIntersection member functions for querying data about the closest intersection when picking. The surface normal at the intersection point is interpolated if vertex normals are present otherwise its value is undefined. Function Data returned float getDistance The distance from the origin of the ray to the intersection point. The unit corresponds to the length of the direction vector of the ray see getRay below. Node getIntersected float getNormalX float getNormalY float getNormalZ void getRay float ray The Mesh or Sprite3D object intersected. The X Y or Z component of the surface normal at the intersection point. The origin in elements 0 to 2 and direction in elements 3 to 5 of ray of the pick ray. int getSubmeshIndex The index of the submesh intersected. Always zero for sprites. float getTextureT int index float getTextureS int index The S or T texture coordinate for texture unit index at the intersection point. For sprites this is the point within the sprite crop rectangle with 0 0 being at the top left corner of the displayed area and 1 1 at the bottom right. Performance tip Picking complex models can be very slow. To speed it up use separate picking geometry. Make two Mesh objects for your model one for rendering and another simplified one for picking. Disable picking on the rendering model and disable rendering on the picking model. Group them together and use the transformation of the Group node to transform them. OPTIMIZING PERFORMANCE It is easy to fill your scene graph with more objects than M3G can handle with reasonable performance. When building real-life applications you will almost certainly run into problems where M3G is not drawing your world quite as quickly as you would like. While M3G seems to offer very few tools explicitly geared for helping you with performance problems there are a few relatively easy things you can do with the scene graph that may help you along the way. SECTION .

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.