本文整理汇总了Java中com.jme3.math.Vector4f.ZERO属性的典型用法代码示例。如果您正苦于以下问题:Java Vector4f.ZERO属性的具体用法?Java Vector4f.ZERO怎么用?Java Vector4f.ZERO使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.jme3.math.Vector4f
的用法示例。
在下文中一共展示了Vector4f.ZERO属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: modsTab
private void modsTab(IconTabControl tabs) {
XTabPanelContent el = new XTabPanelContent(screen, "ModsContainer", LUtil.LAYOUT_SIZE);
el.setIsMovable(false);
el.setIsResizable(false);
el.setLayoutManager(new MigLayout(screen, "gap 0, ins 0", "push[]push", "push[]push"));
Container modsPanel = new Container(screen, "ModsPanel", Vector2f.ZERO,
screen.getStyle("Mods").getVector2f("defaultSize"), Vector4f.ZERO, null);
modsPanel.setLayoutManager(new MigLayout(screen, "wrap 2, gap 1, fill", "[grow, align left][grow, align left]", "push[][][][][][][][][][][][][][]push"));
el.addChild(modsPanel);
attackSpeedMod = addModLabel(modsPanel, "Attack:", inventoryAndEquipment.getAttackSpeedMod());
blockMod = addModLabel(modsPanel, "Block :", inventoryAndEquipment.getBlockMod());
castSpeedMod = addModLabel(modsPanel, "Cast :", inventoryAndEquipment.getCastSpeedMod());
healingMod = addModLabel(modsPanel, "Healing :", inventoryAndEquipment.getHealingMod());
magicCritMod = addModLabel(modsPanel, "Magic Crit:", inventoryAndEquipment.getMagicCritMod());
magicHitMod = addModLabel(modsPanel, "Magic Hit:", inventoryAndEquipment.getMagicHitMod());
meleeCritMod = addModLabel(modsPanel, "Melee Crit:", inventoryAndEquipment.getMeleeCritMod());
meleeHitMod = addModLabel(modsPanel, "Melee Hit:", inventoryAndEquipment.getMeleeHitMod());
parryMod = addModLabel(modsPanel, "Parry:", inventoryAndEquipment.getParryMod());
regenerationMod = addModLabel(modsPanel, "Regeneration:", inventoryAndEquipment.getRegenHealthMod());
runSpeedMod = addModLabel(modsPanel, "Run:", inventoryAndEquipment.getRunSpeedMod());
tabs.addTabWithIcon("Stat modifiers", screen.getStyle("IconTab").getString("modImg"));
tabs.addTabChild(2, el);
}
示例2: BuildToolArea
public BuildToolArea(ToolManager toolMgr, final ElementManager screen) {
super(GameHudType.BUILD, toolMgr, screen, "BuildToolBar", "Buildbar", 7);
//
updateBarText();
Container el = new Container(screen, UIDUtil.getUID(), mainToolBarStyle.getVector2f("propSearchPosition"),
mainToolBarStyle.getVector2f("propSearchSize"), Vector4f.ZERO, null);
el.setLayoutManager(new MigLayout(screen, "", "[][fill, grow][]", "[]"));
propSearch = new AutocompleteTextField<String>(screen, this);
propSearch.setToolTipText("Type in a partial or full prop name and press Ctrl+Space to list all props matching that name");
el.addChild(new Label("Prop: ", screen));
el.addChild(propSearch, "ay 50%");
FancyButton add = new FancyButton(screen) {
@Override
public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
BuildAppState bas = screen.getApplication().getStateManager().getState(BuildAppState.class);
bas.add(propSearch.getText());
}
};
add.setText("Add");
el.addChild(add);
container.addChild(el);
}
示例3: drawImage
public void drawImage(Image img, int dx, int dy, int dw, int dh) {
BaseElement el = new BaseElement(renderer.getScreen(), getTranslatedPosition(dx, dy), new Size(dw, dh),
Vector4f.ZERO, null);
el.setIgnoreGlobalAlpha(true);
el.setIgnoreMouse(true);
el.setIgnoreTouch(true);
el.setDimensions(dw, dh);
el.setTexture(img);
configureForDebug(el, "image");
if (clipLayer != null) {
el.addClippingLayer(clipLayer);
}
//
renderer.addScrollableContent(el);
}
示例4: AbstractMeshElement
public AbstractMeshElement(BaseScreen screen, Vector2f position, Size dimension) {
super(screen, null, position, dimension, Vector4f.ZERO, null);
setIgnoreMouse(true);
meshMaterial = new Material(screen.getApplication().getAssetManager(), "icetone/shaders/Unshaded.j3md");
meshMaterial.setVector2("OffsetAlphaTexCoord", new Vector2f(0, 0));
meshMaterial.setFloat("GlobalAlpha", screen.getGlobalAlpha());
meshMaterial.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
meshMaterial.getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Back);
setLayoutManager(new DefaultLayout() {
@Override
protected void onCalcClip(ElementContainer<?,?> container) {
super.onCalcClip(container);
if (!clippingLayers.isEmpty()) {
meshMaterial.setVector4("Clipping", getClippingBounds());
meshMaterial.setBoolean("UseClipping", true);
} else {
meshMaterial.setBoolean("UseClipping", false);
}
}
});
}
示例5: getPadding
public static Vector4f getPadding(PropertyDeclaration decl) {
if (decl == null)
return Vector4f.ZERO;
Rect rect = decl.getValue().getRectValue();
return new Vector4f(rect.getLeft().getFloatValue(CSSPrimitiveValue.CSS_PX),
rect.getRight().getFloatValue(CSSPrimitiveValue.CSS_PX),
rect.getTop().getFloatValue(CSSPrimitiveValue.CSS_PX),
rect.getBottom().getFloatValue(CSSPrimitiveValue.CSS_PX));
}
示例6: fillRectangle
public void fillRectangle(int x, int y, int width, int height) {
BaseElement el = new BaseElement(renderer.getScreen(), getTranslatedPosition(x, y), new Size(width, height),
Vector4f.ZERO, null);
el.getElementMaterial().setColor("Color", bg);
el.setIgnoreMouse(true);
el.setIgnoreGlobalAlpha(true);
if (clipLayer != null) {
el.addClippingLayer(clipLayer);
}
configureForDebug(el, "other");
renderer.addScrollableContent(el);
}
示例7: setClip
public void setClip(Vector4f bounds) {
if (bounds == null) {
clipLayer = null;
} else {
clipLayer = new BaseElement(renderer.getScreen(), getTranslatedPosition((int) bounds.x, (int) bounds.y),
new Size(bounds.z, bounds.w), Vector4f.ZERO, null);
clipLayer.setAsContainerOnly();
renderer.addScrollableContent(clipLayer);
}
}
示例8: getLetterPos
protected Vector4f getLetterPos(int index) {
if (text.length() == 0)
return Vector4f.ZERO;
if (index >= text.length() && text.length() > 0) {
Vector4f p = getTextElement().getLetterPositions()[index - 1].clone();
p.x += p.z + 1;
return p;
} else
return getTextElement().getLetterPositions()[index];
}
示例9: addMarkerForSpawn
private void addMarkerForSpawn(Spawn spawn) {
spawn.addListener(spawnListener);
Sprite spawnMarker;
if (network.getClient().getPlayerSpawn().equals(spawn)) {
spawnMarker = createSpawnMarker(spawn, 0, 1);
} else {
switch (spawn.getPersona().getCreatureCategory()) {
case ANIMAL:
spawnMarker = createSpawnMarker(spawn, 1, 2);
break;
case DEMON:
spawnMarker = createSpawnMarker(spawn, 2, 1);
break;
case DIVINE:
spawnMarker = createSpawnMarker(spawn, 0, 0);
break;
case DRAGONKIN:
spawnMarker = createSpawnMarker(spawn, 1, 4);
break;
case ELEMENTAL:
spawnMarker = createSpawnMarker(spawn, 1, 5);
break;
case INANIMATE:
spawnMarker = createSpawnMarker(spawn, 2, 0);
break;
case MAGICAL:
spawnMarker = createSpawnMarker(spawn, 1, 7);
break;
case MORTAL:
spawnMarker = createSpawnMarker(spawn, 1, 3);
break;
case UNLIVING:
spawnMarker = createSpawnMarker(spawn, 1, 6);
break;
default:
spawnMarker = createSpawnMarker(spawn, 0, 2);
break;
}
}
Element el = new Element(screen, UIDUtil.getUID(), new Vector2f(MARKER_WIDTH, MARKER_HEIGHT), Vector4f.ZERO, null);
el.setToolTipText(spawn.getPersona().getDisplayName());
spawnMarker.center().move(MARKER_WIDTH / 2f, MARKER_HEIGHT / 2f, 0);
el.attachChild(spawnMarker);
setSpawnRotation(spawn, spawnMarker);
mapArea.addChild(el);
markers.put(spawn, spawnMarker);
}
示例10: getAllPadding
@Override
public Vector4f getAllPadding() {
return Vector4f.ZERO;
}
示例11: getMargin
@Override
public Vector4f getMargin() {
return Vector4f.ZERO;
}
示例12: getTextPadding
@Override
public Vector4f getTextPadding() {
return Vector4f.ZERO;
}