Click or drag to resize
SoConversionConvert Method (SoBufferObject, SbDataType, SoBufferObject, SbDataType, UInt64)

Convert the data in a buffer object from one data type to another one.

Namespace: OIV.Inventor.Algorithms
Assembly: OIV.Inventor.Algorithms (in OIV.Inventor.Algorithms.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public int Convert(
	SoBufferObject sourceBufferObject,
	SbDataType src_type,
	SoBufferObject targetBufferObject,
	SbDataType dst_type,
	ulong size
)

Parameters

sourceBufferObject
Type: OIV.Inventor.DevicesSoBufferObject

The source buffer object.

src_type
Type: OIV.InventorSbDataType

The type of the data in the source buffer object.

targetBufferObject
Type: OIV.Inventor.DevicesSoBufferObject

The destination buffer object.

dst_type
Type: OIV.InventorSbDataType

The destination type.

size
Type: SystemUInt64

The number of elements in the source buffer object to convert.

Return Value

Type: Int32

Returns 0 if there were no errors during the process. Returns 1 if one or more buffers don't have the correct size.

Remarks

Notes: The destination buffer and the source buffers can be same.

Limitations: This function only supports FLOAT and UNSIGNED_BYTE for dst_type.

See Also