andrew.kirillov wrote:mitko29 wrote:but there is no use of it .............
Don't use it then. Just delete it and write yours from scratch.
mitko29 wrote:how the glyphtracker is suppose to give me the posit algorithm
GlyphTracker calls EstimatePose() method of posit algorithm and then provides estimated pose as ExtractedGlyphData.TransformationMatrix. If go through the code, you should see that.
Sorry I didn't want to be rude just wasn't my day.
What I wanted to say is that on the project I am working the source code is not helping me

And I don't wan't to think that I don't appreciate the work your are doing , or the one you already have done , sometimes I just need more time to get into the things .
If you don't mind I have one last question :
I am trying to draw the matrix but I always get this error : Object reference not set to an instance of an object.
Here's my code for void Draw and void Update:
Void UPDATE:- Code: Select all
if (array != null)
{
//for (int i = 0; i < array.Length; i++)
// {
pointx = array[0].X;
pointy = array[1].Y;
//}
mm = new Microsoft.Xna.Framework.Vector3(pointx, pointy, 10.0f);
}
Void Draw:- Code: Select all
if (array != null)
{
if ((myModel != null) && (myModel.Meshes.Count > 0))
{
float modelSize = 113;
ModelMesh mesh = myModel.Meshes[0];
Matrix rotation = Matrix.CreateFromYawPitchRoll(
-yaw , -pitch, roll);
Matrix translation = Matrix.CreateTranslation(mm.X, mm.Y, mm.Z);
Matrix scaling = Matrix.CreateScale(modelSize);
//error
Matrix viewMatrix = Matrix.CreateLookAt(
new Vector3(0, 0, 3), Vector3.Zero,Vector3.Up);
Matrix projectionMatrix = Matrix.CreatePerspective(
1, 1 / GraphicsDevice.Viewport.AspectRatio, 1f, 10000);
Matrix world = Matrix.CreateScale(1 / mesh.BoundingSphere.Radius) *
scaling * rotation * translation;
foreach (Effect effect in mesh.Effects)
{
if (effect is BasicEffect)
{
((BasicEffect)effect).EnableDefaultLighting();
}
effect.Parameters["World"].SetValue(world);
//error
effect.Parameters["View"].SetValue(viewMatrix);
effect.Parameters["Projection"].SetValue(projectionMatrix);
}
mesh.Draw();
}
}
P.P: I forgot to set the Matrix4x4
