AForge.Math.Geometry.Posit.Posit C# (CSharp) Method

Posit() public method

Initializes a new instance of the Posit class.
The model must have 4 points.
public Posit ( Vector3 model, float focalLength ) : System
model Vector3 Array of vectors containing coordinates of four real model's point (points /// must not be on the same plane).
focalLength float Effective focal length of the camera used to capture the model.
return System
        public Posit( Vector3[] model, float focalLength )
        {
            if ( model.Length != 4 )
            {
                throw new ArgumentException( "The model must have 4 points." );
            }

            this.focalLength = focalLength;
            modelPoints = (Vector3[]) model.Clone( );

            // compute model vectors
            modelVectors = Matrix3x3.CreateFromRows(
                model[1] - model[0],
                model[2] - model[0],
                model[3] - model[0] );

            // compute pseudo inverse matrix
            modelPseudoInverse = modelVectors.PseudoInverse( );
        }