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.

C#
public static System.Windows.Media.Media3D.Rect3D Offset(System.Windows.Media.Media3D.Rect3D rect, double offsetX, double offsetY, double offsetZ);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Offset(Double, Double, Double)

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

C#
public void Offset(double offsetX, double offsetY, double offsetZ);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Offset(Vector3D)

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

C#
public void Offset(System.Windows.Media.Media3D.Vector3D offsetVector);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Offset(Rect3D, Vector3D)

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

C#
public static System.Windows.Media.Media3D.Rect3D Offset(System.Windows.Media.Media3D.Rect3D rect, System.Windows.Media.Media3D.Vector3D offsetVector);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9