Ejemplo n.º 1
0
        public static fLineGameObject CreateLineGO(string sName, Colorf color, float fLineWidth)
        {
            GameObject go = new GameObject(sName);
            CurveRendererImplementation curveRen = CurveRendererSource.Build();

            curveRen.initialize(go, new Colorf(Colorf.Black, 0.75f));
            fLineGameObject lgo = new fLineGameObject(go, curveRen);

            lgo.SetColor(color);
            lgo.SetLineWidth(fLineWidth);
            return(lgo);
        }
Ejemplo n.º 2
0
        public static fPolylineGameObject CreatePolylineGO(string sName, List <Vector3f> vVertices, Colorf color, float fLineWidth)
        {
            GameObject go = new GameObject(sName);
            CurveRendererImplementation curveRen = CurveRendererSource.Build();

            curveRen.initialize(go, new Colorf(Colorf.Black, 0.75f));
            fPolylineGameObject fgo = new fPolylineGameObject(go, curveRen);

            fgo.SetColor(color);
            fgo.SetLineWidth(fLineWidth);
            fgo.SetVertices(vVertices);
            return(fgo);
        }
Ejemplo n.º 3
0
        public static fCircleGameObject CreateCircleGO(string sName, float fRadius, Colorf color, float fLineWidth)
        {
            GameObject go = new GameObject(sName);
            CurveRendererImplementation curveRen = CurveRendererSource.Build();

            curveRen.initialize(go, new Colorf(Colorf.Black, 0.75f));
            fCircleGameObject fgo = new fCircleGameObject(go, curveRen);

            fgo.SetColor(color);
            fgo.SetLineWidth(fLineWidth);
            fgo.SetSteps(32);
            fgo.SetRadius(fRadius);
            return(fgo);
        }
Ejemplo n.º 4
0
        public static fPolylineGameObject CreatePolylineGO(string sName, List <Vector3f> vVertices, fMaterial material, bool bSharedMaterial, float fLineWidth, LineWidthType widthType)
        {
            GameObject go = new GameObject(sName);
            CurveRendererImplementation curveRen = CurveRendererSource.Build(widthType);

            curveRen.initialize(go, material, bSharedMaterial);
            fPolylineGameObject fgo = new fPolylineGameObject(go, curveRen);

            fgo.SetLineWidth(fLineWidth);
            if (vVertices != null)
            {
                fgo.SetVertices(vVertices);
            }
            return(fgo);
        }