예제 #1
0
        /*
         * public static void Project(IDrawing2D dc, CameraProjection3D camera, Model3D scene)
         * {
         *  camera.GetProjectionInfo(out ProjectPointCallback projCallback, out PLANE plane, scene);
         *
         *  var projector = new _RenderTarget2D(dc, projCallback, plane);
         *
         *  projector.Draw(scene);
         * }*/

        private _RenderTarget2D(ICanvas2D dc, ProjectPointCallback prjCallback, PLANE plane)
        {
            _RenderTarget = dc;

            _Proj3Func = prjCallback;

            _FrustumNearPlane = plane; // XYZ must be normalized
            _StrafeVector     = plane.Normal.GetAnyPerpendicular().Normalized();
        }
예제 #2
0
 public void Transform(Matrix4x4 matrix)
 {
     _internalPlane = System.Numerics.Plane.Normalize(System.Numerics.Plane.Transform(_internalPlane, matrix));
     ComputeBBCorners();
 }
 public Plane(System.Numerics.Plane plane, Vector3 center) : this(plane.Normal, center, plane.D)
 {
 }
예제 #4
0
        protected Plane(float nX, float nY, float nZ, float D)
        {
            _internalPlane = System.Numerics.Plane.Normalize(new System.Numerics.Plane(nX, nY, nZ, D));

            ComputeBBCorners();
        }