diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-30 17:41:19 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-30 17:41:19 +0400 |
commit | c9b4585618ea72f61c4671d4734c9e48b6ce6745 (patch) | |
tree | c085b7a47ce5db91e1b825419a7353a412431354 /source/gameengine/Ketsji/KX_VertexProxy.cpp | |
parent | 09d3007b7148c6a0089c1cddcd7c463639d291cd (diff) |
Switch to using floats instead of shorts for normal data - they're supposed to be faster.
Also use shorts instead of ints for the index data, since index arrays are limited anyhow.
Diffstat (limited to 'source/gameengine/Ketsji/KX_VertexProxy.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_VertexProxy.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp index d4f82c31ea2..ae8a5555843 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.cpp +++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp @@ -96,8 +96,7 @@ KX_VertexProxy::_getattr(const STR_String& attr) if (attr == "normal") { - MT_Vector3 normal(m_vertex->getNormal()[0], m_vertex->getNormal()[1], m_vertex->getNormal()[2]); - return PyObjectFromMT_Vector3(normal/32767.); + return PyObjectFromMT_Vector3(m_vertex->getNormal()); } // pos @@ -293,9 +292,7 @@ PyObject* KX_VertexProxy::PyGetNormal(PyObject* self, PyObject* kwds) { - const short* shortnormal = m_vertex->getNormal(); - MT_Vector3 normal(shortnormal[0],shortnormal[1],shortnormal[2]); - normal.normalize(); + MT_Vector3 normal(m_vertex->getNormal()); PyObject* resultlist = PyList_New(3); int index; |