SoCpuBufferObjectCreateInstanceT Method (SbNativeArrayT) |
Factory method to create an instance of SoCpuBufferObject from
an arbitrary SbNativeArrayT.
Namespace: OIV.Inventor.DevicesAssembly: OIV.Inventor.Base (in OIV.Inventor.Base.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax public static SoCpuBufferObject CreateInstance<T>(
SbNativeArray<T> buffer
)
where T : struct, new()
Public Shared Function CreateInstance(Of T As {Structure, New}) (
buffer As SbNativeArray(Of T)
) As SoCpuBufferObject
public:
generic<typename T>
where T : value class, gcnew()
static SoCpuBufferObject^ CreateInstance(
SbNativeArray<T>^ buffer
)
static member CreateInstance :
buffer : SbNativeArray<'T> -> SoCpuBufferObject when 'T : struct, new()
Parameters
- buffer
- Type: OIV.Inventor.GenericSbNativeArrayT
buffer that would be shared by the SoCpuBufferObject instance.
Type Parameters
- T
- A value type.
Return Value
Type:
SoCpuBufferObjectExceptions Exception | Condition |
---|
ArgumentNullException |
Thrown when the specified buffer is .
|
Remarks
This method is provided to address the lack of generic constructor
in .NET framework.
The data owned by buffer is not duplicated. The
SoCpuBufferObject created instance share the same buffer.
See Also