|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.imp.shells.PerfectRadioShell
@ConfigurableType(value="Perfect radio") public class PerfectRadioShell
Simulates a perfect radio. The broadcasts are perfectly spherical and reliable
| Field Summary | |
|---|---|
float |
bitrate
The bitrate of the radio, in kbps |
int |
channel
The channel of the radio |
| Constructor Summary | |
|---|---|
PerfectRadioShell()
Builds a new radio shell |
|
PerfectRadioShell(PerfectRadioShell 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. |
float |
getRange()
Gets the range of this radio shell |
float |
getRangeSq()
Gets the square of the range of this radio shell |
boolean |
hit(Speck sender,
SpeckPosition senderOrientation,
Speck target,
SpeckPosition targetOrientation)
Checks to see if the sender can reach the target. |
void |
setRadioRange(float r)
Sets the range of this radio |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@ConfigurableVariable(value="Bit rate")
@NumberRange(value={0.0f,1024.0f})
@Description(value="The bitrate of the radio, in kbps")
@Priority(value=2)
public float bitrate
@ConfigurableVariable(value="Channel") @Description(value="The channel of the radio. Transmissions on different channels do not interfere with each other") @Priority(value=3) public int channel
| Constructor Detail |
|---|
public PerfectRadioShell()
public PerfectRadioShell(PerfectRadioShell 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 Configurator getConfigurator()
Configurable
getConfigurator in interface Configurable
@ConfigurableVariable(value="Range")
@NumberRange(value={0.0f,1.7999999523162842f})
@Description(value="The range of the transmission")
@Priority(value=1)
public void setRadioRange(float r)
r - The new maximum range for transmissionspublic float getRangeSq()
@ConfigurableVariable(value="Range") public float getRange()
public MessageShell clone()
MessageShell
clone in interface MessageShellclone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||