TazGraph Project v0.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Link Class Reference
Inheritance diagram for Link:
Inheritance graph
[legend]
Collaboration diagram for Link:
Collaboration graph
[legend]

Public Member Functions

 Link (Manager &mManager)
 
 Link (Manager &mManager, EntityID mfromId, EntityID mtoId)
 
 Link (Manager &mManager, EntityID mfromId, EntityID mtoId, EntityID m_fromPort, EntityID m_toPort, int m_fromSlot, int m_toSlot)
 
 Link (Manager &mManager, glm::vec3 mfromPos, glm::vec3 mtoPos)
 
 Link (Manager &mManager, ConnectionType m_type)
 
void onCreation () override
 
void addToGroup (Group mGroup) override
 
void removeGroup (Group mGroup) override
 
void update (float deltaTime) override
 
void cellUpdate () override
 
void updateArrowHeads () override
 
void setConnectionType (ConnectionType setType) override
 
int findNextAvailableSlotIndex (Entity *portEntity)
 
void removeSlotAndReindex (Entity *portEntity, int slotIndexToRemove)
 
int assignSlotIndex (NodeEntity *node, EntityID newPort, EntityID oldPort, int oldSlotIndex)
 
void updateConnection () override
 
void updatePortSlots () override
 
void updateConnectionPositions ()
 
void addArrowHead () override
 
void removeArrowHead () override
 
EntityID getBestPortForConnection (const glm::vec3 &fromPos, const glm::vec3 &toPos)
 
void updateLinksSlotIndices (NodeEntity *node, EntityID portIndex, int removedSlotIndex, bool isFrom)
 
void removeSlotFromNode (NodeEntity *node, EntityID port, int slotIndex, bool isFrom)
 
void imgui_print () override
 
void imgui_display () override
 
void destroy ()
 
std::vector< EntityID > getSlots (Entity *portEntity) const
 
bool removeSlot (Entity *portEntity, int index)
 
size_t getSlotCount (Entity *portEntity) const
 
- Public Member Functions inherited from LinkEntity
 LinkEntity (Manager &mManager)
 
 LinkEntity (Manager &mManager, EntityID mfromId, EntityID mtoId)
 
 LinkEntity (Manager &mManager, EntityID mfromId, EntityID mtoId, EntityID m_fromPort, EntityID m_toPort, int m_fromSlot, int m_toSlot)
 
 LinkEntity (Manager &mManager, glm::vec3 mfrom, glm::vec3 mto)
 
void setComponentEntity (LinkComponent *c) override
 
void removeFromCells () override
 
void removeEntityFromCell () override
 
EntityID getFromNode () const
 
EntityID getToNode () const
 
- Public Member Functions inherited from MultiCellEntity
 MultiCellEntity (Manager &mManager)
 
void setOwnerCells (std::vector< Cell * > cells)
 
CellgetOwnerCells () const
 
- Public Member Functions inherited from Entity
void setId (EntityID m_id)
 
EntityID getId ()
 
void hide ()
 
void reveal ()
 
bool isHidden ()
 
 Entity (Manager &mManager)
 
virtual CellgetOwnerCell () const
 
void draw (size_t e_index, PlaneModelRenderer &batch, TazGraphEngine::Window &window)
 
void draw (size_t e_index, LineRenderer &batch, TazGraphEngine::Window &window)
 
void draw (size_t e_index, PlaneColorRenderer &batch, TazGraphEngine::Window &window)
 
void draw (size_t e_index, LightRenderer &batch, TazGraphEngine::Window &window)
 
EntitygetParentEntity ()
 
void setParentEntity (Entity *pEntity)
 
bool isActive ()
 
bool hasGroup (Group mGroup)
 
template<typename T >
bool hasComponent () const
 
template<typename T , typename... TArgs>
T & addComponent (TArgs &&... mArgs)
 have addScript function
 
template<typename T >
void removeComponent ()
 
virtual void setComponentEntity (Component *c)
 
virtual void setComponentEntity (NodeComponent *c)
 
template<typename T >
T & GetComponent () const
 
template<typename T >
T * GetComponentPtr ()
 
bool hasComponentByName (const std::string &componentName)
 
ManagergetManager ()
 
virtual void removeFromCell ()
 

Additional Inherited Members

- Public Types inherited from LinkEntity
enum class  ConnectionType { NODE_TO_NODE , PORT_TO_PORT , DIRECT_POSITIONS , GHOST_PORT_TO_PORT }
 
- Public Attributes inherited from LinkEntity
EntityID fromId = 0
 When Node_to_Node.
 
EntityID toId = 0
 
ConnectionType type = ConnectionType::NODE_TO_NODE
 
glm::vec3 fromPos = glm::vec3(0)
 When DirectPosition.
 
glm::vec3 toPos = glm::vec3(0)
 
EntityID fromPort = -1
 When Port_to_Port.
 
EntityID toPort = -1
 
int fromSlotIndex = -1
 
int toSlotIndex = -1
 
- Public Attributes inherited from MultiCellEntity
std::vector< Cell * > ownerCells = {}
 
- Public Attributes inherited from Entity
bool isVertical = false
 
float slotSpacing = 0.0f
 
std::map< EntityID, EntityID > children
 child_index(id) -> real_entity_id
 
std::vector< std::unique_ptr< BaseComponent > > components
 
- Protected Attributes inherited from Entity
bool active = true
 
bool hidden = false
 
ComponentArray componentArray = {}
 
ComponentBitSet componentBitSet
 
GroupBitSet groupBitSet
 
std::optional< ComponentArray > nodeComponentArray
 
std::optional< ComponentBitSet > nodeComponentBitSet
 
Entityparent_entity = nullptr
 
Managermanager
 the object doesnt move, so we can have pointer
 

Member Function Documentation

◆ addArrowHead()

void Link::addArrowHead ( )
inlineoverridevirtual

Reimplemented from LinkEntity.

◆ addToGroup()

void Link::addToGroup ( Group  mGroup)
inlineoverridevirtual

Reimplemented from Entity.

◆ cellUpdate()

void Link::cellUpdate ( )
inlineoverridevirtual

Reimplemented from Entity.

◆ destroy()

void Link::destroy ( )
inlinevirtual

Reimplemented from Entity.

◆ imgui_display()

void Link::imgui_display ( )
inlineoverridevirtual

Reimplemented from Entity.

◆ imgui_print()

void Link::imgui_print ( )
inlineoverridevirtual

Reimplemented from Entity.

◆ onCreation()

void Link::onCreation ( )
inlineoverridevirtual

Reimplemented from Entity.

◆ removeArrowHead()

void Link::removeArrowHead ( )
inlineoverridevirtual

Reimplemented from LinkEntity.

◆ removeGroup()

void Link::removeGroup ( Group  mGroup)
inlineoverridevirtual

Reimplemented from Entity.

◆ setConnectionType()

void Link::setConnectionType ( ConnectionType  setType)
inlineoverridevirtual

Reimplemented from LinkEntity.

◆ update()

void Link::update ( float  deltaTime)
inlineoverridevirtual

Reimplemented from Entity.

◆ updateArrowHeads()

void Link::updateArrowHeads ( )
inlineoverridevirtual

Reimplemented from LinkEntity.

◆ updateConnection()

void Link::updateConnection ( )
inlineoverridevirtual

Reimplemented from LinkEntity.

◆ updatePortSlots()

void Link::updatePortSlots ( )
inlineoverridevirtual

Reimplemented from LinkEntity.


The documentation for this class was generated from the following file: