O'Reilly logo

Character Animation with Direct3D® by Carl Granberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Picking a Hardware-Rendered Mesh

Picking is another name for a collection of ray intersection tests. A ray is usually made up of two 3D vectors—an origin and a direction. The most common example is a ray in your 3D world that is calculated from the position of your mouse (in screen space)—something you have probably come across in an introductory book on 3D graphics. In this chapter I won’t cover how the mouse ray is calculated; rather, I’ll stick to the general case of having any arbitrary ray in world space and using it to paint a decal on a character.

There are several ray intersection tests that may prove useful when you write your game code. The most common ray intersection tests are ray-bounding box, ray-bounding sphere, ray-plane, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required