private boolean anchorNode(final VRTNode node, final Vector position) {
            if (DEBUG_ANCHORING) {
                Log.i(TAG, "Anchoring node " + node + " [attempt " + mAttempt + "]");
            }

            if (node == null || node.isTornDown() || node.getParent() == null) {
                return false;
            }

            final ARScene scene = (ARScene) ((VRTARScene) node.getParent()).getNativeScene();
            if (node.mViroContext == null) {
                if (DEBUG_ANCHORING) {
                    Log.i(TAG, "   Delaying anchoring: ViroContext is null");
                }
                return false;
            }

            node.mAnchor = scene.createAnchoredNode(position);

            if (node.mAnchor != null) {
                if (DEBUG_ANCHORING) {
                    Log.i(TAG, "Anchor created successfully at position " + position + ", repositioning Node to origin");
                }

                node.mNodeJni.removeFromParentNode();
                scene.getRootNode().addChildNode(node.mAnchor);
                node.mAnchor.addChildNode(node.mNodeJni);
                node.mNodeJni.setPosition(new Vector(0, 0, 0));

                return true;
            } else {
                // Anchor failed: simply set the node to the position and try again later
                if (DEBUG_ANCHORING) {
                    Log.i(TAG, "Failed to anchor node at " + position + " -- trying again later");
                }
                node.mNodeJni.setPosition(position);

                return false;
            }
        }
Anchor this node by creating an anchored node at the given position, then parenting this
node with the anchor and setting this node to the origin. Note that this node's current
position is ignored. If anchoring fails, then the node is simply set to the position, and
we try again later.

@param position The position at which to anchor the node.
@return True if anchoring succeeded.
android/viro_bridge/src/main/java/com/viromedia/bridge/component/node/VRTNode.java