algoanim.primitives
Class Triangle

java.lang.Object
  extended by algoanim.primitives.Primitive
      extended by algoanim.primitives.Triangle

public class Triangle
extends Primitive

Represents a triangle defined by three Nodes.

Author:
Stephan Mehlhase

Field Summary
 
Fields inherited from class algoanim.primitives.Primitive
gen
 
Constructor Summary
Triangle(TriangleGenerator tg, Node pointA, Node pointB, Node pointC, java.lang.String name, DisplayOptions display, TriangleProperties tp)
          Instantiates the Triangle and calls the create() method of the associated TriangleGenerator.
 
Method Summary
 Node[] getNodes()
          Returns the Nodes of this Triangle.
 TriangleProperties getProperties()
          Returns the properties of this Triangle.
 void setName(java.lang.String newName)
          Sets the name of this Primitive.
 
Methods inherited from class algoanim.primitives.Primitive
changeColor, exchange, getDisplayOptions, getName, hide, hide, moveBy, moveTo, moveVia, rotate, rotate, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triangle

public Triangle(TriangleGenerator tg,
                Node pointA,
                Node pointB,
                Node pointC,
                java.lang.String name,
                DisplayOptions display,
                TriangleProperties tp)
Instantiates the Triangle and calls the create() method of the associated TriangleGenerator.

Parameters:
tg - the appropriate code Generator.
pointA - the first Node of this Triangle.
pointB - the second Node of this Triangle.
pointC - the third Node of this Triangle.
name - the name of this Triangle.
display - [optional] the DisplayOptions of this Triangle
tp - [optional] the properties of this Triangle.
Method Detail

getNodes

public Node[] getNodes()
Returns the Nodes of this Triangle.

Returns:
the Nodes of this Triangle.

getProperties

public TriangleProperties getProperties()
Returns the properties of this Triangle.

Returns:
the properties of this Triangle.

setName

public void setName(java.lang.String newName)
Description copied from class: Primitive
Sets the name of this Primitive.

Overrides:
setName in class Primitive
Parameters:
newName - the new name for this Primitive.
See Also:
Primitive.setName(java.lang.String)