S3DVertex: understanding constructor parameters

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
oleo
Posts: 27
Joined: Fri Dec 16, 2005 9:50 am

S3DVertex: understanding constructor parameters

Post 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.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hybrid

Post 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.
Post Reply