de.jreality.scene.pick
Class Hit
java.lang.Object
de.jreality.scene.pick.Hit
- All Implemented Interfaces:
- PickResult
public class Hit
- extends java.lang.Object
- implements PickResult
Constructor Summary |
Hit(SceneGraphPath path,
double[] pointWorld,
double dist,
double affineCoord,
int pickType,
int index,
int triIndex)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Hit
public Hit(SceneGraphPath path,
double[] pointWorld,
double dist,
double affineCoord,
int pickType,
int index,
int triIndex)
getPickPath
public SceneGraphPath getPickPath()
- Specified by:
getPickPath
in interface PickResult
getWorldCoordinates
public double[] getWorldCoordinates()
- Specified by:
getWorldCoordinates
in interface PickResult
- Returns:
- pick point in world coordinates
getObjectCoordinates
public double[] getObjectCoordinates()
- Specified by:
getObjectCoordinates
in interface PickResult
- Returns:
- pick point in object coordinates
getDist
public double getDist()
getIndex
public int getIndex()
- Description copied from interface:
PickResult
- returns the index of the picked face/edge/point
- Specified by:
getIndex
in interface PickResult
- Returns:
- the index or -1 if not available
getSecondaryIndex
public int getSecondaryIndex()
- Specified by:
getSecondaryIndex
in interface PickResult
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getPickType
public int getPickType()
- Description copied from interface:
PickResult
- returns if the type of the pick:
- PICK_TYPE_OBJECT
- PICK_TYPE_FACE
- PICK_TYPE_LINE
- PICK_TYPE_POINT
- Specified by:
getPickType
in interface PickResult
- Returns:
getAffineCoordinate
public double getAffineCoordinate()
convertToBary
public static boolean convertToBary(double[] bary,
double[] x0,
double[] x1,
double[] x2,
double[] x)
getTextureCoordinates
public double[] getTextureCoordinates()
- Description copied from interface:
PickResult
- returns texture coordinates if available.
- Specified by:
getTextureCoordinates
in interface PickResult
- Returns:
- the coordinates of null.