Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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);
 }
Exemplo n.º 3
0
 /**
  * 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);
 }
Exemplo n.º 4
0
 /** Sets the node to use a 1x1x1 collision sphere for hit-test operations. */
 public void useCollisionSphere() {
   setValue(PROP_COLLISION_SHAPE, CollisionType.SPHERE);
 }
Exemplo n.º 5
0
 /**
  * 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);
 }
Exemplo n.º 6
0
 /** Sets the node to use an <b>unbounded</b> collision plane for hit-test operations. */
 public void useCollisionPlane() {
   setValue(PROP_COLLISION_SHAPE, CollisionType.PLANE);
 }
Exemplo n.º 7
0
 /** Sets the node to use a 1x1 collision square for hit-test operations. */
 public void useCollisionSquare() {
   setValue(PROP_COLLISION_SHAPE, CollisionType.SQUARE);
 }
Exemplo n.º 8
0
 /**
  * Sets the opacity of a node.
  *
  * @param opacity New opacity 0-255 for the node
  */
 public void setOpacity(int opacity) {
   setValue(PROP_OPACITY, opacity);
 }
Exemplo n.º 9
0
 /** Removes any existing collision geometry and so cannot be hit-tested. */
 public void disableCollision() {
   setValue(PROP_COLLISION_SHAPE, CollisionType.NONE);
 }
Exemplo n.º 10
0
 /**
  * Sets the color of a node.
  *
  * @param color New color to apply to the node
  */
 public void setColor(Color color) {
   setValue(PROP_COLOR, color);
 }
Exemplo n.º 11
0
 /**
  * Sets whether the node is visible.
  *
  * @param visible False to make the node invisible
  */
 public void setVisible(boolean visible) {
   setValue(PROP_VISIBLE, visible);
 }
Exemplo n.º 12
0
 /**
  * Sets the scale of the node.
  *
  * @param scale New scale to apply to the node
  */
 public void setScale(Scale scale) {
   setValue(PROP_SCALE, scale);
 }
Exemplo n.º 13
0
 /**
  * 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);
 }
Exemplo n.º 14
0
 /**
  * Sets the local position of the node.
  *
  * @param position New position of the node
  */
 public void setPosition(Point position) {
   setValue(PROP_POSITION, position);
 }