SEToolbox.Interop.Asteroids.MyVoxelContentCell.GetVoxelContent C# (CSharp) Method

GetVoxelContent() public method

public GetVoxelContent ( Vector3I &voxelCoordInCell ) : byte
voxelCoordInCell Vector3I
return byte
        public byte GetVoxelContent(ref Vector3I voxelCoordInCell)
        {
            if (this.CellType == MyVoxelCellType.EMPTY)
            {
                //  Cell is empty, therefore voxel must be empty too.
                return MyVoxelConstants.VOXEL_CONTENT_EMPTY;
            }
            else if (this.CellType == MyVoxelCellType.FULL)
            {
                //  Cell is full, therefore voxel must be full too.
                return MyVoxelConstants.VOXEL_CONTENT_FULL;
            }
            else
            {
                //  If cell is mixed, get voxel's content from the cell's content.
                //  Content was allocated before, we don't need to do it now (or even check it).
                if (this._cellContent != null)
                {
                    return this._cellContent.GetVoxelContent(ref voxelCoordInCell);
                }

                return 0;
            }
        }