ベクトルの複写

Namespace: fvalgcli
Assembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)

Syntax

C#
public static int fnFIE_mat_vcopy(
	FVECTOR_PTR v1,
	FVECTOR_PTR v2
)
Visual Basic
Public Shared Function fnFIE_mat_vcopy ( 
	v1 As FVECTOR_PTR,
	v2 As FVECTOR_PTR
) As Integer

Parameters

v1
Type: fvalgcli..::..FVECTOR_PTR
ベクトル1(コピー元ベクトル)
v2
Type: fvalgcli..::..FVECTOR_PTR
ベクトル2(コピー先ベクトル)

Return Value

Type: Int32
以下のエラーコードを返します。

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_NOMEMORYメモリ不足エラー
F_ERR_INVALID_IMAGE画像オブジェクトの異常
F_ERR_INVALID_PARAMパラメータ異常
F_ERR_NO_LICENCEライセンスエラー、または未初期化エラー

Remarks

Examples

C# Copy imageCopy
//    $Revision: 1.1 $

using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;

namespace TC
{
    public partial class FIE
    {
        [FvPluginExecute]
        public void fnFIE_mat_vcopy()
        {
            FVECTOR_PTR a = FVECTOR_PTR.Zero;
            FVECTOR_PTR b = FVECTOR_PTR.Zero;

            try
            {
                a = api.fnFIE_mat_valloc(3);
                b = api.fnFIE_mat_valloc(3);
                Assert.IsTrue(a != FVECTOR_PTR.Zero, "エラーが発生しました。");
                Assert.IsTrue(b != FVECTOR_PTR.Zero, "エラーが発生しました。");
                int status = api.fnFIE_mat_vcopy(a, b);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "エラーが発生しました。({0})", (f_err)status);
            }
            finally
            {
                api.fnFIE_mat_vfree(a);
                api.fnFIE_mat_vfree(b);
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli

Public Partial Class FIE
    <FvPluginExecute> _
    Public Sub fnFIE_mat_vcopy()
        Dim a As FVECTOR_PTR = FVECTOR_PTR.Zero
        Dim b As FVECTOR_PTR = FVECTOR_PTR.Zero

        Try
            a = api.fnFIE_mat_valloc(3)
            b = api.fnFIE_mat_valloc(3)
            Assert.IsTrue(a <> FVECTOR_PTR.Zero, "エラーが発生しました。")
            Assert.IsTrue(b <> FVECTOR_PTR.Zero, "エラーが発生しました。")
            Dim status As Integer = api.fnFIE_mat_vcopy(a, b)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "エラーが発生しました。({0})", CType(status, f_err))
        Finally
            api.fnFIE_mat_vfree(a)
            api.fnFIE_mat_vfree(b)
        End Try
    End Sub
End Class

See Also