예제 #1
0
        public void write(BytesWriteStream stream)
        {
            stream.writeVector3(origin);
            stream.writeVector3(unit);
            stream.writeInt(resolutionX);
            stream.writeInt(resolutionZ);

            int len = heightSamples.Length;

            stream.writeLen(len);

            for (int i = 0; i < len; i++)
            {
                stream.natureWriteShort(heightSamples[i]);
            }
        }
예제 #2
0
        public void write(BytesWriteStream stream)
        {
            int len = triangles.Length;

            stream.writeLen(len);
            for (int i = 0; i < len; i++)
            {
                stream.writeInt(triangles[i]);
            }

            len = vertices.Length;
            stream.writeLen(len);
            for (int i = 0; i < len; i++)
            {
                stream.writeVector3(vertices[i]);
            }

            stream.writeVector3(min);
            stream.writeVector3(max);
        }
예제 #3
0
        /** 写入流 */
        public void write(BytesWriteStream stream)
        {
            stream.writeInt(originX);
            stream.writeInt(originZ);
            stream.writeInt(sizeX);
            stream.writeInt(sizeZ);
            stream.writeFloat(tileSize);

            stream.writeVector3(min);
            stream.writeVector3(max);

            if (terrain != null)
            {
                stream.writeBoolean(true);
                terrain.write(stream);
            }
            else
            {
                stream.writeBoolean(false);
            }

            int len = meshList.size();

            SceneRecastMeshData[] values = meshList.getValues();
            stream.writeLen(len);

            for (int i = 0; i < len; i++)
            {
                values[i].write(stream);
            }

            len = objList.size();
            SceneRecastObjData[] values2 = objList.getValues();
            stream.writeLen(len);

            for (int i = 0; i < len; i++)
            {
                values2[i].write(stream);
            }
        }
예제 #4
0
 public void write(BytesWriteStream stream)
 {
     stream.writeInt(meshIndex);
     stream.writeInt(area);
     stream.writeVector3(x);
     stream.writeVector3(y);
     stream.writeVector3(z);
     stream.writeVector3(w);
     stream.writeVector3(min);
     stream.writeVector3(max);
 }