本文整理了Java中com.jme3.scene.Spatial.getLocalScale()
方法的一些代码示例,展示了Spatial.getLocalScale()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spatial.getLocalScale()
方法的具体详情如下:
包路径:com.jme3.scene.Spatial
类名称:Spatial
方法名:getLocalScale
[英]getLocalScale
retrieves the local scale of this node.
[中]getLocalScale
检索此节点的本地规模。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
initScale = model.getLocalScale().clone();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
initScale = model.getLocalScale().clone();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Calculate the correct transform for a collision shape relative to the
* ancestor for which the shape was generated.
*
* @param spat
* @param parent
* @return a new instance (not null)
*/
private static Transform getTransform(Spatial spat, Spatial parent) {
Transform shapeTransform = new Transform();
Spatial parentNode = spat.getParent() != null ? spat.getParent() : spat;
Spatial currentSpatial = spat;
//if we have parents combine their transforms
while (parentNode != null) {
if (parent == currentSpatial) {
//real parent -> only apply scale, not transform
Transform trans = new Transform();
trans.setScale(currentSpatial.getLocalScale());
shapeTransform.combineWithParent(trans);
parentNode = null;
} else {
shapeTransform.combineWithParent(currentSpatial.getLocalTransform());
parentNode = currentSpatial.getParent();
currentSpatial = parentNode;
}
}
return shapeTransform;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Calculate the correct transform for a collision shape relative to the
* ancestor for which the shape was generated.
*
* @param spat
* @param parent
* @return a new instance (not null)
*/
private static Transform getTransform(Spatial spat, Spatial parent) {
Transform shapeTransform = new Transform();
Spatial parentNode = spat.getParent() != null ? spat.getParent() : spat;
Spatial currentSpatial = spat;
//if we have parents combine their transforms
while (parentNode != null) {
if (parent == currentSpatial) {
//real parent -> only apply scale, not transform
Transform trans = new Transform();
trans.setScale(currentSpatial.getLocalScale());
shapeTransform.combineWithParent(trans);
parentNode = null;
} else {
shapeTransform.combineWithParent(currentSpatial.getLocalTransform());
parentNode = currentSpatial.getParent();
currentSpatial = parentNode;
}
}
return shapeTransform;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
debug.setCullHint(Spatial.CullHint.Never);
debug.getLocalTranslation().set(teapot.getLocalTranslation());
debug.getLocalScale().set(teapot.getLocalScale());
rootNode.attachChild(debug);
代码示例来源:origin: jMonkeyEngine-Contributions/Lemur
/**
* Creates a tween that will interpolate the scale of the specified target
* from one scale to another. If either scale is null then they will
* be substituted with the Spatial's current local scale AT THE TIME OF THIS CALL.
*/
public static Tween scale( Spatial target, Vector3f from, Vector3f to, double length ) {
from = from != null ? from : target.getLocalScale();
to = to != null ? to : target.getLocalScale();
return new ScaleSpatial(target, from, to, length);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport-jmonkey
addchild.setLocalScale(addchild.getLocalScale().multLocal(add.getLocalScale()));
tmpNode.attachChild(addchild);
代码示例来源:origin: org.cogchar/org.cogchar.lib.render.goody
aniFactory.addKeyFrameScale(0, attachedSpatial.getLocalScale());
代码示例来源:origin: org.jmonkeyengine/jme3-jbullet
initScale = model.getLocalScale().clone();
代码示例来源:origin: org.jmonkeyengine/jme3-jbullet
/**
* Calculate the correct transform for a collision shape relative to the
* ancestor for which the shape was generated.
*
* @param spat
* @param parent
* @return a new instance (not null)
*/
private static Transform getTransform(Spatial spat, Spatial parent) {
Transform shapeTransform = new Transform();
Spatial parentNode = spat.getParent() != null ? spat.getParent() : spat;
Spatial currentSpatial = spat;
//if we have parents combine their transforms
while (parentNode != null) {
if (parent == currentSpatial) {
//real parent -> only apply scale, not transform
Transform trans = new Transform();
trans.setScale(currentSpatial.getLocalScale());
shapeTransform.combineWithParent(trans);
parentNode = null;
} else {
shapeTransform.combineWithParent(currentSpatial.getLocalTransform());
parentNode = currentSpatial.getParent();
currentSpatial = parentNode;
}
}
return shapeTransform;
}
代码示例来源:origin: org.jmonkeyengine/jme3-bullet
/**
* returns the correct transform for a collisionshape in relation
* to the ancestor for which the collisionshape is generated
* @param spat
* @param parent
* @return
*/
private static Transform getTransform(Spatial spat, Spatial parent) {
Transform shapeTransform = new Transform();
Spatial parentNode = spat.getParent() != null ? spat.getParent() : spat;
Spatial currentSpatial = spat;
//if we have parents combine their transforms
while (parentNode != null) {
if (parent == currentSpatial) {
//real parent -> only apply scale, not transform
Transform trans = new Transform();
trans.setScale(currentSpatial.getLocalScale());
shapeTransform.combineWithParent(trans);
parentNode = null;
} else {
shapeTransform.combineWithParent(currentSpatial.getLocalTransform());
parentNode = currentSpatial.getParent();
currentSpatial = parentNode;
}
}
return shapeTransform;
}
代码示例来源:origin: org.jmonkeyengine/jme3-bullet
initScale = model.getLocalScale().clone();
代码示例来源:origin: info.projectkyoto/mms-engine
initScale = model.getLocalScale().clone();
内容来源于网络,如有侵权,请联系作者删除!