Axiom.Core.Frustum.EnableCustomNearClipPlane C# (CSharp) Метод

EnableCustomNearClipPlane() публичный Метод

Links the frustum to a custom near clip plane, which can be used to clip geometry in a custom manner without using user clip planes.

There are several applications for clipping a scene arbitrarily by a single plane; the most common is when rendering a reflection to a texture, and you only want to render geometry that is above the water plane (to do otherwise results in artefacts). Whilst it is possible to use user clip planes, they are not supported on all cards, and sometimes are not hardware accelerated when they are available. Instead, where a single clip plane is involved, this technique uses a 'fudging' of the near clip plane, which is available and fast on all hardware, to perform as the arbitrary clip plane. This does change the shape of the frustum, leading to some depth buffer loss of precision, but for many of the uses of this technique that is not an issue.

This version of the method links to a plane, rather than requiring a by-value plane definition, and therefore you can make changes to the plane (e.g. by moving / rotating the node it is attached to) and they will automatically affect this object.

This technique only works for perspective projection.

public EnableCustomNearClipPlane ( IDerivedPlaneProvider plane ) : void
plane IDerivedPlaneProvider The plane to link to to perform the clipping.
Результат void
		public virtual void EnableCustomNearClipPlane( IDerivedPlaneProvider plane )
		{
			useObliqueDepthProjection = true;
			linkedObliqueProjPlane = plane;
			obliqueProjPlane = plane.DerivedPlane;
			InvalidateFrustum();
		}

Same methods

Frustum::EnableCustomNearClipPlane ( Plane plane ) : void