当前位置: 首页>>代码示例>>Java>>正文


Java Input.readFloat方法代码示例

本文整理汇总了Java中com.esotericsoftware.kryo.io.Input.readFloat方法的典型用法代码示例。如果您正苦于以下问题:Java Input.readFloat方法的具体用法?Java Input.readFloat怎么用?Java Input.readFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.esotericsoftware.kryo.io.Input的用法示例。


在下文中一共展示了Input.readFloat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public PerspectiveCamera read (Kryo kryo, Input input, Class<PerspectiveCamera> type) {
    PerspectiveCamera camera = new PerspectiveCamera();
    Vector3 position = kryo.readObject(input, Vector3.class);
    Vector3 direction = kryo.readObject(input, Vector3.class);
    Vector3 up = kryo.readObject(input, Vector3.class);
    camera.position.set(position);
    camera.direction.set(direction);
    camera.up.set(up);
    camera.near = input.readFloat();
    camera.far = input.readFloat();
    camera.viewportWidth = input.readFloat();
    camera.viewportHeight = input.readFloat();
    camera.fieldOfView = input.readFloat();
    camera.update();
    return camera;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:18,代码来源:PerspectiveCameraSerializer.java

示例2: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public OrthographicCamera read(Kryo kryo, Input input, Class<OrthographicCamera> type) {
    OrthographicCamera camera = new OrthographicCamera();
    Vector3 position = kryo.readObject(input, Vector3.class);
    Vector3 direction = kryo.readObject(input, Vector3.class);
    Vector3 up = kryo.readObject(input, Vector3.class);
    camera.position.set(position);
    camera.direction.set(direction);
    camera.up.set(up);
    camera.near = input.readFloat();
    camera.far = input.readFloat();
    camera.viewportWidth = input.readFloat();
    camera.viewportHeight = input.readFloat();
    camera.zoom = input.readFloat();
    camera.update();
    return camera;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:18,代码来源:OrthographicCameraSerializer.java

示例3: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public ArrayMetaData<float[]> read(Kryo kryo, Input input, Class<ArrayMetaData<float[]>> type) {
    try {
        float[] arrData = arrayMetaData.getArrData();
        thatArrMetaData = arrayMetaData.recv(input);
        int arrSegNum = thatArrMetaData.getSegNum();
        for (int i = 0; i < arrSegNum; i++) {
            int from = thatArrMetaData.getFrom(i);
            int to = thatArrMetaData.getTo(i);
            for (int j = from; j < to; j++) {
                arrData[j] = input.readFloat();
            }
        }
        thatArrMetaData.setArrData(arrData);
    } catch (IOException e) {
        LOG.error("double array read exception", e);
        System.exit(1);
    }
    return thatArrMetaData;

}
 
开发者ID:yuantiku,项目名称:ytk-mp4j,代码行数:21,代码来源:FloatOperand.java

示例4: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public BoundingBox read(Kryo kryo, Input input, Class<BoundingBox> type) {
    Vector3 min = new Vector3();
    min.x = input.readFloat();
    min.y = input.readFloat();
    min.z = input.readFloat();
    Vector3 max = new Vector3();
    max.x = input.readFloat();
    max.y = input.readFloat();
    max.z = input.readFloat();
    return new BoundingBox(min, max);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:13,代码来源:BoundingBoxSerializer.java

示例5: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Sphere read(Kryo kryo, Input input, Class<Sphere> type) {
    Vector3 center = new Vector3();
    center.x = input.readFloat();
    center.y = input.readFloat();
    center.z = input.readFloat();
    float radius = input.readFloat();
    return new Sphere(center, radius);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:10,代码来源:SphereSerializer.java

示例6: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Ray read(Kryo kryo, Input input, Class<Ray> type) {
    Ray ray = new Ray();
    Vector3 origin = ray.origin;
    origin.x = input.readFloat();
    origin.y = input.readFloat();
    origin.z = input.readFloat();
    Vector3 direction = ray.direction;
    direction.x = input.readFloat();
    direction.y = input.readFloat();
    direction.z = input.readFloat();
    return ray;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:14,代码来源:RaySerializer.java

示例7: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Segment read(Kryo kryo, Input input, Class<Segment> type) {
    Vector3 a = new Vector3();
    a.x = input.readFloat();
    a.y = input.readFloat();
    a.z = input.readFloat();
    Vector3 b = new Vector3();
    b.x = input.readFloat();
    b.y = input.readFloat();
    b.z = input.readFloat();
    return new Segment(a, b);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:13,代码来源:SegmentSerializer.java

示例8: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Quaternion read(Kryo kryo, Input input, Class<Quaternion> type) {
    float x = input.readFloat();
    float y = input.readFloat();
    float z = input.readFloat();
    float w = input.readFloat();
    return new Quaternion(x, y, z, w);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:9,代码来源:QuaternionSerializer.java

示例9: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Vector3 read(Kryo kryo, Input input, Class<Vector3> type) {
    float x = input.readFloat();
    float y = input.readFloat();
    float z = input.readFloat();
    return new Vector3(x, y, z);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:8,代码来源:Vector3Serializer.java

示例10: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Circle read(Kryo kryo, Input input, Class<Circle> type) {
    float x = input.readFloat();
    float y = input.readFloat();
    float radius = input.readFloat();
    return new Circle(x, y, radius);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:8,代码来源:CircleSerializer.java

示例11: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Ellipse read(Kryo kryo, Input input, Class<Ellipse> type) {
    float x = input.readFloat();
    float y = input.readFloat();
    float width = input.readFloat();
    float height = input.readFloat();
    return new Ellipse(x, y, width, height);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:9,代码来源:EllipseSerializer.java

示例12: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Plane read(Kryo kryo, Input input, Class<Plane> type) {
    Plane plane = new Plane();
    Vector3 normal = plane.normal;
    normal.x = input.readFloat();
    normal.y = input.readFloat();
    normal.z = input.readFloat();
    plane.d = input.readFloat();
    return plane;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:11,代码来源:PlaneSerializer.java

示例13: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public SplitInfo read(Kryo kryo, Input input, Class<SplitInfo> type) {
    SplitInfo splitInfo = new SplitInfo();
    splitInfo.lossChg = input.readFloat();
    splitInfo.splitIndex = input.readInt();
    splitInfo.splitValue = input.readFloat();
    int len = input.readInt();
    splitInfo.splitSlotInterval = new int[len];
    for (int i = 0; i < len; i++) {
        splitInfo.splitSlotInterval[i] = input.readInt();
    }
    return splitInfo;
}
 
开发者ID:yuantiku,项目名称:ytk-learn,代码行数:14,代码来源:SplitInfo.java

示例14: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Affine2 read(Kryo kryo, Input input, Class<Affine2> type) {
    Affine2 affine2 = new Affine2();
    affine2.m00 = input.readFloat();
    affine2.m01 = input.readFloat();
    affine2.m02 = input.readFloat();
    affine2.m10 = input.readFloat();
    affine2.m11 = input.readFloat();
    affine2.m12 = input.readFloat();
    return affine2;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:12,代码来源:Affine2Serializer.java

示例15: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public Summary read(Kryo kryo, Input input, Class<Summary> type) {
    Summary summary = new Summary();
    int len = input.readInt();
    summary.value = new float[len];
    for (int i = 0; i < len; i++) {
        summary.value[i] = input.readFloat();
    }

    len = input.readInt();
    summary.rmin = new double[len];
    for (int i = 0; i < len; i++) {
        summary.rmin[i] = input.readDouble();
    }

    len = input.readInt();
    summary.rmax = new double[len];
    for (int i = 0; i < len; i++) {
        summary.rmax[i] = input.readDouble();
    }

    len = input.readInt();
    summary.w = new float[len];
    for (int i = 0; i < len; i++) {
        summary.w[i] = input.readFloat();
    }

    summary.capacity = input.readInt();
    summary.cursor = input.readInt();
    summary.B = input.readDouble();
    summary.exact = input.readBoolean();
    summary.eps = input.readDouble();

    summary.poolMap = new TreeMap<>();
    PoolNode poolNode = summary.getPoolNode(summary.capacity);

    return summary;
}
 
开发者ID:yuantiku,项目名称:ytk-learn,代码行数:39,代码来源:WeightApproximateQuantile.java


注:本文中的com.esotericsoftware.kryo.io.Input.readFloat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。