Package org.geppetto.core.data.model

Examples of org.geppetto.core.data.model.SimpleVariable


   * @param type
   * @return
   */
  public static SimpleVariable getSimpleVariable(String name, AType type)
  {
    SimpleVariable sv = new SimpleVariable();
    sv.setName(name);
    sv.setType(type);
    return sv;
  }
View Full Code Here


    floatType.setType(Type.FLOAT);
   
    // structure type vector
    StructuredType vector = new StructuredType();
    List<AVariable> vectorVars = new ArrayList<AVariable>();
    SimpleVariable x = new SimpleVariable();
    SimpleVariable y = new SimpleVariable();
    SimpleVariable z = new SimpleVariable();
    x.setName("x");
    x.setType(floatType);
    y.setName("y");
    y.setType(floatType);
    z.setName("z");
    z.setType(floatType);
    vectorVars.addAll(Arrays.asList(x, y, z));
    vector.setVariables(vectorVars);
   
    // structure type particle
    StructuredType particle = new StructuredType();
    List<AVariable> particleVars = new ArrayList<AVariable>();
    SimpleVariable position = new SimpleVariable();
    SimpleVariable velocity = new SimpleVariable();
    position.setName("position");
    position.setType(vector);
    velocity.setName("velocity");
    velocity.setType(vector);
    particleVars.addAll(Arrays.asList(position, velocity));
    particle.setVariables(particleVars);
   
    // array of particles
    ArrayVariable particles = new ArrayVariable();
View Full Code Here

TOP

Related Classes of org.geppetto.core.data.model.SimpleVariable

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.