@@ -901,9 +901,7 @@ class Icosphere
901
901
902
902
~Icosphere () {}
903
903
904
- unsigned int getPositionCount () const { return (unsigned int )vertices.size () / 3 ; }
905
- unsigned int getNormalCount () const { return (unsigned int )normals.size () / 3 ; }
906
- unsigned int getTexCoordCount () const { return (unsigned int )texCoords.size () / 2 ; }
904
+ unsigned int getVertexCount () const { return (unsigned int )vertices.size () / 3 ; }
907
905
unsigned int getIndexCount () const { return (unsigned int )indices.size (); }
908
906
unsigned int getLineIndexCount () const { return (unsigned int )lineIndices.size (); }
909
907
unsigned int getTriangleCount () const { return getIndexCount () / 3 ; }
@@ -1815,7 +1813,7 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CGeometryCreator::createIcoSphere(fl
1815
1813
1816
1814
// Create indices
1817
1815
{
1818
- auto indexView = createIndexView<Icosphere::index_t >(icosphere.getIndexCount (), icosphere.getPositionCount () - 1 );
1816
+ auto indexView = createIndexView<Icosphere::index_t >(icosphere.getIndexCount (), icosphere.getVertexCount () - 1 );
1819
1817
memcpy (indexView.src .buffer ->getPointer (), icosphere.getIndices (), icosphere.getIndexSize ());
1820
1818
retval->setIndexView (std::move (indexView));
1821
1819
}
@@ -1825,7 +1823,7 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CGeometryCreator::createIcoSphere(fl
1825
1823
shapes::AABB<4 , float32_t > aabb;
1826
1824
aabb.maxVx = float32_t4 (radius, radius, radius, 0 .f );
1827
1825
aabb.minVx = -aabb.maxVx ;
1828
- auto positionView = createPositionView (icosphere.getPositionCount (), aabb);
1826
+ auto positionView = createPositionView (icosphere.getVertexCount (), aabb);
1829
1827
memcpy (positionView.src .buffer ->getPointer (), icosphere.getPositions (), icosphere.getPositionSize ());
1830
1828
retval->setPositionView (std::move (positionView));
1831
1829
}
@@ -1851,10 +1849,10 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CGeometryCreator::createIcoSphere(fl
1851
1849
{
1852
1850
using uv_element_t = uint16_t ;
1853
1851
hlsl::vector<uv_element_t , 2 >* uvs;
1854
- auto uvView = createUvView<uv_element_t >(icosphere.getTexCoordCount ());
1852
+ auto uvView = createUvView<uv_element_t >(icosphere.getVertexCount ());
1855
1853
uvs = reinterpret_cast <decltype (uvs)>(uvView.src .buffer ->getPointer ());
1856
1854
1857
- for (auto uv_i = 0u ; uv_i < icosphere.getTexCoordCount (); uv_i++)
1855
+ for (auto uv_i = 0u ; uv_i < icosphere.getVertexCount (); uv_i++)
1858
1856
{
1859
1857
const auto texCoords = icosphere.getTexCoords ();
1860
1858
const auto f32_uv = float32_t2{ texCoords[2 * uv_i], texCoords[(2 * uv_i) + 1 ] };
0 commit comments