Atavism Version 2018.1AGIS API

atavism.server.engine
Class InterpolatedWorldNode

java.lang.Object
  extended by atavism.server.engine.InterpolatedWorldNode
All Implemented Interfaces:
BasicInterpolatable, Interpolatable, Locatable, WorldNode, java.io.Serializable
Direct Known Subclasses:
WMWorldNode

public class InterpolatedWorldNode
extends java.lang.Object
implements WorldNode, BasicInterpolatable

See Also:
Serialized Form

Nested Class Summary
 class InterpolatedWorldNode.InterpolatedDirLocOrientTime
          A utility class provided solely to return these values atomically
 
Field Summary
protected  java.util.Set<WorldNode> children
           
protected  AOVector dir
           
protected  java.lang.Boolean followsTerrain
           
protected  OID instanceOid
           
protected  Point interpLoc
           
protected  long lastInterp
           
protected  long lastUpdate
           
 java.util.concurrent.locks.Lock lock
           
protected  EntityHandle objHandle
           
protected  Quaternion orient
           
protected  WorldNode parent
           
protected  PathInterpolator pathInterpolator
           
protected  Point rawLoc
           
protected  boolean spawned
           
 java.util.concurrent.locks.Lock treeLock
           
 
Constructor Summary
InterpolatedWorldNode()
           
InterpolatedWorldNode(BasicWorldNode bnode)
           
InterpolatedWorldNode(WorldManagerClient.ObjectInfo info)
           
 
Method Summary
 void addChild(WorldNode child)
           
protected  void changeDir(AOVector dir, boolean performDirInterpolation)
           
 java.util.Set<WorldNode> getChildren()
           
 Point getCurrentLoc()
           
 AOVector getDir()
           
 InterpolatedWorldNode.InterpolatedDirLocOrientTime getDirLocOrientTime()
           
 java.lang.Boolean getFollowsTerrain()
           
 OID getInstanceOid()
           
 Point getInterpLoc()
           
 long getLastInterp()
           
 long getLastUpdate()
           
 Point getLoc()
           
 AOObject getObject()
           
 OID getObjectOID()
           
 Quaternion getOrientation()
           
 WorldNode getParent()
           
 PathInterpolator getPathInterpolator()
           
 Point getRawLoc()
           
 PathLocAndDir interpolate(float t)
           
 boolean isSpawned()
           
 void isSpawned(boolean spawned)
           
 void removeChild(WorldNode child)
           
 void setChildren(java.util.Set<WorldNode> children)
           
 void setDir(AOVector dir)
           
 void setDirLocOrient(BasicWorldNode bnode)
           
 void setFollowsTerrain(java.lang.Boolean flag)
           
 void setInstanceOid(OID oid)
           
 void setInterpLoc(Point p)
           
 void setLastInterp(long time)
           
 void setLastUpdate(long time)
           
 void setLoc(Point p)
           
 void setObject(AOObject obj)
           
 void setObjectOID(OID oid)
           
 void setOrientation(Quaternion orient)
           
 void setParent(WorldNode node)
           
 void setPathInterpolator(PathInterpolator pathInterpolator)
           
 void setPathInterpolatorValues(long time, AOVector newDir, Point newLoc, Quaternion orientation)
           
 void setRawLoc(Point p)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

objHandle

protected EntityHandle objHandle

followsTerrain

protected java.lang.Boolean followsTerrain

spawned

protected boolean spawned

instanceOid

protected OID instanceOid

rawLoc

protected Point rawLoc

interpLoc

protected Point interpLoc

dir

protected AOVector dir

orient

protected Quaternion orient

pathInterpolator

protected transient PathInterpolator pathInterpolator

lastUpdate

protected long lastUpdate

lastInterp

protected long lastInterp

parent

protected WorldNode parent

children

protected java.util.Set<WorldNode> children

lock

public transient java.util.concurrent.locks.Lock lock

treeLock

public transient java.util.concurrent.locks.Lock treeLock
Constructor Detail

InterpolatedWorldNode

public InterpolatedWorldNode()

InterpolatedWorldNode

public InterpolatedWorldNode(BasicWorldNode bnode)

InterpolatedWorldNode

public InterpolatedWorldNode(WorldManagerClient.ObjectInfo info)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInstanceOid

public OID getInstanceOid()
Specified by:
getInstanceOid in interface Locatable

setInstanceOid

public void setInstanceOid(OID oid)

getLoc

public Point getLoc()
Specified by:
getLoc in interface Locatable

setLoc

public void setLoc(Point p)
Specified by:
setLoc in interface Locatable

getLastUpdate

public long getLastUpdate()
Specified by:
getLastUpdate in interface Locatable

setLastUpdate

public void setLastUpdate(long time)
Specified by:
setLastUpdate in interface Locatable

getObject

public AOObject getObject()
Specified by:
getObject in interface WorldNode

setObject

public void setObject(AOObject obj)
Specified by:
setObject in interface WorldNode

setObjectOID

public void setObjectOID(OID oid)

getObjectOID

public OID getObjectOID()

getParent

public WorldNode getParent()
Specified by:
getParent in interface WorldNode

setParent

public void setParent(WorldNode node)
Specified by:
setParent in interface WorldNode

getOrientation

public Quaternion getOrientation()
Specified by:
getOrientation in interface BasicInterpolatable
Specified by:
getOrientation in interface WorldNode

setOrientation

public void setOrientation(Quaternion orient)
Specified by:
setOrientation in interface BasicInterpolatable
Specified by:
setOrientation in interface WorldNode

setDirLocOrient

public void setDirLocOrient(BasicWorldNode bnode)

getDirLocOrientTime

public InterpolatedWorldNode.InterpolatedDirLocOrientTime getDirLocOrientTime()

getChildren

public java.util.Set<WorldNode> getChildren()
Specified by:
getChildren in interface WorldNode

setChildren

public void setChildren(java.util.Set<WorldNode> children)
Specified by:
setChildren in interface WorldNode

addChild

public void addChild(WorldNode child)
Specified by:
addChild in interface WorldNode

removeChild

public void removeChild(WorldNode child)
Specified by:
removeChild in interface WorldNode

isSpawned

public boolean isSpawned()
Specified by:
isSpawned in interface WorldNode

isSpawned

public void isSpawned(boolean spawned)

getPathInterpolator

public PathInterpolator getPathInterpolator()
Specified by:
getPathInterpolator in interface BasicInterpolatable

setPathInterpolator

public void setPathInterpolator(PathInterpolator pathInterpolator)

interpolate

public PathLocAndDir interpolate(float t)

getDir

public AOVector getDir()
Specified by:
getDir in interface BasicInterpolatable

setDir

public void setDir(AOVector dir)
Specified by:
setDir in interface BasicInterpolatable

changeDir

protected void changeDir(AOVector dir,
                         boolean performDirInterpolation)

getRawLoc

public Point getRawLoc()
Specified by:
getRawLoc in interface BasicInterpolatable

setRawLoc

public void setRawLoc(Point p)
Specified by:
setRawLoc in interface BasicInterpolatable

getLastInterp

public long getLastInterp()
Specified by:
getLastInterp in interface BasicInterpolatable

setLastInterp

public void setLastInterp(long time)
Specified by:
setLastInterp in interface BasicInterpolatable

getInterpLoc

public Point getInterpLoc()
Specified by:
getInterpLoc in interface BasicInterpolatable

getCurrentLoc

public Point getCurrentLoc()
Specified by:
getCurrentLoc in interface Locatable

setInterpLoc

public void setInterpLoc(Point p)
Specified by:
setInterpLoc in interface BasicInterpolatable

setPathInterpolatorValues

public void setPathInterpolatorValues(long time,
                                      AOVector newDir,
                                      Point newLoc,
                                      Quaternion orientation)
Specified by:
setPathInterpolatorValues in interface BasicInterpolatable

getFollowsTerrain

public java.lang.Boolean getFollowsTerrain()

setFollowsTerrain

public void setFollowsTerrain(java.lang.Boolean flag)


Copyright © 2018 Dragonsan Studios Sp. z o.o.