Examples of ColorCube


Examples of com.lightcrafts.mediax.jai.ColorCube

  if (!modeName.equalsIgnoreCase("rendered"))
      return true;

        // Retrieve the operation source and parameters.
        RenderedImage src = args.getRenderedSource(0);
        ColorCube colorMap = (ColorCube)args.getObjectParameter(0);
        KernelJAI[] ditherMask = (KernelJAI[])args.getObjectParameter(1);

        // Check color map validity.
        if (!isValidColorMap(src, colorMap, msg)) {
            return false;
View Full Code Here

Examples of com.lightcrafts.mediax.jai.ColorCube

     */
    public RenderedImage create(ParameterBlock args,
                                RenderingHints hints) {
        // Get source and parameters.
        RenderedImage source = args.getRenderedSource(0);
        ColorCube colorMap =
            (ColorCube)args.getObjectParameter(0);
        KernelJAI[] ditherMask = (KernelJAI[])args.getObjectParameter(1);

        // Check colorMap compatibility.
        if(colorMap.getNumBands() != 1 &&
           colorMap.getNumBands() != 3) {
            // 1 or 3 band colorMaps only.
            return null;
        } else if(colorMap.getDataType() != DataBuffer.TYPE_BYTE) {
            // byte colorMaps only
            return null;
        }

        // Check source compatibility.
        SampleModel sourceSM = source.getSampleModel();
        if(sourceSM.getDataType() != DataBuffer.TYPE_BYTE) {
            // byte source images only
            return null;
        } else if(sourceSM.getNumBands() != colorMap.getNumBands()) {
            // band counts must match
            return null;
        }

        // Get ImageLayout from RenderingHints if any.
View Full Code Here

Examples of com.lightcrafts.mediax.jai.ColorCube

        // Get ImageLayout from renderHints if any.
        ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
       

        RenderedImage source = paramBlock.getRenderedSource(0);
        ColorCube colorMap =
            (ColorCube)paramBlock.getObjectParameter(0);
        KernelJAI[] ditherMask = (KernelJAI[])paramBlock.getObjectParameter(1);

        return new OrderedDitherOpImage(source, renderHints, layout,
                                        colorMap, ditherMask);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.ColorCube

      ciel = new Background(new Color3f(0.9f, 0.9f, 1.0f));
      ciel.setCapability(Background.ALLOW_COLOR_WRITE);
      ciel.setApplicationBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      parent.addChild(ciel);
     
      parent.addChild(new ColorCube(0.4));
     
      TransformGroup tg = new TransformGroup();
      Transform3D translation;
      translation = new Transform3D();
      translation.setTranslation(new Vector3f (0, 0, 20));
View Full Code Here

Examples of com.sun.j3d.utils.geometry.ColorCube

    TransformGroup objTrans = new TransformGroup(spin);
    objRoot.addChild(objTrans);

    // Create a simple shape leaf node, add it to the scene graph.
    // ColorCube is a Convenience Utility class
    objTrans.addChild(new ColorCube(0.4));

    //Create a raster obj
    Shape3D shape = new Shape3D(drawRaster);
    objRoot.addChild(shape);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.ColorCube

    TransformGroup objTrans = new TransformGroup(spin);
    objRoot.addChild(objTrans);

    // Create a simple shape leaf node, add it to the scene graph.
    // ColorCube is a Convenience Utility class
    objTrans.addChild(new ColorCube(0.4));

    //Create a raster
    Shape3D shape = new Shape3D(drawRaster);
    objRoot.addChild(shape);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.ColorCube

/*    */
/* 85 */     return shape;
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode() {
/* 89 */     return new ColorCube(this.scale);
/*    */   }
View Full Code Here

Examples of com.sun.j3d.utils.geometry.ColorCube

  BranchGroup objRoot = new BranchGroup();
  TransformGroup objTrans = new TransformGroup();
  objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
  objRoot.addChild(objTrans);
  objTrans.addChild(new ColorCube(0.2));
  Transform3D yAxis = new Transform3D();
  Alpha rotationAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE,
          0, 0,
          4000, 0, 0,
          0, 0, 0);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.ColorCube

  objRoot.addChild(objRotate);
  objRotate.addChild(objSpin);
  // Create a simple shape leaf node, add it to the scene graph.
  // ColorCube is a Convenience Utility class
  objSpin.addChild(new ColorCube(0.4));

  // Create a new Behavior object that will perform the desired
  // operation on the specified transform object and add it into
  // the scene graph.
  Transform3D yAxis = new Transform3D();
View Full Code Here

Examples of com.sun.j3d.utils.geometry.ColorCube

  TransformGroup objTrans = new TransformGroup();
  objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
  objRoot.addChild(objTrans);

  // Create a simple Shape3D node; add it to the scene graph.
  objTrans.addChild(new ColorCube(0.4));

  // Create a new Behavior object that will perform the
  // desired operation on the specified transform and add
  // it into the scene graph.
  Transform3D yAxis = new Transform3D();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.