sub_arctic.constraints
Class std_function

java.lang.Object
  |
  +--sub_arctic.constraints.std_function

public class std_function
extends java.lang.Object
implements std_constraint_consts, std_encoding_consts

This class provides methods for building standard lightweight constraints. These methods are all static so various standard constraints can be created using a notation such as std_function.offset(PARENT.X(), 5).


Field Summary
protected static std_objpart_encoding _dummy
          A dummy std_objpart_encoding to use internally in building function encodings for external constraints.
 
Method Summary
static std_ext_constraint add(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: A + B + K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint add(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: A + B + K
static std_ext_constraint and(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: A & B & K.
static std_constraint and(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: A & B & K.
static std_ext_constraint ave(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: (A + B)/2 + K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint ave(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: (A + B)/2 + K
static std_ext_constraint centered(ext_objpart_encoding A, int K)
          Create the external constraint function: (A - self.wh)/2 + K which is typically used for centering.
static std_constraint centered(std_objpart_encoding A, int K)
          Create the constraint function: (A - self.wh)/2 + K which is typically used for centering.
protected static void check_15_bit(int num)
          Helper function to ensure we get a number in range for 15 bit const.
protected static void check_16_bit(int num)
          Helper function to ensure we get a number in range for 16 bit const.
protected static void check_8_bit(int num)
          Helper function to ensure we get a number in range for 8 bit const.
static std_ext_constraint clip(ext_objpart_encoding A, ext_objpart_encoding B, ext_objpart_encoding C, int K)
          Create the external constraint function: clip(A, B+K, C-K) which means: result = A; if (A < B+K) result = B+K; if (A < C-K) result = C-K; return result For the external case, K can be any integer. Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint clip(std_objpart_encoding A, std_objpart_encoding B, std_objpart_encoding C, int K)
          Create the constraint function: clip(A, B+K, C-K) which means: result = A; if (A < B+K) result = B+K; if (A < C-K) result = C-K; return result In this case K is treated as an unsigned 8 bit quantity.
static std_ext_constraint div(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: (A / B) + K (returns K on div by zero) Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint div(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: (A / B) + K (returns K on div by zero)
static std_ext_constraint eq(ext_objpart_encoding A)
          Create an external equality constraint.
static std_constraint eq(std_objpart_encoding A)
          Create an equality constraint.
static std_constraint external()
          Create a placeholder constraint that indicates an external constraint has been applied.
static std_ext_constraint far_edge_just(ext_objpart_encoding A, int K)
          Create the external constraint function: A - self.wh - K which is typically used do right or bottom justification.
static std_constraint far_edge_just(std_objpart_encoding A, int K)
          Create the constraint function: A - self.wh - K which is typically used do right or bottom justification.
static std_ext_constraint fill(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function for fill: B - A - K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint fill(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function for fill: B - A - K
static std_ext_constraint if_enabled(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: (if self.enabled then A else B) + K. Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint if_enabled(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: (if self.enabled then A else B) + K.
static std_ext_constraint if_visible(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: (if self.visible then A else B) + K. Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint if_visible(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: (if self.visible then A else B) + K.
static std_constraint konst(int K)
          Create a constant constraint.
static std_ext_constraint mask(ext_objpart_encoding A, int K)
          Create the external constraint function: A & (K | 0xffff0000).
static std_constraint mask(std_objpart_encoding A, int K)
          Create the constraint function: A & (K | 0xffff0000).
static std_ext_constraint max(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: max(A,B) + K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint max(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: max(A,B) + K
static std_ext_constraint min(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: min(A,B) + K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint min(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: min(A,B) + K
static std_ext_constraint mod(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: (A % B) + K (returns K on mod by zero) Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint mod(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: (A % B) + K (returns K on mod by zero)
static std_ext_constraint mult(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: A * B + K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint mult(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: A * B + K
static std_ext_constraint not_mask(ext_objpart_encoding A, int K)
          Create the external constraint function: ~A & (K | 0xffff0000).
static std_constraint not_mask(std_objpart_encoding A, int K)
          Create the constraint function: ~A & (K | 0xffff0000).
static ext_objpart_encoding OBJ(interactor to_obj)
          Create an object reference to an arbitrary object.
static std_ext_constraint offset(ext_objpart_encoding A, int K)
          Create the external constraint function: A + K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint offset(std_objpart_encoding A, int K)
          Create the constraint function: A + K
static std_ext_constraint or(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: (A | B) & K.
static std_constraint or(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: (A | B) & K.
static std_ext_constraint parent_fun1(ext_objpart_encoding A, int K)
          Create the external constraint function: parent.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things. Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint parent_fun1(std_objpart_encoding A, int K)
          Create the constraint function: parent.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things.
static std_ext_constraint parent_fun2(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: parent.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things. Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint parent_fun2(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: parent.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things.
static std_ext_constraint rotx(ext_objpart_encoding theta, ext_objpart_encoding dist, int K)
          Create the external constraint function: rotate_x(theta, D) + K where rotate_x computes the x position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e.
static std_constraint rotx(std_objpart_encoding theta, std_objpart_encoding dist, int K)
          Create the constraint function: rotate_x(theta, D) + K where rotate_x computes the x position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e.
static std_ext_constraint roty(ext_objpart_encoding theta, ext_objpart_encoding dist, int K)
          Create the external constraint function: rotate_y(theta, D) + K where rotate_y computes the y position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e., a scaled cosine function). Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint roty(std_objpart_encoding theta, std_objpart_encoding dist, int K)
          Create the constraint function: rotate_y(theta, D) + K where rotate_y computes the y position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e., a scaled cosine function).
static std_ext_constraint self_fun1(ext_objpart_encoding A, int K)
          Create the external constraint function: self.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things.
static std_constraint self_fun1(std_objpart_encoding A, int K)
          Create the constraint function: self.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things.
static std_ext_constraint self_fun2(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: self.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things.
static std_constraint self_fun2(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: self.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things.
static std_ext_constraint subtract(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: A - B + K Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.
static std_constraint subtract(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: A - B + K
static std_ext_constraint wrap(ext_objpart_encoding A, ext_objpart_encoding B, ext_objpart_encoding C, int K)
          Create the external constraint function: wrap(A, B+K, C-K) which means: xx later...
static std_constraint wrap(std_objpart_encoding A, std_objpart_encoding B, std_objpart_encoding C, int K)
          Create the constraint function: wrap(A, B+K, C-K) which means: xx later...
static std_ext_constraint xor(ext_objpart_encoding A, ext_objpart_encoding B, int K)
          Create the external constraint function: (A ^ B) & K.
static std_constraint xor(std_objpart_encoding A, std_objpart_encoding B, int K)
          Create the constraint function: (A ^ B) & K.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_dummy

protected static std_objpart_encoding _dummy
A dummy std_objpart_encoding to use internally in building function encodings for external constraints.
Method Detail

check_16_bit

protected static void check_16_bit(int num)
Helper function to ensure we get a number in range for 16 bit const.
Parameters:
int - num the constant in question.

check_15_bit

protected static void check_15_bit(int num)
Helper function to ensure we get a number in range for 15 bit const.
Parameters:
int - num the constant in question.

check_8_bit

protected static void check_8_bit(int num)
Helper function to ensure we get a number in range for 8 bit const.
Parameters:
int - num the constant in question.

konst

public static std_constraint konst(int K)
Create a constant constraint.
Parameters:
int - K the constant value must be a value that will fit in 16 bits.

external

public static std_constraint external()
Create a placeholder constraint that indicates an external constraint has been applied. This should not normally be used alone since an actual external constraint needs to be attached with it. Instead use the external constraint API provide by base_interactor, or use an std_ext_constraint object.

clip

public static std_constraint clip(std_objpart_encoding A,
                                  std_objpart_encoding B,
                                  std_objpart_encoding C,
                                  int K)
Create the constraint function: clip(A, B+K, C-K) which means:
   result = A;
   if (A < B+K) result = B+K;
   if (A < C-K) result = C-K;
   return result
 
In this case K is treated as an unsigned 8 bit quantity.

Parameters:
std_objpart_encoding - A obj/part designator for value to be clipped
std_objpart_encoding - B object/part designator for first bound
std_objpart_encoding - C object/part designator for second bound
int - K 8 bit unsigned constant for "border offset"
Returns:
std_constraint constraint object for the result

clip

public static std_ext_constraint clip(ext_objpart_encoding A,
                                      ext_objpart_encoding B,
                                      ext_objpart_encoding C,
                                      int K)
Create the external constraint function: clip(A, B+K, C-K) which means:
   result = A;
   if (A < B+K) result = B+K;
   if (A < C-K) result = C-K;
   return result
 
For the external case, K can be any integer.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A obj/part designator for value to be clipped
ext_objpart_encoding - B object/part designator for first bound
ext_objpart_encoding - C object/part designator for second bound
int - K signed constant for "border offset"
Returns:
std_ext_constraint constraint object for the result

wrap

public static std_constraint wrap(std_objpart_encoding A,
                                  std_objpart_encoding B,
                                  std_objpart_encoding C,
                                  int K)
Create the constraint function: wrap(A, B+K, C-K) which means: xx later...
Parameters:
std_objpart_encoding - A obj/part designator for value to be wrapped
std_objpart_encoding - B object/part designator for first bound
std_objpart_encoding - C object/part designator for second bound
int - K 8 bit unsigned constant for "border offset"
Returns:
std_constraint constraint object for the result

wrap

public static std_ext_constraint wrap(ext_objpart_encoding A,
                                      ext_objpart_encoding B,
                                      ext_objpart_encoding C,
                                      int K)
Create the external constraint function: wrap(A, B+K, C-K) which means: xx later... Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A obj/part designator for value to be wrapped
ext_objpart_encoding - B object/part designator for first bound
ext_objpart_encoding - C object/part designator for second bound
int - K signed constant for "border offset"
Returns:
std_ext_constraint constraint object for the result

self_fun1

public static std_constraint self_fun1(std_objpart_encoding A,
                                       int K)
Create the constraint function: self.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

self_fun1

public static std_ext_constraint self_fun1(ext_objpart_encoding A,
                                           int K)
Create the external constraint function: self.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

parent_fun1

public static std_constraint parent_fun1(std_objpart_encoding A,
                                         int K)
Create the constraint function: parent.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

parent_fun1

public static std_ext_constraint parent_fun1(ext_objpart_encoding A,
                                             int K)
Create the external constraint function: parent.fun1(A,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

not_mask

public static std_constraint not_mask(std_objpart_encoding A,
                                      int K)
Create the constraint function: ~A & (K | 0xffff0000). Note: K is silently truncated to 16 bits.

Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

not_mask

public static std_ext_constraint not_mask(ext_objpart_encoding A,
                                          int K)
Create the external constraint function: ~A & (K | 0xffff0000). Note: K is silently truncated to 16 bits.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_ext_constraint constraint object for the result

mask

public static std_constraint mask(std_objpart_encoding A,
                                  int K)
Create the constraint function: A & (K | 0xffff0000). Note: K is silently truncated to 16 bits.

Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

mask

public static std_ext_constraint mask(ext_objpart_encoding A,
                                      int K)
Create the external constraint function: A & (K | 0xffff0000). Note: K is silently truncated to 16 bits.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_ext_constraint constraint object for the result

centered

public static std_constraint centered(std_objpart_encoding A,
                                      int K)
Create the constraint function: (A - self.wh)/2 + K which is typically used for centering. Width or height is chosen based on context to have the same orientation as the part being constrained.

Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

centered

public static std_ext_constraint centered(ext_objpart_encoding A,
                                          int K)
Create the external constraint function: (A - self.wh)/2 + K which is typically used for centering. Width or height is chosen based on the orientation of the constraint.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

offset

public static std_constraint offset(std_objpart_encoding A,
                                    int K)
Create the constraint function: A + K

Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

offset

public static std_ext_constraint offset(ext_objpart_encoding A,
                                        int K)
Create the external constraint function: A + K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

eq

public static std_constraint eq(std_objpart_encoding A)
Create an equality constraint. This is really just an offset() operation with an offset constant of 0.
Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

eq

public static std_ext_constraint eq(ext_objpart_encoding A)
Create an external equality constraint. This is really just an offset() operation with an offset constant of 0. Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

far_edge_just

public static std_constraint far_edge_just(std_objpart_encoding A,
                                           int K)
Create the constraint function: A - self.wh - K which is typically used do right or bottom justification. Width or height is chosen based on context to have the same orientation as the part being constrained.

Parameters:
std_objpart_encoding - A object/part designator for parameter
int - K 16 bit signed value for constant
Returns:
std_constraint constraint object for the result

far_edge_just

public static std_ext_constraint far_edge_just(ext_objpart_encoding A,
                                               int K)
Create the external constraint function: A - self.wh - K which is typically used do right or bottom justification. Width or height is chosen based on the orientation of the constraint.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

add

public static std_constraint add(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: A + B + K

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

add

public static std_ext_constraint add(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: A + B + K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

subtract

public static std_constraint subtract(std_objpart_encoding A,
                                      std_objpart_encoding B,
                                      int K)
Create the constraint function: A - B + K

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

subtract

public static std_ext_constraint subtract(ext_objpart_encoding A,
                                          ext_objpart_encoding B,
                                          int K)
Create the external constraint function: A - B + K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K signed value for constant
Returns:
std_ext_constraint constraint object for the result

mult

public static std_constraint mult(std_objpart_encoding A,
                                  std_objpart_encoding B,
                                  int K)
Create the constraint function: A * B + K

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

mult

public static std_ext_constraint mult(ext_objpart_encoding A,
                                      ext_objpart_encoding B,
                                      int K)
Create the external constraint function: A * B + K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

div

public static std_constraint div(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: (A / B) + K (returns K on div by zero)

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

div

public static std_ext_constraint div(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: (A / B) + K (returns K on div by zero)

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

mod

public static std_constraint mod(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: (A % B) + K (returns K on mod by zero)

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

mod

public static std_ext_constraint mod(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: (A % B) + K (returns K on mod by zero)

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

and

public static std_constraint and(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: A & B & K. Note: K is silently truncated to 15 bits.

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

and

public static std_ext_constraint and(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: A & B & K. Note: K is silently truncated to 15 bits.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

or

public static std_constraint or(std_objpart_encoding A,
                                std_objpart_encoding B,
                                int K)
Create the constraint function: (A | B) & K. Note: K is silently truncated to 15 bits.

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

or

public static std_ext_constraint or(ext_objpart_encoding A,
                                    ext_objpart_encoding B,
                                    int K)
Create the external constraint function: (A | B) & K. Note: K is silently truncated to 15 bits.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

xor

public static std_constraint xor(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: (A ^ B) & K. Note: K is silently truncated to 15 bits.

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

xor

public static std_ext_constraint xor(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: (A ^ B) & K. Note: K is silently truncated to 15 bits.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

min

public static std_constraint min(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: min(A,B) + K

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

min

public static std_ext_constraint min(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: min(A,B) + K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

max

public static std_constraint max(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: max(A,B) + K

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

max

public static std_ext_constraint max(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: max(A,B) + K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

ave

public static std_constraint ave(std_objpart_encoding A,
                                 std_objpart_encoding B,
                                 int K)
Create the constraint function: (A + B)/2 + K

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

ave

public static std_ext_constraint ave(ext_objpart_encoding A,
                                     ext_objpart_encoding B,
                                     int K)
Create the external constraint function: (A + B)/2 + K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

rotx

public static std_constraint rotx(std_objpart_encoding theta,
                                  std_objpart_encoding dist,
                                  int K)
Create the constraint function: rotate_x(theta, D) + K where rotate_x computes the x position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e. a scaled sine function).

Parameters:
std_objpart_encoding - theta obj/part designator for angle parameter
std_objpart_encoding - dist obj/part designator for distance parameter
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

rotx

public static std_ext_constraint rotx(ext_objpart_encoding theta,
                                      ext_objpart_encoding dist,
                                      int K)
Create the external constraint function: rotate_x(theta, D) + K where rotate_x computes the x position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e. a scaled sine function).

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - theta obj/part designator for angle parameter
ext_objpart_encoding - dist obj/part designator for distance parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

roty

public static std_constraint roty(std_objpart_encoding theta,
                                  std_objpart_encoding dist,
                                  int K)
Create the constraint function: rotate_y(theta, D) + K where rotate_y computes the y position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e., a scaled cosine function).

Parameters:
std_objpart_encoding - theta obj/part designator for angle parameter
std_objpart_encoding - dist obj/part designator for distance parameter
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

roty

public static std_ext_constraint roty(ext_objpart_encoding theta,
                                      ext_objpart_encoding dist,
                                      int K)
Create the external constraint function: rotate_y(theta, D) + K where rotate_y computes the y position found by rotating the point dist,0 by theta/1000 degrees counter-clockwise (i.e., a scaled cosine function).

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - theta obj/part designator for angle parameter
ext_objpart_encoding - dist obj/part designator for distance parameter
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

if_enabled

public static std_constraint if_enabled(std_objpart_encoding A,
                                        std_objpart_encoding B,
                                        int K)
Create the constraint function: (if self.enabled then A else B) + K.
Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

if_enabled

public static std_ext_constraint if_enabled(ext_objpart_encoding A,
                                            ext_objpart_encoding B,
                                            int K)
Create the external constraint function: (if self.enabled then A else B) + K.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K svalue for constant
Returns:
std_ext_constraint constraint object for the result

if_visible

public static std_constraint if_visible(std_objpart_encoding A,
                                        std_objpart_encoding B,
                                        int K)
Create the constraint function: (if self.visible then A else B) + K.
Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

if_visible

public static std_ext_constraint if_visible(ext_objpart_encoding A,
                                            ext_objpart_encoding B,
                                            int K)
Create the external constraint function: (if self.visible then A else B) + K.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

self_fun2

public static std_constraint self_fun2(std_objpart_encoding A,
                                       std_objpart_encoding B,
                                       int K)
Create the constraint function: self.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

self_fun2

public static std_ext_constraint self_fun2(ext_objpart_encoding A,
                                           ext_objpart_encoding B,
                                           int K)
Create the external constraint function: self.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

parent_fun2

public static std_constraint parent_fun2(std_objpart_encoding A,
                                         std_objpart_encoding B,
                                         int K)
Create the constraint function: parent.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

parent_fun2

public static std_ext_constraint parent_fun2(ext_objpart_encoding A,
                                             ext_objpart_encoding B,
                                             int K)
Create the external constraint function: parent.fun2(A,B,K) which is a special function in all interactors that can be overridden to to subclass specific things.

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

fill

public static std_constraint fill(std_objpart_encoding A,
                                  std_objpart_encoding B,
                                  int K)
Create the constraint function for fill: B - A - K

Parameters:
std_objpart_encoding - A object/part designator for parameter 1
std_objpart_encoding - B object/part designator for parameter 2
int - K 15 bit signed value for constant
Returns:
std_constraint constraint object for the result

fill

public static std_ext_constraint fill(ext_objpart_encoding A,
                                      ext_objpart_encoding B,
                                      int K)
Create the external constraint function for fill: B - A - K

Note: the "self" object and orientation for this constraint need to be filled in before the constraint is used.

Parameters:
ext_objpart_encoding - A object/part designator for parameter 1
ext_objpart_encoding - B object/part designator for parameter 2
int - K value for constant
Returns:
std_ext_constraint constraint object for the result

OBJ

public static ext_objpart_encoding OBJ(interactor to_obj)
Create an object reference to an arbitrary object. This can be "filled out" using the "part" methods of std_objpart_encoding (e.g., X(), etc.).
Parameters:
interactor - to_obj the object being referenced.