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

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getSystemService (Context)
  • putExtra (Intent)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Table (org.hibernate.mapping)
    A relational table
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now