Tabnine Logo
Shape3D.getAppearance
Code IndexAdd Tabnine to your IDE (free)

How to use
getAppearance
method
in
org.scijava.java3d.Shape3D

Best Java code snippets using org.scijava.java3d.Shape3D.getAppearance (Showing top 20 results out of 315)

origin: org.scijava/j3dutils

/** Gets the appearance of the primitive (defaults to first subpart).
 */
public Appearance getAppearance(){
 return getShape(0).getAppearance();
}
origin: org.scijava/j3dutils

/**
 * Gets the appearance of the specified part of the cylinder.
 *
 * @param partId identifier for a given subpart of the cylinder
 *
 * @return The appearance object associated with the partID.  If an
 * invalid partId is passed in, null is returned.
 *
 * @since Java 3D 1.2.1
 */
@Override
public Appearance getAppearance(int partId) {
if (partId > BOTTOM || partId < BODY) return null;
return getShape(partId).getAppearance();
}
origin: org.scijava/j3dutils

/**
 * Gets the appearance of the specified part of the sphere.
 *
 * @param partId identifier for a given subpart of the sphere
 *
 * @return The appearance object associated with the partID.  If an
 * invalid partId is passed in, null is returned.
 *
 * @since Java 3D 1.2.1
 */
@Override
public Appearance getAppearance(int partId) {
if (partId != BODY) return null;
return getShape(partId).getAppearance();
}
origin: org.scijava/j3dutils

/**
 * Gets the appearance of the specified part of the cone.
 *
 * @param partId identifier for a given subpart of the cone
 *
 * @return The appearance object associated with the partID.  If an
 * invalid partId is passed in, null is returned.
 *
 * @since Java 3D 1.2.1
 */
@Override
public Appearance getAppearance(int partId) {
if (partId > CAP || partId < BODY) return null;
return getShape(partId).getAppearance();
}
origin: org.scijava/j3dutils

/**
 * Gets the appearance of the specified part of the box.
 *
 * @param partId identifier for a given subpart of the box
 *
 * @return The appearance object associated with the partID.  If an
 * invalid partId is passed in, null is returned.
 *
 * @since Java 3D 1.2.1
 */
@Override
public Appearance getAppearance(int partId) {
if (partId > BOTTOM || partId < FRONT) return null;
return getShape(partId).getAppearance();
}
origin: sc.fiji/3D_Viewer

/**
 * Get the Appearance object for the Shape3D of the specified axis; Note that
 * both front and back shapes share the same Appearance.
 */
public Appearance getAppearance(final int axis, final int index) {
  final Group frontGroup =
    (Group) axisSwitch.getChild(axisIndex[axis][FRONT]);
  return ((Shape3D) ((Group) frontGroup.getChild(index)).getChild(0))
    .getAppearance();
}
origin: org.scijava/j3dutils

public SphereState( SymbolTableData symbol, Controller control ) {
super( symbol, control );
  if (node!=null) {
    bodyAppearance = control.getSymbolTable().addReference( ((Sphere)node).getShape( Sphere.BODY ).getAppearance() );
  }
}
origin: org.scijava/j3dutils

public ConeState(SymbolTableData symbol,Controller control) {
super( symbol, control );
  if (node!=null) {
    bodyAppearance = control.getSymbolTable().addReference( ((Cone)node).getShape( Cone.BODY ).getAppearance() );
    capAppearance = control.getSymbolTable().addReference( ((Cone)node).getShape( Cone.CAP ).getAppearance() );
  }
}
origin: org.scijava/j3dutils

public CylinderState( SymbolTableData symbol, Controller control ) {
super( symbol, control );
  if (node!=null) {
    bodyAppearance = control.getSymbolTable().addReference( ((Cylinder)node).getShape( Cylinder.BODY ).getAppearance() );
    topAppearance = control.getSymbolTable().addReference( ((Cylinder)node).getShape( Cylinder.TOP ).getAppearance() );
    bottomAppearance = control.getSymbolTable().addReference( ((Cylinder)node).getShape( Cylinder.BOTTOM ).getAppearance() );
  }
}
origin: org.scijava/j3dutils

public BoxState( SymbolTableData symbol, Controller control ) {
super( symbol, control );
  if (node!=null) {
    frontAppearance = control.getSymbolTable().addReference( ((Box)node).getShape( Box.FRONT ).getAppearance() );
    backAppearance = control.getSymbolTable().addReference( ((Box)node).getShape( Box.BACK ).getAppearance() );
    topAppearance = control.getSymbolTable().addReference( ((Box)node).getShape( Box.TOP ).getAppearance() );
    bottomAppearance = control.getSymbolTable().addReference( ((Box)node).getShape( Box.BOTTOM ).getAppearance() );
    leftAppearance = control.getSymbolTable().addReference( ((Box)node).getShape( Box.LEFT ).getAppearance() );
    rightAppearance = control.getSymbolTable().addReference( ((Box)node).getShape( Box.RIGHT ).getAppearance() );
  }
}
origin: sc.fiji/3D_Viewer

  public ShapeGroup duplicate() {
    final ShapeGroup ret = new ShapeGroup();
    if (shape != null) {
      ret.shape = new Shape3D(shape.getGeometry(), shape.getAppearance());
      ret.group.addChild(ret.shape);
    }
    ret.pos = pos;
    return ret;
  }
}
origin: org.scijava/j3dutils

/**
 * Sets the color of the 6DOF sensor echo.  The default is white.  This
 * can be called to set the color before or after the echo geometry is
 * created.
 *
 * @param color the echo color
 */
public void setEchoColor(Color3f color) {
  if (echoColor == null)
    echoColor = new Color3f(color) ;
  else
    echoColor.set(color) ;
  if (echoGeometry != null) {
    Appearance a = echoGeometry.getAppearance() ;
    Material m = a.getMaterial() ;
    m.setDiffuseColor(echoColor) ;
  }
}
origin: org.scijava/j3dutils

public Shape3DState( SymbolTableData symbol, Controller control ) {
  super( symbol, control );
  if (node!=null) {
    appearance = control.getSymbolTable().addReference( ((Shape3D)node).getAppearance() );
    int length = ((Shape3D)node).numGeometries();
    geometry = new int[length];
    for(int i=0; i<length; i++)
      geometry[i] = control.getSymbolTable().addReference( ((Shape3D)node).getGeometry(i) );
  }
}
origin: sc.fiji/3D_Viewer

  /**
   * Sets the slice index of the specified plane to the given value.
   * 
   * @param axis
   * @param v
   */
  public void setSlice(final int axis, final int v) {
    if (v >= dimensions[axis] || v < 0) return;
    slices[axis] = v;
    final Group g = (Group) axisSwitch.getChild(axisIndex[axis][FRONT]);
    final int num = g.numChildren();
    if (num > 1) System.out.println(num + " children, expected only 1");
    final Shape3D shape = (Shape3D) ((Group) g.getChild(num - 1)).getChild(0);

    final double[] quadCoords = geomCreator.getQuadCoords(axis, v);
    ((QuadArray) shape.getGeometry()).setCoordinates(0, quadCoords);

    final Texture2D tex = appCreator.getTexture(axis, v);
    shape.getAppearance().setTexture(tex);
    final TexCoordGeneration tg = appCreator.getTg(axis);
    shape.getAppearance().setTexCoordGeneration(tg);
  }
}
origin: sc.fiji/Volume_Calculator

/**
 * Use the currently selected color to paint an edge.
 *
 * @param shape a Java3D shape - must be a LineArray
 *
 */
void highlightEdge(Shape3D shape) {
  Color3f highlightColor = volumes.getSelectedColor();
  if (shape.getGeometry() instanceof LineArray) {
    Appearance appearance = shape.getAppearance();
    ColoringAttributes ca = appearance.getColoringAttributes();
    Color3f before = new Color3f();
    appearance.setColoringAttributes(ca);
    ca.getColor(before);
    ca.setColor(highlightColor);
  }
}
origin: org.scijava/j3dutils

/**
 * Sets the 6DOF sensor echo transparency.  The default is opaque.  A
 * value of 0.0 is fully opaque and 1.0 is fully transparent.  This can be
 * called to set the transparency before or after the echo geometry is
 * created.
 *
 * @param transparency the transparency value
 */
public void setEchoTransparency(float transparency) {
  echoTransparency = transparency ;
  if (echoGeometry != null) {
    Appearance a = echoGeometry.getAppearance() ;
    TransparencyAttributes ta = a.getTransparencyAttributes() ;
    if (echoTransparency == 0.0f) {
      ta.setTransparencyMode(TransparencyAttributes.NONE) ;
      ta.setTransparency(0.0f) ;
    }
    else {
      ta.setTransparencyMode(TransparencyAttributes.BLENDED) ;
      ta.setTransparency(echoTransparency) ;
      // Use order independent additive blend for gnomon.
      if (echoGeometry instanceof SensorGnomonEcho)
        ta.setDstBlendFunction(TransparencyAttributes.BLEND_ONE) ;
    }
  }
}
origin: org.scijava/j3dutils

Appearance a = shapes[s].getAppearance() ;
if (a != null) {
Material m = a.getMaterial() ;
origin: org.scijava/j3dcore

/**
 * Draw the specified Shape3D leaf node object.  This is
 * a convenience method that is identical to calling the
 * setAppearance(Appearance) and draw(Geometry) methods
 * passing the appearance and geometry component objects of
 * the specified shape node as arguments.
 *
 * @param shape the Shape3D node containing the Appearance component
 * object to set and Geometry component object to draw
 *
 * @exception IllegalSharingException if the Shape3D node
 * is part of or is subsequently made part of a live scene graph.
 *
 * @exception IllegalSharingException if the Shape3D node's Appearance
 * refers to an ImageComponent2D that is being used by a
 * Canvas3D as an off-screen buffer.
 */
public void draw(Shape3D shape) {
if (shape.isLive()) {
  throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D26"));
}
  ((Shape3DRetained)shape.retained).setInImmCtx(true);
setAppearance(shape.getAppearance());
draw(shape.getGeometry());
}
origin: sc.fiji/Volume_Calculator

Shape3D shape = (Shape3D) node;
if (shape.getGeometry() instanceof LineArray) {
  Appearance appearance = shape.getAppearance();
  ColoringAttributes ca = appearance.getColoringAttributes();
  ca.getColor(currentColor);
origin: org.scijava/j3dutils

Appearance a = echoGeometry.getAppearance() ;
if (echoColor != null) {
  Material m = a.getMaterial() ;
org.scijava.java3dShape3DgetAppearance

Javadoc

Retrieves the appearance component of this shape node.

Popular methods of Shape3D

  • <init>
    Constructs and initializes a Shape3D node with the specified geometry and appearance components. The
  • getGeometry
    Retrieves the geometry component at the specified index from this Shape3D node's list of geometry co
  • addGeometry
    Appends the specified geometry component to this Shape3D node's list of geometry components. If ther
  • setAppearance
    Sets the appearance component of this Shape3D node. Setting it to null specifies that default values
  • setCapability
  • setGeometry
    Replaces the geometry component at the specified index in this Shape3D node's list of geometry compo
  • intersect
    Checks whether the geometry in this shape node intersects with the specified pickShape.
  • numGeometries
    Returns the number of geometry components in this Shape3D node's list of geometry components.
  • checkDuplicateNode
  • checkForCycle
  • cloneTree
  • duplicateAttributes
    Copies all Shape3D information fromoriginalNode into the current node. This method is called from th
  • cloneTree,
  • duplicateAttributes,
  • duplicateNode,
  • getCapability,
  • getCollisionBounds,
  • getNodeComponent,
  • getUserData,
  • isLive,
  • isLiveOrCompiled

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for Android Studio
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