class ThreeDViewer.EntityCollection

Overview

Class containing a list of entities and a reference to its parents. More…

class EntityCollection: IEnumerable< Entity >
{
public:
    // properties

    int Count;
    List<Face> AbsoluteFaces;
    Entity this[int index];

    // methods

    EntityCollection(Entity parent);
    EntityCollection(Entity parent, List<Entity> entities);
    void Add(Entity entity);
    void Remove(Entity entity);
    void Clear();
    IEnumerator<Entity> GetEnumerator();
};

Detailed Documentation

Class containing a list of entities and a reference to its parents.

Properties

int Count

Gets the number of entities contained in the collection.

List<Face> AbsoluteFaces

Gets all the absolute faces in the collection (this includes the children of the entities).

Entity this[int index]

Gets the entity in the specified index.

Parameters:

index

Index of the entity.

Returns:

The specified entity.

Methods

EntityCollection(Entity parent)

Initializes a new instance of the EntityCollection class.

Parameters:

parent

Parent of this collection.

EntityCollection(Entity parent, List<Entity> entities)

Initializes a new instance of the EntityCollection class.

Parameters:

parent

Parent of this collection.

entities

Entities stored in this collection.

void Add(Entity entity)

Adds an entity to the list. Checks if the entity is in the list first and updates it’s parent when added.

Parameters:

entity

Entity to add in the list.

void Remove(Entity entity)

Removes an entity in the list. Sets the parent of the entity as null.

Parameters:

entity

Entity to remove from the list.

void Clear()

Removes all the elements from the collection.