gizmoball.graphics
Class GraphicsProperties

java.lang.Object
  extended by gizmoball.graphics.GraphicsProperties

public class GraphicsProperties
extends java.lang.Object

Represents all the graphical properties of an object, including the actual physical primitives.


Constructor Summary
GraphicsProperties(PrimitivesCollection d)
          Creates a new GraphicsProperties from the given primitives.
GraphicsProperties(PrimitivesCollection d, java.awt.Color c)
          Creates a new GraphicsProperties from the given primitives, and the given color
GraphicsProperties(PrimitivesCollection d, java.lang.String texture)
          Creates a new GraphicsProperties from the given primitives, and the given texture filename
 
Method Summary
 void copyOnto(GraphicsProperties other)
          Copies all the graphics-specific information onto the specified other GraphicsProperties object, in such a way that changing one GraphicsProperties object afterwards does not affect the other.
 java.awt.Color getColor()
          Gets the color of this object (or null for no color)
 PrimitivesCollection getPrimitivesCollection()
          Gets the collection of primitives that makes up the physical model for this object
 java.lang.String getTextureFilename()
          Gets the filename for the texture for this object (or null for no texture)
 boolean isWireframe()
          Returns whether or not this object should be drawn in wireframe mode.
 void setColor(java.awt.Color c)
          Sets the color
 void setTextureFilename(java.lang.String fname)
          Sets the texture filename.
 void setVisible(boolean visible)
          Sets whether or not this object is visible (should be drawn).
 void setWireframe(boolean wireframe)
          Sets whether or not this object should be drawn in wireframe mode.
 boolean visible()
          Gets whether or not this object is visible (should be drawn)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsProperties

public GraphicsProperties(PrimitivesCollection d)
Creates a new GraphicsProperties from the given primitives.


GraphicsProperties

public GraphicsProperties(PrimitivesCollection d,
                          java.lang.String texture)
Creates a new GraphicsProperties from the given primitives, and the given texture filename


GraphicsProperties

public GraphicsProperties(PrimitivesCollection d,
                          java.awt.Color c)
Creates a new GraphicsProperties from the given primitives, and the given color

Method Detail

setVisible

public void setVisible(boolean visible)
Sets whether or not this object is visible (should be drawn).


setTextureFilename

public void setTextureFilename(java.lang.String fname)
Sets the texture filename.


setColor

public void setColor(java.awt.Color c)
Sets the color


setWireframe

public void setWireframe(boolean wireframe)
Sets whether or not this object should be drawn in wireframe mode.


isWireframe

public boolean isWireframe()
Returns whether or not this object should be drawn in wireframe mode.


visible

public boolean visible()
Gets whether or not this object is visible (should be drawn)


getColor

public java.awt.Color getColor()
Gets the color of this object (or null for no color)


getTextureFilename

public java.lang.String getTextureFilename()
Gets the filename for the texture for this object (or null for no texture)


getPrimitivesCollection

public PrimitivesCollection getPrimitivesCollection()
Gets the collection of primitives that makes up the physical model for this object


copyOnto

public void copyOnto(GraphicsProperties other)
Copies all the graphics-specific information onto the specified other GraphicsProperties object, in such a way that changing one GraphicsProperties object afterwards does not affect the other. Does not copy the PrimitivesCollection