de.jreality.geometry
Class RemoveDuplicateInfo

java.lang.Object
  extended by de.jreality.geometry.RemoveDuplicateInfo

public class RemoveDuplicateInfo
extends Object


Field Summary
static Attribute[] defaultAttrs
          read out the attributes, which are given by the user, to be compared for equality.
 
Method Summary
 double getEps()
          get Tolerance for equality
 int[] getReferenceTable()
           
static void removeCycleDefinition(int[][] faces)
          a face definition can repeat the first index at the end excample: {1,2,3,4,1} or {1,2,3,4} in first case: the last index will be removed
static PointSet removeDuplicateVertices(PointSet ps, Attribute... attributes)
          merges vertices which appears more than once in the geometry the result of type PointSet is especialy the same typ as the given geometry
static PointSet removeDuplicateVertices(PointSet ps, double eps, Attribute... attributes)
          merges vertices which appears more than once in the geometry the result of type PointSet is especialy the same typ as the given geometry
static double[][] removeNoFaceVertices(double[][] vertices, int[][] faces)
          removes vertices which are not used by faces.
 void setEps(double eps)
          set Tolerance for equality
static void simplifySceneTree(SceneGraphComponent g)
          simplifys the SceneGraphComponent tree recursivly Nodes with cameras, geometrys and lights will not be changed Nodes with transformations and Appearances will only be deleted if no geometry, camera or light will be effected.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultAttrs

public static final Attribute[] defaultAttrs
read out the attributes, which are given by the user, to be compared for equality.

Method Detail

removeDuplicateVertices

public static PointSet removeDuplicateVertices(PointSet ps,
                                               Attribute... attributes)
merges vertices which appears more than once in the geometry the result of type PointSet is especialy the same typ as the given geometry


removeDuplicateVertices

public static PointSet removeDuplicateVertices(PointSet ps,
                                               double eps,
                                               Attribute... attributes)
merges vertices which appears more than once in the geometry the result of type PointSet is especialy the same typ as the given geometry


getEps

public double getEps()
get Tolerance for equality


setEps

public void setEps(double eps)
set Tolerance for equality


getReferenceTable

public int[] getReferenceTable()

removeNoFaceVertices

public static double[][] removeNoFaceVertices(double[][] vertices,
                                              int[][] faces)
removes vertices which are not used by faces. changes faceIndices.

Parameters:
vertices -
faces -
Returns:
vertices

removeCycleDefinition

public static void removeCycleDefinition(int[][] faces)
a face definition can repeat the first index at the end excample: {1,2,3,4,1} or {1,2,3,4} in first case: the last index will be removed


simplifySceneTree

public static void simplifySceneTree(SceneGraphComponent g)
simplifys the SceneGraphComponent tree recursivly Nodes with cameras, geometrys and lights will not be changed Nodes with transformations and Appearances will only be deleted if no geometry, camera or light will be effected. Nodes which have only one Child(which has a Geometry, camera or Light in subtree) and no geometry, Camera or light will be deleted if it has no Appearence or Transformation or if the Tranformation / Appearance can be shifted into the child node