Page 1 of 1

S3DVertex: understanding constructor parameters

Posted: Thu Mar 09, 2006 2:54 pm
by oleo
Hi!
I'm trying to understand the meaning of tcoords in the constructor of S3DVertex.

From API docs:

Code: Select all

irr::video::S3DVertex::S3DVertex   (   const core::vector3df &   pos, 
  const core::vector3df &   normal, 
  video::SColor &   color, 
  const core::vector2d< f32 > &   tcoords
  )    [inline]
     
  constructor
What tcoords represents? If they represents "texture coordinates" (I've read something in other posts) how they have to be used? I'm not very able with textures... :cry:
Thanks for your help.
Fabio.

Posted: Thu Mar 09, 2006 7:52 pm
by Acki
I think you don't know what a S3DVertex is !!! :?
It's a point in a 3d world !!!
tcoords represents the position within the 3d space !!!
But you can all this read if you use the documantation included to the sdk and search for it there...

Posted: Thu Mar 09, 2006 9:30 pm
by hybrid
Acki wrote:I think you don't know what a S3DVertex is !!! :?
It's a point in a 3d world !!!
tcoords represents the position within the 3d space !!!
But you can all this read if you use the documantation included to the sdk and search for it there...
I'm sorry, Acki, but vector3df is a point in the 3d world. S3DVertex is a rather complex structure. However, it is still a point. But not just a point in the 3d space. It is the edge point of a 3d plane (often a triangle). tcoord is indeed the texture coord. A texture is a 2d image. So if you have a triangle with three 3d positions you will need three 2d positions to know which part of the image will be mapped onto the plane.