public abstract class GameEntity
extends com.jme3.scene.control.AbstractControl
MonkeyBrainsAppState#addAgent(com.jme3.ai.agents.Agent)
,
MonkeyBrainsAppState#addAgent(com.jme3.ai.agents.Agent, com.jme3.math.Vector3f)
,
For
other GameEntity use:
,
MonkeyBrainsAppState#addGameObject(com.jme3.ai.agents.util.GameEntity)
Modifier and Type | Field and Description |
---|---|
protected com.jme3.math.Vector3f |
acceleration
GameEntity acceleration speed.
|
protected HitPoints |
hitPoints
HitPoint System that will agent use.
|
protected int |
id
Unique id of gameEntity.
|
protected float |
mass
Mass of GameEntity.
|
protected float |
maxForce
Maximum force that can be applied to this GameEntity.
|
protected float |
maxMoveSpeed
Maximum move speed of GameEntity.
|
protected float |
radius
Radius of GameEntity.
|
protected float |
rotationSpeed
Rotation speed of GameEntity.
|
protected com.jme3.math.Vector3f |
velocity
Container for the velocity of the game object.
|
Constructor and Description |
---|
GameEntity() |
Modifier and Type | Method and Description |
---|---|
protected void |
controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
float |
distanceFromPosition(com.jme3.math.Vector3f position) |
float |
distanceRelativeToGameEntity(GameEntity gameEntity) |
float |
distanceSquaredFromPosition(com.jme3.math.Vector3f position) |
float |
distanceSquaredRelativeToGameEntity(GameEntity gameEntity) |
boolean |
equals(java.lang.Object obj) |
com.jme3.math.Vector3f |
fordwardVector() |
float |
forwardness(GameEntity gameEntity)
Calculates the forwardness in relation with another game entity.
|
float |
forwardness(com.jme3.math.Vector3f offsetVector) |
com.jme3.math.Vector3f |
getAcceleration() |
HitPoints |
getHitPoints() |
int |
getId() |
com.jme3.math.Quaternion |
getLocalRotation() |
com.jme3.math.Vector3f |
getLocalTranslation() |
float |
getMass() |
float |
getMaxForce() |
float |
getMaxMoveSpeed() |
float |
getMoveSpeed() |
com.jme3.math.Vector3f |
getPredictedPosition() |
float |
getRadius() |
float |
getRotationSpeed() |
com.jme3.math.Vector3f |
getVelocity() |
int |
hashCode() |
com.jme3.math.Vector3f |
offset(GameEntity gameEntity) |
com.jme3.math.Vector3f |
offset(com.jme3.math.Vector3f positionVector) |
void |
setAcceleration(com.jme3.math.Vector3f acceleration) |
void |
setHitPoints(HitPoints hitPoints) |
void |
setId(int id) |
void |
setLocalRotation(com.jme3.math.Quaternion rotation) |
void |
setLocalTranslation(float x,
float y,
float z)
Setting local translation of agent
|
void |
setLocalTranslation(com.jme3.math.Vector3f position) |
void |
setMass(float mass) |
void |
setMaxForce(float maxForce) |
void |
setMaxMoveSpeed(float maxMoveSpeed) |
void |
setMoveSpeed(float moveSpeed) |
void |
setRadius(float radius) |
void |
setRotationSpeed(float rotationSpeed) |
void |
setVelocity(com.jme3.math.Vector3f velocity) |
java.lang.String |
toString() |
protected void |
validateRadius(float radius) |
protected com.jme3.math.Vector3f velocity
protected float mass
protected com.jme3.math.Vector3f acceleration
protected float maxMoveSpeed
protected float maxForce
protected HitPoints hitPoints
protected float rotationSpeed
protected float radius
ObstacleAvoidanceBehavior
protected int id
public com.jme3.math.Vector3f getPredictedPosition()
public com.jme3.math.Vector3f offset(GameEntity gameEntity)
gameEntity
- Other game entityspublic com.jme3.math.Vector3f offset(com.jme3.math.Vector3f positionVector)
positionVector
- public com.jme3.math.Vector3f fordwardVector()
public float forwardness(GameEntity gameEntity)
gameEntity
- Other game entitypublic float forwardness(com.jme3.math.Vector3f offsetVector)
positionVector
- Offset vector.public float distanceRelativeToGameEntity(GameEntity gameEntity)
gameEntity
- Other agentpublic float distanceSquaredRelativeToGameEntity(GameEntity gameEntity)
gameEntity
- Other agentpublic float distanceFromPosition(com.jme3.math.Vector3f position)
position
- Positionpublic float distanceSquaredFromPosition(com.jme3.math.Vector3f position)
position
- Positionpublic float getMass()
public void setMass(float mass)
public com.jme3.math.Vector3f getAcceleration()
public void setAcceleration(com.jme3.math.Vector3f acceleration)
public float getMoveSpeed()
public void setMoveSpeed(float moveSpeed)
public float getMaxForce()
public void setMaxForce(float maxForce)
public com.jme3.math.Quaternion getLocalRotation()
public void setLocalRotation(com.jme3.math.Quaternion rotation)
public com.jme3.math.Vector3f getLocalTranslation()
public void setLocalTranslation(com.jme3.math.Vector3f position)
position
- local translation of agentpublic void setLocalTranslation(float x, float y, float z)
x
- x translationy
- y translationz
- z translationpublic float getRotationSpeed()
public void setRotationSpeed(float rotationSpeed)
public float getMaxMoveSpeed()
public void setMaxMoveSpeed(float maxMoveSpeed)
public void setVelocity(com.jme3.math.Vector3f velocity)
public com.jme3.math.Vector3f getVelocity()
public void setRadius(float radius)
public float getRadius()
public HitPoints getHitPoints()
public void setHitPoints(HitPoints hitPoints)
protected void validateRadius(float radius)
protected void controlRender(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp)
controlRender
in class com.jme3.scene.control.AbstractControl
public int getId()
public void setId(int id)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object