Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.SplineConstants
Source: src/com/multiversesocial/hyperview/SplineConstants.java
For remap Types
Extends: none
Implements: none
These are the bits of Spline.flags. The constants themselves are unchanged in 3.2; their behaviour is defined by Spline.advance() (distance along the curve is a double; the speed is in pixels per frame):
| Flag | At the end of the path |
|---|---|
| STOP_AT_END (also when no END_LOGIC bit is set) | the Gob is put exactly on the end point, ARRIVED is set and the Gob lets go of the Spline (Gob.spline = null, GOB_SPLINE_ENA cleared, Gob.detachSpline()). The Spline object stays usable. |
| BOUNCE_AT_END | the distance folds back (d = 2*length - d), direction -1, SP_FORWARD cleared; the same at the start. The overshoot of the frame is carried over, so the speed is constant through the turn (no stall, no jump). |
| WRAP_AT_END | d mod length, overshoot kept. A closed Spline (setClosed(true); createCircle/Ellipse/Heart) is seamless; an open one jumps from the last point to the first. |
| COLLIDE_AT_END | the Gob stops exactly on the end point, ARRIVED is set, the Spline stays attached and parked, and the CollisionManager tests the Gob every frame (also while it travels). Combined with WRAP or BOUNCE the Gob keeps moving and only takes part in the collision pass. It is a Spline end mode; the Gob flag GOB_COLLISION_OUTLINE (image outline) is separate, see Gob. |
| END_LOGIC | mask of the four. If several bits are set the priority is WRAP > BOUNCE > COLLIDE > STOP. |
| SP_ZBUFFER_ENA | the Spline has a z per point, interpolated along the curve as a double; the Gob gets ZBUFFER_ENA and its size follows widthBase / z. (Value 0x800, unrelated to GOB_COLLISION_OUTLINE = 0x800 in Gob.gobFlags2: different flag words.) |
| PATH_LINE_ENA | HyperView draws the sampled curve (Spline.getPathX/Y, in Spline.lineColor, shifted by pathOffsetX/Y) every frame — the real curve now, not the straight segments. |
| SPLINE_ON, SP_FORWARD, ARRIVED | the Spline drives its Gob; set while going from the first to the last point (cleared while BOUNCE goes back); the end was reached (AT_TARGETX|Y|Z). AT_TARGETX/Y/Z, XPLANE_ENA.. EDIT_ENA, TRACE_LINE_ENA are kept for old code; the stepping no longer uses AT_TARGET* per axis. |
public abstract interface SplineConstants
| Declaration | Value / initializer | Description | Source |
|---|---|---|---|
public static final int ARRIVED | = 28672 AT_TARGETX | AT_TARGETY | AT_TARGETZ | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int AT_TARGETX | = 4096 | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int AT_TARGETY | = 8192 | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int AT_TARGETZ | = 16384 | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int BOUNCE_AT_END | = 256 | No comment in source; name appears in 4 other source file(s): HyperView, MegaMooV, Spline, ViewMain. | |
public static final int COLLIDE_AT_END | = 512 | Implemented by the collision pass (see CollisionManager). At the end of the path the Gob stays on its last point, as with the other end logic modes, and keeps its Spline enabled. A Gob with this flag (Gob.collidesAtEnd()) is tested against the other COLLIDE_AT_END Gobs of the current Dispatch frame in every display frame, while it travels and after it has arrived: bounding box first, then point-in-polygon on the outlines (Gob.setOutline(), default the bounding box). A contact sets GOB_COLLIDED, counts, records the other Gob and shows a CollisionAnimGob; nothing is stopped or removed. Used in HyperView, Spline. | |
public static final int EDIT_ENA | = 32 | No comment in source; name appears in 1 other source file(s): Spline. | |
public static final int END_LOGIC | = 1920 STOP_AT_END | BOUNCE_AT_END | COLLIDE_AT_END | WRAP_AT_END | No comment in source; name appears in 1 other source file(s): HyperView. | |
public static final int PATH_LINE_ENA | = 8 | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int SP_FORWARD | = 32768 | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int SP_ZBUFFER_ENA | = 2048 | No comment in source; name appears in 3 other source file(s): Gob, HyperView, Spline. | |
public static final int SPLINE_ON | = 64 | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int STOP_AT_END | = 128 | No comment in source; name appears in 2 other source file(s): HyperView, Spline. | |
public static final int TRACE_LINE_ENA | = 16 | No comment in source; name appears in 1 other source file(s): Spline. | |
public static final int WRAP_AT_END | = 1024 | No comment in source; name appears in 3 other source file(s): HyperView, MegaMooV, Spline. | |
public static final int XPLANE_ENA | = 1 | No comment in source; name appears in 1 other source file(s): Spline. | |
public static final int YPLANE_ENA | = 2 | No comment in source; name appears in 1 other source file(s): Spline. | |
public static final int ZPLANE_ENA | = 4 | No comment in source; name appears in 1 other source file(s): Spline. |
implements — Spline.java, line 5
5 public class Spline implements SplineConstants
6 {
constant — Gob.java, line 176
176 if((tSpline.flags & SplineConstants.SP_ZBUFFER_ENA)!=0)
177 {
constant — MegaMooV.java, line 74
74 Spline sp0 = new Spline(curView,5,xLocs1,yLocs1, SplineConstants.BOUNCE_AT_END);