com.craftar
Class CraftARItemAR
- java.lang.Object
-
- com.craftar.CraftARItem
-
- com.craftar.CraftARItemAR
public class CraftARItemAR extends CraftARItem
CraftARItem that handles an Augmented Reality experience. It may contain one or more instances ofCraftARContent
-
-
Constructor Summary
Constructors Constructor and Description CraftARItemAR(CraftARCollection collection, JSONObject itemJSON)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addContent(CraftARContentBase content)
void
clearContents()
Remove all the contents from thisCraftARItemAR
.boolean
drawsOffTracking()
java.util.ArrayList<CraftARContentBase>
getContents()
Returns a list with all the contents attached to thisCraftARItemAR
float[]
getRotationMatrix()
Get the rotation matrix of this itemcom.craftar.CraftARItemAR.TrackingData
getTrackingData()
float[]
getTranslation()
void
instantiateContents()
boolean
isTracked()
Check if the ARItem is currently being trackedvoid
removeContent(CraftARContentBase content)
Remove acom.craftar.CraftARTrackingContent
from this CraftARItemAR.void
setDrawOffTracking(boolean drawOffTracking)
void
setRotationMatrix(float[] rotationMatrix)
Set the rotation matrix of this itemvoid
setTranslation(float x, float y, float z)
protected void
trackingLost()
protected void
trackingStarted()
-
Methods inherited from class com.craftar.CraftARItem
createFromJson, getCustom, getItemId, getItemName, getJson, getUrl, isAR
-
-
-
-
Constructor Detail
-
CraftARItemAR
public CraftARItemAR(CraftARCollection collection, JSONObject itemJSON)
-
-
Method Detail
-
instantiateContents
public void instantiateContents()
-
getTrackingData
public com.craftar.CraftARItemAR.TrackingData getTrackingData()
-
removeContent
public void removeContent(CraftARContentBase content)
Remove acom.craftar.CraftARTrackingContent
from this CraftARItemAR.
-
clearContents
public void clearContents()
Remove all the contents from thisCraftARItemAR
.
-
getContents
public java.util.ArrayList<CraftARContentBase> getContents()
Returns a list with all the contents attached to thisCraftARItemAR
-
addContent
public void addContent(CraftARContentBase content)
-
isTracked
public boolean isTracked()
Check if the ARItem is currently being tracked- Returns:
- true if the item is tracked. false otherwise.
-
setRotationMatrix
public void setRotationMatrix(float[] rotationMatrix)
Set the rotation matrix of this item- Parameters:
rotationMatrix
- 4x4 homogeneous matrix
-
getRotationMatrix
public float[] getRotationMatrix()
Get the rotation matrix of this item- Returns:
- 4x4 homogeneous matrix
-
setTranslation
public void setTranslation(float x, float y, float z)
-
getTranslation
public float[] getTranslation()
-
drawsOffTracking
public boolean drawsOffTracking()
-
setDrawOffTracking
public void setDrawOffTracking(boolean drawOffTracking)
-
trackingStarted
protected void trackingStarted()
-
trackingLost
protected void trackingLost()
-
-