Esempio n. 1
0
        protected override void duplicateTo(ref Object3D ret)
        {
            base.duplicateTo(ref ret);
            Transformable transformable = (Transformable)ret;

            float[] values1 = new float[3];
            this.getTranslation(ref values1);
            transformable.setTranslation(values1[0], values1[1], values1[2]);
            float[] values2 = new float[3];
            this.getScale(ref values2);
            transformable.setScale(values2[0], values2[1], values2[2]);
            int[] values3 = new int[4];
            this.getOrientationQuatx(ref values3);
            transformable.setOrientationQuatx(values3[0], values3[1], values3[2], values3[3]);
            transformable.setTransform(this.m_transform);
        }
Esempio n. 2
0
        public static Node m3g_cast(Object3D obj)
        {
            switch (obj.getM3GUniqueClassID())
            {
            case 5:
            case 9:
            case 12:
            case 14:
            case 16:
            case 18:
            case 22:
                return((Node)obj);

            default:
                return((Node)null);
            }
        }
Esempio n. 3
0
        protected override void duplicateTo(ref Object3D ret)
        {
            base.duplicateTo(ref ret);
            Mesh mesh = (Mesh)ret;

            mesh.setSubmeshCount(this.getSubmeshCount());
            VertexBuffer vertexBuffer = this.getVertexBuffer();

            if (vertexBuffer != null)
            {
                mesh.setVertexBuffer(vertexBuffer);
            }
            for (int index = 0; index < this.getSubmeshCount(); ++index)
            {
                mesh.setAppearance(index, this.getAppearance(index));
                mesh.setIndexBuffer(index, this.getIndexBuffer(index));
            }
            mesh.m_mutable = this.isMutable();
        }
Esempio n. 4
0
 protected override void duplicateTo(ref Object3D ret)
 {
     base.duplicateTo(ref ret);
     ((Node)ret).setAlphaFactorx(this.getAlphaFactorx());
 }
Esempio n. 5
0
 public static Camera m3g_cast(Object3D obj)
 {
     return(obj.getM3GUniqueClassID() == 5 ? (Camera)obj : (Camera)null);
 }
Esempio n. 6
0
 public static SkinnedMesh m3g_cast(Object3D obj)
 {
     return(obj.getM3GUniqueClassID() == 16 ? (SkinnedMesh)obj : (SkinnedMesh)null);
 }
Esempio n. 7
0
 public static TriangleStripArray m3g_cast(Object3D obj)
 {
     return(obj.getM3GUniqueClassID() == 11 ? (TriangleStripArray)obj : (TriangleStripArray)null);
 }