congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ParticleController.findInfluencer
Code IndexAdd Tabnine to your IDE (free)

How to use
findInfluencer
method
in
com.badlogic.gdx.graphics.g3d.particles.ParticleController

Best Java code snippets using com.badlogic.gdx.graphics.g3d.particles.ParticleController.findInfluencer (Showing top 20 results out of 315)

origin: libgdx/libgdx

protected boolean canAddInfluencer (Class influencerType, ParticleController controller) {
  boolean hasSameInfluencer = controller.findInfluencer(influencerType) != null;
  if(!hasSameInfluencer){
    if( 	(ColorInfluencer.Single.class.isAssignableFrom(influencerType) && controller.findInfluencer(ColorInfluencer.Random.class) != null) ||
        (ColorInfluencer.Random.class.isAssignableFrom(influencerType) && controller.findInfluencer(ColorInfluencer.Single.class) != null) ){
      return false;
    }
    
    if(RegionInfluencer.class.isAssignableFrom(influencerType)){
      return controller.findInfluencer(RegionInfluencer.class) == null;
    }
    else if(ModelInfluencer.class.isAssignableFrom(influencerType)){
      return controller.findInfluencer(ModelInfluencer.class) == null;
    }
    else if(ParticleControllerInfluencer.class.isAssignableFrom(influencerType)){
      return controller.findInfluencer(ParticleControllerInfluencer.class) == null;
    }
  }
  return !hasSameInfluencer;
}
origin: libgdx/libgdx

protected boolean canAddInfluencer (Class influencerType, ParticleController controller) {
  boolean hasSameInfluencer = controller.findInfluencer(influencerType) != null;
  if(!hasSameInfluencer){
    if( 	(ColorInfluencer.Single.class.isAssignableFrom(influencerType) && controller.findInfluencer(ColorInfluencer.Random.class) != null) ||
        (ColorInfluencer.Random.class.isAssignableFrom(influencerType) && controller.findInfluencer(ColorInfluencer.Single.class) != null) ){
      return false;
    }
    
    if(RegionInfluencer.class.isAssignableFrom(influencerType)){
      return controller.findInfluencer(RegionInfluencer.class) == null;
    }
    else if(ModelInfluencer.class.isAssignableFrom(influencerType)){
      return controller.findInfluencer(ModelInfluencer.class) == null;
    }
    else if(ParticleControllerInfluencer.class.isAssignableFrom(influencerType)){
      return controller.findInfluencer(ParticleControllerInfluencer.class) == null;
    }
  }
  return !hasSameInfluencer;
}
origin: libgdx/libgdx

  public void actionPerformed (ActionEvent event) {
    SpawnSide side = (SpawnSide)sideCombo.getSelectedItem();
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    EllipseSpawnShapeValue shapeValue = (EllipseSpawnShapeValue)influencer.spawnShapeValue;
    shapeValue.setSide(side);
  }
});
origin: libgdx/libgdx

  public void actionPerformed (ActionEvent event) {
    SpawnSide side = (SpawnSide)sideCombo.getSelectedItem();
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    EllipseSpawnShapeValue shapeValue = (EllipseSpawnShapeValue)influencer.spawnShapeValue;
    shapeValue.setSide(side);
  }
});
origin: libgdx/libgdx

public void update (FlameMain editor) {
  SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
  shapeCombo.setSelectedItem( spawnShapeToString(influencer.spawnShapeValue));
}
origin: libgdx/libgdx

public void update (FlameMain editor) {
  SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
  shapeCombo.setSelectedItem( spawnShapeToString(influencer.spawnShapeValue));
}
origin: libgdx/libgdx

  public void actionPerformed (ActionEvent event) {
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    PrimitiveSpawnShapeValue shapeValue = (PrimitiveSpawnShapeValue)influencer.spawnShapeValue;
    shapeValue.setEdges(edgesCheckbox.isSelected());
    setEdgesVisible(true);
  }
});
origin: libgdx/libgdx

  public void actionPerformed (ActionEvent event) {
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    PrimitiveSpawnShapeValue shapeValue = (PrimitiveSpawnShapeValue)influencer.spawnShapeValue;
    shapeValue.setEdges(edgesCheckbox.isSelected());
    setEdgesVisible(true);
  }
});
origin: libgdx/libgdx

@Override
public void onTemplateChecked (Model model, boolean isChecked) {
  //Update the shapes
  SpawnShapeValue shapeValue = null;
  Mesh mesh = model.meshes.get(0);
  weightMeshSpawnShapeValue.setMesh(mesh, model);
  meshSpawnShapeValue.setMesh(mesh, model);
  if(shapeCombo.getSelectedItem() == SPAWN_SHAPE_WEIGHT_MESH){
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    influencer.spawnShapeValue = weightMeshSpawnShapeValue;
  }
  else if(shapeCombo.getSelectedItem() == SPAWN_SHAPE_MESH){
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    influencer.spawnShapeValue = meshSpawnShapeValue;
  }
  editor.restart();
}
origin: libgdx/libgdx

@Override
public void onTemplateChecked (Model model, boolean isChecked) {
  //Update the shapes
  SpawnShapeValue shapeValue = null;
  Mesh mesh = model.meshes.get(0);
  weightMeshSpawnShapeValue.setMesh(mesh, model);
  meshSpawnShapeValue.setMesh(mesh, model);
  if(shapeCombo.getSelectedItem() == SPAWN_SHAPE_WEIGHT_MESH){
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    influencer.spawnShapeValue = weightMeshSpawnShapeValue;
  }
  else if(shapeCombo.getSelectedItem() == SPAWN_SHAPE_MESH){
    SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
    influencer.spawnShapeValue = meshSpawnShapeValue;
  }
  editor.restart();
}
origin: libgdx/libgdx

protected void deleteVelocity () {
  int row = velocityTable.getSelectedRow();
  if (row == -1) return;
  
  //Remove the velocity from the table
  ParticleController controller = editor.getEmitter();
  DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class);
  influencer.velocities.removeValue(velocities.removeIndex(row).velocityValue, true);
  velocityTableModel.removeRow(row);
  
  //Restart the effect and reinit the controller
  editor.restart();
  selectedVelocityPanel.setVisible(false);
  selectedVelocityPanel = null;
}
origin: libgdx/libgdx

protected void deleteVelocity () {
  int row = velocityTable.getSelectedRow();
  if (row == -1) return;
  
  //Remove the velocity from the table
  ParticleController controller = editor.getEmitter();
  DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class);
  influencer.velocities.removeValue(velocities.removeIndex(row).velocityValue, true);
  velocityTableModel.removeRow(row);
  
  //Restart the effect and reinit the controller
  editor.restart();
  selectedVelocityPanel.setVisible(false);
  selectedVelocityPanel = null;
}
origin: libgdx/libgdx

protected void velocityChecked (int index, boolean isChecked) {
  ParticleController controller = editor.getEmitter();
  DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class);		
  influencer.velocities.clear();
  velocities.get(index).isActive = isChecked;
  for(VelocityWrapper wrapper : velocities){
    if(wrapper.isActive)
      influencer.velocities.add(wrapper.velocityValue);
  }
  //Restart the effect and reinit the controller
  editor.restart();
}
origin: libgdx/libgdx

protected void velocityChecked (int index, boolean isChecked) {
  ParticleController controller = editor.getEmitter();
  DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class);		
  influencer.velocities.clear();
  velocities.get(index).isActive = isChecked;
  for(VelocityWrapper wrapper : velocities){
    if(wrapper.isActive)
      influencer.velocities.add(wrapper.velocityValue);
  }
  //Restart the effect and reinit the controller
  editor.restart();
}
origin: libgdx/libgdx

protected void addInfluencer (Class<Influencer> type, ParticleController controller) {
  if(controller.findInfluencer(type) != null) return;
      ModelInfluencer currentInfluencer = (ModelInfluencer)controller.findInfluencer(ModelInfluencer.class);
      if(currentInfluencer != null){
          newModelInfluencer.models.add(currentInfluencer.models.first());
      ParticleControllerInfluencer currentInfluencer = (ParticleControllerInfluencer)controller.findInfluencer(ParticleControllerInfluencer.class);
      if(currentInfluencer != null){
          newModelInfluencer.templates.add(currentInfluencer.templates.first());
origin: libgdx/libgdx

protected void addInfluencer (Class<Influencer> type, ParticleController controller) {
  if(controller.findInfluencer(type) != null) return;
      ModelInfluencer currentInfluencer = (ModelInfluencer)controller.findInfluencer(ModelInfluencer.class);
      if(currentInfluencer != null){
          newModelInfluencer.models.add(currentInfluencer.models.first());
      ParticleControllerInfluencer currentInfluencer = (ParticleControllerInfluencer)controller.findInfluencer(ParticleControllerInfluencer.class);
      if(currentInfluencer != null){
          newModelInfluencer.templates.add(currentInfluencer.templates.first());
origin: libgdx/libgdx

protected void createVelocity (Object selectedItem) {
  //Add the velocity to the table and to the influencer
  ParticleController controller = editor.getEmitter();
  DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class);
  VelocityWrapper wrapper = new VelocityWrapper(createVelocityValue(selectedItem), true);
  velocities.add(wrapper);
  influencer.velocities.add(wrapper.velocityValue);
  int index = velocities.size-1;
  velocityTableModel.addRow(new Object[] {"Velocity "+index, true});
  
  //Reinit
  editor.restart();
  
  //Select new velocity
  velocityTable.getSelectionModel().setSelectionInterval(index, index);
  revalidate();
  repaint();
}

origin: libgdx/libgdx

protected void createVelocity (Object selectedItem) {
  //Add the velocity to the table and to the influencer
  ParticleController controller = editor.getEmitter();
  DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class);
  VelocityWrapper wrapper = new VelocityWrapper(createVelocityValue(selectedItem), true);
  velocities.add(wrapper);
  influencer.velocities.add(wrapper.velocityValue);
  int index = velocities.size-1;
  velocityTableModel.addRow(new Object[] {"Velocity "+index, true});
  
  //Reinit
  editor.restart();
  
  //Select new velocity
  velocityTable.getSelectionModel().setSelectionInterval(index, index);
  revalidate();
  repaint();
}

origin: libgdx/libgdx

protected void setPrimitiveSpawnShape (PrimitiveSpawnShapeValue shape, boolean showEdges, SpawnSide side) {
  setSpawnShapeValue(shape);
  SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
  influencer.spawnShapeValue = shape;
  widthPanel.setValue(shape.getSpawnWidth());
  heightPanel.setValue(shape.getSpawnHeight());
  depthPanel.setValue(shape.getSpawnDepth());
  setEdgesVisible(showEdges);
  if(showEdges) 
    edgesCheckbox.setSelected(shape.isEdges());
  if(side != null){
    setSidesVisible(true);
    sideCombo.setSelectedItem(side);
  }
  else {
    setSidesVisible(false);
  }
  widthPanel.setVisible(true);
  heightPanel.setVisible(true);
  depthPanel.setVisible(true);
  meshPanel.setVisible(false);
}

origin: libgdx/libgdx

protected void setPrimitiveSpawnShape (PrimitiveSpawnShapeValue shape, boolean showEdges, SpawnSide side) {
  setSpawnShapeValue(shape);
  SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
  influencer.spawnShapeValue = shape;
  widthPanel.setValue(shape.getSpawnWidth());
  heightPanel.setValue(shape.getSpawnHeight());
  depthPanel.setValue(shape.getSpawnDepth());
  setEdgesVisible(showEdges);
  if(showEdges) 
    edgesCheckbox.setSelected(shape.isEdges());
  if(side != null){
    setSidesVisible(true);
    sideCombo.setSelectedItem(side);
  }
  else {
    setSidesVisible(false);
  }
  widthPanel.setVisible(true);
  heightPanel.setVisible(true);
  depthPanel.setVisible(true);
  meshPanel.setVisible(false);
}

com.badlogic.gdx.graphics.g3d.particlesParticleControllerfindInfluencer

Popular methods of ParticleController

  • <init>
  • init
    Initialize the controller. All the sub systems will be initialized and binded to the controller. Mus
  • start
    Start the simulation.
  • copy
  • dispose
  • end
    End the simulation.
  • draw
    Updates the renderer used by this controller, usually this means the particles will be draw inside a
  • setTransform
    Sets the current transformation to the given one.
  • translate
    Postmultiplies the current transformation with a translation matrix represented by the given transla
  • update
    Updates the particles data
  • activateParticles
    Generally called by the Emitter. This method will notify all the sub systems that a given amount of
  • allocateChannels
  • activateParticles,
  • allocateChannels,
  • bind,
  • calculateBoundingBox,
  • findIndex,
  • getBoundingBox,
  • isComplete,
  • killParticles,
  • load

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Reference (javax.naming)
  • JTextField (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now