Package jni

Class JniCamera


  • public class JniCamera
    extends Object
    Author:
    Grégory Van den Borre
    • Constructor Detail

      • JniCamera

        public JniCamera()
    • Method Detail

      • delete

        public void delete​(long address)
        Delete the object in native code.
        Parameters:
        address - Address of the native object.
      • setAspectRatio

        public void setAspectRatio​(long pointer,
                                   float ratio)
      • isVisible

        public boolean isVisible​(long pointer,
                                 float xPosition,
                                 float yPosition,
                                 float zPosition)
        Check if a position in visible by the camera.
        Parameters:
        pointer - Address to the native object.
        xPosition - Position to check X value.
        yPosition - Position to check Y value.
        zPosition - Position to check Z value.
        Returns:
        true if visible, false otherwise.
      • detachFromParent

        public void detachFromParent​(long pointer)
        Detach from the parent node in native code.
        Parameters:
        pointer - Address of this yz::Camera.
      • forceListenersUpdate

        public void forceListenersUpdate​(long pointer)
        Use this when the camera is not moved directly(i.e. by nodes) to force listeners being updated.
        Parameters:
        pointer - Address to the native object.
      • unregisterListener

        public void unregisterListener​(long pointer,
                                       long ls)
        Remove a listener in native code.
        Parameters:
        pointer - Address of this yz::Camera.
        ls - Address of the listener to remove.
      • enableRenderingDistance

        public void enableRenderingDistance​(long pointer)
        Enable the rendering distance.
        Parameters:
        pointer - Pointer to the native object.
      • setFarClip

        public void setFarClip​(long pointer,
                               int distance)
        Set the far clip distance.
        Parameters:
        pointer - Pointer to the native object.
        distance - Far clip distance.
      • setNearClip

        public void setNearClip​(long pointer,
                                int distance)
        Set the near clip distance.
        Parameters:
        pointer - Pointer to the native object.
        distance - Near clip distance.
      • attachToNode

        public void attachToNode​(long pointerAddress,
                                 long nodeAddress)