Hi - I recently started working with genmeshes for parts of my app (most of it uses thing meshes, and I can't really switch off of them yet due to technical reasons), and I'm having trouble figuring out how to correctly map a texture onto a quad. I'm creating a tesselated quad, and once I apply the material (which uses the density texture mapper), the texture is shifted (where the center of the texture is at the edges of the polygon, and the edges of the texture are in the center). I'm mostly familiar with the Thing factory state's SetPolygonTextureMapping function.
Part of my code:
CS::Geometry::TesselatedQuad wall (csVector3(x2, altitude, z1), csVector3(x1, altitude, z1), csVector3(x2, altitude + height, z2));
CS::Geometry::DensityTextureMapper mapper(1);
wall.SetMapper(&mapper);
wall.Append(mesh->GetFactory());
csRef<iMaterialWrapper> mat = engine->GetMaterialList()->FindByName(texture);
mesh->GetMeshObject()->SetMaterialWrapper(mat);
Examples are attached (a pic of the thing mesh with the up/down arrows, and then the gen mesh with the same textures, each arrow is a mesh)
-eventhorizon