/** * Sets whether to render the collision shape. This function is useful for debugging and setting * up collision shapes. * * @param visible True to make the shape visible */ public void setCollisionVisible(boolean visible) { setValue(PROP_COLLISION_VISIBLE, visible); }
/** * Sets the rotation of the collision shape relative to the node. * * @param rotation Rotation of shape */ public void setCollisionRotation(Rotation rotation) { setValue(PROP_COLLISION_ROTATION, rotation); }
/** * Sets the scale of the collision shape relative to the node. All shapes (apart from unbounded * plane) are of unit size by default. * * @param scale Scale of shape */ public void setCollisionScale(Scale scale) { setValue(PROP_COLLISION_SCALE, scale); }
/** Sets the node to use a 1x1x1 collision sphere for hit-test operations. */ public void useCollisionSphere() { setValue(PROP_COLLISION_SHAPE, CollisionType.SPHERE); }
/** * Sets the position of the collision shape relative to the node. * * @param position Position of shape */ public void setCollisionPosition(Point position) { setValue(PROP_COLLISION_POSITION, position); }
/** Sets the node to use an <b>unbounded</b> collision plane for hit-test operations. */ public void useCollisionPlane() { setValue(PROP_COLLISION_SHAPE, CollisionType.PLANE); }
/** Sets the node to use a 1x1 collision square for hit-test operations. */ public void useCollisionSquare() { setValue(PROP_COLLISION_SHAPE, CollisionType.SQUARE); }
/** * Sets the opacity of a node. * * @param opacity New opacity 0-255 for the node */ public void setOpacity(int opacity) { setValue(PROP_OPACITY, opacity); }
/** Removes any existing collision geometry and so cannot be hit-tested. */ public void disableCollision() { setValue(PROP_COLLISION_SHAPE, CollisionType.NONE); }
/** * Sets the color of a node. * * @param color New color to apply to the node */ public void setColor(Color color) { setValue(PROP_COLOR, color); }
/** * Sets whether the node is visible. * * @param visible False to make the node invisible */ public void setVisible(boolean visible) { setValue(PROP_VISIBLE, visible); }
/** * Sets the scale of the node. * * @param scale New scale to apply to the node */ public void setScale(Scale scale) { setValue(PROP_SCALE, scale); }
/** * Sets the rotation of the node. * * @param rotation New rotation of the node about its origin */ public void setRotation(Rotation rotation) { setValue(PROP_ROTATION, rotation); }
/** * Sets the local position of the node. * * @param position New position of the node */ public void setPosition(Point position) { setValue(PROP_POSITION, position); }