Game Development Community

C++ question

by Danny Goss · in Technical Issues · 04/02/2004 (12:36 pm) · 3 replies

In the dts sdk file DTSMESH.h, all the verticies for the mesh is stored in a variable called verts. verts is defined as:

std::vector verts;

I'm not sure exactly what this is doing. Not an array and I don't think it is a pointer, so how does it store all the vertices for the mesh?

Thanks,

Danny

#1
04/02/2004 (1:00 pm)
A vector is an array-like data storage template. A template is sort of like a class, but works with generic data types.

To be simple, just think of it like a class that you can stick elements into and take elements out of. If you look at where verts is used you will see.
#3
04/02/2004 (1:28 pm)
Thanks,

It all makes sense now.

Danny