Here are the examples of the csharp api System.Func.Invoke(Vector3D) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : Util.cs
with MIT License
from roice3
with MIT License
from roice3
public static Vector3D PlaneDualPoint( Geometry g, Vector3D planeKlein )
{
if( g != Geometry.Hyperbolic )
throw new System.NotImplementedException();
if( Math.Abs( planeKlein.W ) < 1e-7 )
{
return new Vector3D( planeKlein.X, planeKlein.Y, 0.0 );
}
double inv = 1.0 / planeKlein.W;
//Vector3D dual = new Vector3D( planeKlein.X * inv, planeKlein.Y * inv, planeKlein.Z * inv, 1.0 );
Vector3D dual = new Vector3D( planeKlein.X * inv, planeKlein.Y * inv, 1.0 ); // Turn into 2D, would be nice to be more general.
//NormalizeInGeometry( g, ref dual );
// Ugh, sign convention of function above messing me up.
System.Func<Vector3D, Vector3D> lorentzNormalize = v =>
{
double normSquared = Math.Abs( LorentzDot( v, v ) );
double norm = Math.Sqrt( normSquared );
v /= norm;
return v;
};
dual = lorentzNormalize( dual );
return dual;
}