fCraft.PrepareParametrizedManifold.GetPlayerParametrizationParamsStorage C# (CSharp) Method

GetPlayerParametrizationParamsStorage() public static method

public static GetPlayerParametrizationParamsStorage ( Player p ) : double[][]
p Player
return double[][]
        public static double[][] GetPlayerParametrizationParamsStorage( Player p )
        {
            Object o;
            if ( !p.PublicAuxStateObjects.TryGetValue( ParamsStorageName, out o ) ) {
                o = new double[3][];
                p.PublicAuxStateObjects.Add( ParamsStorageName, o );
            }
            return ( double[][] )o;
        }

Usage Example

Example #1
0
        public ManifoldDrawOperation(Player p, Command cmd)
            : base(p)
        {
            _expressions = PrepareParametrizedManifold.GetPlayerParametrizationCoordsStorage(p);
            if (null == _expressions[0])
            {
                throw new InvalidExpressionException("x is undefined");
            }
            if (null == _expressions[1])
            {
                throw new InvalidExpressionException("y is undefined");
            }
            if (null == _expressions[2])
            {
                throw new InvalidExpressionException("z is undefined");
            }

            _paramIterations = PrepareParametrizedManifold.GetPlayerParametrizationParamsStorage(p);
            if (null == _paramIterations[0] && null == _paramIterations[1] && null == _paramIterations[2])
            {
                throw new InvalidExpressionException("all parametrization variables are undefined");
            }

            if (GetNumOfSteps(0) * GetNumOfSteps(1) * GetNumOfSteps(2) > MaxIterationSteps)
            {
                throw new InvalidExpressionException("too many iteration steps (over " + MaxIterationSteps + ")");
            }

            _scaler = new Scaler(cmd.Next());

            p.Message("Going to draw the following parametrization:\nx=" + _expressions[0].Print() +
                      "\ny=" + _expressions[1].Print() + "\nz=" + _expressions[2].Print());
        }
All Usage Examples Of fCraft.PrepareParametrizedManifold::GetPlayerParametrizationParamsStorage