[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/libs/kgllib/extras/kgllib
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2008-07-04 14:26:50
Message-ID: 1215181610.542407.18010.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 828066 by rivol:

Add methods to access vertex/normal/etc arrays and their sizes

 M  +8 -0      batch.h  


--- trunk/playground/libs/kgllib/extras/kgllib/batch.h #828065:828066
@@ -85,21 +85,26 @@
      *  contain more, then the remaining ones will be unused).
      **/
     void setVertexCount(int count);
+    int vertexCount() const  { return mVertexCount; }
+
     /**
      * Sets the vertices array to @p vertices.
      **/
     void setVertices(Eigen::Vector2f* vertices)  { setVertices(vertices, 2); }
     void setVertices(Eigen::Vector3f* vertices)  { setVertices(vertices, 3); }
     void setVertices(Eigen::Vector4f* vertices)  { setVertices(vertices, 4); }
+    const void* verticesArray() const  { return mVertices; }
     /**
      * Sets the per-vertex colors array to @p colors.
      **/
     void setColors(Eigen::Vector3f* colors)  { setColors(colors, 3); }
     void setColors(Eigen::Vector4f* colors)  { setColors(colors, 4); }
+    const void* colorsArray() const  { return mColors; }
     /**
      * Sets the normals array to @p normals.
      **/
     void setNormals(Eigen::Vector3f* normals);
+    const void* normalsArray() const  { return mNormals; }
     /**
      * Sets the texture coordinates array to @p texcoords.
      **/
@@ -107,12 +112,15 @@
     void setTexcoords(Eigen::Vector2f* texcoords)  { setTexcoords(texcoords, 2); }
     void setTexcoords(Eigen::Vector3f* texcoords)  { setTexcoords(texcoords, 3); }
     void setTexcoords(Eigen::Vector4f* texcoords)  { setTexcoords(texcoords, 4); }
+    const void* texcoordsArray() const  { return mTexcoords; }
     /**
      * Sets the indices array to @p indices. The array must contain at least
      *  @p count entries (if it contains more, then the remaining ones will be
      *  unused).
      **/
     void setIndices(unsigned int* indices, int count);
+    const void* indicesArray() const  { return mIndices; }
+    int indicesCount() const  { return mIndexCount; }
 
     /**
      * @return current rendering method of this Batch.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic