Tabnine Logo
org.scijava.java3d
Code IndexAdd Tabnine to your IDE (free)

How to use org.scijava.java3d

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

origin: stackoverflow.com

BackgroundSound mBackgroundSound = new BackgroundSound();
origin: stackoverflow.com

scene.compile();
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
BranchGroup lineGroup = new BranchGroup();
Appearance app = new Appearance();
ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f,204.0f), ColoringAttributes.SHADE_FLAT);
app.setColoringAttributes(ca);
Point3f[] plaPts = new Point3f[5];
for (int i = 0; i < 2; i++) {
pla.setCoordinates(0, plaPts);
PointAttributes a_point_just_bigger=new PointAttributes();
a_point_just_bigger.setPointSize(10.0f);//10 pixel-wide point
a_point_just_bigger.setPointAntialiasingEnable(true);//now points are sphere-like(not a cube)
app.setPointAttributes(a_point_just_bigger);
PolygonAttributes la=new PolygonAttributes();
la.setPolygonMode(PolygonAttributes.POLYGON_FILL);
la.setCullFace(PolygonAttributes.CULL_NONE);
app.setPolygonAttributes(la);
Material matt=new Material();
matt.setAmbientColor(new Color3f(1,1,1));
matt.setDiffuseColor(new Color3f(0.5f,0.5f,0.7f));
matt.setEmissiveColor(new Color3f(0.2f,0.2f,0.3f));
matt.setShininess(0.5f);
matt.setSpecularColor(new Color3f(0.4f,0.6f,0.9f));
matt.setLightingEnable(true);
origin: stackoverflow.com

scene.compile();
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
BranchGroup lineGroup = new BranchGroup();
Appearance app = new Appearance();
pts[23].x=0.5f;pts[23].y=0.5f;pts[23].z=-0.5f;
normals[20].y=1;normals[21].y=1;normals[22].y=1;normals[23].y=1;
lsa.setNormals(0, normals);
lsa.setCoordinates(0, pts);
Shape3D sh=new Shape3D();
PolygonAttributes pa=new PolygonAttributes();
pa.setPolygonMode(PolygonAttributes.POLYGON_FILL);
pa.setCullFace(PolygonAttributes.CULL_NONE);
Material mat=new Material();
mat.setEmissiveColor(new Color3f(0.5f,0.5f,0.5f));
mat.setAmbientColor(new Color3f(0.1f,0.1f,0.1f));
mat.setDiffuseColor(new Color3f(0.2f,0.3f,0.4f));
mat.setSpecularColor(new Color3f(0.6f,0.3f,0.2f));
mat.setLightingEnable(true);
RenderingAttributes ra=new RenderingAttributes();
ra.setIgnoreVertexColors(true);
ColoringAttributes ca=new ColoringAttributes();
ca.setShadeModel(ColoringAttributes.SHADE_GOURAUD);
ca.setColor(new Color3f(0.2f,0.5f,0.9f));
app.setColoringAttributes(ca);
origin: stackoverflow.com

scene.compile();
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
BranchGroup lineGroup = new BranchGroup();
Appearance app = new Appearance();
ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f,          204.0f), ColoringAttributes.SHADE_FLAT);
app.setColoringAttributes(ca);
pla.setCoordinates(0, plaPts); 
PointAttributes a_point_just_bigger=new PointAttributes();
a_point_just_bigger.setPointSize(10.0f);//10 pixel-wide point
a_point_just_bigger.setPointAntialiasingEnable(true);//now points are sphere-like(not a cube)
app.setPointAttributes(a_point_just_bigger);
TransformGroup objRotate = new TransformGroup();
objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
objRotate.addChild(plShape);
lineGroup.addChild(objRotate);
return lineGroup;
origin: stackoverflow.com

scene.compile();
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
BranchGroup lineGroup = new BranchGroup();
Appearance app = new Appearance();
ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f,          204.0f), ColoringAttributes.SHADE_FLAT);
app.setColoringAttributes(ca);
pla.setCoordinates(0, plaPts);
Shape3D plShape = new Shape3D(pla, app);
TransformGroup objRotate = new TransformGroup();
objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
objRotate.addChild(plShape);
lineGroup.addChild(objRotate);
return lineGroup;
origin: stackoverflow.com

 function Alpha() {
 this.onion = 'onion';

 function Beta() {
  alert(this.onion);
 }

 Beta.call(this);
}

var alpha1 = new Alpha();
// Alerts 'onion'
origin: org.scijava/j3dcore

/**
 * Get the localToVworld transform for a node.
 */
void getLocalToVworld(SceneGraphPath path, Transform3D t) {
  HashKey key = new HashKey("");
  if (inSharedGroup == false) {
  throw new IllegalSharingException(J3dI18N.getString("NodeRetained1"));
  }
  path.validate(key);
computeLocalToVworld(this, this, key, t);
}
origin: org.scijava/j3dcore

/**
 * Retrieves the vertexFormat of this GeometryArray
 * @return format of vertices in this GeometryArray
 * @exception CapabilityNotSetException if the appropriate capability is
 * not set and this object is part of a live or compiled scene graph
 */
public int getVertexFormat() {
if (isLiveOrCompiled())
  if(!this.getCapability(ALLOW_FORMAT_READ))
  throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray2"));
return ((GeometryArrayRetained)this.retained).getVertexFormat();
}
origin: org.scijava/j3dcore

/**
 * Retrieves the back clip distance.
 * @return the current back clip distance, in meters
 */
public double getBackDistance() {
  if (isLiveOrCompiled())
    if(!this.getCapability(ALLOW_BACK_DISTANCE_READ))
      throw new CapabilityNotSetException(J3dI18N.getString("Clip1"));
  return ((ClipRetained)this.retained).getBackDistance();
}
origin: org.scijava/j3dcore

/**
 * Retrieve Reverberation Order
 * @return reverb order
 * @exception CapabilityNotSetException if appropriate capability is
 * not set and this object is part of live or compiled scene graph
 */
public int getReverbOrder() {
  if (!this.getCapability(ALLOW_REVERB_ORDER_READ))
    if (isLiveOrCompiled())
      throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes9"));
  return ((AuralAttributesRetained)this.retained).getReverbOrder();
}
origin: org.scijava/j3dcore

/**
 * Retrieves the width of this image component object.
 * @return the width of this image component object
 * @exception CapabilityNotSetException if appropriate capability is
 * not set and this object is part of live or compiled scene graph
 */
public int getWidth() {
  if (isLiveOrCompiled())
    if(!this.getCapability(ALLOW_SIZE_READ))
     throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent0"));
  return ((ImageComponentRetained)this.retained).getWidth();
}
origin: org.scijava/j3dcore

@Override
public Shader[] getShaders() {
if (isLiveOrCompiled()) {
  if(!this.getCapability(ALLOW_SHADERS_READ)) {
  throw new CapabilityNotSetException(J3dI18N.getString("GLSLShaderProgram1"));
  }
}
 return ((GLSLShaderProgramRetained)this.retained).getShaders();
}
origin: org.scijava/j3dcore

/**
 * Retrieves the current transparencyAttributes object.
 * @return the transparencyAttributes object
 * @exception CapabilityNotSetException if appropriate capability is
 * not set and this object is part of live or compiled scene graph
 */
public TransparencyAttributes getTransparencyAttributes() {
if (isLiveOrCompiled())
 if (!this.getCapability(ALLOW_TRANSPARENCY_ATTRIBUTES_READ))
  throw new CapabilityNotSetException(J3dI18N.getString("Appearance9"));
return ((AppearanceRetained)this.retained).getTransparencyAttributes();
}
origin: org.scijava/j3dcore

/**
 * Retrieves the current texture object.
 * @return the texture object
 * @exception CapabilityNotSetException if appropriate capability is
 * not set and this object is part of live or compiled scene graph
 */
public Texture getTexture() {
if (isLiveOrCompiled())
 if (!this.getCapability(ALLOW_TEXTURE_READ))
  throw new CapabilityNotSetException(J3dI18N.getString("Appearance3"));
return ((AppearanceRetained)this.retained).getTexture();
}
origin: org.scijava/j3dcore

/**
 * Retrieves the height of this depth component object.
 * @return the height of the array of depth values
 * @exception CapabilityNotSetException if appropriate capability is
 * not set and this object is part of live or compiled scene graph
 */
public int getHeight() {
if (isLiveOrCompiled())
 if (!this.getCapability(ALLOW_SIZE_READ))
  throw new CapabilityNotSetException(J3dI18N.getString("DepthComponent0"));
return ((DepthComponentRetained)this.retained).getHeight();
}
origin: org.scijava/j3dcore

@Override
void setLive(boolean inBackgroundGroup, int refCount) {
  // Do illegalSharing check.
  if(getUsedByOffScreen()) {
    throw new IllegalSharingException(J3dI18N.getString("ImageComponent3"));
  }
  super.setLive(inBackgroundGroup, refCount);
}
origin: stackoverflow.com

add("Center", canvas3D);
BranchGroup scene = createSceneGraph();
scene.compile();
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
BranchGroup lineGroup = new BranchGroup();
Appearance app = new Appearance();
Vector3f [] normals=new Vector3f[24];
for(int i=0;i<24;i++)normals[i]=new Vector3f();
pts[23].x=0.5f;pts[23].y=0.5f;pts[23].z=-0.5f;
normals[20].y=1;normals[21].y=1;normals[22].y=1;normals[23].y=1;
Shape3D sh=new Shape3D();
PolygonAttributes pa=new PolygonAttributes();
pa.setPolygonMode(PolygonAttributes.POLYGON_FILL);
pa.setCullFace(PolygonAttributes.CULL_NONE);
Material mat=new Material();
mat.setEmissiveColor(new Color3f(0.5f,0.5f,0.5f));
mat.setAmbientColor(new Color3f(0.1f,0.1f,0.1f));
mat.setDiffuseColor(new Color3f(0.2f,0.3f,0.4f));
mat.setSpecularColor(new Color3f(0.6f,0.3f,0.2f));
mat.setLightingEnable(true);
RenderingAttributes ra=new RenderingAttributes();
ra.setIgnoreVertexColors(true);
ColoringAttributes ca=new ColoringAttributes();
ca.setShadeModel(ColoringAttributes.SHADE_GOURAUD);
ca.setColor(new Color3f(0.2f,0.5f,0.9f));
origin: stackoverflow.com

setLayout(new BorderLayout());
GraphicsConfiguration gc=SimpleUniverse.getPreferredConfiguration();
Canvas3D canvas3D = new Canvas3D(gc);
add("Center", canvas3D);
scene.compile();
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
BranchGroup lineGroup = new BranchGroup();
Appearance app = new Appearance();
ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f,          204.0f), ColoringAttributes.SHADE_FLAT);
app.setColoringAttributes(ca);
PointAttributes a_point_just_bigger=new PointAttributes();
a_point_just_bigger.setPointSize(10.0f);//10 pixel-wide point
a_point_just_bigger.setPointAntialiasingEnable(true);//now points are sphere-like(not a cube)
app.setPointAttributes(a_point_just_bigger);
TransformGroup objRotate = new TransformGroup();
objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
objRotate.addChild(plShape);
lineGroup.addChild(objRotate);
return lineGroup;
origin: stackoverflow.com

 function Alpha() {
 this.onion = 'onion';

 var Beta = function () {
  alert(this.onion);
 }.bind(this);

 Beta();
}

var alpha1 = new Alpha();
// Alerts 'onion'
origin: stackoverflow.com

BackgroundSound mBackgroundSound = new BackgroundSound();
org.scijava.java3d

Most used classes

  • Appearance
    The Appearance object defines all rendering state that can be set as a component object of a Shape3D
  • BranchGroup
    The BranchGroup serves as a pointer to the root of a scene graph branch; BranchGroup objects are the
  • Transform3D
    A generalized transform object represented internally as a 4x4 double-precision floating point matri
  • Shape3D
    The Shape3D leaf node specifies all geometric objects. It contains a list of one or more Geometry co
  • Canvas3D
    The Canvas3D class provides a drawing canvas for 3D rendering. It is used either for on-screen rende
  • PolygonAttributes,
  • RenderingAttributes,
  • TransformGroup,
  • TransparencyAttributes,
  • Alpha,
  • BoundingSphere,
  • ImageComponent2D,
  • LineArray,
  • LineAttributes,
  • Material,
  • Node,
  • PointAttributes,
  • QuadArray,
  • RotationInterpolator
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