Class MPoly


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

    Class Documentation

    Java .Blend

    Defines a polygon based on a subset of the loop entries of the Mesh.

    Blender Source Code

    Mesh Faces This only stores the polygon size & flags, the vertex & edge indices are stored in the MLoop .

    Typically accessed from Mesh.getMpoly() .

    • Field Detail

      • __DNA__SDNA_INDEX

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

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

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

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

        Field Documentation

        Java .Blend

        offset in loop array (#getMLoop)

        Blender Source Code

        Offset into loop array and number of loops in the face.

        Pointer Arithmetics

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

         MPoly mpoly = ...;
         CPointer<Object> p = mpoly.__dna__addressof(MPoly.__DNA__FIELD__loopstart);
         CPointer<Integer> p_loopstart = p.cast(new Class[]{Integer.class});
         

        Metadata

        • Field: 'loopstart'
        • Signature: 'int'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD__totloop

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

        Field Documentation

        Java .Blend

        Number of loop entries from loopstart

        Blender Source Code

        Keep signed since we need to subtract when getting the previous loop.

        Pointer Arithmetics

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

         MPoly mpoly = ...;
         CPointer<Object> p = mpoly.__dna__addressof(MPoly.__DNA__FIELD__totloop);
         CPointer<Integer> p_totloop = p.cast(new Class[]{Integer.class});
         

        Metadata

        • Field: 'totloop'
        • Signature: 'int'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD__mat_nr

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

        Pointer Arithmetics

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

         MPoly mpoly = ...;
         CPointer<Object> p = mpoly.__dna__addressof(MPoly.__DNA__FIELD__mat_nr);
         CPointer<Short> p_mat_nr = p.cast(new Class[]{Short.class});
         

        Metadata

        • Field: 'mat_nr'
        • Signature: 'short'
        • Actual Size (32bit/64bit): 2/2
      • __DNA__FIELD__flag

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

        Field Documentation

        Java .Blend

        Values:

                ME_SMOOTH   = (1 << 0),
                ME_FACE_SEL = (1 << 1),
         //     ME_HIDE     = (1 << 4), 
                                        

        Pointer Arithmetics

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

         MPoly mpoly = ...;
         CPointer<Object> p = mpoly.__dna__addressof(MPoly.__DNA__FIELD__flag);
         CPointer<Byte> p_flag = p.cast(new Class[]{Byte.class});
         

        Metadata

        • Field: 'flag'
        • Signature: 'char'
        • Actual Size (32bit/64bit): 1/1
      • __DNA__FIELD___pad

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

        Pointer Arithmetics

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

         MPoly mpoly = ...;
         CPointer<Object> p = mpoly.__dna__addressof(MPoly.__DNA__FIELD___pad);
         CPointer<Byte> p__pad = p.cast(new Class[]{Byte.class});
         

        Metadata

        • Field: '_pad'
        • Signature: 'char'
        • Actual Size (32bit/64bit): 1/1
    • Constructor Detail

      • MPoly

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

        protected MPoly​(MPoly that)
    • Method Detail

      • getLoopstart

        public int getLoopstart()
                         throws java.io.IOException
        Get method for struct member 'loopstart'.

        Field Documentation

        Java .Blend

        offset in loop array (#getMLoop)

        Blender Source Code

        Offset into loop array and number of loops in the face.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__loopstart
      • setLoopstart

        public void setLoopstart​(int loopstart)
                          throws java.io.IOException
        Set method for struct member 'loopstart'.

        Field Documentation

        Java .Blend

        offset in loop array (#getMLoop)

        Blender Source Code

        Offset into loop array and number of loops in the face.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__loopstart
      • getTotloop

        public int getTotloop()
                       throws java.io.IOException
        Get method for struct member 'totloop'.

        Field Documentation

        Java .Blend

        Number of loop entries from loopstart

        Blender Source Code

        Keep signed since we need to subtract when getting the previous loop.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__totloop
      • setTotloop

        public void setTotloop​(int totloop)
                        throws java.io.IOException
        Set method for struct member 'totloop'.

        Field Documentation

        Java .Blend

        Number of loop entries from loopstart

        Blender Source Code

        Keep signed since we need to subtract when getting the previous loop.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__totloop
      • getMat_nr

        public short getMat_nr()
                        throws java.io.IOException
        Get method for struct member 'mat_nr'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__mat_nr
      • setMat_nr

        public void setMat_nr​(short mat_nr)
                       throws java.io.IOException
        Set method for struct member 'mat_nr'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__mat_nr
      • getFlag

        public byte getFlag()
                     throws java.io.IOException
        Get method for struct member 'flag'.

        Field Documentation

        Java .Blend

        Values:

                ME_SMOOTH   = (1 << 0),
                ME_FACE_SEL = (1 << 1),
         //     ME_HIDE     = (1 << 4), 
                                        
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__flag
      • setFlag

        public void setFlag​(byte flag)
                     throws java.io.IOException
        Set method for struct member 'flag'.

        Field Documentation

        Java .Blend

        Values:

                ME_SMOOTH   = (1 << 0),
                ME_FACE_SEL = (1 << 1),
         //     ME_HIDE     = (1 << 4), 
                                        
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__flag
      • get_pad

        public byte get_pad()
                     throws java.io.IOException
        Get method for struct member '_pad'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad
      • set_pad

        public void set_pad​(byte _pad)
                     throws java.io.IOException
        Set method for struct member '_pad'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad
      • __io__addressof

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