Search Results for

    Show / Hide Table of Contents

    Class BufferUtil

    Inheritance
    Object
    BufferUtil
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: g3
    Assembly: cs.temp.dll.dll
    Syntax
    public class BufferUtil

    Methods

    AllocNxM(Int32, Int32)

    Declaration
    public static double[][] AllocNxM(int N, int M)
    Parameters
    Type Name Description
    Int32 N
    Int32 M
    Returns
    Type Description
    Double[][]

    CompressZLib(Byte[], Boolean)

    Compress a byte buffer using Deflate/ZLib compression.

    Declaration
    public static byte[] CompressZLib(byte[] buffer, bool bFast)
    Parameters
    Type Name Description
    Byte[] buffer
    Boolean bFast
    Returns
    Type Description
    Byte[]

    CountValid<T>(T[], Func<T, Boolean>, Int32)

    Count number of elements in array (or up to max_i) that pass FilterF test

    Declaration
    public static int CountValid<T>(T[] data, Func<T, bool> FilterF, int max_i = -1)
    Parameters
    Type Name Description
    T[] data
    Func<T, Boolean> FilterF
    Int32 max_i
    Returns
    Type Description
    Int32
    Type Parameters
    Name Description
    T

    DecompressZLib(Byte[])

    Decompress a byte buffer that has been compressed using Deflate/ZLib compression

    Declaration
    public static byte[] DecompressZLib(byte[] zBuffer)
    Parameters
    Type Name Description
    Byte[] zBuffer
    Returns
    Type Description
    Byte[]

    DistanceSquared(Double[], Double[])

    Declaration
    public static double DistanceSquared(double[] a, double[] b)
    Parameters
    Type Name Description
    Double[] a
    Double[] b
    Returns
    Type Description
    Double

    Dot(Double[], Double[])

    Declaration
    public static double Dot(double[] a, double[] b)
    Parameters
    Type Name Description
    Double[] a
    Double[] b
    Returns
    Type Description
    Double

    Filter<T>(T[], Func<T, Boolean>, Int32)

    return a new array containing only elements (or up to max_i) that pass FilterF test

    Declaration
    public static T[] Filter<T>(T[] data, Func<T, bool> FilterF, int max_i = -1)
    Parameters
    Type Name Description
    T[] data
    Func<T, Boolean> FilterF
    Int32 max_i
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    FilterInPlace<T>(T[], Func<T, Boolean>, Int32)

    shifts elements of array (or up to max_i) that pass FilterF to front of list, and returns number that passed

    Declaration
    public static int FilterInPlace<T>(T[] data, Func<T, bool> FilterF, int max_i = -1)
    Parameters
    Type Name Description
    T[] data
    Func<T, Boolean> FilterF
    Int32 max_i
    Returns
    Type Description
    Int32
    Type Parameters
    Name Description
    T

    InitNxM(Int32, Int32, Double[][])

    Declaration
    public static double[][] InitNxM(int N, int M, double[][] init)
    Parameters
    Type Name Description
    Int32 N
    Int32 M
    Double[][] init
    Returns
    Type Description
    Double[][]

    MultiplyAdd(Double[], Double, Double[])

    Declaration
    public static void MultiplyAdd(double[] dest, double multiply, double[] add)
    Parameters
    Type Name Description
    Double[] dest
    Double multiply
    Double[] add

    MultiplyAdd(Double[], Double[], Double[])

    Declaration
    public static void MultiplyAdd(double[] dest, double[] multiply, double[] add)
    Parameters
    Type Name Description
    Double[] dest
    Double[] multiply
    Double[] add

    MultiplyAdd_GetSqrSum(Double[], Double, Double[])

    Declaration
    public static double MultiplyAdd_GetSqrSum(double[] dest, double multiply, double[] add)
    Parameters
    Type Name Description
    Double[] dest
    Double multiply
    Double[] add
    Returns
    Type Description
    Double

    ParallelDot(Double[], Double[][], Double[][])

    Declaration
    public static void ParallelDot(double[] a, double[][] b, double[][] result)
    Parameters
    Type Name Description
    Double[] a
    Double[][] b
    Double[][] result

    SetTriangle(Int32[], Int32, Int32, Int32, Int32)

    Declaration
    public static void SetTriangle(int[] v, int i, int a, int b, int c)
    Parameters
    Type Name Description
    Int32[] v
    Int32 i
    Int32 a
    Int32 b
    Int32 c

    SetVertex2(Double[], Int32, Double, Double)

    Declaration
    public static void SetVertex2(double[] v, int i, double x, double y)
    Parameters
    Type Name Description
    Double[] v
    Int32 i
    Double x
    Double y

    SetVertex2(Single[], Int32, Single, Single)

    Declaration
    public static void SetVertex2(float[] v, int i, float x, float y)
    Parameters
    Type Name Description
    Single[] v
    Int32 i
    Single x
    Single y

    SetVertex3(Double[], Int32, Double, Double, Double)

    Declaration
    public static void SetVertex3(double[] v, int i, double x, double y, double z)
    Parameters
    Type Name Description
    Double[] v
    Int32 i
    Double x
    Double y
    Double z

    SetVertex3(Single[], Int32, Single, Single, Single)

    Declaration
    public static void SetVertex3(float[] v, int i, float x, float y, float z)
    Parameters
    Type Name Description
    Single[] v
    Int32 i
    Single x
    Single y
    Single z

    ToBytes(Double[])

    convert double array to bytes

    Declaration
    public static byte[] ToBytes(double[] array)
    Parameters
    Type Name Description
    Double[] array
    Returns
    Type Description
    Byte[]

    ToBytes(Int16[])

    convert short array to bytes

    Declaration
    public static byte[] ToBytes(short[] array)
    Parameters
    Type Name Description
    Int16[] array
    Returns
    Type Description
    Byte[]

    ToBytes(Int32[])

    convert int array to bytes

    Declaration
    public static byte[] ToBytes(int[] array)
    Parameters
    Type Name Description
    Int32[] array
    Returns
    Type Description
    Byte[]

    ToBytes(Single[])

    convert float array to bytes

    Declaration
    public static byte[] ToBytes(float[] array)
    Parameters
    Type Name Description
    Single[] array
    Returns
    Type Description
    Byte[]

    ToDouble(Byte[])

    convert byte array to double array

    Declaration
    public static double[] ToDouble(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    Double[]

    ToFloat(Byte[])

    convert byte array to float array

    Declaration
    public static float[] ToFloat(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    Single[]

    ToIndex3i<T>(IEnumerable<T>)

    convert input set into Index3i. Supports packed list of int tuples, list of Vector3i/Index3i

    Declaration
    public static Index3i[] ToIndex3i<T>(IEnumerable<T> values)
    Parameters
    Type Name Description
    IEnumerable<T> values
    Returns
    Type Description
    Index3i[]
    Type Parameters
    Name Description
    T

    ToIndexArray4i(Byte[])

    convert byte array to IndexArray4i

    Declaration
    public static IndexArray4i ToIndexArray4i(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    IndexArray4i

    ToInt(Byte[])

    convert byte array to int array

    Declaration
    public static int[] ToInt(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    Int32[]

    ToShort(Byte[])

    convert byte array to short array

    Declaration
    public static short[] ToShort(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    Int16[]

    ToVector3d<T>(IEnumerable<T>)

    convert input set into Vector3d. Supports packed list of float/double tuples, list of Vector3f/Vector3d

    Declaration
    public static Vector3d[] ToVector3d<T>(IEnumerable<T> values)
    Parameters
    Type Name Description
    IEnumerable<T> values
    Returns
    Type Description
    Vector3d[]
    Type Parameters
    Name Description
    T

    ToVector3f<T>(IEnumerable<T>)

    convert input set into Vector3f. Supports packed list of float/double tuples, list of Vector3f/Vector3d

    Declaration
    public static Vector3f[] ToVector3f<T>(IEnumerable<T> values)
    Parameters
    Type Name Description
    IEnumerable<T> values
    Returns
    Type Description
    Vector3f[]
    Type Parameters
    Name Description
    T

    ToVectorArray2f(Byte[])

    convert byte array to VectorArray2f

    Declaration
    public static VectorArray2f ToVectorArray2f(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    VectorArray2f

    ToVectorArray3d(Byte[])

    convert byte array to VectorArray3d

    Declaration
    public static VectorArray3d ToVectorArray3d(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    VectorArray3d

    ToVectorArray3f(Byte[])

    convert byte array to VectorArray3f

    Declaration
    public static VectorArray3f ToVectorArray3f(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    VectorArray3f

    ToVectorArray3i(Byte[])

    convert byte array to VectorArray3i

    Declaration
    public static VectorArray3i ToVectorArray3i(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer
    Returns
    Type Description
    VectorArray3i
    In This Article
    Back to top ViRGIS VR GIS