Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #4
0
 /** Sets the node to use a 1x1x1 collision sphere for hit-test operations. */
 public void useCollisionSphere() {
   setValue(PROP_COLLISION_SHAPE, CollisionType.SPHERE);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #7
0
 /** Sets the node to use a 1x1 collision square for hit-test operations. */
 public void useCollisionSquare() {
   setValue(PROP_COLLISION_SHAPE, CollisionType.SQUARE);
 }
Beispiel #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);
 }
Beispiel #9
0
 /** Removes any existing collision geometry and so cannot be hit-tested. */
 public void disableCollision() {
   setValue(PROP_COLLISION_SHAPE, CollisionType.NONE);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }