当前位置: 首页>>代码示例>>Java>>正文


Java TreeNodeIterator类代码示例

本文整理汇总了Java中org.fleen.util.tree.TreeNodeIterator的典型用法代码示例。如果您正苦于以下问题:Java TreeNodeIterator类的具体用法?Java TreeNodeIterator怎么用?Java TreeNodeIterator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TreeNodeIterator类属于org.fleen.util.tree包,在下文中一共展示了TreeNodeIterator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createNodes

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
protected boolean createNodes(ForsythiaComposition composition){
Jig jig;
boolean creatednodes=false;
TreeNodeIterator i=composition.getLeafPolygonIterator();
FPolygon leaf;
ForsythiaGrammar grammar=composition.getGrammar();
while(i.hasNext()){
  leaf=(FPolygon)i.next();
  if(isCapped(leaf))continue;
  jig=selectJig(grammar,leaf);
  if(jig==null){
    cap(leaf);
  }else{
    jig.createNodes(leaf);
    creatednodes=true;}}
jigbypolygonsig.clear();
return creatednodes;}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:18,代码来源:FSC_Basic.java

示例2: createNodes

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
private boolean createNodes(ForsythiaComposition composition){
Jig jig;
boolean creatednodes=false;
TreeNodeIterator i=composition.getLeafPolygonIterator();
FPolygon leaf;
ForsythiaGrammar grammar=composition.getGrammar();
while(i.hasNext()){
  leaf=(FPolygon)i.next();
  if(isCapped(leaf))continue;
  jig=selectJig(grammar,leaf);
  if(jig==null){
    cap(leaf);
  }else{
    jig.createNodes(leaf);
    creatednodes=true;}}
jigbypolygonsig.clear();
return creatednodes;}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:18,代码来源:Composer.java

示例3: createNodes

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
protected boolean createNodes(ForsythiaComposition composition){
Jig jig;
FPolygon leaf;
boolean creatednodes=false;
TreeNodeIterator i;
//random cap at level
if(buildcycleindex==6){
  i=composition.getLeafPolygonIterator();
  while(i.hasNext()){
    leaf=(FPolygon)i.next();
    if(rnd.nextDouble()<0.3)
      cap(leaf);}}


//actual create nodes thing
ForsythiaGrammar grammar=composition.getGrammar();
i=composition.getLeafPolygonIterator();
while(i.hasNext()){
  leaf=(FPolygon)i.next();
  if(isCapped(leaf))continue;
  jig=selectJig(grammar,leaf);
  if(jig==null){
    cap(leaf);
  }else{
    jig.createNodes(leaf);
    creatednodes=true;}}
jigbypolygonsig.clear();
return creatednodes;}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:29,代码来源:FSC_ChorusedVaryingDetailAreas.java

示例4: getLeafPolygonIterator

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
/**
 * @return Leaves of the branch rooted at this node
 */
@SuppressWarnings("serial")
public TreeNodeIterator getLeafPolygonIterator(){
  return new TreeNodeIterator(this){
    //if it isn't a leaf AND a polygon then skip it
    public boolean skip(TreeNode node){
      return !((node instanceof FPolygon)&&(node.isLeaf()));}};}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:10,代码来源:ForsythiaTreeNode.java

示例5: getTreeString

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public String getTreeString(){
StringBuffer a=new StringBuffer();
TreeNodeIterator i=new TreeNodeIterator(this);
ConnectedGraph cg;
while(i.hasNext()){
  cg=(ConnectedGraph)i.next();
  a.append(cg+"\n");}
a.append("\n");
return a.toString();}
 
开发者ID:johnalexandergreene,项目名称:Junk,代码行数:10,代码来源:ConnectedGraph.java

示例6: getYardsForCGTreeRoot

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
private List<KYard> getYardsForCGTreeRoot(ConnectedGraph root){
List<KYard> yards=new ArrayList<KYard>();
TreeNodeIterator i=new TreeNodeIterator(root);
ConnectedGraph cg;
while(i.hasNext()){
  cg=(ConnectedGraph)i.next();
  yards.addAll(getYardsForCG(cg));}
return yards;}
 
开发者ID:johnalexandergreene,项目名称:Junk,代码行数:9,代码来源:DisconnectedGraph.java

示例7: getHeads

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public List<ZPolygon> getHeads(){
List<ZPolygon> heads=new ArrayList<ZPolygon>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
  lattice=(ZLattice)i.next();
  heads.addAll(lattice.getHeads());}
return heads;}
 
开发者ID:johnalexandergreene,项目名称:Junk,代码行数:9,代码来源:Azalea.java

示例8: getPoints

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public Set<ZPoint> getPoints(){
Set<ZPoint> points=new HashSet<ZPoint>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
  lattice=(ZLattice)i.next();
  points.addAll(lattice.getPoints());}
return points;}
 
开发者ID:johnalexandergreene,项目名称:Junk,代码行数:9,代码来源:Azalea.java

示例9: getPrimaryPoints

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public Set<ZPoint> getPrimaryPoints(){
Set<ZPoint> points=new HashSet<ZPoint>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
  lattice=(ZLattice)i.next();
  points.addAll(lattice.getSoul().getPrimaryPoints());}
return points;}
 
开发者ID:johnalexandergreene,项目名称:Junk,代码行数:9,代码来源:Azalea.java

示例10: getSegs

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public Set<ZSeg> getSegs(){
Set<ZSeg> segs=new HashSet<ZSeg>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
  lattice=(ZLattice)i.next();
  segs.addAll(lattice.getSegs());}
return segs;}
 
开发者ID:johnalexandergreene,项目名称:Junk,代码行数:9,代码来源:Azalea.java

示例11: getNodeIterator

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public TreeNodeIterator getNodeIterator(){
return new TreeNodeIterator(root);}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:3,代码来源:ForsythiaComposition.java

示例12: getNodes

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public List<ForsythiaTreeNode> getNodes(){
List<ForsythiaTreeNode> nodes=new ArrayList<ForsythiaTreeNode>();
TreeNodeIterator i=getNodeIterator();
while(i.hasNext())
  nodes.add((ForsythiaTreeNode)i.next());
return nodes;}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:7,代码来源:ForsythiaComposition.java

示例13: getGridIterator

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public TreeNodeIterator getGridIterator(){
return new GridNodeIterator(root);}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:3,代码来源:ForsythiaComposition.java

示例14: getPolygonIterator

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public TreeNodeIterator getPolygonIterator(){
return new PolygonIterator(root);}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:3,代码来源:ForsythiaComposition.java

示例15: getPolygons

import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public List<FPolygon> getPolygons(){
List<FPolygon> polygons=new ArrayList<FPolygon>();
TreeNodeIterator i=getPolygonIterator();
while(i.hasNext())
  polygons.add((FPolygon)i.next());
return polygons;}
 
开发者ID:johnalexandergreene,项目名称:Forsythia,代码行数:7,代码来源:ForsythiaComposition.java


注:本文中的org.fleen.util.tree.TreeNodeIterator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。