Computes a parallel projection of the 3d vector.
Namespace:
ceometric.VectorGeometryAssembly: ceometric.VectorGeometry (in ceometric.VectorGeometry.dll) Version: 1.6.0.0 (1.6.0.0)
Syntax
| C# |
|---|
public Vector3d ProjectParallelOn( Plane plane, Vector3d viewDirection ) |
| Visual Basic (Declaration) |
|---|
Public Function ProjectParallelOn ( _ plane As Plane, _ viewDirection As Vector3d _ ) As Vector3d |
| Visual C++ |
|---|
public: Vector3d^ ProjectParallelOn( Plane^ plane, Vector3d^ viewDirection ) |
Parameters
- plane
- Type: ceometric.VectorGeometry..::.Plane
A plane the 3d vector is projected onto.
- viewDirection
- Type: ceometric.VectorGeometry..::.Vector3d
A vector defining the direction of the projection.
Return Value
The projection of the vector onto plane in the direction of viewDirection.
Remarks
For a perpendicular projection of a 3d vector v on a plane plane, write v.ProjectParallelOn(plane, plane.NormalVector);
If the vector and viewDirection are parallel, this method returns a zero length vector.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentException | The view direction is parallel to the projection plane. |