|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.imp.shells.EllipsoidShell
@ConfigurableType(value="Ellipsoid shell") public class EllipsoidShell
This shell type simulates an ellipsoid shell
| Field Summary | |
|---|---|
float |
bitrate
The bit rate of the shell |
int |
channel
The channel id |
boolean |
preserveProportions
When true, setting the min or max range will
preserve the relative proportions of the ellipsoid. |
Vector3f |
radius
The radius of the ellipse |
| Constructor Summary | |
|---|---|
EllipsoidShell()
|
|
EllipsoidShell(EllipsoidShell shell)
Constructs a new shell, identical to the argument |
|
| Method Summary | |
|---|---|
EllipsoidShell |
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 |
getMaxRange()
Gets the length of the largest radii in the ellipse. |
float |
getMinRange()
Gets the length of the smallest radii in the ellipse. |
SpeckPosition |
getOrientationOffset()
Gets the offset that this shell has from the position and orientation of the owning speck |
Vector3f |
getRadius()
Gets the current emission radii of this shell |
float |
getVolume()
Gets the volume encompassed by the ellipsoid |
float |
getXRadius()
Gets the x-radius |
boolean |
hit(Speck sender,
SpeckPosition senderOrientation,
Speck target,
SpeckPosition targetOrientation)
Checks to see if the sender can reach the target. |
void |
setMaxRange(float range)
Sets the length of the largest radii in the ellipse. |
void |
setMinRange(float range)
Sets the length of the smallest radii in the ellipse |
void |
setOrientationOffset(SpeckPosition offset)
Sets the offset that this shell will have with respect to the position and orientation of the owning speck |
void |
setVolume(float volume)
Sets the volume of the ellipsoid. |
void |
setXRadius(float xRadius)
Sets the x-radius of the shell. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@ConfigurableVariable(value="Radius")
@Description(value="The radii of the ellipsoid")
@NumberRange(value={0.0f,0.0f,0.0f,1.0f,1.0f,1.0f})
@Priority(value=1)
public Vector3f radius
@ConfigurableVariable(value="Preserve proportions") @Description(value="Preserve the ellipsoid proportions when setting the min and max ranges") @Priority(value=3) public boolean preserveProportions
true, setting the min or max range will
preserve the relative proportions of the ellipsoid. When
false, the proportions are not preserved.
@ConfigurableVariable(value="Bit rate")
@Description(value="The bit rate of the shell, in kbps")
@NumberRange(value={0.0f,1024.0f})
@Priority(value=6)
public float bitrate
@ConfigurableVariable(value="Channel") @Description(value="Transmissions on different channels do not interfere with each other") @Priority(value=7) public int channel
| Constructor Detail |
|---|
public EllipsoidShell()
public EllipsoidShell(EllipsoidShell 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 Vector3f getRadius()
@ConfigurableVariable(value="Maximum range")
@Description(value="The size of the largest radii")
@NumberRange(value={0.0f,1.0f})
@Priority(value=4)
public void setMaxRange(float range)
range - The desired length of the largest radii in the ellipse@ConfigurableVariable(value="Maximum range") public float getMaxRange()
@ConfigurableVariable(value="Minimum range")
@Description(value="The size of the smallest radii")
@NumberRange(value={0.0f,1.0f})
@Priority(value=5)
public void setMinRange(float range)
range - The desired length of the smallest radii@ConfigurableVariable(value="Minimum range") public float getMinRange()
@ConfigurableVariable(value="Volume")
@Description(value="The volume of the ellipsoid")
@NumberRange(value={0.0f,4.188790321350098f})
@Priority(value=2)
public void setVolume(float volume)
volume - The desired volume@ConfigurableVariable(value="Volume") public float getVolume()
public SpeckPosition getOrientationOffset()
public void setOrientationOffset(SpeckPosition offset)
offset - The new offset
@ConfigurableVariable(value="X radius")
@Description(value="The radius of the ellipsoid on the x-axis")
@NumberRange(value={0.0f,1.0f})
@Priority(value=8)
public void setXRadius(float xRadius)
xRadius - The new x radius@ConfigurableVariable(value="X radius") public float getXRadius()
public EllipsoidShell 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 | |||||||||