Package pro.streem.ar.sceneform
Class Sun
- java.lang.Object
-
- pro.streem.ar.sceneform.NodeParent
-
- pro.streem.ar.sceneform.Node
-
- pro.streem.ar.sceneform.Sun
-
- All Implemented Interfaces:
TransformProvider
public class Sun extends Node
Represents the "sun" - the default directional light in the scene.The following method will throw
UnsupportedOperationExceptionwhen called:setParent(NodeParent)- Sunlight's parent cannot be changed, it is always the scene.All other functionality in Node is supported. You can access the position and rotation of the sun, assign a collision shape to the sun, or add children to the sun. Disabling the sun turns off the default directional light.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class pro.streem.ar.sceneform.Node
Node.LifecycleListener, Node.OnTapListener, Node.OnTouchListener, Node.TransformChangedListener
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetParent(NodeParent parent)Changes the parent node of this node.-
Methods inherited from class pro.streem.ar.sceneform.Node
addLifecycleListener, addTransformChangedListener, callOnHierarchy, canAddChild, findInHierarchy, getBack, getCollisionShape, getDown, getForward, getLeft, getLight, getLocalPosition, getLocalRotation, getLocalScale, getName, getParent, getRenderable, getRenderableInstance, getRight, getScene, getUp, getWorldModelMatrix, getWorldPosition, getWorldRotation, getWorldScale, isActive, isDescendantOf, isEnabled, isTopLevel, localToWorldDirection, localToWorldPoint, onActivate, onAddChild, onDeactivate, onRemoveChild, onTouchEvent, onTransformChange, onUpdate, removeLifecycleListener, removeTransformChangedListener, setCollisionShape, setEnabled, setLight, setLocalPosition, setLocalRotation, setLocalScale, setLookDirection, setLookDirection, setName, setOnTapListener, setOnTouchListener, setRenderable, setWorldPosition, setWorldRotation, setWorldScale, toString, worldToLocalDirection, worldToLocalPoint
-
Methods inherited from class pro.streem.ar.sceneform.NodeParent
addChild, findByName, getChildren, removeChild
-
-
-
-
Method Detail
-
setParent
public void setParent(@Nullable NodeParent parent)Description copied from class:NodeChanges the parent node of this node. If set to null, this node will be detached from its parent. The local position, rotation, and scale of this node will remain the same. Therefore, the world position, rotation, and scale of this node may be different after the parent changes.The parent may be another
Nodeor aScene. If it is a scene, then thisNodeis considered top level.Node.getParent()will return null, andNode.getScene()will return the scene.- Overrides:
setParentin classNode- Parameters:
parent- The new parent that this node will be a child of. If null, this node will be detached from its parent.- See Also:
Node.getParent(),Node.getScene()
-
-