本文整理了Java中com.ardor3d.math.Transform.getScale()
方法的一些代码示例,展示了Transform.getScale()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transform.getScale()
方法的具体详情如下:
包路径:com.ardor3d.math.Transform
类名称:Transform
方法名:getScale
暂无
代码示例来源:origin: Renanse/Ardor3D
/**
* Gets the world scale vector.
*
* @return the world scale
*/
public ReadOnlyVector3 getWorldScale() {
return _worldTransform.getScale();
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/**
* Gets the local scale vector.
*
* @return the scale
*/
public ReadOnlyVector3 getScale() {
return _localTransform.getScale();
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Gets the local scale vector.
*
* @return the scale
*/
public ReadOnlyVector3 getScale() {
return _localTransform.getScale();
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/**
* Gets the world scale vector.
*
* @return the world scale
*/
public ReadOnlyVector3 getWorldScale() {
return _worldTransform.getScale();
}
代码示例来源:origin: Renanse/Ardor3D
/** get width in world units */
public float getWidth() {
return (_size.getXf() * _worldTransform.getScale().getXf());
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/** get height in world units */
public float getHeight() {
return (_size.getYf() * _worldTransform.getScale().getYf());
}
代码示例来源:origin: Renanse/Ardor3D
/** get height in world units */
public float getHeight() {
return (_size.getYf() * _worldTransform.getScale().getYf());
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/** get width in world units */
public float getWidth() {
return (_size.getXf() * _worldTransform.getScale().getXf());
}
代码示例来源:origin: com.ardor3d/ardor3d-terrain
@Override
public void drawTo(final BufferedImage image, final ReadOnlyTransform localTransform, final int clipmapLevel) {
// apply the two transforms together and then use result to scale/translate and rotate image
final Transform trans = new Transform();
localTransform.multiply(getTransform(), trans);
// grab a copy of the graphics so we don't bleed state to next image
final Graphics2D g2d = (Graphics2D) image.getGraphics().create();
// apply hints
for (final RenderingHints.Key key : hints.keySet()) {
g2d.setRenderingHint(key, hints.get(key));
}
// set transform
g2d.translate(trans.getTranslation().getX(), trans.getTranslation().getY());
g2d.rotate(trans.getMatrix().toAngles(null)[2]); // rotation about z
g2d.scale(trans.getScale().getX(), trans.getScale().getY());
// set composite
if (_compositeOverride != null) {
g2d.setComposite(_compositeOverride);
}
// draw the image
g2d.drawImage(_image, 0, 0, null);
}
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public void drawTo(final BufferedImage image, final ReadOnlyTransform localTransform, final int clipmapLevel) {
// apply the two transforms together and then use result to scale/translate and rotate image
final Transform trans = new Transform();
localTransform.multiply(getTransform(), trans);
// grab a copy of the graphics so we don't bleed state to next image
final Graphics2D g2d = (Graphics2D) image.getGraphics().create();
// apply hints
for (final RenderingHints.Key key : hints.keySet()) {
g2d.setRenderingHint(key, hints.get(key));
}
// set transform
g2d.translate(trans.getTranslation().getX(), trans.getTranslation().getY());
g2d.rotate(trans.getMatrix().toAngles(null)[2]); // rotation about z
g2d.scale(trans.getScale().getX(), trans.getScale().getY());
// set composite
if (_compositeOverride != null) {
g2d.setComposite(_compositeOverride);
}
// draw the image
g2d.drawImage(_image, 0, 0, null);
}
}
代码示例来源:origin: com.ardor3d/ardor3d-terrain
g2d.scale(trans.getScale().getX(), trans.getScale().getY());
代码示例来源:origin: Renanse/Ardor3D
g2d.scale(trans.getScale().getX(), trans.getScale().getY());
代码示例来源:origin: Renanse/Ardor3D
/**
*
* @param cam
*/
public void correctTransform(final Camera cam) {
updateWorldTransform(false);
if (_autoRotate) {
// Billboard rotation
_look.set(cam.getDirection());
_left.set(cam.getLeft()).negateLocal();
_rot.fromAxes(_left, _look, cam.getUp());
if (_rot.isOrthonormal()) {
_worldTransform.setRotation(_rot);
} else {
logger.warning("BMText: non-orthonormal rotation matrix :" + getName());
}
}
_worldTransform.setScale(_localTransform.getScale());
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/**
*
* @param cam
*/
public void correctTransform(final Camera cam) {
updateWorldTransform(false);
if (_autoRotate) {
// Billboard rotation
_look.set(cam.getDirection());
_left.set(cam.getLeft()).negateLocal();
_rot.fromAxes(_left, _look, cam.getUp());
_worldTransform.setRotation(_rot);
}
_worldTransform.setScale(_localTransform.getScale());
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public void applyFilter(final InteractManager manager) {
final ReadOnlyVector3 oldScale = manager.getSpatialTarget().getScale();
final SpatialState state = manager.getSpatialState();
final ReadOnlyVector3 scale = state.getTransform().getScale();
state.getTransform().setScale( //
_xAxis ? scale.getX() : oldScale.getX(), //
_yAxis ? scale.getY() : oldScale.getY(), //
_zAxis ? scale.getZ() : oldScale.getZ());
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public void applyFilter(final InteractManager manager) {
final SpatialState state = manager.getSpatialState();
final ReadOnlyVector3 scale = state.getTransform().getScale();
final double x = MathUtils.clamp(scale.getX(), _minScale.getX(), _maxScale.getX());
final double y = MathUtils.clamp(scale.getY(), _minScale.getY(), _maxScale.getY());
final double z = MathUtils.clamp(scale.getZ(), _minScale.getZ(), _maxScale.getZ());
state.getTransform().setScale(x, y, z);
}
代码示例来源:origin: Renanse/Ardor3D
assertTrue(true == immutable.isUniformScale());
assertEquals(new Matrix3().applyRotationX(MathUtils.QUARTER_PI), immutable.getMatrix());
assertEquals(new Vector3(0, -1, -2), immutable.getScale());
assertEquals(new Vector3(1, 2, 3), immutable.getTranslation());
assertEquals(Vector3.ONE, trans.getScale());
assertEquals(new Vector3(1, 2, 3), trans.getScale());
assertEquals(new Vector3(-1, 5, -3), trans.getScale());
代码示例来源:origin: com.ardor3d/ardor3d-core
final Matrix3 worldMatrix = Matrix3.fetchTempInstance().set(_worldTransform.getMatrix());
final ReadOnlyVector3 scale = _worldTransform.getScale();
_left.divideLocal(scale);
代码示例来源:origin: Renanse/Ardor3D
p.getPosition().divideLocal(_emitterTransform.getScale());
代码示例来源:origin: com.ardor3d/ardor3d-effects
p.getPosition().divideLocal(_emitterTransform.getScale());
内容来源于网络,如有侵权,请联系作者删除!