com.azalient.api.draw
Interface IDrawable

All Known Subinterfaces:
IAgent, IAttached, IChangingDrawable, IMotor, IPerson, ITransport, IVehicle

public interface IDrawable

An object (in model coordinates) can be defined as drawable by implementing this interface, and by adding it to the list of drawables. To be drawn, an object must be registered with the system using IDrawable.registerDrawable()

See Also:
IDrawing.registerDrawable(IDrawable)

Method Summary
 boolean canExplode()
          Returns true if this Drawable object should be drawn with height modified in exploded view.
 IXyz centroid()
          The position used to sort objects by distance from the eye, for transparency and blending
 void destroy()
          This is called by the system to discard resources if the object is deleted
 void draw(IDrawing drw)
          This is called by the system to draw this object
 boolean isTransparent(int aspect)
          Return true if this object should be included in the list of objects to sort by order when blending.
 String name()
          A name used to identify the object if the renderer catches an exception during drawing
 void remove()
          This is called when the object is removed from the list of drawables
 boolean removed()
          Should return true if the object has been removed (and is no longer drawable)
 

Method Detail

name

String name()
A name used to identify the object if the renderer catches an exception during drawing


draw

void draw(IDrawing drw)
This is called by the system to draw this object


destroy

void destroy()
This is called by the system to discard resources if the object is deleted


remove

void remove()
This is called when the object is removed from the list of drawables


removed

boolean removed()
Should return true if the object has been removed (and is no longer drawable)


canExplode

boolean canExplode()
Returns true if this Drawable object should be drawn with height modified in exploded view. For example, people and vehicles return false for this, while buildings return true


isTransparent

boolean isTransparent(int aspect)
Return true if this object should be included in the list of objects to sort by order when blending. The default value is false.


centroid

IXyz centroid()
The position used to sort objects by distance from the eye, for transparency and blending