jme.entity
Interface EntityInterface

All Known Implementing Classes:
Entity, ParticleSystem

public interface EntityInterface

EntityInterface defines an interface for handling entities. Where an entity is any game element. This will handle anything from a tree to a player to a camera.

Version:
1
Author:
Mark Powell

Method Summary
 void checkVisibility(Frustum frustum)
          checkVisibility makes the appropriate checks to test if the entity is currently visible or not.
 BoundingVolume getBoundingVolume()
          getBoundingVolume returns the volume that contains the entity.
 boolean isVisible()
          isVisible returns true if the entity is visible and false if it is not.
 void render()
          render handles the making the required calls to the rendering framework (OpenGL) to display the entity to the screen.
 void setBoundingVolume(BoundingVolume volume)
          setBoundingVolume sets the volume that contains this entity.
 void update(float time)
          update is used to alter the entity in any way to reflect the passage of time.
 

Method Detail

render

public void render()
render handles the making the required calls to the rendering framework (OpenGL) to display the entity to the screen.


update

public void update(float time)
update is used to alter the entity in any way to reflect the passage of time. This could be position changes, animation, etc.

Parameters:
time - the amount of time between frames.

isVisible

public boolean isVisible()
isVisible returns true if the entity is visible and false if it is not.

Returns:
true if the entity is visible and false otherwise.

checkVisibility

public void checkVisibility(Frustum frustum)
checkVisibility makes the appropriate checks to test if the entity is currently visible or not.

Parameters:
frustum - the view frustum to check against.

setBoundingVolume

public void setBoundingVolume(BoundingVolume volume)
setBoundingVolume sets the volume that contains this entity.

Parameters:
volume - the volume that contains the entity.

getBoundingVolume

public BoundingVolume getBoundingVolume()
getBoundingVolume returns the volume that contains the entity.

Returns:
the volume that contains the entity.