Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.SplineConstants
Source: src/com/multiversesocial/hyperview/SplineConstants.java

SplineConstants

HyperView V3.2 — interface
version V3.2 interface

Summary

For remap Types

Source file: SplineConstants.java

Hierarchy

Extends: none

Implements: none

Referenced HyperView classes

Media files used

What the flags mean in 3.2 (movement along a real curve)

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):

FlagAt 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_ENDthe 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_ENDd 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_ENDthe 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_LOGICmask of the four. If several bits are set the priority is WRAP > BOUNCE > COLLIDE > STOP.
SP_ZBUFFER_ENAthe 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_ENAHyperView 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, ARRIVEDthe 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.

Declaration & members

public abstract interface SplineConstants

Declared in src/com/multiversesocial/hyperview/SplineConstants.java, lines 3–26. 18 field(s), 0 constructor(s), 0 method(s). Every member has an anchor you can link to (e.g. SplineConstants.html#<id>).

Fields (18)

DeclarationValue / initializerDescriptionSource
public static final int ARRIVED= 28672 (constant)
source: AT_TARGETX | AT_TARGETY | AT_TARGETZ
No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 22
public static final int AT_TARGETX= 4096 (constant)No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 18
public static final int AT_TARGETY= 8192 (constant)No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 19
public static final int AT_TARGETZ= 16384 (constant)No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 20
public static final int BOUNCE_AT_END= 256 (constant)No comment in source; name appears in 4 other source file(s): HyperView, MegaMooV, Spline, ViewMain.line 14
public static final int COLLIDE_AT_END= 512 (constant)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.line 15
public static final int EDIT_ENA= 32 (constant)No comment in source; name appears in 1 other source file(s): Spline.line 10
public static final int END_LOGIC= 1920 (constant)
source: 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.line 23
public static final int PATH_LINE_ENA= 8 (constant)No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 8
public static final int SP_FORWARD= 32768 (constant)No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 21
public static final int SP_ZBUFFER_ENA= 2048 (constant)No comment in source; name appears in 3 other source file(s): Gob, HyperView, Spline.line 17
public static final int SPLINE_ON= 64 (constant)No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 11
public static final int STOP_AT_END= 128 (constant)No comment in source; name appears in 2 other source file(s): HyperView, Spline.line 13
public static final int TRACE_LINE_ENA= 16 (constant)No comment in source; name appears in 1 other source file(s): Spline.line 9
public static final int WRAP_AT_END= 1024 (constant)No comment in source; name appears in 3 other source file(s): HyperView, MegaMooV, Spline.line 16
public static final int XPLANE_ENA= 1 (constant)No comment in source; name appears in 1 other source file(s): Spline.line 5
public static final int YPLANE_ENA= 2 (constant)No comment in source; name appears in 1 other source file(s): Spline.line 6
public static final int ZPLANE_ENA= 4 (constant)No comment in source; name appears in 1 other source file(s): Spline.line 7

Constructors (0)

None (interface).

Methods (0)

None declared.

Examples

Real usage taken from elsewhere in the HyperView 3.2 source (file and line shown; source path src/com/multiversesocial/hyperview/).

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);
Hits--