Split perspective state out, to let shaders better interact with it
This commit is contained in:
parent
4f73d2cbd6
commit
56e5f6fbb3
4 changed files with 147 additions and 65 deletions
46
src/main/java/org/dynmap/hdmap/HDPerspectiveState.java
Normal file
46
src/main/java/org/dynmap/hdmap/HDPerspectiveState.java
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
package org.dynmap.hdmap;
|
||||
|
||||
import org.dynmap.utils.Vector3D;
|
||||
|
||||
public interface HDPerspectiveState {
|
||||
/**
|
||||
* Get sky light level - only available if shader requested it
|
||||
*/
|
||||
int getSkyLightLevel();
|
||||
/**
|
||||
* Get emitted light level - only available if shader requested it
|
||||
*/
|
||||
int getEmittedLightLevel();
|
||||
/**
|
||||
* Get current block type ID
|
||||
*/
|
||||
int getBlockTypeID();
|
||||
/**
|
||||
* Get current block data
|
||||
*/
|
||||
int getBlockData();
|
||||
/**
|
||||
* Get direction of last block step
|
||||
*/
|
||||
HDMap.BlockStep getLastBlockStep();
|
||||
/**
|
||||
* Get perspective scale
|
||||
*/
|
||||
double getScale();
|
||||
/**
|
||||
* Get start of current ray, in world coordinates
|
||||
*/
|
||||
Vector3D getRayStart();
|
||||
/**
|
||||
* Get end of current ray, in world coordinates
|
||||
*/
|
||||
Vector3D getRayEnd();
|
||||
/**
|
||||
* Get pixel X coordinate
|
||||
*/
|
||||
int getPixelX();
|
||||
/**
|
||||
* Get pixel Y coordinate
|
||||
*/
|
||||
int getPixelY();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue