cs567.rigidbody
Class Disk

java.lang.Object
  extended by cs567.rigidbody.Disk

public class Disk
extends java.lang.Object

Representation of a circular bounding disk.


Field Summary
(package private)  javax.vecmath.Point2d c
          Center of disk.
(package private)  double r
          Radius of disk.
 
Constructor Summary
Disk(java.util.Collection<Block> blocks)
          Builds a Disk that encloses the specified blocks in their frame of reference.
Disk(javax.vecmath.Point2d center, double radius)
          Builds Disk with specified center and radius values.
 
Method Summary
(package private)  javax.vecmath.Point2d c()
          Fragile reference to center of Disk.
 void display(javax.media.opengl.GL gl)
          Draws circular disk using a display list.
 boolean intersects(javax.vecmath.Point2d p)
          True if point intersects this bounding volume.
 double r()
          Radius of Disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c

javax.vecmath.Point2d c
Center of disk.


r

double r
Radius of disk.

Constructor Detail

Disk

Disk(java.util.Collection<Block> blocks)
Builds a Disk that encloses the specified blocks in their frame of reference. (HINT: You might get better performance from an AABB, especially for text)


Disk

Disk(javax.vecmath.Point2d center,
     double radius)
Builds Disk with specified center and radius values.

Method Detail

c

javax.vecmath.Point2d c()
Fragile reference to center of Disk.


r

public double r()
Radius of Disk.


intersects

public boolean intersects(javax.vecmath.Point2d p)
True if point intersects this bounding volume.

Parameters:
p - Point in frame of reference of Disk.

display

public void display(javax.media.opengl.GL gl)
Draws circular disk using a display list.