Esempio n. 1
0
        // Generate vertexes and indexes for a polytope, and optionally returns the polygon windings. The positive sides of the planes will be visible.
        public static SrfTriangles R_PolytopeSurface(int numPlanes, Plane[] planes, Winding[] windings)
        {
            int          i, j;
            SrfTriangles tri;
            var          planeWindings = new FixedWinding[MAX_POLYTOPE_PLANES];
            int          numVerts, numIndexes;

            if (numPlanes > MAX_POLYTOPE_PLANES)
            {
                common.Error($"R_PolytopeSurface: more than {MAX_POLYTOPE_PLANES} planes");
            }

            numVerts   = 0;
            numIndexes = 0;
            for (i = 0; i < numPlanes; i++)
            {
                ref Plane        plane = ref planes[i];
                ref FixedWinding w     = ref planeWindings[i];
Esempio n. 2
0
 // get the polygon of a model
 public bool GetModelPolygon(CmHandle model, int polygonNum, FixedWinding winding);
Esempio n. 3
0
        //-------------- Decals and Overlays  -----------------

        // Creates decals on all world surfaces that the winding projects onto. The projection origin should be infront of the winding plane.
        // The decals are projected onto world geometry between the winding plane and the projection origin. The decals are depth faded from the winding plane to a certain distance infront of the
        // winding plane and the same distance from the projection origin towards the winding.
        public abstract void ProjectDecalOntoWorld(FixedWinding winding, in Vector3 projectionOrigin, bool parallel, float fadeDepth, Material material, int startTime);