當前位置: 首頁>>代碼示例>>Java>>正文


Java Vector2f.clone方法代碼示例

本文整理匯總了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();
}
 
開發者ID:josmas,項目名稱:openwonderland,代碼行數:20,代碼來源:Window2D.java

示例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();
}
 
開發者ID:josmas,項目名稱:openwonderland,代碼行數:11,代碼來源:Window2D.java

示例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();
        }
    }
}
 
開發者ID:josmas,項目名稱:openwonderland,代碼行數:17,代碼來源:View2DEntity.java

示例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();
        }
    }
}
 
開發者ID:josmas,項目名稱:openwonderland,代碼行數:17,代碼來源:View2DEntity.java

示例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();
        }
    }
}
 
開發者ID:josmas,項目名稱:openwonderland,代碼行數:24,代碼來源:View2DEntity.java

示例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();
        }
    }
}
 
開發者ID:josmas,項目名稱:openwonderland,代碼行數:15,代碼來源:View2DEntity.java

示例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);
}
 
開發者ID:josmas,項目名稱:openwonderland,代碼行數:13,代碼來源:View2DEntity.java


注:本文中的com.jme.math.Vector2f.clone方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。