Codota Logo
Shape3D.intersect
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain Shape3D
private void myMethod () {
Shape3D s =
  • Codota Iconnew Shape3D()
  • Smart code suggestions by Codota
}
origin: org.scijava/j3dcore

/**
 * Checks whether the geometry in this shape node intersects with
 * the specified pickShape.
 *
 * @param path the SceneGraphPath to this shape node
 * @param pickShape the PickShape to be intersected
 *
 * @return true if the pick shape intersects this node; false
 * otherwise.
 *
 * @exception IllegalArgumentException if pickShape is a PickPoint.
 * Java 3D doesn't have spatial information of the surface.
 * Use PickBounds with BoundingSphere and a small radius, instead.
 *
 * @exception CapabilityNotSetException if the Geometry.ALLOW_INTERSECT
 * capability bit is not set in all of the Geometry objects
 * referred to by this shape node.
 */
public boolean intersect(SceneGraphPath path, PickShape pickShape) {
return intersect(path, pickShape, null);
}
origin: org.scijava/j3dutils

private SceneGraphPath pickGeomAny(int xpos, int ypos)
 {
  Node obj;
  int i;
  pickRay = (PickRay) generatePickRay(xpos, ypos);
  sceneGraphPathArr = pickRoot.pickAll(pickRay);
  for(i=0; i<sceneGraphPathArr.length; i++) {
   obj = sceneGraphPathArr[i].getObject();
 if(obj instanceof Shape3D) {
  if(((Shape3D) obj).intersect(sceneGraphPathArr[i],(PickShape) pickRay))
   return sceneGraphPathArr[i];
 } else if(obj instanceof Morph) {
  if(((Morph) obj).intersect(sceneGraphPathArr[i],(PickShape) pickRay))
   return sceneGraphPathArr[i];
 }
  }
  return null;
 }
origin: org.scijava/j3dutils

  obj = sceneGraphPathArr[i].getObject();
if(obj instanceof Shape3D) {
 found[i] = ((Shape3D) obj).intersect(sceneGraphPathArr[i],
            (PickShape) pickRay);
} else if(obj instanceof Morph) {
origin: org.scijava/j3dutils

private PickResult pickGeomAny (PickShape pickShape) {
Node obj = null;
int i;
SceneGraphPath[] sgpa = null;
if (pickRootBG != null) {
  sgpa = pickRootBG.pickAll(pickShape);
} else if (pickRootL != null) {
  sgpa = pickRootL.pickAll(pickShape);
}
if (sgpa == null) return null; // no match
for(i=0; i<sgpa.length; i++) {
  obj = sgpa[i].getObject();
  PickResult pr = new PickResult(sgpa[i], pickShape);
  if(obj instanceof Shape3D) {
  if(((Shape3D) obj).intersect(sgpa[i], pickShape)) {
    return pr;
  }
  } else if (obj instanceof Morph) {
  if(((Morph) obj).intersect(sgpa[i], pickShape)){
    return pr;
  }
  }
}
return null;
}
origin: org.scijava/j3dutils

found[i] = ((Shape3D) obj[i]).intersect(sgp[i], pickShape);
} else if (obj[i] instanceof Morph) {
found[i] = ((Morph) obj[i]).intersect(sgp[i], pickShape);
origin: org.scijava/j3dutils

  obj = sceneGraphPathArr[i].getObject();
if(obj instanceof Shape3D) {
 found[i] = ((Shape3D) obj).intersect(sceneGraphPathArr[i],
            pickRay, dist);
 distArr[i] = dist[0];
origin: org.scijava/j3dutils

pr[i] = new PickResult (sgp[i], pickShape);
if (obj[i] instanceof Shape3D) {
found[i] = ((Shape3D)obj[i]).intersect(sgp[i], pickShape,
            dist);
distArr[i] = dist[0];
org.scijava.java3dShape3Dintersect

Javadoc

Checks whether the geometry in this shape node intersects with the specified pickRay.

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
  • setGeometry
    Replaces the geometry component at the specified index in this Shape3D node's list of geometry compo
  • 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

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setContentView (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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