Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-10 13:45:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-10 13:45:43 +0400
commitfecc3b9d68102630fc53f451a3f405f180b31384 (patch)
tree36d2ca28db9d0eb244ee9fad921d81f5d66adcbb /source/gameengine/Rasterizer/RAS_TexVert.cpp
parentf5c9f2c2530d21474f8e2ee5ea7dfdb483b7ba7d (diff)
add 2 new utility functions to the BGE mesh py api.
mesh.transform(matid, matrix) mesh.transform_uv(matid, matrix, uv_index=-1)) much more efficient then looping over verts in python to transform them.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_TexVert.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_TexVert.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_TexVert.cpp b/source/gameengine/Rasterizer/RAS_TexVert.cpp
index 3b4f4cae30e..6d8cbfece15 100644
--- a/source/gameengine/Rasterizer/RAS_TexVert.cpp
+++ b/source/gameengine/Rasterizer/RAS_TexVert.cpp
@@ -151,3 +151,12 @@ void RAS_TexVert::Transform(const MT_Matrix4x4& mat, const MT_Matrix4x4& nmat)
SetTangent((nmat*MT_Vector4(m_tangent[0], m_tangent[1], m_tangent[2], 1.0)).getValue());
}
+void RAS_TexVert::TransformUV(const MT_Matrix4x4& mat)
+{
+ SetUV((mat * MT_Vector4(m_uv1[0], m_uv1[1], 0.0, 1.0)).getValue());
+}
+
+void RAS_TexVert::TransformUV2(const MT_Matrix4x4& mat)
+{
+ SetUV2((mat * MT_Vector4(m_uv2[0], m_uv2[1], 0.0, 1.0)).getValue());
+}