Example #1
0
    //only to be constructed by using CreateFacetType()
    private FFacetType(string name, int index, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer)
    {
        this.index = index;
        this.name = name;

        this.initialAmount = initialAmount;
        this.expansionAmount = expansionAmount;
        this.maxEmptyAmount = maxEmptyAmount;

        this.createRenderLayer = createRenderLayer;
    }
Example #2
0
    private FFacetType(string name, int index, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer)      //only to be constructed by using CreateFacetType()
    {
        this.index = index;
        this.name  = name;

        this.initialAmount   = initialAmount;
        this.expansionAmount = expansionAmount;
        this.maxEmptyAmount  = maxEmptyAmount;

        this.createRenderLayer = createRenderLayer;
    }
Example #3
0
    //create your own FFacetTypes by creating them here
    public static FFacetType CreateFacetType(string facetTypeShortName, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer)
    {
        for(int s = 0; s<_facetTypes.Count; s++)
        {
            if(_facetTypes[s].name == facetTypeShortName) return _facetTypes[s]; //don't add it if we have it already
        }

        FFacetType newFacetType = new FFacetType(facetTypeShortName, _nextFacetTypeIndex++, initialAmount, expansionAmount, maxEmptyAmount, createRenderLayer);
        _facetTypes.Add (newFacetType);

        return newFacetType;
    }
Example #4
0
    //create your own FFacetTypes by creating them here
    public static FFacetType CreateFacetType(string facetTypeShortName, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer)
    {
        for (int s = 0; s < _facetTypes.Count; s++)
        {
            if (_facetTypes[s].name == facetTypeShortName)
            {
                return(_facetTypes[s]);                                                      //don't add it if we have it already
            }
        }

        FFacetType newFacetType = new FFacetType(facetTypeShortName, _nextFacetTypeIndex++, initialAmount, expansionAmount, maxEmptyAmount, createRenderLayer);

        _facetTypes.Add(newFacetType);

        return(newFacetType);
    }