model
Class ComplexObject

java.lang.Object
  extended by model.ComplexObject
Direct Known Subclasses:
PrimitiveObject

public class ComplexObject
extends java.lang.Object


Constructor Summary
ComplexObject(Model model)
           
 
Method Summary
 void clearTexturePath()
          Clears all texture info from this object.
 ComplexObject copy(Model m)
          Creates a deep copy of this complex object.
 void draw(boolean forceRender)
           
 java.lang.String getAlias()
           
 float[] getFillColor()
          Returns a deep copy of this fill color.
 boolean getGlCalculated()
           
 int getID()
           
 IDList getObjectIDList()
          Added by Debbie.
 java.util.ArrayList<ComplexObject> getObjectList()
          Added by Debbie.
 ObjectType getObjectType()
           
 boolean getOverwriteChildColors()
           
 int getPriority()
           
 java.lang.String getTexPath(int i)
           
 int getTexSize()
           
 Transformation getTransformation()
          Added by Debbie.
 float[] getTransMatrixFloat()
          Added by Debbie.
 void load(ModelFile mf)
           
 void rotateBy(float rotX, float rotY, float rotZ)
           
 void rotateTo(float rotX, float rotY, float rotZ)
           
 void scaleBy(float scaleX, float scaleY, float scaleZ)
           
 void scaleTo(float scaleX, float scaleY, float scaleZ)
           
 void setAlias(java.lang.String alias)
           
 void setComplexType(java.lang.String type)
           
 void setFillColor(float[] color)
           
 void setFillColor(float red, float green, float blue, float alpha)
           
 void setID(int id)
           
 void setObjectIDList(IDList objectIDList)
          Added by Debbie.
 void setObjectList(java.util.ArrayList<ComplexObject> list)
          Added by Debbie.
 void setObjectType(ObjectType objectType)
           
 void setOverwriteChildColors(boolean o)
           
 void setPriority(int priority)
           
 void setTexture(java.lang.String texture)
           
 void setTexturePath(int i, java.lang.String s)
          Store the filename of the texture for the specified face
 void setTexturesOn(boolean b)
          Just a stub, since we're not allowing textures on ComplexObjects, just Primitives.
 void setTexturesToNumbers()
          Sets the textures for this object to numbered panels.
 void setTransform(float[] m)
           
 void setTransform(Matrix4x4f m)
           
 void setTransform(Transformation t)
           
 void transformBy(float[] m)
           
 void transformBy(float[] trans, float[] rot, float[] scale)
           
 void transformBy(Matrix4x4f m)
           
 void transformTo(float[] trans, float[] rot, float[] scale)
           
 void translateBy(float transX, float transY, float transZ)
           
 void translateTo(float transX, float transY, float transZ)
           
 void updateTexture(int face, java.lang.String filename)
          Sets the texture of the specified face to the specified image
 void write(java.io.PrintWriter writer, ModelFile mf)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexObject

public ComplexObject(Model model)
Method Detail

copy

public ComplexObject copy(Model m)
Creates a deep copy of this complex object. Everything is the same except for the Model.

Parameters:
m - The Model assignment for the new ComplexObject
Returns:
a copy of the complex object

getGlCalculated

public boolean getGlCalculated()

getID

public int getID()

setID

public void setID(int id)

getOverwriteChildColors

public boolean getOverwriteChildColors()

setOverwriteChildColors

public void setOverwriteChildColors(boolean o)

getAlias

public java.lang.String getAlias()

setAlias

public void setAlias(java.lang.String alias)

getObjectType

public ObjectType getObjectType()

setObjectType

public void setObjectType(ObjectType objectType)

setComplexType

public void setComplexType(java.lang.String type)

getFillColor

public float[] getFillColor()
Returns a deep copy of this fill color.

Returns:
color

setFillColor

public void setFillColor(float red,
                         float green,
                         float blue,
                         float alpha)

setFillColor

public void setFillColor(float[] color)

setTexturesOn

public void setTexturesOn(boolean b)
Just a stub, since we're not allowing textures on ComplexObjects, just Primitives.


getObjectList

public java.util.ArrayList<ComplexObject> getObjectList()
Added by Debbie. Accesses this ComplexObject's list of interior objects.

Returns:
list of objects

setObjectList

public void setObjectList(java.util.ArrayList<ComplexObject> list)
Added by Debbie. Mutates this ComplexObject's list of interior objects.

Parameters:
list - New list of interior objects

getObjectIDList

public IDList getObjectIDList()
Added by Debbie. Accesses the IDList for this ComplexObject's interior objects..

Returns:
list of ObjectIDs

setObjectIDList

public void setObjectIDList(IDList objectIDList)
Added by Debbie. Mutates the IDList for this ComplexObject's interior objects.


getTransformation

public Transformation getTransformation()
Added by Debbie. Accesses the transformation matrix as a Matrix4x4f.

Returns:
transformation matrix

getTransMatrixFloat

public float[] getTransMatrixFloat()
Added by Debbie. Accesses the transformation matrix as a float array.

Returns:
transformation matrix as float[]

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

load

public void load(ModelFile mf)

write

public void write(java.io.PrintWriter writer,
                  ModelFile mf)

draw

public void draw(boolean forceRender)

transformBy

public void transformBy(Matrix4x4f m)

transformBy

public void transformBy(float[] m)

setTransform

public void setTransform(Matrix4x4f m)

setTransform

public void setTransform(float[] m)

setTransform

public void setTransform(Transformation t)

translateBy

public void translateBy(float transX,
                        float transY,
                        float transZ)

scaleBy

public void scaleBy(float scaleX,
                    float scaleY,
                    float scaleZ)

rotateBy

public void rotateBy(float rotX,
                     float rotY,
                     float rotZ)

transformBy

public void transformBy(float[] trans,
                        float[] rot,
                        float[] scale)

translateTo

public void translateTo(float transX,
                        float transY,
                        float transZ)

scaleTo

public void scaleTo(float scaleX,
                    float scaleY,
                    float scaleZ)

rotateTo

public void rotateTo(float rotX,
                     float rotY,
                     float rotZ)

transformTo

public void transformTo(float[] trans,
                        float[] rot,
                        float[] scale)

setTexturePath

public void setTexturePath(int i,
                           java.lang.String s)
Store the filename of the texture for the specified face

Parameters:
i - face #
s - filename of texture

clearTexturePath

public void clearTexturePath()
Clears all texture info from this object.


updateTexture

public void updateTexture(int face,
                          java.lang.String filename)
Sets the texture of the specified face to the specified image

Parameters:
face - number corresponding to face
filename - filename of texture to be mapped to that face

getTexSize

public int getTexSize()

getTexPath

public java.lang.String getTexPath(int i)

setTexturesToNumbers

public void setTexturesToNumbers()
Sets the textures for this object to numbered panels. This is intended to aid the designer, who may not know which face of the building corresponds to which number.


setTexture

public void setTexture(java.lang.String texture)