# EQGenerator

### Description

EQGenerator is base abstract class for all environment query [generators](https://renownedgames.gitbook.io/ai-tree/environment-query-system/useful-objects/environment-query/generator).

Generators are used to define shape of area that is covered by [EQS](https://renownedgames.gitbook.io/ai-tree/environment-query-system).

To create a environment query [generator](https://renownedgames.gitbook.io/ai-tree/environment-query-system/useful-objects/environment-query/generator) you should inherit from EQGenerator class and implement logic that is described below.

### GeneratePoints

When inheriting from EQGenerator you have to override GeneratePoints method.

<pre class="language-csharp"><code class="lang-csharp"><strong>public class ExampleEQGenerator : EQGenerator
</strong>{
    public override IEnumerable&#x3C;Vector3> GeneratePoints()
    {
        throw new System.NotImplementedException();
    }
}
</code></pre>

* GeneratePoints returns positions of all generated points.
* GeneratePoints gets called when [Environment Query](https://renownedgames.gitbook.io/ai-tree/environment-query-system/useful-objects/environment-query) object generates [items](https://renownedgames.gitbook.io/ai-tree/environment-query-system/items).
