/// <summary> /// Fills the unstructured grid cell buffer. /// </summary> /// <param name="nbCells">Nb cells.</param> /// <param name="ptValues">Point values.</param> /// <param name="cellValues">Cell values.</param> /// <param name="cellTypes">Cell types.</param> /// <param name="buffer">Buffer.</param> /// <param name="destFormat">Destination format.</param> public unsafe void FillUnstructuredGridCellBuffer(UInt32 nbCells, VTKValue ptValues, VTKValue cellValues, VTKValue cellTypes, IntPtr buffer, VTKValueFormat destFormat = VTKValueFormat.VTK_NO_VALUE_FORMAT) { unsafe { VTKInterop.VTKParser_fillUnstructuredGridCellBuffer(m_parser, nbCells, ptValues.Value, (Int32 *)cellValues.Value, (Int32 *)cellTypes.Value, buffer, destFormat); } }
/// <summary> /// Parse all the Unstructured Grid Points available in this dataset. /// Use FillUnstructuredGridCellBuffer for getting triangle composition of these cells /// </summary> /// <returns>A VTKValue of these points.</returns> public VTKValue ParseAllUnstructuredGridPoints() { VTKValue val = new VTKValue(); VTKPointPositions pos = VTKInterop.VTKParser_getUnstructuredGridPointDescriptor(m_parser); val.Value = VTKInterop.VTKParser_parseAllUnstructuredGridPoints(m_parser); val.NbValues = pos.NbPoints * 3; return(val); }
/// <summary> /// Get the concrete Value of a Field Value /// </summary> /// <returns>The VTK value.</returns> /// <param name="val">Value.</param> public VTKValue ParseAllFieldValues(VTKFieldValue fieldVal) { VTKValue val = new VTKValue(); val.NbValues = fieldVal.NbTuples * fieldVal.NbValuesPerTuple; val.Value = VTKInterop.VTKParser_parseAllFieldValues(m_parser, fieldVal.NativePtr); val.Format = fieldVal.Format; return(val); }
/// <summary> /// Get the values of Cell Types for understanding how to merge the points described in ParseAllUnstructuredGridCellsComposition. /// Use FillUnstructuredGridCellBuffer for getting triangle composition of these cells /// </summary> /// <returns>A VTKValue of all the cell types of this dataset. Format : VTK_INT</returns> public VTKValue ParseAllUnstructuredGridCellTypesDescriptor() { VTKCellTypes desc = VTKInterop.VTKParser_getUnstructuredGridCellTypesDescriptor(m_parser); VTKValue res = new VTKValue(); res.Format = VTKValueFormat.VTK_INT; unsafe { res.Value = VTKInterop.VTKParser_parseAllUnstructuredGridCellTypes(m_parser); } res.NbValues = desc.NbCells; return(res); }
/// <summary> /// Get the values of Cell composition for unstructured grid. Use TODO for getting triangle composition of these cells /// </summary> /// <returns>A VTKValue of the cell composition. Format : VTK_INT</returns> public VTKValue ParseAllUnstructuredGridCellsComposition() { VTKCells desc = VTKInterop.VTKParser_getUnstructuredGridCellDescriptor(m_parser); VTKValue res = new VTKValue(); unsafe { res.Value = VTKInterop.VTKParser_parseAllUnstructuredGridCellsComposition(m_parser); } res.NbValues = desc.WholeSize; res.Format = VTKValueFormat.VTK_INT; return(res); }
/// <summary> /// Gets the cell construction descriptor. /// </summary> /// <returns>The cell construction descriptor.</returns> /// <param name="nbCells">Nb cells.</param> /// <param name="cellValues">Cell values.</param> /// <param name="cellTypes">Cell types.</param> public static VTKCellConstruction GetCellConstructionDescriptor(UInt32 nbCells, VTKValue cellValues, VTKValue cellTypes) { unsafe { return(VTKInterop.VTKParser_getCellConstructionDescriptor(nbCells, (Int32 *)cellValues.Value, (Int32 *)cellTypes.Value)); } }