congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Shape3D.setGeometry
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: stackoverflow.com

app.setMaterial(mat);
app.setPolygonAttributes(pa);
sh.setGeometry(lsa);
sh.setAppearance(app);
sh.setPickable(true); 
origin: stackoverflow.com

sh.setGeometry(ginfo.getGeometryArray()); // shape is a Shape3D.
TransformGroup objRotate = new TransformGroup();
objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
origin: sc.fiji/3D_Viewer

public void setColor(final Color3f c) {
  this.color = c;
  lineShape.setGeometry(createLineGeometry());
  textShape.setAppearance(createTextAppearance());
}
origin: stackoverflow.com

 float radius = 2.4f;
int divisions = 24;
// Further flags: GENERATE_TEXTURE_COORDS etc.
int primflags = Sphere.GEOMETRY_NOT_SHARED | Sphere.GENERATE_NORMALS;

Sphere sphere = new Sphere(radius, primflags, divisions);

Shape3D shape3D = sphere.getShape();

Geometry = shape3D.getGeometry(); // Your desired result !

shape3D.setGeometry(null);
origin: sc.fiji/3D_Viewer

public void setLength(final float l) {
  this.length = l;
  lineShape.setGeometry(createLineGeometry());
  textShape.setGeometry(createTextGeometry());
  final Transform3D d = new Transform3D();
  d.setTranslation(new Vector3f(length / 2, -length / 2, 0.0f));
  textTG.setTransform(d);
}
origin: org.scijava/j3dutils

@Override
public void buildGraph() {
  ((Shape3D)node).setAppearance( (Appearance)control.getSymbolTable().getJ3dNode( appearance ) );
  ((Shape3D)node).setGeometry( (Geometry)control.getSymbolTable().getJ3dNode( geometry[0] ) );
  for(int i=1; i<geometry.length; i++) {
    ((Shape3D)node).addGeometry( (Geometry)control.getSymbolTable().getJ3dNode( geometry[i] ) );
  }
  super.buildGraph(); // Must be last call in method
}
origin: org.scijava/j3dutils

shape.setGeometry(gi.getGeometryArray(false, false, false));
origin: sc.fiji/3D_Viewer

public Scalebar(final float length) {
  final Transform3D position = new Transform3D();
  positionTG = new TransformGroup(position);
  positionTG.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
  positionTG.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
  addChild(positionTG);
  lineShape = new Shape3D();
  lineShape.setGeometry(createLineGeometry());
  lineShape.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
  positionTG.addChild(lineShape);
  final Transform3D texttranslate = new Transform3D();
  texttranslate.setTranslation(new Vector3f(length / 2, -length / 2, 0.0f));
  textTG = new TransformGroup(texttranslate);
  textTG.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
  positionTG.addChild(textTG);
  textShape = new OrientedShape3D();
  textShape.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
  textShape.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
  textShape.setGeometry(createTextGeometry());
  textShape.setAppearance(createTextAppearance());
  textShape.setAlignmentAxis(0.0f, 1.0f, 0.0f);
  textTG.addChild(textShape);
}
origin: sc.fiji/3D_Viewer

lines.setGeometry(createGeometry());
addChild(lines);
org.scijava.java3dShape3DsetGeometry

Javadoc

Replaces the geometry component at index 0 in this Shape3D node's list of geometry components with the specified geometry component. If there are existing geometry components in the list (besides the one being replaced), the new geometry component must be of the same equivalence class (point, line, polygon, CompressedGeometry, Raster, Text3D) as the others.

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
  • getAppearance
    Retrieves the appearance component of this shape node.
  • 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
  • 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

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • setContentView (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 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