Acnirak
27-09-2010 16:01:07
Hi All;
i am creating a mesh by using manual object but i have serious problems when i try to save it to a .mesh file;
Target is my manualobject and the code below is giving me a mesh which is working without a problem;(Target have indexes too)
Target.ConvertToMesh(MeshName);
it is ok till now
but after this
MeshSerializer SerializeMesh = new MeshSerializer();
MeshManager meshmanage = new MeshManager();
meshmanage.BoundsPaddingFactor = 1f;
Mesh ISSF = new Mesh(meshmanage, "Deneme", resourceno, "Deneme");
ISSF._setBounds(AAB);
SerializeMesh.ExportMesh(ISSF, "Ucgen.mesh");
it says thay converting mesh is ok and i am finding the file but it is only 72 bytes and i dont think it writes it something actually because file size doesnt change even with bigger manualobjects and
i cant load mesh from file.
an example code is like that:
ManualObject Target = mSceneMgr.CreateManualObject(MeshName);
//DrawTarget(mSceneMgr, Target, 9, 20, 5, 20);
Target.Begin("BaseWhiteNoLighting", RenderOperation.OperationTypes.OT_TRIANGLE_LIST);
Target.Position(0, 0, 0);
Target.Position(50, 0, 0);
Target.Position(0, 75, 0);
Target.Triangle(0, 1, 2);
Target.End();
AxisAlignedBox AAB = new AxisAlignedBox(-10f, -10f, -10f, 100, 100, 100);
Target.BoundingBox = AAB;
AAB.Volume();
Target.ConvertToMesh(MeshName);
it works til now;
but after this serialize doesnt work properly;
MeshSerializer SerializeMesh = new MeshSerializer();
MeshManager meshmanage = new MeshManager();
meshmanage.BoundsPaddingFactor = 1f;
Mesh ISSF = new Mesh(meshmanage, "Deneme", resourceno, "Deneme");
ISSF._setBounds(AAB);
SerializeMesh.ExportMesh(ISSF, "Ucgen.mesh");
i am creating a mesh by using manual object but i have serious problems when i try to save it to a .mesh file;
Target is my manualobject and the code below is giving me a mesh which is working without a problem;(Target have indexes too)
Target.ConvertToMesh(MeshName);
it is ok till now
but after this
MeshSerializer SerializeMesh = new MeshSerializer();
MeshManager meshmanage = new MeshManager();
meshmanage.BoundsPaddingFactor = 1f;
Mesh ISSF = new Mesh(meshmanage, "Deneme", resourceno, "Deneme");
ISSF._setBounds(AAB);
SerializeMesh.ExportMesh(ISSF, "Ucgen.mesh");
it says thay converting mesh is ok and i am finding the file but it is only 72 bytes and i dont think it writes it something actually because file size doesnt change even with bigger manualobjects and
i cant load mesh from file.
an example code is like that:
ManualObject Target = mSceneMgr.CreateManualObject(MeshName);
//DrawTarget(mSceneMgr, Target, 9, 20, 5, 20);
Target.Begin("BaseWhiteNoLighting", RenderOperation.OperationTypes.OT_TRIANGLE_LIST);
Target.Position(0, 0, 0);
Target.Position(50, 0, 0);
Target.Position(0, 75, 0);
Target.Triangle(0, 1, 2);
Target.End();
AxisAlignedBox AAB = new AxisAlignedBox(-10f, -10f, -10f, 100, 100, 100);
Target.BoundingBox = AAB;
AAB.Volume();
Target.ConvertToMesh(MeshName);
it works til now;
but after this serialize doesnt work properly;
MeshSerializer SerializeMesh = new MeshSerializer();
MeshManager meshmanage = new MeshManager();
meshmanage.BoundsPaddingFactor = 1f;
Mesh ISSF = new Mesh(meshmanage, "Deneme", resourceno, "Deneme");
ISSF._setBounds(AAB);
SerializeMesh.ExportMesh(ISSF, "Ucgen.mesh");