|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.environment.GraphicsDemoEnvironment
hmi.environment.PhysicalDemoEnvironment
hmi.environment.ElckerlycDemoEnvironment
public class ElckerlycDemoEnvironment
Adds mixed dynamics animatino to PhysicalDemoEnvironment, plus a lot of other functionlaity for creating, managing and controlling virtual humans with body, voices, bmlrealizer, etc. Major change wrt superclass is the physicscallback. physicsTime will no longer call physicsTick, but rather call the AnimationPlayerManager to do its thing (which includes making the physicssteps through a PhysCallback) Also, voices will be played on the physicsTime, to make sure that voices have the same time line as the animation
| Nested Class Summary | |
|---|---|
(package private) class |
ElckerlycDemoEnvironment.LoadVHListener
Toggle visibility of given VHUI... |
(package private) class |
ElckerlycDemoEnvironment.PhysCallback
Called by the anmiationplayermanager to make one simulation step in the physical world |
(package private) static class |
ElckerlycDemoEnvironment.ToggleVHUIListener
Toggle visibility of given VHUI... |
| Nested classes/interfaces inherited from class hmi.environment.PhysicalDemoEnvironment |
|---|
PhysicalDemoEnvironment.CollisionCheckListener, PhysicalDemoEnvironment.PhysicsCheckListener, PhysicalDemoEnvironment.PhysicsClockListener, PhysicalDemoEnvironment.Sleeper, PhysicalDemoEnvironment.ThrowBallListener |
| Nested classes/interfaces inherited from class hmi.environment.GraphicsDemoEnvironment |
|---|
GraphicsDemoEnvironment.DebugCheckListener, GraphicsDemoEnvironment.MyRenderclockCallback, GraphicsDemoEnvironment.PlayListener, GraphicsDemoEnvironment.ResetListener |
| Field Summary | |
|---|---|
boolean |
animateavatars
If set to false, the avatars do not move at all |
private org.slf4j.Logger |
logger
|
boolean |
playvoices
If set to false, no voices are played (even when scheduled) |
protected AnimationPlayerManager |
theAnimationPlayerManager
|
(package private) GenericVirtualWorld |
theVirtualWorld
|
protected HashMap<HmiVirtualHuman,VirtualHumanUI> |
vhUIs
The UIs for all loaded virtualHumans |
protected HashMap<HmiVirtualHuman,JButton> |
vhUIToggleButtons
The ToggleUI buttons for all loaded virtualHumans |
protected ArrayList<HmiVirtualHuman> |
virtualHumanList
All loaded virtualHumans |
protected VJoint |
vjCameraTarget
|
protected VJoint |
vjCurrentMixedDynamicsRoot
|
protected VJoint |
vjMixedDynamicsAnimationRoot
The mixed dynamics animation root is added as a child to hmi.environment.PhysicalDemoEnvironment#vjMixedDynamicsAnimationRoot vjMixedDynamicsAnimationRoot. |
protected VJoint |
vjNextMixedDynamicsRoot
|
protected VJoint |
vjPredictorMixedDynamicsRoot
|
protected VJoint |
vjPreviousMixedDynamicsRoot
|
protected VJoint |
vjXuukTarget
used to attach a xuk sensor to... |
protected XuukReader |
xuukReader
|
protected XuukTargetMover |
xuukTargetMover
|
| Fields inherited from class hmi.environment.PhysicalDemoEnvironment |
|---|
collision, collisionEnabled, g, glueJointGroup, groundGeom, phsphere, phworld, physicsClock, physicsLoopFrequency, physicsRunners, prevTime, runphysics, space, sphereAnimationJoint, sphereRenderJoint, timeStep |
| Fields inherited from class hmi.environment.GraphicsDemoEnvironment |
|---|
background, color_buf_tex, debugJOGL, depth_buf_tex, dx, dy, dz, enableFSAA, fovyFar, fovyNear, frameTitle, FSAA_samples, fullscreen, glCanvas, glNavControl, glObjectControl, hiddenVisualisations, jframe, laptop, light0, light1, light2, light3, light4, lightPos0, lightPos1, lightPos2, lightPos3, lightPos4, numStencilBits, render, renderClock, renderDebugVisualisations, renderer, renderRunners, shutdownSync, toolBar, useVsync, vglSceneRenderRoot, visualisations, visualisationsUninitialized, vjNavigationNode, vjSceneRenderRoot, vjWorldAnimationRoot, vjWorldRenderRoot, wowTransformMatrix, wowvx, wowvx_header_data, wowvx_header_tex |
| Constructor Summary | |
|---|---|
ElckerlycDemoEnvironment()
Default constructor does not do anything. |
|
ElckerlycDemoEnvironment(WorldObjectManager wom)
Default constructor does not do anything. |
|
| Method Summary | |
|---|---|
void |
addPhysicalHumanDebugVisualisations(HmiVirtualHuman vh)
|
void |
addVJointDebugVisualisations(HmiVirtualHuman vh)
|
void |
close()
Clean up physicalhumanoids and the verbalplayers and stops the application |
void |
createVirtualHumanUI(HmiVirtualHuman vh)
|
protected void |
disposeFrame()
Clean up physicalhumanoids and the verbalplayers and disposes the jframe |
GenericVirtualWorld |
getVirtualWorld()
|
void |
init()
In addition to super.init(), initialize the clones of the aniomationroot (for the mixed dynamics animation), and the animationPlayerManager |
protected void |
initGraphicScene()
Add the graphical representation for the phsphere to the graphical scene |
protected void |
initMixedAnimation()
Initialize the mixed dynamics: make vjMixedDynamicsAnimationRoot, clone the animationroot, create the animationplayermanager |
protected void |
initQuickSettings()
Overide this method to change the quicksettings |
protected void |
initUI()
Add a 'load virtual human' button to the default UI |
protected void |
initVoiceSystem()
There is not actually much initialisation required for the general voice system |
protected void |
initWorldPhysics()
add space, collision, etc, to the VIrtualWorld |
HmiVirtualHuman |
loadVirtualHuman(Resources res,
String specFileName,
String name)
Load a virtual human according to the specifications; store the resulting VirtualHuman object in the virtualHumanList array; add vhuman to scene and playermanager etc |
HmiVirtualHuman |
loadVirtualHuman(VirtualHumanSpecHmi spec,
String name)
Load a virtual human according to the specifications; store the resulting VirtualHuman object in the virtualHumanList array; add vhuman to scene and playermanager etc |
protected void |
physicsTime(double currentTime)
Override: physicsTime stepping is now left to AnimationPlayerManager. |
protected void |
playAudio(double currentTime)
Make sure that all audio is played for currentTime. |
protected void |
playVoices(double currentTime)
Make sure that all voices are played for currentTime. |
void |
processAnimationResultForRender(GLRenderContext glc)
override, because now we also need to do the deform() & morph()!! |
protected void |
reset()
Reset: set clocks to 0 (also physics, because physicsclock also drives the animation!). |
void |
setXuukReader(XuukReader xr)
|
private void |
unloadAllVirtualHumans()
|
void |
unloadVirtualHuman(HmiVirtualHuman vh)
Completely removes a virtual human from the environment; stops all of its players, etc. |
| Methods inherited from class hmi.environment.PhysicalDemoEnvironment |
|---|
addPhysicsRunner, glueFeetToFloor, initGraphicSphere, initGroundPhysics, initSpherePhysics, initThrowBallButton, initUI, physicsCopy, physicsRun, physicsTick, prepareClose, prepareDispose, prepareReset, setCollisionEnabled, setPhysicsEnabled, startClocks, toggleCollision, togglePhysics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.slf4j.Logger logger
public boolean animateavatars
public boolean playvoices
GenericVirtualWorld theVirtualWorld
protected VJoint vjXuukTarget
protected VJoint vjCameraTarget
protected XuukTargetMover xuukTargetMover
protected VJoint vjMixedDynamicsAnimationRoot
As for vjMixedDynamicsAnimationRoot, three copies are made of this node: vjNextMixedDynamicsRoot, vjCurrentMixedDynamicsRoot and vjPreviousMixedDynamicsRoot. These are used to calculate the inverse dynamics of certain animations, in the Mixed AnimationPlayers. Note that all actual animations must be performed on vjNextMixedDynamicsRoot -- the results of that animation will in the end be copied to vjMixedDynamicsAnimationRoot, which in turn is connected to the vjWorldRenderNode through various GLScene.deform calls for rendering. Finally, a predictorWorldRoot is used to run animatino pose predictions on in order to calculate the end pose of transitionmotinounits.
protected VJoint vjNextMixedDynamicsRoot
vjMixedDynamicsAnimationRootprotected VJoint vjCurrentMixedDynamicsRoot
vjMixedDynamicsAnimationRootprotected VJoint vjPreviousMixedDynamicsRoot
vjMixedDynamicsAnimationRootprotected VJoint vjPredictorMixedDynamicsRoot
vjMixedDynamicsAnimationRootprotected AnimationPlayerManager theAnimationPlayerManager
protected ArrayList<HmiVirtualHuman> virtualHumanList
protected HashMap<HmiVirtualHuman,JButton> vhUIToggleButtons
protected HashMap<HmiVirtualHuman,VirtualHumanUI> vhUIs
protected XuukReader xuukReader
| Constructor Detail |
|---|
public ElckerlycDemoEnvironment(WorldObjectManager wom)
public ElckerlycDemoEnvironment()
| Method Detail |
|---|
public GenericVirtualWorld getVirtualWorld()
public void init()
init in class PhysicalDemoEnvironmentprotected void initUI()
initUI in class PhysicalDemoEnvironmentprotected void initGraphicScene()
PhysicalDemoEnvironment
initGraphicScene in class PhysicalDemoEnvironmentpublic void setXuukReader(XuukReader xr)
protected void initMixedAnimation()
protected void initQuickSettings()
initQuickSettings in class PhysicalDemoEnvironmentprotected void initVoiceSystem()
protected void initWorldPhysics()
initWorldPhysics in class PhysicalDemoEnvironmentprotected void physicsTime(double currentTime)
physicsTime in class PhysicalDemoEnvironmentprotected void playAudio(double currentTime)
protected void playVoices(double currentTime)
public void processAnimationResultForRender(GLRenderContext glc)
processAnimationResultForRender in class GraphicsDemoEnvironmentpublic void close()
close in class PhysicalDemoEnvironmentprivate void unloadAllVirtualHumans()
protected void disposeFrame()
throws InterruptedException,
InvocationTargetException
disposeFrame in class PhysicalDemoEnvironmentInvocationTargetException
InterruptedExceptionprotected void reset()
reset in class PhysicalDemoEnvironment
public HmiVirtualHuman loadVirtualHuman(Resources res,
String specFileName,
String name)
throws Exception
Exception
public HmiVirtualHuman loadVirtualHuman(VirtualHumanSpecHmi spec,
String name)
throws Exception
Exceptionpublic void addVJointDebugVisualisations(HmiVirtualHuman vh)
public void addPhysicalHumanDebugVisualisations(HmiVirtualHuman vh)
public void unloadVirtualHuman(HmiVirtualHuman vh)
public void createVirtualHumanUI(HmiVirtualHuman vh)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||