|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.constraints.op3_impl
Constraint implementation class to provide encoding for standard 3 operand constraints. This object takes 3 std_objpart_encoding objects representing operands, along with an unsigned 8 bit value to provide a constant to the function.
3 operand constraints are encoded as:
8 6 6 6 5 KKKKKKKK AAAAAA BBBBBB CCCCCC X 00000where KKK represents an 8 bit unsigned constant, AAA, BBB, and CCC represent parameter objects, and X represents one bit used to encode an op code (i.e, clip or wrap in the standard set).
Field Summary | |
static int |
H
|
static int |
W
|
static int |
X
|
static int |
Y
|
Method Summary | |
static int |
const_val(int enc)
Decode constant from the given encoding. |
static std_constraint |
create(int op_code,
std_objpart_encoding op1,
std_objpart_encoding op2,
std_objpart_encoding op3,
short K)
Create a standard constraint given an op_code, 3 obj/part designators, and a constant. |
static boolean |
depends_on(int enc,
interactor constr_obj,
int which_obj,
int which_part,
int nth_child,
int orient)
Test whether the given encoded constraint (constraining the given object) depends on the indicated object and part (expressed relative to it). |
static int |
encode(int op_code,
std_objpart_encoding op1,
std_objpart_encoding op2,
std_objpart_encoding op3,
short K)
Do an encoding given an op_code, 3 obj/part designators, and a constant. |
static int |
eval_fun(int enc,
interactor constr_obj,
int val1,
int val2,
int val3,
int cnst_val,
int orient)
Evaluate an encoded constraint function given its operand and constant values. |
static int |
eval(int enc,
interactor constr_obj,
int constr_part,
int orient)
Evaluate an encoded constraint applied to the given part of the given object. |
static java.util.Vector |
mk_depend_list(int enc,
interactor constr_obj,
int orient)
Extract the set of objects/parts that a constraint depends on. |
static java.util.Vector |
mk_implicit_depend_list(int enc,
interactor constr_obj,
int orient)
Extract the set of objects/parts that a particular constraint function implicitly depends on. |
static int |
op_code(int enc)
Decode op_code from the given encoding. |
static int |
op1(int enc)
Decode first operand from the given encoding. |
static int |
op2(int enc)
Decode second operand from the given encoding. |
static int |
op3(int enc)
Decode third operand from the given encoding. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int X
public static final int Y
public static final int W
public static final int H
Method Detail |
public static std_constraint create(int op_code, std_objpart_encoding op1, std_objpart_encoding op2, std_objpart_encoding op3, short K)
int
- op_code op code value for this operation.std_objpart_encoding
- op1 designator for operand 1std_objpart_encoding
- op2 designator for operand 2std_objpart_encoding
- op3 designator for operand 3short
- K value for 15 bit signed constantpublic static int encode(int op_code, std_objpart_encoding op1, std_objpart_encoding op2, std_objpart_encoding op3, short K)
int
- op_code op code value for this operation.std_objpart_encoding
- op1 designator for operand 1std_objpart_encoding
- op2 designator for operand 2std_objpart_encoding
- op3 designator for operand 3short
- K value for 15 bit signed constantpublic static int op_code(int enc)
int
- enc the encoding for a constraintpublic static int op1(int enc)
int
- enc the encoding for a constraintpublic static int op2(int enc)
int
- enc the encoding for a constraintpublic static int op3(int enc)
int
- enc the encoding for a constraintpublic static int const_val(int enc)
int
- enc the encoding for a constraintpublic static int eval_fun(int enc, interactor constr_obj, int val1, int val2, int val3, int cnst_val, int orient)
int
- enc the encoding from the constraintinteractor
- constr_obj the object being constrainedint
- val1 value of first operandint
- val2 value of second operandint
- val3 value of third operandint
- cnst_val value of constant parameterint
- orient orientation of the constraint (should be
HORIZONTAL or VERTICAL).public static int eval(int enc, interactor constr_obj, int constr_part, int orient)
int
- enc the encoding from the constraintinteractor
- constr_obj the object being constrainedint
- constr_part the part being constrainedint
- orient the orientation of the constraintpublic static boolean depends_on(int enc, interactor constr_obj, int which_obj, int which_part, int nth_child, int orient)
int
- enc The encoding for the constraint.interactor
- constr_obj The object the constraint is attached toint
- test_which_obj The object we are asking about. This
can be one of the values OBJCODE_SELF,
OBJCODE_PARENT, OBJCODE_SOME_CHILD,
OBJCODE_PREV_SIBLING, or
OBJCODE_NEXT_SIBLING.int
- test_which_part The part we are asking about.int
- nth_child for SOME_CHILD, this provides the index
of the child (and is ignored otherwise).int
- orient Orientation of the constraint. This
should be HORIZONTAL or VERTICAL.public static java.util.Vector mk_depend_list(int enc, interactor constr_obj, int orient)
Here we assume that this is a 3 operand constraint.
int
- enc encoding value for the constraint in question.interactor
- constr_obj the object the constraint is attached to
(hence its referents are relative to).int
- orient Orientation of the constraint. This
should be HORIZONTAL or VERTICAL.public static java.util.Vector mk_implicit_depend_list(int enc, interactor constr_obj, int orient)
int
- enc encoding value for the constraint in question.interactor
- constr_obj the object the constraint is attached to
(hence its referents are relative to).int
- orient Orientation of the constraint. This
should be HORIZONTAL or VERTICAL.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |