org.jcae.viewer3d.fd
Class CellManager
java.lang.Object
org.jcae.viewer3d.fd.CellManager
public class CellManager
- extends java.lang.Object
Keep track of selected cell and of geometry overlay used to represent
the selection.
The main algorithmic task of this class is to convert floating coordinates
to a cell id.
|
Method Summary |
FDSelection[] |
getSelection()
return the current selection. 1 FDSelection for each Domain. |
boolean |
isSlotSelected(byte type,
int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
boolean |
isXWireSelected(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
boolean |
isYWireSelected(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
boolean |
isZWireSelected(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
javax.media.j3d.LineArray |
selectSlot(byte type,
int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
javax.media.j3d.Geometry |
selectXWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
javax.media.j3d.Geometry |
selectYWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
javax.media.j3d.Geometry |
selectZWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
void |
unselectAll()
|
javax.media.j3d.Geometry |
unselectSlot(byte type,
int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
javax.media.j3d.Geometry |
unselectXWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
javax.media.j3d.Geometry |
unselectYWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
javax.media.j3d.Geometry |
unselectZWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CellManager
public CellManager(FDProvider provider)
- Parameters:
provider - a FDProvider used to get FD grid
getSelection
public FDSelection[] getSelection()
- return the current selection. 1 FDSelection for each Domain.
isSlotSelected
public boolean isSlotSelected(byte type,
int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
a - FDDomain.XX_SLOT valuedomainId - value - The ID of the slot ownin the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a boolean representing the selected Cell.
selectSlot
public javax.media.j3d.LineArray selectSlot(byte type,
int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
a - FDDomain.XX_SLOT valuedomainId - value - The ID of the slot ownin the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
isXWireSelected
public boolean isXWireSelected(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
selectXWire
public javax.media.j3d.Geometry selectXWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
isYWireSelected
public boolean isYWireSelected(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
selectYWire
public javax.media.j3d.Geometry selectYWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
isZWireSelected
public boolean isZWireSelected(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
selectZWire
public javax.media.j3d.Geometry selectZWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
unselectSlot
public javax.media.j3d.Geometry unselectSlot(byte type,
int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
a - FDDomain.XX_SLOT valuedomainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected slotpoint - The coordinates of the picked point
- Returns:
- The LineArray previously returned by selectSlot
unselectAll
public void unselectAll()
unselectXWire
public javax.media.j3d.Geometry unselectXWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected wirepoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
unselectYWire
public javax.media.j3d.Geometry unselectYWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected wirepoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.
unselectZWire
public javax.media.j3d.Geometry unselectZWire(int domainId,
int value,
javax.vecmath.Point3d[] cds,
javax.vecmath.Point3d point)
- Parameters:
domainId - value - The ID of the wire owning the selected cellcds - The coordinates of the selected wirepoint - The coordinates of the picked point
- Returns:
- a LineArray representing the selected Cell.