本文整理汇总了Java中com.jme3.math.Vector3f.ZERO属性的典型用法代码示例。如果您正苦于以下问题:Java Vector3f.ZERO属性的具体用法?Java Vector3f.ZERO怎么用?Java Vector3f.ZERO使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.jme3.math.Vector3f
的用法示例。
在下文中一共展示了Vector3f.ZERO属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reload
@Override
@FXThread
protected void reload() {
final Vector3f vector = getPropertyValue() == null ? Vector3f.ZERO : getPropertyValue();
final FloatTextField xField = getXField();
xField.setValue(vector.getX());
xField.positionCaret(xField.getText().length());
final FloatTextField yFiled = getYFiled();
yFiled.setValue(vector.getY());
yFiled.positionCaret(xField.getText().length());
final FloatTextField zField = getZField();
zField.setValue(vector.getZ());
zField.positionCaret(xField.getText().length());
}
示例2: updateVector
/**
* Update the vector.
*
* @param event the event
*/
@FXThread
protected void updateVector(@Nullable final KeyEvent event) {
if (isIgnoreListener() || (event != null && event.getCode() != KeyCode.ENTER)) return;
final FloatTextField xField = getXField();
final float x = xField.getValue();
final FloatTextField yFiled = getYFiled();
final float y = yFiled.getValue();
final FloatTextField zField = getZField();
final float z = zField.getValue();
final Vector3f oldValue = getPropertyValue() == null ? Vector3f.ZERO : getPropertyValue();
final Vector3f newValue = new Vector3f();
newValue.set(x, y, z);
changed(newValue, oldValue.clone());
}
示例3: reload
@Override
@FXThread
protected void reload() {
final Vector3f vector = getPropertyValue() == null ? Vector3f.ZERO : getPropertyValue();
final FloatTextField xField = getXField();
xField.setValue(vector.getX());
xField.positionCaret(xField.getText().length());
final FloatTextField yField = getYField();
yField.setValue(vector.getY());
yField.positionCaret(yField.getText().length());
final FloatTextField zField = getZField();
zField.setValue(vector.getZ());
zField.positionCaret(zField.getText().length());
}
示例4: updateVector
/**
* Update the current value.
*
* @param event the change event.
*/
@FXThread
private void updateVector(@Nullable final KeyEvent event) {
if (isIgnoreListener() || (event != null && event.getCode() != KeyCode.ENTER)) return;
final FloatTextField xField = getXField();
final float x = xField.getValue();
final FloatTextField yField = getYField();
final float y = yField.getValue();
final FloatTextField zField = getZField();
final float z = zField.getValue();
final Vector3f oldValue = getPropertyValue() == null ? Vector3f.ZERO : getPropertyValue();
final Vector3f newValue = new Vector3f();
newValue.set(checkResultXValue(x, y, z), checkResultYValue(x, y, z), checkResultZValue(x, y, z));
changed(newValue, oldValue.clone());
}
示例5: createForceFieldProducer
public static ForceProducer createForceFieldProducer(Vector3f halfExtents, Vector3f force){
return new ForceProducer(r -> {
if(r.x <= halfExtents.x && r.x >= -halfExtents.x
&& r.y <= halfExtents.y && r.y >= -halfExtents.y
&& r.z <= halfExtents.z && r.z >= -halfExtents.z){
return force;
}
return Vector3f.ZERO;
});
}
示例6: createConstantBoundedForceProducer
/**
*
* @param factor
* @param radius
* @return
*/
public static ForceProducer createConstantBoundedForceProducer(float factor, float radius){
return new ForceProducer(r -> {
if(r.lengthSquared() > radius*radius){
return Vector3f.ZERO;
}
return r.normalize().mult(factor);
});
}
示例7: BulletJointDebugControl
public BulletJointDebugControl(BulletDebugAppState debugAppState, PhysicsJoint body) {
super(debugAppState);
this.body = body;
this.geomA = new Geometry(body.toString());
arrowA = new Arrow(Vector3f.ZERO);
geomA.setMesh(arrowA);
// geomA.setMaterial(debugAppState.DEBUG_GREEN);
this.geomB = new Geometry(body.toString());
arrowB = new Arrow(Vector3f.ZERO);
geomB.setMesh(arrowB);
// geomB.setMaterial(debugAppState.DEBUG_GREEN);
}
示例8: SlopeTerrainToolControl
/**
* Instantiates a new Slope terrain tool control.
*
* @param component the component
*/
public SlopeTerrainToolControl(@NotNull final TerrainEditingComponent component) {
super(component);
this.baseMarker = new Geometry("BaseMarker", new Sphere(8, 8, 1));
this.baseMarker.setMaterial(createMaterial(ColorRGBA.Red));
this.targetMarker = new Geometry("TargetMarker", new Sphere(8, 8, 1));
this.targetMarker.setMaterial(createMaterial(ColorRGBA.Blue));
this.line = new Geometry("line", new Line(Vector3f.ZERO, Vector3f.ZERO));
this.line.setMaterial(createMaterial(ColorRGBA.White));
}
示例9: ViewLocation
public ViewLocation() {
this(Vector3f.ZERO);
}
示例10: PhysicsToViewLocation
public PhysicsToViewLocation() {
this(Vector3f.ZERO);
}