Point3D.Offset(Double, Double, Double) 메서드

정의

지정된 크기만큼 Point3D 구조체를 변환합니다.

public:
 void Offset(double offsetX, double offsetY, double offsetZ);
public void Offset (double offsetX, double offsetY, double offsetZ);
member this.Offset : double * double * double -> unit
Public Sub Offset (offsetX As Double, offsetY As Double, offsetZ As Double)

매개 변수

offsetX
Double

X 구조체의 Point3D 좌표를 변경할 크기입니다.

offsetY
Double

Y 구조체의 Point3D 좌표를 변경할 크기입니다.

offsetZ
Double

Z 구조체의 Point3D 좌표를 변경할 크기입니다.

예제

다음 예제에서는 구조를 오프셋 Point3D 하는 방법을 보여줍니다.

// Offsets the X, Y and Z values of a Point3D.

Point3D point1 = new Point3D(10, 5, 1);

point1.Offset(20, 30, 40);
// point1 is equal to (30, 35, 41)

// Note: This operation is equivalent to adding a point 
// to vector with the corresponding X,Y, Z values.

// Displaying Results
syntaxString = "point1.Offset(20, 30, 40);";
resultType = "Point3D";
operationString = "Offsetting a Point3D";
ShowResults(point1.ToString(), syntaxString, resultType, operationString);
' Offsets the X, Y and Z values of a Point3D.

Dim point1 As New Point3D(10, 5, 1)

point1.Offset(20, 30, 40)
' point1 is equal to (30, 35, 41)

' Note: This operation is equivalent to adding a point 
' to vector with the corresponding X,Y, Z values.

' Displaying Results
syntaxString = "point1.Offset(20, 30, 40)"
resultType = "Point3D"
operationString = "Offsetting a Point3D"
ShowResults(point1.ToString(), syntaxString, resultType, operationString)

설명

이 작업은 해당 YXZ 및 값을 사용하여 Vector3D 구조체에 Point3D 구조를 추가하는 것과 같습니다.

메서드를 Offset 호출하면 , YZ 속성을 직접 변경할 X수 있는 경우에만 효과가 있습니다. 때문에 Point3D 값 형식인를 참조 하는 경우는 Point3D 개체 속성 또는 인덱서를 사용 하 여 개체에 대 한 참조가 아니라 개체의 복사본을 얻을 있습니다. 또는 속성 또는 Z 인덱서 참조에서 변경XY하려고 하면 컴파일러 오류가 발생합니다. 마찬가지로, 호출 Offset 속성 또는 인덱서에 기본 개체는 변경 되지 것입니다. 값을 변경 하려는 경우는 Point3D 속성 또는 인덱서를으로 참조 되는, 새 Point3D, 해당 필드를 수정 하 고 할당을 Point3D 속성 또는 인덱서를 다시 합니다.

적용 대상