From c9b4585618ea72f61c4671d4734c9e48b6ce6745 Mon Sep 17 00:00:00 2001 From: Kester Maddock Date: Wed, 30 Jun 2004 13:41:19 +0000 Subject: 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. --- source/gameengine/Ketsji/KX_VertexProxy.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source/gameengine/Ketsji/KX_VertexProxy.cpp') 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; -- cgit v1.2.3