org.joml.Vector3dc Java Examples

The following examples show how to use org.joml.Vector3dc. 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: Pin.java    From BlockMap with MIT License 6 votes vote down vote up
@Override
protected PopOver initInfo() {
	PopOver info = super.initInfo();
	GridPane content = new GridPane();
	content.getStyleClass().add("grid");

	content.add(new Label("Player position:"), 0, 2);

	Vector3dc position = player.getPosition();
	Button jumpButton = new Button(position.toString());
	jumpButton.setTooltip(new Tooltip("Click to go there"));
	content.add(jumpButton, 1, 2);
	jumpButton.setOnAction(e -> {
		Vector2d spawnpoint = new Vector2d(position.x(), position.z());
		AABBd frustum = viewport.frustumProperty.get();
		viewport.translationProperty.set(spawnpoint.negate().add((frustum.maxX - frustum.minX) / 2, (frustum.maxY - frustum.minY) / 2));
		info.hide();
	});

	info.setContentNode(content);
	return info;
}
 
Example #2
Source File: LevelMetadata.java    From BlockMap with MIT License 5 votes vote down vote up
public PlayerPin(Vector3dc position, MinecraftDimension dimension, Optional<String> UUID, Optional<Vector3ic> spawnpoint, Optional<Integer> gamemode) {
	this.position = position;
	this.dimension = dimension;
	this.UUID = UUID;
	this.spawnpoint = spawnpoint;
	this.gamemode = gamemode;
}
 
Example #3
Source File: LevelMetadata.java    From BlockMap with MIT License 4 votes vote down vote up
public PlayerPin(Vector3dc position, MinecraftDimension dimension, String UUID, Vector3ic spawnpoint, int gamemode) {
	this(position, dimension, Optional.ofNullable(UUID), Optional.ofNullable(spawnpoint), Optional.ofNullable(gamemode));
}
 
Example #4
Source File: LevelMetadata.java    From BlockMap with MIT License 4 votes vote down vote up
public Vector3dc getPosition() {
	return position;
}
 
Example #5
Source File: CoordsList.java    From OSPREY3 with GNU General Public License v2.0 4 votes vote down vote up
public void set(int i, Vector3dc in) {
	int o = i*3;
	coords[o] = in.x();
	coords[++o] = in.y();
	coords[++o] = in.z();
}
 
Example #6
Source File: StatsNamespace.java    From imagej-ops with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@OpMethod(op = net.imagej.ops.stats.regression.leastSquares.Quadric.class)
public Matrix4d leastSquares(final Collection<Vector3dc> points) {
	return (Matrix4d) ops().run(
		net.imagej.ops.stats.regression.leastSquares.Quadric.class, points);
}