本文整理汇总了Java中com.jme.math.Vector2f.clone方法的典型用法代码示例。如果您正苦于以下问题:Java Vector2f.clone方法的具体用法?Java Vector2f.clone怎么用?Java Vector2f.clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme.math.Vector2f
的用法示例。
在下文中一共展示了Vector2f.clone方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setOffset
import com.jme.math.Vector2f; //导入方法依赖的package包/类
/**
* Specify the first part the window's offset translation in local
* coordinates from the center of the parent to the center of this window.
* Note: setPixelOffset is the other part of the offset translation.The two
* offsets are added to produce the effective offset. If the window has no
* parent the offset is ignored. Any decoration is ignored.
*/
public void setOffset(Vector2f offset) {
synchronized (this) {
if (this.offset.x == offset.x && this.offset.y == offset.y) {
return;
}
this.offset = (Vector2f) offset.clone();
changeMask |= CHANGED_OFFSET;
updateViews();
}
updateFrames();
}
示例2: setPixelScale
import com.jme.math.Vector2f; //导入方法依赖的package包/类
/**
* Specify the initial pixel scale for the window's views when they are in
* cell mode.
*/
public synchronized void setPixelScale(Vector2f pixelScale) {
if (this.pixelScale.equals(pixelScale)) {
return;
}
this.pixelScale = pixelScale.clone();
}
示例3: setPixelScale
import com.jme.math.Vector2f; //导入方法依赖的package包/类
/**
* Specify the size of the displayed pixels used when the view is in cell mode.
* Update if specified. Defaults to the pixel scale of the window.
*/
public synchronized void setPixelScale (Vector2f pixelScale, boolean update) {
logger.info("view = " + this);
logger.info("change pixelScale cell = " + pixelScale);
this.pixelScaleCell = pixelScale.clone();
changeMask |= CHANGED_PIXEL_SCALE;
if (update) {
update();
if (!inCleanup) {
updateFrame();
}
}
}
示例4: setPixelScaleOrtho
import com.jme.math.Vector2f; //导入方法依赖的package包/类
/**
* Specify the size of the displayed pixels used when the view is in ortho mode.
* Update if specified. This defaults to (1.0, 1.0).
*/
public synchronized void setPixelScaleOrtho (Vector2f pixelScale, boolean update) {
logger.info("view = " + this);
logger.info("change pixelScale ortho = " + pixelScale);
this.pixelScaleOrtho = pixelScale.clone();
changeMask |= CHANGED_PIXEL_SCALE;
if (update) {
update();
if (!inCleanup) {
updateFrame();
}
}
}
示例5: setLocationOrtho
import com.jme.math.Vector2f; //导入方法依赖的package包/类
/**
* Specify the location of a primary view used when the view is in ortho mode.
* The location is an offset relative to the origin of the displayer and is in
* the coordinate system of the ortho plane. Update if specified.
* This attribute is ignored for non-primary views.
*
* Note: there is no corresponding attribute for cell mode because the cell itself automatically
* controls the location of a primary view within the cell (usually centered) and the cell location
* within the world is derived from WFS and other input.
*/
public synchronized void setLocationOrtho (Vector2f location, boolean update) {
if (locationOrtho.x == location.x && locationOrtho.y == location.y) return;
logger.info("view = " + this);
logger.info("change location ortho = " + location);
locationOrtho = location.clone();
changeMask |= CHANGED_LOCATION_ORTHO;
if (update) {
update();
if (!inCleanup) {
updateFrame();
}
}
}
示例6: setOffset
import com.jme.math.Vector2f; //导入方法依赖的package包/类
/** {@inheritDoc} */
public synchronized void setOffset(Vector2f offset, boolean update) {
if (this.offset.x == offset.x && this.offset.y == offset.y) return;
logger.info("view = " + this);
logger.info("change offset = " + offset);
this.offset = (Vector2f) offset.clone();
changeMask |= CHANGED_OFFSET;
if (update) {
update();
if (!inCleanup) {
updateFrame();
}
}
}
示例7: userMovePlanarUpdate
import com.jme.math.Vector2f; //导入方法依赖的package包/类
/**
* Called by the UI to indicate a drag vector update during interactive planar move.
*/
public synchronized void userMovePlanarUpdate (Vector2f dragVector) {
// Calculate the delta of the movement since the last update
Vector2f deltaDragVector = dragVector.clone();
deltaDragVector.subtractLocal(userMovePlanarDragVectorPrev);
userMovePlanarDragVectorPrev = dragVector;
applyDeltaTranslationUser(new Vector3f(deltaDragVector.x, deltaDragVector.y, 0f), true);
}