edu.ohiou.cs456_badabing.sceneapi.basic
Class MaterialGroupNode

java.lang.Object
  extended by edu.ohiou.cs456_badabing.sceneapi.basic.ANode
      extended by edu.ohiou.cs456_badabing.sceneapi.basic.MaterialGroupNode

public class MaterialGroupNode
extends ANode

Node that renders a material group.

Description: node that renders a material group.

Copyright: Lev A Neiman 2008

Company: Ohio University EECS


Field Summary
private  java.util.Vector<Triangle> faces
          Triangles belonging to this group.
 
Fields inherited from class edu.ohiou.cs456_badabing.sceneapi.basic.ANode
children, display_list, name, no_disp_list, parent, ppop, rotation, rotation_angle, scale, show, translation
 
Constructor Summary
MaterialGroupNode(java.util.Vector<Triangle> mtl_group)
          default constructor
 
Method Summary
 Coordinate centrify()
           
 Coordinate getCenter()
           
 void render(GLAutoDrawable gld)
          Overloaded render method.
 
Methods inherited from class edu.ohiou.cs456_badabing.sceneapi.basic.ANode
addChild, countNodes, drawCube, getName, getNormal, hideTree, pushPop, renderTree, rotation, scale, setName, setParent, setPushPop, showTree, translation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

faces

private java.util.Vector<Triangle> faces
Triangles belonging to this group.

Constructor Detail

MaterialGroupNode

public MaterialGroupNode(java.util.Vector<Triangle> mtl_group)
default constructor

Parameters:
mtl_group - Vector - triangles that belong to this group.
Method Detail

getCenter

public Coordinate getCenter()

centrify

public Coordinate centrify()

render

public void render(GLAutoDrawable gld)
Overloaded render method. This method actually renders the material group, and maps the texture, applies material properties, etc.

Overrides:
render in class ANode
Parameters:
gld - GLAutoDrawable