com.jme3.effect.shapes.EmitterPointShape Java Examples

The following examples show how to use com.jme3.effect.shapes.EmitterPointShape. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EmitterShapePropertyBuilder.java    From jmonkeybuilder with Apache License 2.0 6 votes vote down vote up
@Override
@FxThread
protected void buildForImpl(@NotNull final Object object, @Nullable final Object parent,
                            @NotNull final VBox container, @NotNull final ModelChangeConsumer changeConsumer) {

    if (!(object instanceof EmitterShape)) return;

    final EmitterShape shape = (EmitterShape) object;

    if (shape instanceof EmitterPointShape) {
        createControls(container, changeConsumer, (EmitterPointShape) object);
    } else if (shape instanceof EmitterBoxShape) {
        createControls(container, changeConsumer, (EmitterBoxShape) object);
    } else if (shape instanceof EmitterSphereShape) {
        createControls(container, changeConsumer, (EmitterSphereShape) object);
    }
}
 
Example #2
Source File: EmitterShapePropertyBuilder.java    From jmonkeybuilder with Apache License 2.0 6 votes vote down vote up
/**
 * Create controls.
 *
 * @param container      the container.
 * @param changeConsumer the change consumer.
 * @param shape          the shape.
 */
@FxThread
private void createControls(@NotNull final VBox container, @NotNull final ModelChangeConsumer changeConsumer,
                            @NotNull final EmitterPointShape shape) {

    final Vector3f point = shape.getPoint();

    final Vector3fPropertyControl<ModelChangeConsumer, EmitterPointShape> pointControl =
            new Vector3fPropertyControl<>(point, Messages.MODEL_PROPERTY_POINT, changeConsumer);

    pointControl.setSyncHandler(EmitterPointShape::getPoint);
    pointControl.setApplyHandler(EmitterPointShape::setPoint);
    pointControl.setEditObject(shape);

    FXUtils.addToPane(pointControl, container);
}
 
Example #3
Source File: EmitterPointShapeTreeNode.java    From jmonkeybuilder with Apache License 2.0 4 votes vote down vote up
public EmitterPointShapeTreeNode(@NotNull final EmitterPointShape element, final long objectId) {
    super(element, objectId);
}
 
Example #4
Source File: CreatePointShapeEmitterAction.java    From jmonkeybuilder with Apache License 2.0 4 votes vote down vote up
@Override
@FxThread
protected @NotNull EmitterShape createEmitterShape(@NotNull final VarTable vars) {
    final Vector3f point = vars.get(PROPERTY_POINT);
    return new EmitterPointShape(point);
}