Class DrawableGeometryNodePtr


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

      • DrawableGeometryNodePtr

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

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

        public DrawableGeometryNodePtr​(DrawableGeometryNode 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
      • setColor

        public void setColor​(double r,
                             double g,
                             double b,
                             double alpha)
        sets the RGBA color of the geometry
        Parameters:
        r - [in] red [0;1]
        g - [in] green [0;1]
        b - [in] blue [0;1]
        alpha - [in] opasity value [0;1], 0 is completely transparent
      • setColor

        public void setColor​(Vector3D rgb)
        sets the RGB color of the geometry
        Parameters:
        rgb - [in] red, green and blue must be between [0;1]
      • setAlpha

        public void setAlpha​(double alpha)
        sets the alpha value
        Parameters:
        alpha - [in] between [0;1], 0 is completely transparent
      • getColor

        public Vector3D getColor()
        get the RGB color
        Returns:
        RGB color
      • getAlpha

        public double getAlpha()
        get alpha value
        Returns:
        alpha
      • addLines

        public void addLines​(VectorLine lines)
        add lines to this geometry
        Parameters:
        lines - [in] list of line segments that should be added
      • addLine

        public void addLine​(Vector3D v1,
                            Vector3D v2)
        add a single line segment to this geometry render
        Parameters:
        v1 - [in] line segment vertice 1
        v2 - [in] line segment vertice 2
      • addGeometry

        public void addGeometry​(GeometryPtr geom)
        add a geometry to this render
        Parameters:
        geom - [in] a geometry that should be rendered
      • addFrameAxis

        public void addFrameAxis​(double size)
        add a frame axis to this geometry
        Parameters:
        size - [in] length of the frame axis's
      • 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
        1.0 to completely solid.
      • getTransparency

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

        public boolean isTransparent()
        Check if node is transparent.
        Returns:
        true if transparent, false otherwise.
      • 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.
      • 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.