Package com.badlogic.gdx.graphics.g3d

Examples of com.badlogic.gdx.graphics.g3d.ModelInstance


      ModelBuilder builder = new ModelBuilder();
      Model   xyzModel = builder.createXYZCoordinates(10, new Material(), Usage.Position|Usage.ColorPacked),
        planeModel = builder.createLineGrid(10, 10, 1, 1, new Material(ColorAttribute.createDiffuse(Color.WHITE)), Usage.Position);
      models.add(xyzModel);
      models.add(planeModel);
      xyzInstance = new ModelInstance(xyzModel);
      xzPlaneInstance = new ModelInstance(planeModel);
      xyPlaneInstance = new ModelInstance(planeModel);
      xyPlaneInstance.transform.rotate(1f, 0f, 0f, 90f);

      setDrawXYZ(true);
      setDrawXZPlane(true);
View Full Code Here


  @Override
  public void update () {
    for(int i=0, positionOffset = 0, c = controller.particles.size;
      i< c;
      ++i, positionOffset += renderData.positionChannel.strideSize){
      ModelInstance instance = renderData.modelInstanceChannel.data[i];
      float scale = hasScale ? renderData.scaleChannel.data[i] : 1;
      float qx=0, qy=0, qz=0, qw=1;
      if(hasRotation){
        int rotationOffset = i* renderData.rotationChannel.strideSize;
        qx = renderData.rotationChannel.data[rotationOffset + ParticleChannels.XOffset];
View Full Code Here

    @Override
    public void init () {
      Model first = models.first();
      for(int i=0, c = controller.emitter.maxParticleCount; i < c; ++i){
        modelChannel.data[i] = new ModelInstance(first);
      }
    }
View Full Code Here

    private class ModelInstancePool extends Pool<ModelInstance>{
      public ModelInstancePool () {}

      @Override
      public ModelInstance newObject () {
        return new ModelInstance(models.random());
      }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.g3d.ModelInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.