Class Eval

Collection of utility functions and data, for the implementation of Evaluators.

Hierarchy

  • Eval

Constructors

Properties

AUTO_INHERIT: "_AutoInherit" = "_AutoInherit"

Pre-defined identifier for the special evaluator parameter that forces the inheritance of evaluator parameters to the immediate children that also have an evaluator assigned.

DERIVED: "Derived" = "Derived"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit EvalResponse member instead.

EVALUATOR_PARAMETERS: "EvaluatorParameters" = "EvaluatorParameters"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit EvalResponse member instead.

INTERACTOR_PARAMETERS: "InteractorParameters" = "InteractorParameters"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit EvalResponse member instead.

MAPPINGS: "Mappings" = "Mappings"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit EvalResponse member instead.

MAPPINGS_DESCRIPTION: "Description" = "Description"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Mapping member instead.

MAPPINGS_Name: "Name" = "Name"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Mapping member instead.

MAPPINGS_ROTATION: "Rotation" = "Rotation"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Mapping member instead.

MAPPINGS_SCALE_S: "ScaleS" = "ScaleS"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Mapping member instead.

MAPPINGS_SCALE_T: "ScaleT" = "ScaleT"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Mapping member instead.

MAPPINGS_TRANSLATION_S: "TranslationS" = "TranslationS"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Mapping member instead.

MAPPINGS_TRANSLATION_T: "TranslationT" = "TranslationT"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Mapping member instead.

NO_GEOMETRY: "_None" = "_None"

Pre-defined identifier for corresponding Evaluator parameter.

Deprecated

Use None instead.

PRODUCTS: "Products" = "Products"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit EvalResponse member instead.

PRODUCTS_EVALUATOR: "Evaluator" = "Evaluator"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_GEOMETRY: "Geometry" = "Geometry"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_GEOMETRY_PARAMETERS: "GeometryParameters" = "GeometryParameters"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_INTERACTOR: "Interactor" = "Interactor"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_LAYER: "Layer" = "Layer"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_MAPPING: "Mapping" = "Mapping"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_MATERIAL: "Material" = "Material"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_PATH: "Path" = "Path"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_POSITION: "Position" = "Position"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_PRODUCT: "Product" = "Product"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_ROTATION: "Rotation" = "Rotation"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_SCALE: "Scale" = "Scale"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_SELECTABLE: "Selectable" = "Selectable"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

PRODUCTS_VISIBLE: "Visible" = "Visible"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit Product member instead.

SCRIPT_KEY: "Key" = "Key"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit ScriptParameter member instead.

SCRIPT_PATH: "Path" = "Path"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit ScriptParameter member instead.

SCRIPT_PRODUCT: "Product" = "Product"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit ScriptParameter member instead.

SCRIPT_VALUE: "Value" = "Value"

Pre-defined identifier for Eval responses.

Deprecated

Use explicit ScriptParameter member instead.

SELECTABLE_NONE: Selectable

Pre-defined identifier for Eval responses.

Deprecated

Use type Selectable instead.

SELECTABLE_PARENT: Selectable

Pre-defined identifier for Eval responses.

Deprecated

Use type Selectable instead.

SELECTABLE_SELF: Selectable

Pre-defined identifier for Eval responses.

Deprecated

Use type Selectable instead.

Methods

  • Call an Evaluator script and merges the response with the passed response.

    Returns

    The enhanced response.

    Parameters

    • response: EvalResponse

      The current response passed from the calling context, or undefined.

    • evaluator: string

      The fully scoped Evaluator class name.

    • productId: string
    • path: string

      The component path for which the Evaluator will be called, null is passed for the root.

    • parameters: {
          [key: string]: any;
      }

      Evaluator parameters.

      • [key: string]: any

    Returns EvalResponse

  • Gets a boolean from a parameter.

    Returns

    The value to be applied.

    Parameters

    • value: any

      The value to get from.

    • Optional defaultValue: boolean

      The default value to be designed if there's no (valid) value.

    Returns boolean

  • Gets an Evaluator object, even if only a string is passed.

    Returns

    An Evaluator object.

    Parameters

    • evaluator: string | object

      Either an Evaluator class name, or an object.

    Returns object

  • Gets a float number from a parameter.

    Returns

    The value to be applied.

    Parameters

    • value: any

      The value to get from.

    • Optional defaultValue: number

      The default value to be designed if there's no (valid) value.

    Returns number

  • Gets an integer number from a parameter.

    Returns

    The value to be applied.

    Parameters

    • value: any

      The value to get from.

    • Optional defaultValue: number

      The default value to be designed if there's no (valid) value.

    Returns number

  • Creates the path prefix for the new product/component.

    Returns

    The complete path for the new product/component.

    Parameters

    • parent: string

      The parent path or null.

    • number: number

      The object's number, starting at 0.

    Returns string

  • Gets a string from a parameter.

    Returns

    The value to be applied.

    Parameters

    • value: any

      The value to get from.

    • Optional defaultValue: string

      The default value to be designed if there's no (valid) value.

    Returns string

  • Gets a string list from a parameter, strings should be separated by space.

    Returns

    The value to be applied.

    Parameters

    • value: string

      The value to get from.

    • Optional minSize: number

      The required minimum size. If needed, the last entry will be inserted again until the required size is reached.

    • Optional defaultValue: string[]

      The default value to be designed if there's no (valid) value.

    Returns string[]

  • Gets a string (out of a list of fix strings) from a parameter.

    Returns

    The value to be applied.

    Parameters

    • value: any

      The value to get from.

    • values: string[]

      The available values, the first one is the default.

    Returns string

  • Checks if the passed name is an evaluator. This may be used for polymorphic geometry parameters that may be Evaluators or Geometries.

    Returns

    true if there is a corresponding evaluator type.

    Parameters

    • evaluator: string

      A potential evaluator type.

    Returns boolean

  • Adds scope to the name if it is not already scoped.

    Handles implicit material categories (e.g. "@Wood_Birch")

    Static

    Returns

    {string}

    Parameters

    • name: string
    • scope: string

    Returns string

Generated using TypeDoc