Class DrawableNodeClone


  • public class DrawableNodeClone
    extends DrawableNode
    Abstract base class for all drawable classes

    Classes that are able to draw them self, may inherit from this class.

    The drawable class use a draw mask to distinguish between different
    groups to draw. E.g. when taking snapshots with a simulated camera
    virtual objects such as the red laser vector or the lines showing
    the camera view angle is should not be renered. Hence objects that
    are virtual should be set to virtual.

    A call to draw enabling Physical and User1 defined objects look like:
    drawable->draw(DrawableNode::Physical | DrawableNode::User1);
    • Constructor Detail

      • DrawableNodeClone

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

        public DrawableNodeClone​(java.lang.String name,
                                 DrawableNodePtr drawable)
        constructor
        Parameters:
        name - [in] the name of the node.
        drawable - [in] the drawable to clone - it will not make an actual clone of data,
        only of the visualization.
    • Method Detail

      • draw

        public void draw()
        draws the object.
        Overrides:
        draw in class DrawableNode
      • setHighlighted

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

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

        public boolean isHighlighted()
        Returns whether the DrawableNode is highlighted

        Overrides:
        isHighlighted in class DrawableNode
        Returns:
        true/false
      • setTransparency

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

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

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

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

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

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

        public boolean isVisible()
        checks if this drawable is enabled
        Overrides:
        isVisible in class DrawableNode
      • getTransform

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

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

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

        public long getMask()
        Get the DrawableTypeMask for the node.
        Overrides:
        getMask in class DrawableNode
        Returns:
        the type mask.