Project Red - Fabrication

Project Red - Fabrication

19M Downloads

ComponentStore.java

Iree opened this issue ยท 2 comments

commented
  •    public void renderModel(Transformation t, int orient) {
    
  •        if ((orient&0x3) == 2)
    
  •            orient = orient&0xFC | 0;
    
  •        else if ((orient&0x3) == 3)
    
  •            orient = orient&0xFC | 1; 
    

Isn't that doing exactly the same as

  •         orient = orient&0xFD; ?
    
    (Looks at bottom 2 bits, does 00->00, 01->01, 10->00, 11->01)

PS: What is the proper way of asking such code questions?
Are they useful?

commented

Its not finished, this is going to be redone.

commented

You are correct, orient&=0xFD would have been the most concise way to express the original operation.
I have properly mapped bundled cables in 9131732
The reason for the extra complexity in my mapping is such that cable models need not be symetrical along any axis