Class DrawableNodeClonePtr


  • public class DrawableNodeClonePtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • DrawableNodeClonePtr

        public DrawableNodeClonePtr​(long cPtr,
                                    boolean cMemoryOwn)
      • DrawableNodeClonePtr

        public DrawableNodeClonePtr()
        Default constructor yielding a NULL-pointer.
      • DrawableNodeClonePtr

        public DrawableNodeClonePtr​(DrawableNodeClone ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • draw

        public void draw()
        draws the object.
      • setHighlighted

        public void setHighlighted​(boolean b)
        enables or disables highlighting of the drawable class

        Parameters:
        b - [in] a if true highlight is enabled if false disabled
      • isHighlighted

        public boolean isHighlighted()
        Returns whether the DrawableNode is highlighted

        Returns:
        true/false
      • setDrawType

        public void setDrawType​(DrawableNode.DrawType drawType)
        Sets the DrawType

        Parameters:
        drawType - [in] the DrawType to be used
      • setTransparency

        public void setTransparency​(float alpha)
        Sets up the color alpha value.

        Parameters:
        alpha - [in] 0.0 corresponds to fully transparent and
        .0 to completely solid.
      • getTransparency

        public float getTransparency()
        Gets the color alpha value.
        Returns:
        alpha value in the interval [0.0;1.0]
      • setScale

        public void setScale​(float scale)
        Specifies the scale of the object
        Parameters:
        scale - [in] the scale
      • getScale

        public float getScale()
        gets the scale of the object
        Returns:
        scale [in] the scale
      • setVisible

        public void setVisible​(boolean enable)
        enable or disable this drawable. When disabled the drawable
        will not render anything.
      • isVisible

        public boolean isVisible()
        checks if this drawable is enabled
      • getTransform

        public Transform3D getTransform()
        gets the transformation of the drawable object
        Returns:
        transform of the drawable object
      • setTransform

        public void setTransform​(Transform3D t3d)
        Sets the transformation of the drawable object
        Parameters:
        t3d - [in] transform of drawable object
      • setMask

        public void setMask​(long mask)
        the group(s) that this drawable belong to
        Parameters:
        mask - [in] drawable mask
      • getMask

        public long getMask()
        Get the DrawableTypeMask for the node.
        Returns:
        the type mask.
      • isTransparent

        public boolean isTransparent()
        Check if node is transparent.
        Returns:
        true if transparent, false otherwise.
      • addParent

        public void addParent​(SceneNodePtr node,
                              SceneNode.AddPolicy policy)
        Add a parent node.
        Parameters:
        node - [in] the node to add as parent node.
        policy - [in] the AddPolicy (default is Back).
      • addParent

        public void addParent​(SceneNodePtr node)
        Add a parent node.
        Parameters:
        node - [in] the node to add as parent node.
      • hasParent

        public boolean hasParent​(SceneNodePtr parent)
        Check if the given node is a parent node.
        Parameters:
        parent - [in] the node to look for.
        Returns:
        true if parent is a parent node.
      • removeParent

        public void removeParent​(SceneNodePtr node)
        erases the parent from the parent list.
        Note: this node is not removed from the parents child list, using this
        Parameters:
        node - [in] the parent to remove.
      • removeParent

        public void removeParent​(SceneNodePtr node,
                                 SceneNodePtr parent)
        Remove a parent node.
        Parameters:
        node - [in] the node.
        parent - [in] the parent node to remove as a parent of node.
      • asGroupNode

        public GroupNode asGroupNode()
        Get a pointer to a GroupNode, if this is a GroupNode.
        Returns:
        a pointer, or NULL if the SceneNode is not of correct type.
      • asCameraNode

        public SceneCamera asCameraNode()
        Get a pointer to a CameraNode, if this is a CameraNode.
        Returns:
        a pointer, or NULL if the SceneNode is not of correct type.
      • getType

        public int getType()
        Get the NodeType.
        Returns:
        the type of node.
      • getName

        public java.lang.String getName()
        Get the name of the node.
        Returns:
        the name.
      • setName

        public void setName​(java.lang.String name)
        Set the name of this node.
        Parameters:
        name - [in] a new name.
      • set_name

        public void set_name​(java.lang.String value)
        The name of the node.
      • get_name

        public java.lang.String get_name()
        The name of the node.
      • set_type

        public void set_type​(int value)
        The NodeType.
      • get_type

        public int get_type()
        The NodeType.