コード例 #1
0
ファイル: TypeList.java プロジェクト: Oger-Lord/JPenguin
 public void write(JmeExporter e) throws IOException {
   try {
     e.getCapsule(this).write((Type) myclass.newInstance(), "myclass", new Type());
   } catch (Exception ee) {
   }
   e.getCapsule(this).writeSavableArrayList(new ArrayList(instances), "instances", null);
 }
コード例 #2
0
 @Override
 public void write(JmeExporter ex) throws IOException {
   super.write(ex);
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(targets, "targets", null);
   oc.write(skeleton, "skeleton", null);
 }
コード例 #3
0
 @Override
 public void write(JmeExporter ex) throws IOException {
   serialize();
   OutputCapsule out = ex.getCapsule(this);
   out.write(array, "array", null);
   out.write(index, "index", null);
 }
コード例 #4
0
ファイル: Material.java プロジェクト: pilsnils/LEGO
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(def.getAssetName(), "material_def", null);
   oc.write(additionalState, "render_state", null);
   oc.write(transparent, "is_transparent", false);
   oc.writeStringSavableMap(paramValues, "parameters", null);
 }
コード例 #5
0
 @Override
 public void write(JmeExporter ex) throws IOException {
   super.write(ex);
   OutputCapsule oc = ex.getCapsule(this);
   oc.write((Node) terrain, "terrain", null);
   oc.write(lodCalculator, "lodCalculator", null);
 }
コード例 #6
0
  @Override
  public void write(JmeExporter e) throws IOException {
    super.write(e);
    OutputCapsule capsule = e.getCapsule(this);

    capsule.write(getMass(), "mass", 1.0f);

    capsule.write(getGravity(), "gravity", Vector3f.ZERO);
    capsule.write(getFriction(), "friction", 0.5f);
    capsule.write(getRestitution(), "restitution", 0);
    capsule.write(getAngularFactor(), "angularFactor", 1);
    capsule.write(kinematic, "kinematic", false);

    capsule.write(getLinearDamping(), "linearDamping", 0);
    capsule.write(getAngularDamping(), "angularDamping", 0);
    capsule.write(getLinearSleepingThreshold(), "linearSleepingThreshold", 0.8f);
    capsule.write(getAngularSleepingThreshold(), "angularSleepingThreshold", 1.0f);

    capsule.write(getCcdMotionThreshold(), "ccdMotionThreshold", 0);
    capsule.write(getCcdSweptSphereRadius(), "ccdSweptSphereRadius", 0);

    capsule.write(getPhysicsLocation(new Vector3f()), "physicsLocation", new Vector3f());
    capsule.write(getPhysicsRotationMatrix(new Matrix3f()), "physicsRotation", new Matrix3f());

    capsule.writeSavableArrayList(joints, "joints", null);
  }
コード例 #7
0
ファイル: Quaternion.java プロジェクト: jingchan/jh_rogue
 public void write(JmeExporter e) throws IOException {
   OutputCapsule cap = e.getCapsule(this);
   cap.write(x, "x", 0);
   cap.write(y, "y", 0);
   cap.write(z, "z", 0);
   cap.write(w, "w", 1);
 }
コード例 #8
0
 @Override
 public void write(JmeExporter e) throws IOException {
   OutputCapsule out = e.getCapsule(this);
   out.write(targetMeshIndex, "meshIndex", 0);
   out.write(frames, "frames", null);
   out.write(times, "times", null);
 }
コード例 #9
0
 public void write(JmeExporter e) throws IOException {
   OutputCapsule capsule = e.getCapsule(this);
   capsule.write(usedRot, "usedRot", null);
   capsule.write(usedTrans, "usedTrans", null);
   capsule.write(usedScale, "usedScale", null);
   capsule.write(time, "time", 0);
   capsule.write(look, "look", null);
 }
コード例 #10
0
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule oc = (OutputCapsule) ex.getCapsule(this);
   oc.write(nbShadowMaps, "nbShadowMaps", 1);
   oc.write(shadowMapSize, "shadowMapSize", 0);
   oc.write(shadowIntensity, "shadowIntensity", 0.7f);
   oc.write(edgeFilteringMode, "edgeFilteringMode", EdgeFilteringMode.Bilinear);
   oc.write(shadowCompareMode, "shadowCompareMode", CompareMode.Hardware);
   oc.write(flushQueues, "flushQueues", false);
   oc.write(edgesThickness, "edgesThickness", 1.0f);
 }
コード例 #11
0
ファイル: LightList.java プロジェクト: jingchan/jh_rogue
  public void write(JmeExporter ex) throws IOException {
    OutputCapsule oc = ex.getCapsule(this);
    //        oc.write(owner, "owner", null);

    ArrayList<Light> lights = new ArrayList<Light>();
    for (int i = 0; i < listSize; i++) {
      lights.add(list[i]);
    }
    oc.writeSavableArrayList(lights, "lights", null);
  }
コード例 #12
0
ファイル: BIHNode.java プロジェクト: phr00t/jmonkeyengine
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(leftIndex, "left_index", 0);
   oc.write(rightIndex, "right_index", 0);
   oc.write(leftPlane, "left_plane", 0);
   oc.write(rightPlane, "right_plane", 0);
   oc.write(axis, "axis", 0);
   oc.write(left, "left_node", null);
   oc.write(right, "right_node", null);
 }
コード例 #13
0
  //    /**
  //     * Sets the material to the a specific batch of this BatchNode
  //     *
  //     *
  //     * @param material the material to use for this geometry
  //     */
  //    public void setMaterial(Material material,int batchIndex) {
  //        if (!batches.isEmpty()) {
  //
  //        }
  //
  //    }
  //
  //    /**
  //     * Returns the material that is used for the first batch of this BatchNode
  //     *
  //     * use getMaterial(Material material,int batchIndex) to get a material from a specific batch
  //     *
  //     * @return the material that is used for the first batch of this BatchNode
  //     *
  //     * @see #setMaterial(com.jme3.material.Material)
  //     */
  //    public Material getMaterial(int batchIndex) {
  //        if (!batches.isEmpty()) {
  //            Batch b = batches.get(batches.keySet().iterator().next());
  //            return b.geometry.getMaterial();
  //        }
  //        return null;//material;
  //    }
  @Override
  public void write(JmeExporter ex) throws IOException {
    super.write(ex);
    OutputCapsule oc = ex.getCapsule(this);
    //
    //        if (material != null) {
    //            oc.write(material.getAssetName(), "materialName", null);
    //        }
    //        oc.write(material, "material", null);

  }
コード例 #14
0
  @Override
  public void write(JmeExporter ex) throws IOException {
    super.write(ex);
    OutputCapsule oc = ex.getCapsule(this);
    oc.write(flipY, "flip_y", false);
    oc.write(generateMips, "generate_mips", false);
    oc.write(anisotropy, "anisotropy", 0);
    oc.write(textureTypeHint, "tex_type", Type.TwoDimensional);

    // Backwards compat
    oc.write(textureTypeHint == Type.CubeMap, "as_cubemap", false);
  }
コード例 #15
0
 @Override
 public void write(JmeExporter e) throws IOException {
   super.write(e);
   OutputCapsule capsule = e.getCapsule(this);
   capsule.write(axisSamples, "axisSamples", 0);
   capsule.write(radialSamples, "radialSamples", 0);
   capsule.write(radius, "radius", 0);
   capsule.write(radius2, "radius2", 0);
   capsule.write(height, "height", 0);
   capsule.write(closed, "closed", false);
   capsule.write(inverted, "inverted", false);
 }
コード例 #16
0
  @Override
  public void write(JmeExporter ex) throws IOException {
    super.write(ex);

    OutputCapsule oc = ex.getCapsule(this);
    oc.write(sampleRadius, "sampleRadius", 3.0f);
    oc.write(intensity, "intensity", 10.2f);
    oc.write(scale, "scale", 3.15f);
    oc.write(bias, "bias", 0.025f);
    // oc.write(sampleRadiusFD, "sampleRadiusFD", 0.55f);
    // oc.write(intensityFD, "intensityFD", 2.5f);
    // oc.write(scaleFD, "scaleFD", 1.15f);
    // oc.write(biasFD, "biasFD", 0.025f);
  }
コード例 #17
0
  public void write(JmeExporter ex) throws IOException {
    OutputCapsule capsule = ex.getCapsule(this);
    capsule.write(name, "name", null);
    capsule.write(worldBound, "world_bound", null);
    capsule.write(cullHint, "cull_mode", CullHint.Inherit);
    capsule.write(batchHint, "batch_hint", BatchHint.Inherit);
    capsule.write(queueBucket, "queue", RenderQueue.Bucket.Inherit);
    capsule.write(shadowMode, "shadow_mode", ShadowMode.Inherit);
    capsule.write(localTransform, "transform", Transform.IDENTITY);
    capsule.write(localLights, "lights", null);

    // Shallow clone the controls array to convert its type.
    capsule.writeSavableArrayList(new ArrayList(controls), "controlsList", null);
    capsule.writeStringSavableMap(userData, "user_data", null);
  }
コード例 #18
0
  public void write(JmeExporter e) throws IOException {
    super.write(e);
    OutputCapsule capsule = e.getCapsule(this);

    capsule.write(numObjects, "numObjects", 0);
    capsule.write(toChange, "toChange", new Spatial[0]);
    capsule.write(pivots, "pivots", new TransformQuaternion[0]);
    capsule.write(parentIndexes, "parentIndexes", new int[0]);
    capsule.writeSavableArrayList(keyframes, "keyframes", new ArrayList());
    capsule.write(haveChanged, "haveChanged", new boolean[0]);
    capsule.write(beginPointTime, "beginPointTime", null);
    capsule.write(endPointTime, "endPointTime", null);
    capsule.write(repeatType, "repeatType", RT_CLAMP);
    capsule.write(minTime, "minTime", 0);
    capsule.write(maxTime, "maxTime", 0);
    capsule.write(speed, "speed", 1);
  }
コード例 #19
0
ファイル: Transform.java プロジェクト: relu91/jmonkeyengine
 public void write(JmeExporter e) throws IOException {
   OutputCapsule capsule = e.getCapsule(this);
   capsule.write(rot, "rot", new Quaternion());
   capsule.write(translation, "translation", Vector3f.ZERO);
   capsule.write(scale, "scale", Vector3f.UNIT_XYZ);
 }
コード例 #20
0
 public void write(JmeExporter ex) throws IOException {
   super.write(ex);
   OutputCapsule capsule = ex.getCapsule(this);
   capsule.write(radius, "radius", 0.5f);
 }
コード例 #21
0
 public void write(JmeExporter ex) throws IOException {
   super.write(ex);
   OutputCapsule capsule = ex.getCapsule(this);
   capsule.write(halfExtents, "halfExtents", new Vector3f(1, 1, 1));
 }
コード例 #22
0
 public void write(JmeExporter e) throws IOException {
   e.getCapsule(this).write(center, "center", Vector3f.ZERO);
 }
コード例 #23
0
ファイル: PlaneD.java プロジェクト: supermerill/testPhysics
 public void write(JmeExporter e) throws IOException {
   OutputCapsule capsule = e.getCapsule(this);
   capsule.write(normal, "normal", Vector3d.ZERO);
   capsule.write(constant, "constant", 0);
 }
コード例 #24
0
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(numSamples, "numSamples", 0);
   oc.writeSavableArrayList((ArrayList) filters, "filters", null);
 }
コード例 #25
0
 @Override
 public void write(JmeExporter ex) throws IOException {
   super.write(ex);
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(content, "content", new byte[0]);
 }
コード例 #26
0
 public void write(JmeExporter ex) throws IOException {
   super.write(ex);
   OutputCapsule capsule = ex.getCapsule(this);
   capsule.write(plane, "collisionPlane", new Plane());
 }
コード例 #27
0
 @Override
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(initialVelocity, "initialVelocity", Vector3f.ZERO);
   oc.write(velocityVariation, "variation", 0.2f);
 }
コード例 #28
0
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule capsule = ex.getCapsule(this);
   capsule.write(scale, "scale", new Vector3f(1, 1, 1));
   capsule.write(getMargin(), "margin", 0.0f);
 }
コード例 #29
0
ファイル: BitmapFont.java プロジェクト: wufuyue/TCL_S820
 @Override
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(charSet, "charSet", null);
   oc.write(pages, "pages", null);
 }
コード例 #30
0
 @Override
 public void write(JmeExporter ex) throws IOException {
   OutputCapsule oc = ex.getCapsule(this);
   oc.write(center, "center", null);
   oc.write(radius, "radius", 0);
 }