Example #1
0
  public PvCellSkin(WorldRenderer renderer, final Component object) {
    UiEngine engine = renderer.getEngine();
    elements = new I3dGroupElement();

    // structure
    File v3drawFileStructure = new File("graphics/output/pvcell_structure.v3draw");
    final V3DrawElement elementStructure = V3DrawElement.LoadFromFile(v3drawFileStructure);
    elements.add(new V3DColorElement(elementStructure, new I3dColor(135, 158, 255)));

    // panel
    File v3drawFilePanel = new File("graphics/output/pvcell_panel.v3draw");
    elementPanel = V3DrawElement.LoadFromFile(v3drawFilePanel);
    elements.add(new V3DColorElement(elementPanel, new I3dColor(0, 20, 60)));

    transform = object.getFirstPart().getTransform();
    elements.setTransformMatrix(transform.toFloatBuffer());

    elementStructure.setRotation(90, 0, 0);
    elementPanel.setRotation(90, 0, 0);
  }
Example #2
0
 @Override
 public void update(Timestamp time) {
   elements.setTransformMatrix(transform.toFloatBuffer());
 }