Package org.tinfour.edge
Class QuadEdgeConstants
- java.lang.Object
-
- org.tinfour.edge.QuadEdgeConstants
-
public final class QuadEdgeConstants extends Object
Defines constants for use in QuadEdge related operations. At this time, the following constants are definedCONSTRAINT_FLAG_MASK 0xf8000000 CONSTRAINT_EDGE_FLAG 0x80000000 CONSTRAINT_REGION_BORDER_FLAG 0x40000000 CONSTRAINT_REGION_INTERIOR_FLAG 0x20000000 CONSTRAINT_LINE_MEMBER_FLAG 0x10000000 SYNTHETIC_EDGE_FLAG 0x08000000 EDGE_FLAG_RESERVED_BIT 0x04000000 CONSTRAINT_REGION_MEMBER_FLAGS 0x60000000 CONSTRAINT_INDEX_BIT_SIZE 13 CONSTRAINT_INDEX_VALUE_MAX 8190 CONSTRAINT_LOWER_INDEX_MASK 0x00001fff CONSTRAINT_LOWER_INDEX_ZERO 0xffffe000 CONSTRAINT_UPPER_INDEX_MASK 0x03ffe000 CONSTRAINT_UPPER_INDEX_ZERO 0xfc001fff
-
-
Field Summary
Fields Modifier and Type Field Description static intCONSTRAINT_EDGE_FLAGA bit indicating that an edge is constrained.static intCONSTRAINT_FLAG_MASKA mask for preserving the bits allocated for edge-related flags At this time, there are definitions for 5 flags with one bit reserved for future use.static intCONSTRAINT_INDEX_BIT_SIZEThe number of bits committed to the storage of a constraint index.static intCONSTRAINT_INDEX_VALUE_MAXThe maximum value of a constraint index based on the 13 bits allocated for its storage.static intCONSTRAINT_LINE_MEMBER_FLAGA bit indicating that an edge is part of a non-region constraint line.static intCONSTRAINT_LOWER_INDEX_MASKA specification for using an AND operation to extract the lower field of bits that contain a constraint index.static intCONSTRAINT_LOWER_INDEX_ZEROA specification for using an AND operation to zero out the lower field of bits that contain a constraint index.static intCONSTRAINT_REGION_BORDER_FLAGA bit indicating that the edge is the border of a constrained regionstatic intCONSTRAINT_REGION_INTERIOR_FLAGA bit indicating that an edge is in the interior of a constrained region.static intCONSTRAINT_REGION_MEMBER_FLAGSA set of bits combining the constraint region interior and border flags.static intCONSTRAINT_UPPER_INDEX_MASKA specification for using an AND operation to extract the upper field of bits that contain a constraint index.static intCONSTRAINT_UPPER_INDEX_ZEROA specification for using an AND operation to zero out the upper-field of bits that contain a constraint index.static intEDGE_FLAG_RESERVED_BITDefines the bit that is not yet committed for representing edge status.static intSYNTHETIC_EDGE_FLAGA bit indicating that an edge has been marked as synthetic.
-
-
-
Field Detail
-
CONSTRAINT_FLAG_MASK
public static final int CONSTRAINT_FLAG_MASK
A mask for preserving the bits allocated for edge-related flags At this time, there are definitions for 5 flags with one bit reserved for future use.- See Also:
- Constant Field Values
-
EDGE_FLAG_RESERVED_BIT
public static final int EDGE_FLAG_RESERVED_BIT
Defines the bit that is not yet committed for representing edge status. This value is equivalent to bit 26.- See Also:
- Constant Field Values
-
CONSTRAINT_INDEX_BIT_SIZE
public static final int CONSTRAINT_INDEX_BIT_SIZE
The number of bits committed to the storage of a constraint index. Tinfour reserves space to store the constraint index values for the left and right side of a border constraint. Constraint indices are stored in the "index" element of the QuadEdgePartner class. The high order 5 bits are committed to various flags. So that leaves 27 bits available for constraint information. Since storage is required for two potential indices (left and right), thirteen bits are available for each.- See Also:
- Constant Field Values
-
CONSTRAINT_INDEX_VALUE_MAX
public static final int CONSTRAINT_INDEX_VALUE_MAX
The maximum value of a constraint index based on the 13 bits allocated for its storage. This would be a value of 8191, or 2^13-1. But QuadEdge reserves the value -1, bit state 0, to represent a null specification. For valid constraint indices, the QuadEdge implementation stores the constraint value plus one. That makes the maximum value 2^13-2- See Also:
- Constant Field Values
-
CONSTRAINT_EDGE_FLAG
public static final int CONSTRAINT_EDGE_FLAG
A bit indicating that an edge is constrained. This bit just happens to be the sign bit, a feature that is exploited by the isConstrained() method.- See Also:
- Constant Field Values
-
CONSTRAINT_REGION_BORDER_FLAG
public static final int CONSTRAINT_REGION_BORDER_FLAG
A bit indicating that the edge is the border of a constrained region- See Also:
- Constant Field Values
-
CONSTRAINT_REGION_INTERIOR_FLAG
public static final int CONSTRAINT_REGION_INTERIOR_FLAG
A bit indicating that an edge is in the interior of a constrained region.- See Also:
- Constant Field Values
-
CONSTRAINT_LINE_MEMBER_FLAG
public static final int CONSTRAINT_LINE_MEMBER_FLAG
A bit indicating that an edge is part of a non-region constraint line. Edges are allowed to be both an interior and a line, so a separate flag bit is required for both cases.- See Also:
- Constant Field Values
-
CONSTRAINT_REGION_MEMBER_FLAGS
public static final int CONSTRAINT_REGION_MEMBER_FLAGS
A set of bits combining the constraint region interior and border flags.- See Also:
- Constant Field Values
-
SYNTHETIC_EDGE_FLAG
public static final int SYNTHETIC_EDGE_FLAG
A bit indicating that an edge has been marked as synthetic.- See Also:
- Constant Field Values
-
CONSTRAINT_LOWER_INDEX_ZERO
public static final int CONSTRAINT_LOWER_INDEX_ZERO
A specification for using an AND operation to zero out the lower field of bits that contain a constraint index. Used in preparation for storing a new value.- See Also:
- Constant Field Values
-
CONSTRAINT_LOWER_INDEX_MASK
public static final int CONSTRAINT_LOWER_INDEX_MASK
A specification for using an AND operation to extract the lower field of bits that contain a constraint index.- See Also:
- Constant Field Values
-
CONSTRAINT_UPPER_INDEX_MASK
public static final int CONSTRAINT_UPPER_INDEX_MASK
A specification for using an AND operation to extract the upper field of bits that contain a constraint index.- See Also:
- Constant Field Values
-
CONSTRAINT_UPPER_INDEX_ZERO
public static final int CONSTRAINT_UPPER_INDEX_ZERO
A specification for using an AND operation to zero out the upper-field of bits that contain a constraint index. Used in preparation for storing a new value.- See Also:
- Constant Field Values
-
-