Class BoidData


  • public class BoidData
    extends CFacade
    Generated facet for DNA struct type 'BoidData'.

    Class Documentation

    • Field Detail

      • __DNA__SDNA_INDEX

        public static final int __DNA__SDNA_INDEX
        This is the sdna index of the struct BoidData.

        It is required when allocating a new block to store data for BoidData.

        See Also:
        StructDNA, BlockTable, Constant Field Values
      • __DNA__FIELD__health

        public static final long[] __DNA__FIELD__health
        Field descriptor (offset) for struct member 'health'.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         BoidData boiddata = ...;
         CPointer<Object> p = boiddata.__dna__addressof(BoidData.__DNA__FIELD__health);
         CPointer<Float> p_health = p.cast(new Class[]{Float.class});
         

        Metadata

        • Field: 'health'
        • Signature: 'float'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD__acc

        public static final long[] __DNA__FIELD__acc
        Field descriptor (offset) for struct member 'acc'.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         BoidData boiddata = ...;
         CPointer<Object> p = boiddata.__dna__addressof(BoidData.__DNA__FIELD__acc);
         CPointer<CArrayFacade<Float>> p_acc = p.cast(new Class[]{CArrayFacade.class, Float.class});
         

        Metadata

        • Field: 'acc'
        • Signature: 'float[3]'
        • Actual Size (32bit/64bit): 12/12
      • __DNA__FIELD__state_id

        public static final long[] __DNA__FIELD__state_id
        Field descriptor (offset) for struct member 'state_id'.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         BoidData boiddata = ...;
         CPointer<Object> p = boiddata.__dna__addressof(BoidData.__DNA__FIELD__state_id);
         CPointer<Short> p_state_id = p.cast(new Class[]{Short.class});
         

        Metadata

        • Field: 'state_id'
        • Signature: 'short'
        • Actual Size (32bit/64bit): 2/2
      • __DNA__FIELD__mode

        public static final long[] __DNA__FIELD__mode
        Field descriptor (offset) for struct member 'mode'.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         BoidData boiddata = ...;
         CPointer<Object> p = boiddata.__dna__addressof(BoidData.__DNA__FIELD__mode);
         CPointer<Short> p_mode = p.cast(new Class[]{Short.class});
         

        Metadata

        • Field: 'mode'
        • Signature: 'short'
        • Actual Size (32bit/64bit): 2/2
    • Constructor Detail

      • BoidData

        public BoidData​(long __address,
                        Block __block,
                        BlockTable __blockTable)
      • BoidData

        protected BoidData​(BoidData that)
    • Method Detail

      • getHealth

        public float getHealth()
                        throws java.io.IOException
        Get method for struct member 'health'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__health
      • setHealth

        public void setHealth​(float health)
                       throws java.io.IOException
        Set method for struct member 'health'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__health
      • getAcc

        public CArrayFacade<java.lang.Float> getAcc()
                                             throws java.io.IOException
        Get method for struct member 'acc'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__acc
      • setAcc

        public void setAcc​(CArrayFacade<java.lang.Float> acc)
                    throws java.io.IOException
        Set method for struct member 'acc'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__acc
      • getState_id

        public short getState_id()
                          throws java.io.IOException
        Get method for struct member 'state_id'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__state_id
      • setState_id

        public void setState_id​(short state_id)
                         throws java.io.IOException
        Set method for struct member 'state_id'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__state_id
      • getMode

        public short getMode()
                      throws java.io.IOException
        Get method for struct member 'mode'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__mode
      • setMode

        public void setMode​(short mode)
                     throws java.io.IOException
        Set method for struct member 'mode'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__mode
      • __io__addressof

        public CPointer<BoidData> __io__addressof()
        Instantiates a pointer on this instance.