diff --git a/libraries/graphics/src/graphics/Geometry.h b/libraries/graphics/src/graphics/Geometry.h index a75fb1bf62..485542d26b 100755 --- a/libraries/graphics/src/graphics/Geometry.h +++ b/libraries/graphics/src/graphics/Geometry.h @@ -74,7 +74,7 @@ public: size_t getNumIndices() const { return _indexBuffer.getNumElements(); } // Access vertex position value - const Vec3& getPos3(Index index) const { return _vertexBuffer.get(index); } + const Vec3& getPos(Index index) const { return _vertexBuffer.get(index); } enum Topology { POINTS = 0, diff --git a/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp b/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp index 741478789e..8f3d1ffec1 100644 --- a/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp +++ b/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp @@ -21,7 +21,7 @@ int SimpleMeshProxy::getNumVertices() const { return (int)_mesh->getNumVertices(); } -glm::vec3 SimpleMeshProxy::getPos3(int index) const { - return _mesh->getPos3(index); +glm::vec3 SimpleMeshProxy::getPos(int index) const { + return _mesh->getPos(index); } diff --git a/libraries/model-networking/src/model-networking/SimpleMeshProxy.h b/libraries/model-networking/src/model-networking/SimpleMeshProxy.h index 24c3fca27e..073eb1c00f 100644 --- a/libraries/model-networking/src/model-networking/SimpleMeshProxy.h +++ b/libraries/model-networking/src/model-networking/SimpleMeshProxy.h @@ -26,8 +26,8 @@ public: int getNumVertices() const override; - glm::vec3 getPos3(int index) const override; - + glm::vec3 getPos(int index) const override; + glm::vec3 getPos3(int index) const override { return getPos(index); } // deprecated protected: const MeshPointer _mesh; diff --git a/libraries/shared/src/RegisteredMetaTypes.h b/libraries/shared/src/RegisteredMetaTypes.h index 4fee78a0db..78e368748b 100644 --- a/libraries/shared/src/RegisteredMetaTypes.h +++ b/libraries/shared/src/RegisteredMetaTypes.h @@ -363,12 +363,13 @@ public: /**jsdoc * Get the position of a vertex in the mesh. - * @function MeshProxy#getPos3 + * @function MeshProxy#getPos * @param {number} index - Integer index of the mesh vertex. * @returns {Vec3} Local position of the vertex relative to the mesh. * @deprecated Use the {@link Graphics} API instead. */ - Q_INVOKABLE virtual glm::vec3 getPos3(int index) const = 0; + Q_INVOKABLE virtual glm::vec3 getPos(int index) const = 0; + Q_INVOKABLE virtual glm::vec3 getPos3(int index) const { return getPos(index); } // deprecated }; Q_DECLARE_METATYPE(MeshProxy*);