本文整理了Java中com.jme3.scene.Spatial.getWorldScale()
方法的一些代码示例,展示了Spatial.getWorldScale()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spatial.getWorldScale()
方法的具体详情如下:
包路径:com.jme3.scene.Spatial
类名称:Spatial
方法名:getWorldScale
[英]getWorldScale
retrieves the absolute scale factor of the spatial.
[中]getWorldScale
检索空间的绝对比例因子。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Creates a transform matrix that will convert from this spatials'
* local coordinate space to the world coordinate space
* based on the world transform.
*
* @param store Matrix where to store the result, if null, a new one
* will be created and returned.
*
* @return store if not null, otherwise, a new matrix containing the result.
*
* @see Spatial#getWorldTransform()
*/
public Matrix4f getLocalToWorldMatrix(Matrix4f store) {
if (store == null) {
store = new Matrix4f();
} else {
store.loadIdentity();
}
// multiply with scale first, then rotate, finally translate (cf.
// Eberly)
store.scale(getWorldScale());
store.multLocal(getWorldRotation());
store.setTranslation(getWorldTranslation());
return store;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
for (Spatial child : result.getChildren()) {
if (child instanceof Geometry) {
this.flipMeshIfRequired((Geometry) child, child.getWorldScale());
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
left.x *= 1.0f / spatial.getWorldScale().x;
left.y *= 1.0f / spatial.getWorldScale().y;
left.z *= 1.0f / spatial.getWorldScale().z;
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Creates a transform matrix that will convert from this spatials'
* local coordinate space to the world coordinate space
* based on the world transform.
*
* @param store Matrix where to store the result, if null, a new one
* will be created and returned.
*
* @return store if not null, otherwise, a new matrix containing the result.
*
* @see Spatial#getWorldTransform()
*/
public Matrix4f getLocalToWorldMatrix(Matrix4f store) {
if (store == null) {
store = new Matrix4f();
} else {
store.loadIdentity();
}
// multiply with scale first, then rotate, finally translate (cf.
// Eberly)
store.scale(getWorldScale());
store.multLocal(getWorldRotation());
store.setTranslation(getWorldTranslation());
return store;
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Creates a transform matrix that will convert from this spatials'
* local coordinate space to the world coordinate space
* based on the world transform.
*
* @param store Matrix where to store the result, if null, a new one
* will be created and returned.
*
* @return store if not null, otherwise, a new matrix containing the result.
*
* @see Spatial#getWorldTransform()
*/
public Matrix4f getLocalToWorldMatrix(Matrix4f store) {
if (store == null) {
store = new Matrix4f();
} else {
store.loadIdentity();
}
// multiply with scale first, then rotate, finally translate (cf.
// Eberly)
store.scale(getWorldScale());
store.multLocal(getWorldRotation());
store.setTranslation(getWorldTranslation());
return store;
}
代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit
Vector3f worldScale = spatial.getWorldScale();
spatial = spatial.clone();
代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit
Vector3f worldScale = spatial.getWorldScale();
spatial = spatial.clone();
代码示例来源:origin: org.jmonkeyengine/jme3-core
left.x *= 1.0f / spatial.getWorldScale().x;
left.y *= 1.0f / spatial.getWorldScale().y;
left.z *= 1.0f / spatial.getWorldScale().z;
代码示例来源:origin: info.projectkyoto/mms-engine
left.x *= 1.0f / spatial.getWorldScale().x;
left.y *= 1.0f / spatial.getWorldScale().y;
left.z *= 1.0f / spatial.getWorldScale().z;
内容来源于网络,如有侵权,请联系作者删除!