Class ViewportJMonkey
- java.lang.Object
-
- jadex.extension.envsupport.observer.graphics.AbstractViewport3d
-
- jadex.extension.envsupport.observer.graphics.jmonkey.ViewportJMonkey
-
- All Implemented Interfaces:
IViewport3d
public class ViewportJMonkey extends AbstractViewport3d
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ViewportJMonkey.MyCallAction
-
Field Summary
Fields Modifier and Type Field Description java.util.HashMap<java.lang.String,com.jme3.scene.Spatial>
complexobjects
java.util.HashMap<java.lang.String,com.jme3.material.Material>
materials
-
Fields inherited from class jadex.extension.envsupport.observer.graphics.AbstractViewport3d
areaSize_, canvas_, drawObjects_, paddedSize_, perspective, pixPosition_, position_, preserveAR_, rendering, size_, spacecontroller
-
-
Constructor Summary
Constructors Constructor Description ViewportJMonkey(IPerspective perspective, java.lang.ClassLoader classloader, IVector3 spacesize, boolean isGrid, boolean shader, java.lang.String camera, java.lang.String guiCreatorPath, ISpaceController spaceController)
Creates a new ViewportJMonkey
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLight(com.jme3.light.Light light)
com.jme3.scene.Spatial
createPrimitive3d(DrawableCombiner3d drawableCombiner3d, Primitive3d p, SpaceObject sobj)
Create a 3d Objectjava.util.HashMap<java.lang.String,com.jme3.animation.AnimChannel>
getAnimChannels()
com.jme3.asset.AssetManager
getAssetManager()
java.util.Collection<com.jme3.renderer.Caps>
getCapabilities()
java.lang.ClassLoader
getClassloader()
java.util.ArrayList<com.jme3.light.Light>
getLights()
DrawableCombiner3d
getMarker()
get the Marker.int
getSelected()
get the Selected Visualcom.jme3.water.SimpleWaterProcessor
getWaterProcessor()
com.jme3.math.Vector3f
handleHeightValue(java.lang.Object posObj)
Handle the Height Value.void
pauseApp()
Pause the internal 3d Applicationvoid
refresh(java.util.List<java.lang.Object[]> objectList, java.util.Collection<DrawableCombiner3d> staticvisuals)
Refreshes the viewport.void
remveLight(com.jme3.light.Light light)
void
setAnimChannels(java.util.HashMap<java.lang.String,com.jme3.animation.AnimChannel> _animChannels)
void
setCapabilities(java.util.Collection<com.jme3.renderer.Caps> capabilities)
void
setLights(java.util.ArrayList<com.jme3.light.Light> lights)
void
setSelected(int selected, DrawableCombiner3d marker)
set the Selected Visual by intIdvoid
setWaterProcessor(com.jme3.water.SimpleWaterProcessor waterProcessor)
void
startApp()
This starts the jMonkey Applicationvoid
stopApp()
Stops the internal 3d Applicationvoid
updatePrimitive3d(DrawableCombiner3d drawableCombiner3d, Primitive3d p, SpaceObject sobj, com.jme3.scene.Spatial sp)
Update a 3d Object-
Methods inherited from class jadex.extension.envsupport.observer.graphics.AbstractViewport3d
addViewportListener, getAreaSize, getAreaSize3d, getCamera, getCanvas, getCanvasSize, getPaddedSize, getPerspective, getPosition, getSize, getSpaceController, getSpaceController, isGridSpace, isShader, isShowing, removeViewportListener, setAreaSize, setCamera, setShader
-
-
-
-
Constructor Detail
-
ViewportJMonkey
public ViewportJMonkey(IPerspective perspective, java.lang.ClassLoader classloader, IVector3 spacesize, boolean isGrid, boolean shader, java.lang.String camera, java.lang.String guiCreatorPath, ISpaceController spaceController)
Creates a new ViewportJMonkey- Parameters:
perspective
- the selected PerspectiveClassLoader
- the Classloader
-
-
Method Detail
-
refresh
public void refresh(java.util.List<java.lang.Object[]> objectList, java.util.Collection<DrawableCombiner3d> staticvisuals)
Description copied from interface:IViewport3d
Refreshes the viewport.
-
startApp
public void startApp()
This starts the jMonkey Application
-
handleHeightValue
public com.jme3.math.Vector3f handleHeightValue(java.lang.Object posObj)
Handle the Height Value. Check if its set or not
-
getClassloader
public java.lang.ClassLoader getClassloader()
- Returns:
- the Classloader
-
stopApp
public void stopApp()
Description copied from interface:IViewport3d
Stops the internal 3d Application
-
pauseApp
public void pauseApp()
Description copied from interface:IViewport3d
Pause the internal 3d Application
-
getCapabilities
public java.util.Collection<com.jme3.renderer.Caps> getCapabilities()
- Returns:
- return the graphic card capabilities
-
setCapabilities
public void setCapabilities(java.util.Collection<com.jme3.renderer.Caps> capabilities)
- Parameters:
capabilities
- the graphic card capabilities
-
getAnimChannels
public java.util.HashMap<java.lang.String,com.jme3.animation.AnimChannel> getAnimChannels()
- Returns:
- the _animChannels
-
setAnimChannels
public void setAnimChannels(java.util.HashMap<java.lang.String,com.jme3.animation.AnimChannel> _animChannels)
- Parameters:
_animChannels
- the _animChannels to set
-
getLights
public java.util.ArrayList<com.jme3.light.Light> getLights()
- Returns:
- the lights
-
setLights
public void setLights(java.util.ArrayList<com.jme3.light.Light> lights)
- Parameters:
lights
- the lights to set
-
addLight
public void addLight(com.jme3.light.Light light)
-
remveLight
public void remveLight(com.jme3.light.Light light)
-
getWaterProcessor
public com.jme3.water.SimpleWaterProcessor getWaterProcessor()
- Returns:
- the waterProcessor
-
setWaterProcessor
public void setWaterProcessor(com.jme3.water.SimpleWaterProcessor waterProcessor)
- Parameters:
waterProcessor
- the waterProcessor to set
-
setSelected
public void setSelected(int selected, DrawableCombiner3d marker)
set the Selected Visual by intId
-
getSelected
public int getSelected()
get the Selected Visual
-
getMarker
public DrawableCombiner3d getMarker()
Description copied from interface:IViewport3d
get the Marker. A visual Object that visuals the selection
-
getAssetManager
public com.jme3.asset.AssetManager getAssetManager()
-
createPrimitive3d
public com.jme3.scene.Spatial createPrimitive3d(DrawableCombiner3d drawableCombiner3d, Primitive3d p, SpaceObject sobj)
Create a 3d Object- Parameters:
drawableCombiner3d
- The 3d combiner.p
- The primitive3d.obj
- The object being drawn.
-
updatePrimitive3d
public void updatePrimitive3d(DrawableCombiner3d drawableCombiner3d, Primitive3d p, SpaceObject sobj, com.jme3.scene.Spatial sp)
Update a 3d Object- Parameters:
drawableCombiner3d
- The 3d combiner.p
- The primitive3d.obj
- The object being drawn.sp
- The spatial where the object is saved.
-
-