mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 05:03:52 +02:00
rename Mesh api getPos3 to getPos, deprecate but still support getPos3
This commit is contained in:
parent
2487e34ee8
commit
2fd6bc4130
4 changed files with 8 additions and 7 deletions
|
@ -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<Vec3>(index); }
|
||||
const Vec3& getPos(Index index) const { return _vertexBuffer.get<Vec3>(index); }
|
||||
|
||||
enum Topology {
|
||||
POINTS = 0,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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*);
|
||||
|
|
Loading…
Reference in a new issue