Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * The MIT License (MIT)
   * Copyright (c) 2014 Christian Gärtner
   * Permission is hereby granted, free of charge, to any person obtaining a copy
   * of this software and associated documentation files (the "Software"), to deal
   * in the Software without restriction, including without limitation the rights
   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  * copies of the Software, and to permit persons to whom the Software is
  * furnished to do so, subject to the following conditions:
  * The above copyright notice and this permission notice shall be included in all
  * copies or substantial portions of the Software.
 package org.achtern.AchternEngine.core.scenegraph.entity;
An Entity is the base of all things which live and do stuff in the scenegraph. The need a parent (org.achtern.AchternEngine.core.scenegraph.Node) to work properly.
 public interface Entity extends Updatable {

Marks this Entity to be no longer needed. This is just a hint for the various engines operating with this Entity. The org.achtern.AchternEngine.core.rendering.RenderEngine for example could decide to delete the resources for a given Entity from the graphics card's memory, etc.
     public void destroy();

Set whether or not the resources assoc. with this Entity can be destroyed.

shouldbeDestroyed whether or not to destroy this Entity
See also:
     public void destroy(boolean shouldbeDestroyed);

If true, the Entity is no longer needed.

whether or not to destroy this Entity
See also:
     public boolean shouldBeDestroyed();

Called on render, draw stuff here

renderEngine The active renderEngine (caller)
     public void render(RenderEngine renderEngine);

Should return the current transform of the Entity

Current transform
     public Transform getTransform();

Set the parent node

parent The new parent
     public void setParent(Node parent);

Set the CoreEngine

engine The new coreengine
     public void setEngine(CoreEngine engine);

Called when an Entity is about to get removed from the active scenegraph
     public void removed();

Called when an Entity gets attached to an scenegraph
     public void attached();

Should return the name of the Entits

The name
    public String getName();

Returns a Node containing this Entity. The Name should equal the name of this Entity.

Node with this Entity
    public Node boxed();
New to GrepCode? Check out our FAQ X