แก้ไข

แชร์ผ่าน


Rect3D.Offset Method

Definition

Gets or sets an offset value by which the location of a Rect3D is translated.

Overloads

Offset(Rect3D, Double, Double, Double)

Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Double, Double, Double)

Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Vector3D)

Sets the offset translation of the Rect3D to the provided value, specified as a Vector3D.

Offset(Rect3D, Vector3D)

Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Rect3D, Double, Double, Double)

Gets or sets an offset value by which the location of a Rect3D is translated.

public:
 static System::Windows::Media::Media3D::Rect3D Offset(System::Windows::Media::Media3D::Rect3D rect, double offsetX, double offsetY, double offsetZ);
public static System.Windows.Media.Media3D.Rect3D Offset (System.Windows.Media.Media3D.Rect3D rect, double offsetX, double offsetY, double offsetZ);
static member Offset : System.Windows.Media.Media3D.Rect3D * double * double * double -> System.Windows.Media.Media3D.Rect3D
Public Shared Function Offset (rect As Rect3D, offsetX As Double, offsetY As Double, offsetZ As Double) As Rect3D

Parameters

rect
Rect3D

Rect3D to be translated.

offsetX
Double

Offset along the X axis.

offsetY
Double

Offset along the Y axis.

offsetZ
Double

Offset along the Z axis.

Returns

A Rect3D value that represents the result of the offset.

Remarks

Rect3D is typically used to represent the bounds of a MeshGeometry3D or Model3D.

Applies to

Offset(Double, Double, Double)

Gets or sets an offset value by which the location of a Rect3D is translated.

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)

Parameters

offsetX
Double

Offset along the X axis.

offsetY
Double

Offset along the Y axis.

offsetZ
Double

Offset along the Z axis.

Remarks

Rect3D is typically used to represent the bounds of a MeshGeometry3D or Model3D.

Note that calling the Offset method will only have an effect if you can change the X, Y, and Z properties directly. Because Rect3D is a value type, if you reference a Rect3D object by using a property or indexer, you get a copy of the object, not a reference to the object. If you attempt to change X, Y, or Z on a property or indexer reference, a compiler error occurs. Similarly, calling Offset on the property or indexer will not change the underlying object. If you want to change the value of a Rect3D that is referenced as a property or indexer, create a new Rect3D, modify its fields, and then assign the Rect3D back to the property or indexer.

Applies to

Offset(Vector3D)

Sets the offset translation of the Rect3D to the provided value, specified as a Vector3D.

public:
 void Offset(System::Windows::Media::Media3D::Vector3D offsetVector);
public void Offset (System.Windows.Media.Media3D.Vector3D offsetVector);
member this.Offset : System.Windows.Media.Media3D.Vector3D -> unit
Public Sub Offset (offsetVector As Vector3D)

Parameters

offsetVector
Vector3D

Vector3D that specifies the offset translation.

Remarks

Rect3D is typically used to represent the bounds of a MeshGeometry3D or Model3D.

Note that calling the Offset method will only have an effect if you can change the X, Y, and Z properties directly. Because Rect3D is a value type, if you reference a Rect3D object by using a property or indexer, you get a copy of the object, not a reference to the object. If you attempt to change X, Y, or Z on a property or indexer reference, a compiler error occurs. Similarly, calling Offset on the property or indexer will not change the underlying object. If you want to change the value of a Rect3D that is referenced as a property or indexer, create a new Rect3D, modify its fields, and then assign the Rect3D back to the property or indexer.

Applies to

Offset(Rect3D, Vector3D)

Gets or sets an offset value by which the location of a Rect3D is translated.

public:
 static System::Windows::Media::Media3D::Rect3D Offset(System::Windows::Media::Media3D::Rect3D rect, System::Windows::Media::Media3D::Vector3D offsetVector);
public static System.Windows.Media.Media3D.Rect3D Offset (System.Windows.Media.Media3D.Rect3D rect, System.Windows.Media.Media3D.Vector3D offsetVector);
static member Offset : System.Windows.Media.Media3D.Rect3D * System.Windows.Media.Media3D.Vector3D -> System.Windows.Media.Media3D.Rect3D
Public Shared Function Offset (rect As Rect3D, offsetVector As Vector3D) As Rect3D

Parameters

rect
Rect3D

Rect3D to be translated.

offsetVector
Vector3D

Vector3D that specifies the offset translation.

Returns

A Rect3D value that represents the result of the offset.

Remarks

Rect3D is typically used to represent the bounds of a MeshGeometry3D or Model3D.

Applies to