com.jme3.scene.Geometry.scale()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中com.jme3.scene.Geometry.scale()方法的一些代码示例,展示了Geometry.scale()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.scale()方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称:Geometry
方法名:scale

Geometry.scale介绍

暂无

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void simpleInitApp() {
  teaGeom.scale(3);

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void simpleInitApp() {
  teaGeom.scale(3);
  teaGeom.getMaterial().setColor("GlowColor", ColorRGBA.Green);

代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit

private Geometry getExtrusionGeometry(BufferedImage bufferedImage, double thickness, AppearanceDefinition appearance)
  {

   Geometry geometry = ShapeUtilities.createShape(bufferedImage, (float) thickness);

   geometry.scale((float) bufferedImage.getWidth() / (float) bufferedImage.getHeight(), 1.0f, 1.0f);
//      geometry.setLocalRotation(JMEGeometryUtils.getRotationFromJMEToZupCoordinates());

   setGeometryMaterialBasedOnAppearance(geometry, appearance);

   return geometry;
  }

代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit

private Geometry getExtrusionGeometry(BufferedImage bufferedImage, double thickness, AppearanceDefinition appearance)
  {

   Geometry geometry = ShapeUtilities.createShape(bufferedImage, (float) thickness);

   geometry.scale((float) bufferedImage.getWidth() / (float) bufferedImage.getHeight(), 1.0f, 1.0f);
//      geometry.setLocalRotation(JMEGeometryUtils.getRotationFromJMEToZupCoordinates());

   setGeometryMaterialBasedOnAppearance(geometry, appearance);

   return geometry;
  }

代码示例来源:origin: us.ihmc/IHMCPerception

private Geometry putShape(Node node, Mesh shape, ColorRGBA color){
 Geometry g = new Geometry("coordinate axis", shape);
 Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
 mat.getAdditionalRenderState().setWireframe(true);
 mat.setColor("Color", color);
 g.setMaterial(mat);
 g.rotate(0.0f,0.0f,0.0f);
 g.scale(0.25f);
 node.attachChild(g);
 return g;
}

代码示例来源:origin: us.ihmc/ihmc-perception

private Geometry putShape(Node node, Mesh shape, ColorRGBA color){
 Geometry g = new Geometry("coordinate axis", shape);
 Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
 mat.getAdditionalRenderState().setWireframe(true);
 mat.setColor("Color", color);
 g.setMaterial(mat);
 g.rotate(0.0f,0.0f,0.0f);
 g.scale(0.25f);
 node.attachChild(g);
 return g;
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

scale = bs.getRadius();
origin.scale(scale);
attachChild(origin);

代码示例来源:origin: org.jmonkeyengine/jme3-core

gt.scale(0.8f);
Vector3f v = new Vector3f(0, boneLength, 0);
if (guessBonesOrientation) {

代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit

/** Reads the colors of first column of an image and creates a gradient texture.*/
public static void testMain(SimpleApplication scene)
{
 String shape = "shapes/public domain/tribal_star.png";
 float height = 0.05f;
 //Apply image effects.
 BufferedImage shapeImage = ImageUtilities.loadImage(shape, scene.getAssetManager());
 shapeImage = ImageUtilities.symmetrifyX(shapeImage, true, false);
 //Get shape.
 com.jme3.scene.Geometry g = createShape(shapeImage, height);
 g.setMaterial(Utilities.getUnshadedMaterial(scene.getAssetManager().loadTexture("Textures/CobbleStone.png"), null, BlendMode.Off, scene.getAssetManager()));
 g.scale(10f);
 g.rotate(FastMath.HALF_PI*3, 0, 0);
 scene.getRootNode().attachChild(g);
 scene.getViewPort().setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f));
}

代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit

/** Reads the colors of first column of an image and creates a gradient texture.*/
public static void testMain(SimpleApplication scene)
{
 String shape = "shapes/public domain/tribal_star.png";
 float height = 0.05f;
 //Apply image effects.
 BufferedImage shapeImage = ImageUtilities.loadImage(shape, scene.getAssetManager());
 shapeImage = ImageUtilities.symmetrifyX(shapeImage, true, false);
 //Get shape.
 com.jme3.scene.Geometry g = createShape(shapeImage, height);
 g.setMaterial(Utilities.getUnshadedMaterial(scene.getAssetManager().loadTexture("Textures/CobbleStone.png"), null, BlendMode.Off, scene.getAssetManager()));
 g.scale(10f);
 g.rotate(FastMath.HALF_PI*3, 0, 0);
 scene.getRootNode().attachChild(g);
 scene.getViewPort().setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f));
}

代码示例来源:origin: info.projectkyoto/mms-engine

case 2:
  mesh = new Sphere(10, 10, 0.5f);
  geom.scale(rigidBody.getShapeW() * 2, rigidBody.getShapeH() + rigidBody.getShapeW() * 2, rigidBody.getShapeW() * 2);

相关文章