public class HumanAgentState extends AgentState implements Visible, Audible, VisionPerceptor, AudioPerceptor, SmellPerceptor
Modifier and Type | Class and Description |
---|---|
static class |
HumanAgentState.VisionShape
Enumeration for vision shape of the agent.
|
Constructor and Description |
---|
HumanAgentState() |
Modifier and Type | Method and Description |
---|---|
java.awt.Shape |
calculateVisibleRegion()
Calculates the visible region of the agent represented by a spherical cone.
|
void |
copyFrom(HumanAgentState agent)
Changes the agent type, control type, heading, max speed, desired speed, visible distance, field of view, min
audible threshold, acoustic emission,
smell sensitivity, reach distance, posture, vision algorithm, olfactory enabled and auditory enabled of the agent
with such properties from the
given agent state.
|
float |
getAcousticEmission()
Gets the acoustic emission of the event's sound.
|
float |
getAgentSize()
The size of the agent
|
com.jme3.math.Vector3f |
getAudiblePosition()
Gets the position of the origin of the event's sound.
|
float |
getCurrentSoundRadius()
Gets the radius of the event's sound.
|
float |
getDesiredSpeed()
Gets the desired speed of the agent.
|
com.jme3.math.Vector3f |
getEyePosition()
Gets the eyes position of the agent
|
float |
getFOV()
Gets the field of view of the agent.
|
float |
getHeight()
Gets the height of the agent.
|
float |
getMaxSpeed()
Gets the maximum speed of the agent.
|
float |
getMinAudibleThreshold()
Gets the minimum audible threshold the agent can perceive using its hearing sense.
|
float |
getSmellSensitivity()
Gets the smell sensitivity the agent has when using its smell sense.
|
float |
getVisibleDistance()
Gets the visible distance of the agent.
|
com.jme3.math.Vector3f |
getVisiblePosition()
Gets the visible position of the event.
|
java.util.List<com.jme3.math.Ray> |
getVisibleRegion()
Returns the an array of vectors representing the agent's visible region
|
com.jme3.math.Vector3f |
getVisibleScale()
Gets the visible scale of the event.
|
VisionAlgorithm |
getVisionAlgorithm()
Gets the vision algorithm of the agent.
|
float |
getVisionHeight()
Gets the eyes level height of the agent.
|
boolean |
isAuditoryEnabled()
Flag indicating if the agent auditory sense is enabled.
|
boolean |
isOlfactoryEnabled()
Flag indicating if the agent olfactory sense is enabled.
|
void |
setAcousticEmission(float acousticEmission)
Changes the acoustic emission of sound emitted by the agent.
|
void |
setAuditoryEnabled(boolean auditoryEnabled)
Changes the flag indicating whether the agent auditory sense is enabled or not enabled.
|
void |
setDesiredSpeed(float velocity)
Changes the desired speed of the agent.
|
void |
setFOV(float fov)
Changes the field of view of the agent
|
void |
setMaxSpeed(float maxVelocity)
Changes the maximum speed of the agent.
|
void |
setMinAudibleThreshold(float minAudibleThreshold)
Changes the minimum audible threshold of the agent.
|
void |
setOlfactoryEnabled(boolean olfactoryEnabled)
Changes the flag indicating whether the agent olfactory sense is enabled or not enabled.
|
void |
setSmellSensitivity(float smellSensitivity)
Changes the smell sensitivity of the agent.
|
void |
setVisibleDistance(float visibleDistance)
Changes the visible distance of the agent.
|
void |
setVisiblePosition(com.jme3.math.Vector3f visiblePosition)
Changes the position of the agent for which other entities can perceive it.
|
void |
setVisionAlgorithm(VisionAlgorithm visionAlgorithmName)
Changes the vision algorithm of the agent.
|
addCollision, canHear, canSee, canSmell, copyFrom, getAgentType, getCollisions, getControlType, getHeading, getPosition2D, getTaskNames, isAlive, setAgentType, setAlive, setControlType, setHeading, setTaskNames
clone, contains2D, copyFrom, getAcceleration, getBoundingArea, getBoundingVolume, getModelName, getPosition, getRotation, getScale, getVelocity, getVelocity2D, intersects, isAudible, isCollidable, isSmellable, isVisible, isVisualized, setAcceleration, setBoundingShape, setCollidable, setModelName, setPosition, setRotation, setScale, setVelocity, setVisualized, toString, updateBoundings
equals, getID, setID
public float getMinAudibleThreshold()
getMinAudibleThreshold
in interface AudioPerceptor
public float getSmellSensitivity()
public float getDesiredSpeed()
public float getMaxSpeed()
public VisionAlgorithm getVisionAlgorithm()
public float getVisibleDistance()
getVisibleDistance
in interface VisionPerceptor
public float getAcousticEmission()
Audible
getAcousticEmission
in interface Audible
public com.jme3.math.Vector3f getAudiblePosition()
Audible
getAudiblePosition
in interface Audible
public void setAcousticEmission(float acousticEmission)
acousticEmission
- the new acoustic emission for the agent.public com.jme3.math.Vector3f getVisiblePosition()
Visible
getVisiblePosition
in interface Visible
public com.jme3.math.Vector3f getVisibleScale()
Visible
getVisibleScale
in interface Visible
public float getCurrentSoundRadius()
Audible
getCurrentSoundRadius
in interface Audible
public void setMinAudibleThreshold(float minAudibleThreshold)
minAudibleThreshold
- The new minimum audible threshold.public void setSmellSensitivity(float smellSensitivity)
smellSensitivity
- The new smell sensitivity for the agent.public void setDesiredSpeed(float velocity)
velocity
- The new desired speed for the agent.public void setMaxSpeed(float maxVelocity)
maxVelocity
- The new maximum speed for the agent.public void setVisionAlgorithm(VisionAlgorithm visionAlgorithmName)
setVisionAlgorithm
in interface VisionPerceptor
visionAlgorithmName
- The new vision algorithm for the agent.public void setVisibleDistance(float visibleDistance)
setVisibleDistance
in interface VisionPerceptor
visibleDistance
- The new visible distance for the agent.public void setVisiblePosition(com.jme3.math.Vector3f visiblePosition)
visiblePosition
- The new visible position for the agent.public float getFOV()
getFOV
in interface VisionPerceptor
public void setFOV(float fov)
setFOV
in interface VisionPerceptor
fov
- The new field of view for the agent.public boolean isOlfactoryEnabled()
isOlfactoryEnabled
in interface SmellPerceptor
public void setOlfactoryEnabled(boolean olfactoryEnabled)
setOlfactoryEnabled
in interface SmellPerceptor
olfactoryEnabled
- Flag indicating if the agent olfactory sense is enabled.public boolean isAuditoryEnabled()
isAuditoryEnabled
in interface AudioPerceptor
public void setAuditoryEnabled(boolean auditoryEnabled)
setAuditoryEnabled
in interface AudioPerceptor
auditoryEnabled
- Flag indicating if the agent auditory sense is enabled.public java.awt.Shape calculateVisibleRegion()
calculateVisibleRegion
in interface VisionPerceptor
public java.util.List<com.jme3.math.Ray> getVisibleRegion()
public float getVisionHeight()
getVisionHeight
in interface VisionPerceptor
public com.jme3.math.Vector3f getEyePosition()
public float getAgentSize()
public float getHeight()
public void copyFrom(HumanAgentState agent)
agent
- The agent state to copy properties from (i.e., agent type, control type, heading) to this agent state.