Class Entity


  • public class Entity
    extends Object
    Class that represents an entity in the world
    Author:
    Darius Dinger
    • Constructor Detail

      • Entity

        public Entity()
    • Method Detail

      • setModel

        public void setModel​(String model)
        Parameters:
        model - New model of the entity
      • getTransform

        public Transformation getTransform()
        Returns:
        Read/writeable transformation of the entity
      • getModel

        public String getModel()
        Returns:
        Model of the entity
      • setRotateWithCam

        public void setRotateWithCam​(boolean rotateWithCam)
        Should the entity rotate and move with the camera
        Parameters:
        rotateWithCam - New value
      • isRotateWithCam

        public boolean isRotateWithCam()
        Returns:
        Should the entity rotate and move with the camera
      • getPickColor

        public Color getPickColor()
        Returns:
        Color of this Entity in the mouse picker
      • isMouseOver

        public boolean isMouseOver()
        Returns true if mouse is over entity.
        Only works, if picking is enabled!!!
        Returns:
        Is mouse over entity
      • isCullFaces

        public boolean isCullFaces()
        Returns:
        Is backface culling enabled
      • setCullFaces

        public void setCullFaces​(boolean cullFaces)
        Parameters:
        cullFaces - Should backface culling be enabled
      • setShader

        public void setShader​(EntityShader shader)
        Parameters:
        shader - Shader for rendering the entity.
      • getShader

        public EntityShader getShader()
        Returns:
        Shader to render this entity.