|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.imp.shells.CollimatedShell
@ConfigurableType(value="Collimated shell") public class CollimatedShell
A simple shell that simulates a targetted, collimated beam of radiation. The energy levels are assumed to be uniform accross the beam, with perfectly crisp edges
| Field Summary | |
|---|---|
float |
bitrate
The bitrate of the radio, in kbps. |
int |
channelID
The channel ID. |
float |
divergenceAngle
The angle of divergence for the beam, 0 == perfect line pi=sphere |
float |
range
The maximum range of the beam |
boolean |
relativeToSpeck
Determines whether the target vector is relative to the speck orientation, rather than to the world |
Vector3d |
targetVector
The target vector |
| Constructor Summary | |
|---|---|
CollimatedShell()
|
|
CollimatedShell(CollimatedShell shell)
Constructs a new Shell, identical to the argument |
|
| Method Summary | |
|---|---|
MessageShell |
clone()
Override this method to return a copy of this MessageShell. |
float |
getBitRate()
Gets the data transmission speed, in kilobits per second. |
Vector3d[] |
getBoundingBox(SpeckPosition orientation)
Works out an axis-aligned bounding box for this message shell. |
int |
getChannelID()
Gets an identifier for the channel used by this shell. |
Configurator |
getConfigurator()
Gets a Configurator object that describes and can manipulate the variables of this Configurable. |
boolean |
hit(Speck sender,
SpeckPosition senderOrientation,
Speck target,
SpeckPosition targetOrientation)
Checks to see if the sender can reach the target. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@ConfigurableVariable(value="Range")
@Description(value="The maximum range of the transmission")
@NumberRange(value={0.0f,1.7999999523162842f})
@Priority(value=1)
public float range
@ConfigurableVariable(value="Divergence")
@Description(value="The angle of divergence of the beam, in radians")
@NumberRange(value={0.0f,3.1415927410125732f})
@Priority(value=2)
public float divergenceAngle
public Vector3d targetVector
@ConfigurableVariable(value="Orient with speck") @Description(value="Sets whether the target vector is taken wrt to the speck\'s orientation") @Priority(value=3) public boolean relativeToSpeck
@ConfigurableVariable(value="Bit rate")
@Description(value="The tranceiving speed, in kbps. Set to 0 for infinite speed")
@NumberRange(value={0.0f,1024.0f})
@Priority(value=4)
public float bitrate
@ConfigurableVariable(value="Channel") @Description(value="The channel ID. Transmissions on different channels cannot interfere with each other") @Priority(value=5) public int channelID
| Constructor Detail |
|---|
public CollimatedShell()
public CollimatedShell(CollimatedShell shell)
shell - The shell to copy| Method Detail |
|---|
public boolean hit(Speck sender,
SpeckPosition senderOrientation,
Speck target,
SpeckPosition targetOrientation)
MessageShell
hit in interface MessageShellsender - The sending specksenderOrientation - The position of the sending speck at the time of
transmissiontarget - The prospective receiving specktargetOrientation - The position of the target speck at the time of
transmission
public Vector3d[] getBoundingBox(SpeckPosition orientation)
MessageShell
getBoundingBox in interface MessageShellorientation - The orientation of the sending speck at the time of
transmission
public float getBitRate()
MessageShell
getBitRate in interface MessageShellpublic int getChannelID()
MessageShell
getChannelID in interface MessageShellpublic MessageShell clone()
MessageShell
clone in interface MessageShellclone in class java.lang.Objectpublic Configurator getConfigurator()
Configurable
getConfigurator in interface Configurable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||