Skip to content

Commit 93b280e

Browse files
committed
examples and readme update
1 parent 566d574 commit 93b280e

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ The optional `inertia` parameter should be a value in [0..1], `0` no inertia (wh
130130

131131
#### Shapes
132132

133-
Node shapes can be set from an [immediate-mode](https://en.wikipedia.org/wiki/Immediate_mode_(computer_graphics)) rendering Processing procedure (see [graphics(PGraphics)](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#graphics-processing.core.PGraphics-)) or from a [retained-mode](https://en.wikipedia.org/wiki/Retained_mode) rendering Processing [PShape](https://processing.org/reference/PShape.html) (see [shape(PShape)](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#shape-processing.core.PShape-)). Shapes can be picked precisely using their projection onto the screen, see [pickingMode()](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#pickingMode--). Note that even the _eye_ can have a shape which may be useful to depict the viewer in first person camera style.
133+
Node shapes can be set from an [immediate-mode](https://en.wikipedia.org/wiki/Immediate_mode_(computer_graphics)) rendering Processing procedure (see [graphics(PGraphics)](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#graphics-processing.core.PGraphics-)) or from a [retained-mode](https://en.wikipedia.org/wiki/Retained_mode) rendering Processing [PShape](https://processing.org/reference/PShape.html) (see [shape(PShape)](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#shape-processing.core.PShape-)). Shapes can be picked precisely using their projection onto the screen, see [picking()](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#picking--). Note that even the _eye_ can have a shape which may be useful to depict the viewer in first person camera style.
134134

135135
#### Space transformations
136136

@@ -356,7 +356,7 @@ Picking a node (which should be different than the scene eye) to interact with i
356356
Observations:
357357

358358
1. A node can have multiple tags but a given tag cannot be assigned to more than one node, and since the null tag is allowed, signatures of all the above methods lacking the tag parameter are provided for convenience, e.g., `mouseTag()` is equivalent to calling `mouseTag(null)` which in turn is equivalent to `tag(null, mouseX, mouseY)` (and `tag(mouseX, mouseY)`).
359-
2. Refer to [pickingMode()](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#pickingMode--) and [enablePickingMode(int)](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#enablePickingMode-int-) for the different ray-casting node picking modes.
359+
2. Refer to [picking()](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#picking--) and [enablePicking(int)](https://visualcomputing.github.io/nub-javadocs/nub/core/Node.html#enablePicking-int-) for the different ray-casting node picking modes.
360360
3. To check if a given node would be picked with a ray cast at a given screen position, call [tracks(Node, int, int)](https://visualcomputing.github.io/nub-javadocs/nub/core/Graph.html#tracks-nub.core.Node-int-int-) or [mouseTracks(Node)](https://visualcomputing.github.io/nub-javadocs/nub/processing/Scene.html#mouseTracks-nub.core.Node-).
361361
4. To tag the nodes in a given array with ray casting use [updateTag(String, int, int, Node[])](https://visualcomputing.github.io/nub-javadocs/nub/core/Graph.html#updateTag-java.lang.String-int-int-nub.core.Node:A-) and [updateMouseTag(String, Node[])](https://visualcomputing.github.io/nub-javadocs/nub/processing/Scene.html#updateMouseTag-java.lang.String-nub.core.Node:A-).
362362
5. In the case of `mouseTranslateTag(tag, [lag])` and `mouseTranslate(tag, [lag])` a `lag` is used (instead of `inertia`), `0` responds immediately and `1` no response at all.

examples/basics/CajasOrientadas/CajasOrientadas.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void setup() {
3535
cajas = new Box[15];
3636
for (int i = 0; i < cajas.length; i++) {
3737
cajas[i] = new Box(color(random(0, 255), random(0, 255), random(0, 255)), random(10, 40), random(10, 40), random(10, 40));
38-
cajas[i].togglePickingMode(Node.SHAPE);
38+
cajas[i].togglePicking(Node.SHAPE);
3939
}
4040
scene.fit();
4141
scene.tag("keyboard", esfera);
@@ -71,7 +71,7 @@ void mouseWheel(MouseEvent event) {
7171
void keyPressed() {
7272
if (key == ' ') {
7373
for (Box caja : cajas)
74-
caja.togglePickingMode(Node.BULLSEYE | Node.SHAPE);
74+
caja.togglePicking(Node.BULLSEYE | Node.SHAPE);
7575
}
7676
if (key == 'c') {
7777
for (Box caja : cajas)

examples/demos/MiniMap/MiniMap.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void setup() {
3333
size(1920, 1080, renderer);
3434
scene = onScreen ? new Scene(this, 1000) : new Scene(createGraphics(width, height, renderer), 1000);
3535
scene.eye().enableHint(Node.BOUNDS | Node.BULLSEYE);
36-
scene.eye().disablePickingMode(Node.BULLSEYE);
36+
scene.eye().disablePicking(Node.BULLSEYE);
3737
scene.eye().setBullsEyeSize(50);
3838
scene.eye().setHighlight(0);
3939
scene.enableHint(Scene.BACKGROUND, color(75, 25, 15));
@@ -77,7 +77,7 @@ void keyPressed() {
7777
if (key == 't')
7878
focus.togglePerspective();
7979
if (key == 'p')
80-
scene.eye().togglePickingMode(Node.BULLSEYE | Node.BOUNDS);
80+
scene.eye().togglePicking(Node.BULLSEYE | Node.BOUNDS);
8181
}
8282

8383
void mouseMoved() {

0 commit comments

Comments
 (0)