|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.Wall
public class Wall
Represents a simple triangular wall that is opaque to all transmissions. Extend this class and override the blocksTransmission() method for different behaviour
| Constructor Summary | |
|---|---|
Wall(java.io.DataInputStream dis)
Constructs a new wall from the stream |
|
Wall(Point3d v1,
Point3d v2,
Point3d v3)
Constructs a new Wall. |
|
| Method Summary | |
|---|---|
boolean |
blocksTransmission(Point3d p1,
Point3d p2,
MessageShell shell)
Determines if this wall blocks a transmission |
void |
encode(java.io.DataOutputStream dos)
Encodes the vertices to the stream |
Point3d[] |
getBoundingBox()
Gets an axis aligned bounding box for this wall |
Point3d |
v1()
Get the first vertex |
Point3d |
v2()
Get the second vertex |
Point3d |
v3()
Get the third vertex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Wall(Point3d v1,
Point3d v2,
Point3d v3)
v1 - The first vertexv2 - The second vertexv3 - The third vertex
public Wall(java.io.DataInputStream dis)
throws java.io.IOException
dis - The stream to read from
java.io.IOException| Method Detail |
|---|
public void encode(java.io.DataOutputStream dos)
throws java.io.IOException
dos - The stream to write to
java.io.IOException
public boolean blocksTransmission(Point3d p1,
Point3d p2,
MessageShell shell)
p1 - The origin of the transmissionp2 - The target of the transmissionshell - The shell used in this transmission
true if the wall blocks the transmission,
false otherwisepublic Point3d[] getBoundingBox()
Point3d array. The first element
is the vertex of the bounding box closest to (-∞, -∞, -∞ ),
the second is the vertex closest to ( ∞, ∞, ∞ )public Point3d v1()
public Point3d v2()
public Point3d v3()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||