Beispiel #1
0
        private PLYNode(PLY model, string positionNameInIBufferable, params RenderMethodBuilder[] builders)
            : base(model, positionNameInIBufferable, builders)
        {
            vec3 size = model.ModelSize;

            this.ModelSize = size;
            const float factor  = 12.0f;
            float       average = (size.x + size.y + size.z) / 3.0f;

            this.Scale = new vec3(factor / average, factor / average, factor / average);
        }
Beispiel #2
0
        private PLYRenderer(PLY model, IShaderProgramProvider shaderProgramProvider,
                            AttributeMap attributeMap, params GLState[] switches)
            : base(model, shaderProgramProvider, attributeMap, inPosition, switches)
        {
            vec3 size = model.ModelSize;

            this.ModelSize = size;
            const float factor  = 12.0f;
            float       average = (size.x + size.y + size.z) / 3.0f;

            this.Scale = new vec3(factor / average, factor / average, factor / average);
        }