本文整理汇总了Java中com.jme3.post.filters.LightScatteringFilter类的典型用法代码示例。如果您正苦于以下问题:Java LightScatteringFilter类的具体用法?Java LightScatteringFilter怎么用?Java LightScatteringFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LightScatteringFilter类属于com.jme3.post.filters包,在下文中一共展示了LightScatteringFilter类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createSheet
import com.jme3.post.filters.LightScatteringFilter; //导入依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set set = Sheet.createPropertiesSet();
set.setDisplayName("Blur");
set.setName(Node.class.getName());
LightScatteringFilter obj = (LightScatteringFilter) filter;
if (obj == null) {
return sheet;
}
// set.put(makeProperty(obj, float.class, "getBlurStart", "setBlurStart", "Blur Start"));
// set.put(makeProperty(obj, float.class, "getBlurWidth", "setBlurWidth", "Blur Width"));
// set.put(makeProperty(obj, float.class, "getLightDensity", "setLightDensity", "Light Density"));
// set.put(makeProperty(obj, Vector3f.class, "getLightPosition", "setLightPosition", "Light Position"));
// set.put(makeProperty(obj, int.class, "getNbSamples", "setNbSamples", "Sample Number"));
createFields(LightScatteringFilter.class, set, obj);
sheet.put(set);
return sheet;
}
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:22,代码来源:JmeLightScatteringFilter.java
示例2: setLightScattering
import com.jme3.post.filters.LightScatteringFilter; //导入依赖的package包/类
/**
* Creates a new light scattering object, doesn't let you set anything about it though
*/
public void setLightScattering(){
lightScatter = new LightScatteringFilter();
lightScatter.setLightPosition(new Vector3f(sun.getSunX(), sun.getSunY(), 0).mult(3000f));
lightScatter.setEnabled(true);
lightScatter.setBlurStart(0.06f);
lightScatter.setBlurWidth(0.5f);
lightScatter.setLightDensity(1.1f);
}
开发者ID:GSam,项目名称:Game-Project,代码行数:12,代码来源:VisualEffectsManager.java
示例3: simpleInitApp
import com.jme3.post.filters.LightScatteringFilter; //导入依赖的package包/类
@Override
public void simpleInitApp() {
// put the camera in a bad position
cam.setLocation(new Vector3f(55.35316f, -0.27061665f, 27.092093f));
cam.setRotation(new Quaternion(0.010414706f, 0.9874893f, 0.13880467f, -0.07409228f));
// cam.setDirection(new Vector3f(0,-0.5f,1.0f));
// cam.setLocation(new Vector3f(0, 300, -500));
//cam.setFrustumFar(1000);
flyCam.setMoveSpeed(10);
Material mat = assetManager.loadMaterial("Textures/Terrain/Rocky/Rocky.j3m");
Spatial scene = assetManager.loadModel("Models/Terrain/Terrain.mesh.xml");
TangentBinormalGenerator.generate(((Geometry)((Node)scene).getChild(0)).getMesh());
scene.setMaterial(mat);
scene.setShadowMode(ShadowMode.CastAndReceive);
scene.setLocalScale(400);
scene.setLocalTranslation(0, -10, -120);
rootNode.attachChild(scene);
// load sky
rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", false));
DirectionalLight sun = new DirectionalLight();
Vector3f lightDir = new Vector3f(-0.12f, -0.3729129f, 0.74847335f);
sun.setDirection(lightDir);
sun.setColor(ColorRGBA.White.clone().multLocal(2));
scene.addLight(sun);
PssmShadowRenderer pssmRenderer = new PssmShadowRenderer(assetManager,1024,4);
pssmRenderer.setDirection(lightDir);
pssmRenderer.setShadowIntensity(0.55f);
// viewPort.addProcessor(pssmRenderer);
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
// SSAOFilter ssaoFilter= new SSAOFilter(viewPort, new SSAOConfig(0.36f,1.8f,0.84f,0.16f,false,true));
// fpp.addFilter(ssaoFilter);
// Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
// mat2.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));
//
// Sphere lite=new Sphere(8, 8, 10.0f);
// Geometry lightSphere=new Geometry("lightsphere", lite);
// lightSphere.setMaterial(mat2);
Vector3f lightPos = lightDir.multLocal(-3000);
// lightSphere.setLocalTranslation(lightPos);
// rootNode.attachChild(lightSphere);
LightScatteringFilter filter = new LightScatteringFilter(lightPos);
LightScatteringUI ui = new LightScatteringUI(inputManager, filter);
fpp.addFilter(filter);
//fpp.setNumSamples(4);
//fpp.addFilter(new RadialBlurFilter(0.3f,15.0f));
// SSAOUI ui=new SSAOUI(inputManager, ssaoFilter.getConfig());
viewPort.addProcessor(fpp);
}
开发者ID:mleoking,项目名称:PhET,代码行数:57,代码来源:TestLightScattering.java
示例4: doCreateFilter
import com.jme3.post.filters.LightScatteringFilter; //导入依赖的package包/类
@Override
protected Filter doCreateFilter() {
return new LightScatteringFilter();
}
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:5,代码来源:NewLightScatteringFilterAction.java
示例5: JmeLightScatteringFilter
import com.jme3.post.filters.LightScatteringFilter; //导入依赖的package包/类
public JmeLightScatteringFilter(LightScatteringFilter filter, DataObject object, boolean readOnly) {
super(filter);
this.dataObject = object;
this.readOnly = readOnly;
}
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:6,代码来源:JmeLightScatteringFilter.java
示例6: getExplorerObjectClass
import com.jme3.post.filters.LightScatteringFilter; //导入依赖的package包/类
@Override
public Class<?> getExplorerObjectClass() {
return LightScatteringFilter.class;
}
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:5,代码来源:JmeLightScatteringFilter.java
示例7: createNodes
import com.jme3.post.filters.LightScatteringFilter; //导入依赖的package包/类
@Override
public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
return new Node[]{new JmeLightScatteringFilter((LightScatteringFilter) key, dataObject, readOnly)};
}
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:5,代码来源:JmeLightScatteringFilter.java
注:本文中的com.jme3.post.filters.LightScatteringFilter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论