當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。