-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transformation support to display entities.
- Loading branch information
1 parent
6353b69
commit 920b82c
Showing
12 changed files
with
214 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCTransformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.laytonsmith.abstraction.bukkit.entities; | ||
|
||
import com.laytonsmith.abstraction.entities.MCTransformation; | ||
import org.bukkit.util.Transformation; | ||
import org.joml.Quaternionf; | ||
import org.joml.Vector3f; | ||
|
||
/** | ||
* | ||
*/ | ||
public class BukkitMCTransformation implements MCTransformation { | ||
|
||
Transformation transformation; | ||
|
||
public BukkitMCTransformation(Transformation transformation) { | ||
this.transformation = transformation; | ||
} | ||
|
||
@Override | ||
public Vector3f getTranslation() { | ||
return transformation.getTranslation(); | ||
} | ||
|
||
@Override | ||
public Quaternionf getLeftRotation() { | ||
return transformation.getLeftRotation(); | ||
} | ||
|
||
@Override | ||
public Vector3f getScale() { | ||
return transformation.getScale(); | ||
} | ||
|
||
@Override | ||
public Quaternionf getRightRotation() { | ||
return transformation.getRightRotation(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/com/laytonsmith/abstraction/entities/MCTransformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.laytonsmith.abstraction.entities; | ||
|
||
import org.joml.Quaternionf; | ||
import org.joml.Vector3f; | ||
|
||
/** | ||
* | ||
* @author Cailin | ||
*/ | ||
public interface MCTransformation { | ||
|
||
public Vector3f getTranslation(); | ||
|
||
public Quaternionf getLeftRotation(); | ||
|
||
public Vector3f getScale(); | ||
|
||
public Quaternionf getRightRotation(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.