Class GaiaSceneDecimator

java.lang.Object
com.gaia3d.basic.geometry.modifier.GaiaSceneDecimator

public class GaiaSceneDecimator extends Object
General-purpose edge-collapse mesh decimator that operates directly on a GaiaScene.

This is a thin, reusable convenience wrapper around the existing half-edge based HalfEdgeDecimator: it converts the GaiaScene to a HalfEdgeScene, runs the edge-collapse decimation (which preserves creases via

invalid reference
DecimateParameters#getMaxDiffAngDegrees()
and per-vertex attributes such as color), and converts the result back to a GaiaScene.

It was introduced for the marching-cubes iso-surface pipeline but is intentionally generic so any pipeline that produces a GaiaScene can reuse it.

  • Constructor Details

    • GaiaSceneDecimator

      public GaiaSceneDecimator()
  • Method Details

    • decimate

      public GaiaScene decimate(GaiaScene gaiaScene, DecimateParameters decimateParameters)
      Decimates the given scene using the supplied parameters and returns a new, decimated scene. The input scene is left untouched.
      Parameters:
      gaiaScene - the scene to decimate (may be null)
      decimateParameters - edge-collapse parameters
      Returns:
      the decimated scene, or null if the input was null