com.craftar
Class CraftARItemARFactory
- java.lang.Object
-
- com.craftar.CraftARItemFactory
-
- com.craftar.CraftARItemARFactory
public class CraftARItemARFactory extends CraftARItemFactory
The CraftARItemARFactory creates the items when a recognition request matched some image. In the Augmented-Reality SDK, the CraftARItemFactory can return AR items or IR items. If you want to create customized items (i.e, having extra fields), you must extend this class and callCraftARItemFactory.setFactory(YourClass yourFactory)
to notify the SDK to use your Factory instead of the default one.
-
-
Constructor Summary
Constructors Constructor and Description CraftARItemARFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
getAutoInstantiateARContents()
Whether the SDK automatically creates and adds the AR contents when creating an AR item.protected CraftARItem
getItem(CraftARCollection collection, JSONObject itemJSON)
void
setAutoInstantiateARContents(boolean instantiateARContents)
Whether the SDK automatically creates and adds the AR contents when creating an AR item.-
Methods inherited from class com.craftar.CraftARItemFactory
getFactory, setFactory
-
-
-
-
Method Detail
-
setAutoInstantiateARContents
public void setAutoInstantiateARContents(boolean instantiateARContents)
Whether the SDK automatically creates and adds the AR contents when creating an AR item. true by default, this triggers the download of the AR item contents as well. When set to NO, call CraftARItemAR.instantiateContents() to trigger contents download.
-
getAutoInstantiateARContents
public boolean getAutoInstantiateARContents()
Whether the SDK automatically creates and adds the AR contents when creating an AR item. true by default, this triggers the download of the AR item contents as well. When set to NO, call CraftARItemAR.instantiateContents() to trigger contents download.
-
getItem
protected CraftARItem getItem(CraftARCollection collection, JSONObject itemJSON)
- Overrides:
getItem
in classCraftARItemFactory
-
-
Comments
0 comments
Article is closed for comments.