Jump to content
  • Advertisement

SR D

Member
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SR D

  • Rank
    Newbie

Personal Information

  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I am trying to do ray casting with Ogre for the purpose of selecting a triangle on a mesh. I have this question. As I understand it, ray casting is drawing a line from the mouse on the screen into the center of the model. The ray is tested first against a bounding box to find the mesh. However, I have 3 mesh objects, one inside the other and each would have it's own bounding box. So how would I know which mesh to look at for where the ray intersects with which triangle?
  2. I've been learning how to do vertex buffers plus index buffers using Ogre, but I believe this is mostly the same across several engines. I have this question about using vertex buffers + index buffers. Using DynamicGeometryGameState (from Ogre) as an example, I noticed that when drawing the cubes, they were programmatically drawn in order within the createIndexBuffer() function like so ... const Ogre::uint16 c_indexData[3 * 2 * 6] = { 0, 1, 2, 2, 3, 0, //Front face 6, 5, 4, 4, 7, 6, //Back face 3, 2, 6, 6, 7, 3, //Top face 5, 1, 0, 0, 4, 5, //Bottom face 4, 0, 3, 3, 7, 4, //Left face 6, 2, 1, 1, 5, 6, //Right face }; From the above, the front face is drawn using the vertices 0, 1, 2, 2, 3, 0. But when reading in thousands of vertices from a file, one obviously doesn't code an array specifying which vertices make up a face. So how is this done when working with a large number of vertices?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!