Mesh - geometric container sets vertex model object. Tops in its composition can have the following characteristics: position, color, vector front, texture coordinates. More...
Public Types | |
enum | stDrawFormat { _GL_POINTS = 0x000, _GL_LINES = 0x001, _GL_LINE_LOOP = 0x002, _GL_LINE_STRIP = 0x003, _GL_TRIANGLES = 0x004, _GL_TRIANGLE_STRIP = 0x005, _GL_TRIANGLE_FAN = 0x006, _GL_QUADS = 0x007 , _GL_POLYGON = 0x009, _GL_INDEX_BYTE = 0x01000000 , _GL_NEED_INDEX_UPDATE = 0x10000000, _GL_NEED_ELEMENT_UPDATE = 0x20000000 } |
the format of building geometry. More... | |
enum | stFormat { _TGL_V2F = 0x00000001, _TGL_V3F = 0x00000002 , _TGL_V2D = 0x00000004, _TGL_V3D = 0x00000005 , _TGL_N3F = 0x00000008, _TGL_0T1F = 0x00000010, _TGL_0T2F = 0x00000020 , _TGL_C3F = 0x10000000, _TGL_C4F = 0x20000000 } |
the types of fields of geometry More... | |
enum | stItem { _TEXTURE0 = 0, _TEXTURE1 = 1, _TEXTURE2 = 2 , _COLOR = 6, _NORMAL = 7, _VECTOR = 8 } |
field vertex geometry. More... | |
Public Member Functions | |
CSAD_API vector3d | calculateBound () |
preset sphere describing cube | |
CSAD_API void | calculateNormals () |
recalculate normals | |
CSAD_API void | cleanIndex (int from, int count) |
specifies the zero index elements | |
template<typename T > | |
_FORCEINLINE LinkArray< T > | color () |
The array of vertices color. | |
_FORCEINLINE unsigned char *& | elements () |
елементы геометрии | |
_FORCEINLINE unsigned int | elementsCount () |
returns the number of vertices | |
_FORCEINLINE unsigned int | elementSize () |
The size element. | |
_FORCEINLINE vector4d & | getBoundSphere () |
returns a sector describing the cube in which pomeshaetsa geometry | |
CSAD_API unsigned int | getColorType () |
returns the color format of vertices: float[3] float[4] | |
_FORCEINLINE stDrawFormat | getDrawFormat () |
former rendering | |
CSAD_API unsigned int | getTexType (int id) |
CSAD_API unsigned int | getVectorType () |
template<typename T > | |
_FORCEINLINE LinkArray< T > | index () |
Array indexes. | |
CSAD_API int | indexById (unsigned int id) |
value of index | |
_FORCEINLINE unsigned int | indexCount () |
returns the number of indexes | |
CSAD_API bool | isNormal () |
returns true if the vertices contains the vector of the front | |
template<typename T > | |
_FORCEINLINE LinkArray< T > | normal () |
Array normals. | |
CSAD_API Mesh & | resizeIndex (unsigned int count) |
Changes the number of indexes, preserving the values at the end of the array. | |
CSAD_API Mesh & | resizeVertex (unsigned int count) |
Changes the number of elements, preserving the values at the end of the array. | |
CSAD_API Mesh & | setDrawFormat (stDrawFormat attr) |
задает тип геометри | |
CSAD_API Mesh & | setFields (unsigned int attr) |
to install the vertex format | |
CSAD_API Mesh & | setIndex (unsigned int i, int val) |
installing index | |
CSAD_API Mesh & | setIndexCount (unsigned int count) |
Sets the number of indexes, the previous value of the index is not saved. | |
CSAD_API Mesh & | setIndexLine (unsigned int i, unsigned int a, unsigned int b) |
installation of two indexess in a row | |
CSAD_API Mesh & | setIndexQuad (unsigned int i, unsigned int a, unsigned int b, unsigned int c, unsigned int d) |
installation of four indexes in a row | |
CSAD_API Mesh & | setIndexTri (unsigned int i, unsigned int a, unsigned int b, unsigned int c) |
installation of three indexes in a row | |
CSAD_API Mesh & | setVector (unsigned int i, float *v) |
slow installation vertix | |
CSAD_API Mesh & | setVector (unsigned int i, double *v) |
slow installation vertix | |
CSAD_API Mesh & | setVertexCount (unsigned int count) |
Sets the number of elements vertex buffer, the previous value of vertices is not saved. | |
template<typename T > | |
_FORCEINLINE LinkArray< T > | texture0 () |
An array of texture coordinates. | |
template<typename T > | |
_FORCEINLINE LinkArray< T > | texture1 () |
An array of texture coordinates. | |
_FORCEINLINE void | update () |
the next drawing geometry updated on the device | |
_FORCEINLINE void | updateVertex () |
the next drawing vertex geometry updated on the device | |
template<typename T > | |
_FORCEINLINE LinkArray< T > | vector () |
The array of vertices positions. | |
template<typename T > | |
_FORCEINLINE LinkArray< T > | vertex () |
The array of vertices. | |
Static Public Attributes | |
static CSAD_API Mesh * | Cube |
Геометрия куба | |
static CSAD_API Mesh * | Quad |
Геометрия квадрата | |
Friends | |
class | gen::ModellerMesh |
Mesh - geometric container sets vertex model object. Tops in its composition can have the following characteristics: position, color, vector front, texture coordinates.
the format of building geometry.
enum csad::Mesh::stFormat |
the types of fields of geometry
enum csad::Mesh::stItem |
CSAD_API unsigned int csad::Mesh::getTexType | ( | int | id) |
The field type of texture coordinates, if the field is missing returns 0.
id | - индекс слоя текстурных координат. |
CSAD_API unsigned int csad::Mesh::getVectorType | ( | ) |
The type of the field of coordinate geometry, if the field is missing returns 0.