Codota Logo
Shape3D.setGeometry
Code IndexAdd Codota 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)

  • Common ways to obtain Shape3D
private void myMethod () {
Shape3D s =
  • Codota Iconnew Shape3D()
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now