|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.DefaultGeometrySearch
public abstract class DefaultGeometrySearch
Default implementation of GeometrySearch
interface.
Field Summary |
---|
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, reg, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
DefaultGeometrySearch()
|
Method Summary | |
---|---|
boolean |
buildDirectory(int entity,
int ctx)
Builds the whole data structure (directory) from scratch. |
BrepIterator |
centerPass(double[] center,
double radius,
BrepIterator pre)
Initializes a new center pass. |
double |
finishedSegment(BrepIterator iter)
Returns end value (coordinate) of already finished pass-segment. |
double |
getProgress(BrepIterator iter,
int[] count)
Returns progress parameters of the given pass. |
int |
getStatistics(long[] counters)
Returns (and resets) counters (for statistics, profiling). |
void |
insertObject(int handle)
Inserts another object into the directory. |
BrepIterator |
intervalQuery(double[] min,
double[] max,
BrepIterator pre)
Initializes a new interval query for floating-point coordinates. |
BrepIterator |
intervalQuery(int[] min,
int[] max,
BrepIterator pre)
Initializes a new interval query for integer coordinates. |
int |
localize(double[] coord)
Localizes the given point - finds the object which contains it (first of such objects). |
int |
localize(int[] coord)
Localizes the given point - finds the object which contains it (first of such objects). |
boolean |
optimizeDirectory()
Optimizes the data structure (directory). |
BrepIterator |
rayPass(double[] start,
double[] direction,
BrepIterator pre)
Initializes a new ray-casting pass. |
boolean |
removeObject(int handle)
Removes the given object from the directory. |
boolean |
resetDirectory(int entity,
int ctx)
(Re-)initializes the data structure (directory). |
BrepIterator |
sweepPass(double[] plane,
double[] origin,
BrepIterator pre)
Initializes a new sweep-plane pass. |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplate, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, get, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit, get, set |
Constructor Detail |
---|
public DefaultGeometrySearch()
Method Detail |
---|
public boolean buildDirectory(int entity, int ctx)
buildDirectory
in interface GeometrySearch
entity
- Type of stored entities (VERTEX
, EDGE
or
FACE
from Brep
).ctx
- Handle to the used Brep
-context.
true
if this service is implemented.resetDirectory(int, int)
,
optimizeDirectory()
,
Brep.VERTEX
,
Brep.EDGE
,
Brep.SOLID
public boolean resetDirectory(int entity, int ctx)
resetDirectory
in interface GeometrySearch
entity
- Type of stored entities (VERTEX
, EDGE
or
FACE
from Brep
).ctx
- Handle to the used Brep
-context.
true
if this service is implemented.buildDirectory(int, int)
,
optimizeDirectory()
,
Brep.VERTEX
,
Brep.EDGE
,
Brep.SOLID
public void insertObject(int handle)
resetDirectory(int, int)
.
insertObject
in interface GeometrySearch
handle
- Handle to an inserted object (its entity type and context
were defined in advance).resetDirectory(int, int)
public boolean removeObject(int handle)
removeObject
in interface GeometrySearch
handle
- Handle to a removed object (its entity type and context
were defined in advance).
true
if this service is implemented and if the object was
successfully removed.resetDirectory(int, int)
public boolean optimizeDirectory()
optimizeDirectory
in interface GeometrySearch
true
if this service is implemented.buildDirectory(int, int)
,
resetDirectory(int, int)
public int localize(int[] coord)
localize
in interface GeometrySearch
coord
- Coordinate vector of the localized point.
NULL
if not found (or the service is
not implemented).localize(double[])
public int localize(double[] coord)
localize
in interface GeometrySearch
coord
- Coordinate vector of the localized point.
NULL
if not found (or the service is
not implemented).localize(int[])
public BrepIterator intervalQuery(int[] min, int[] max, BrepIterator pre)
intervalQuery
in interface GeometrySearch
min
- Coordinate vector of minimum-vertex.max
- Coordinate vector of maximum-vertex. Non-mandatory ?pre
- Pre-allocated BrepIterator
object (can be null
).
intervalQuery(double[],double[],BrepIterator)
,
getProgress(cz.cuni.jagrlib.iface.BrepIterator, int[])
public BrepIterator intervalQuery(double[] min, double[] max, BrepIterator pre)
intervalQuery
in interface GeometrySearch
min
- Coordinate vector of minimum-vertex.max
- Coordinate vector of maximum-vertex. Non-mandatory ?pre
- Pre-allocated BrepIterator
object (can be null
).
intervalQuery(int[],int[],BrepIterator)
,
getProgress(cz.cuni.jagrlib.iface.BrepIterator, int[])
public BrepIterator rayPass(double[] start, double[] direction, BrepIterator pre)
rayPass
in interface GeometrySearch
start
- Starting point of the ray.direction
- Direction vector of the ray.pre
- Pre-allocated BrepIterator
object (can be null
).
getProgress(cz.cuni.jagrlib.iface.BrepIterator, int[])
public BrepIterator centerPass(double[] center, double radius, BrepIterator pre)
centerPass
in interface GeometrySearch
center
- Center of a pass.radius
- Maximum radius to be searched.pre
- Pre-allocated BrepIterator
object (can be null
).
getProgress(cz.cuni.jagrlib.iface.BrepIterator, int[])
public BrepIterator sweepPass(double[] plane, double[] origin, BrepIterator pre)
sweepPass
in interface GeometrySearch
plane
- (Oriented) normal vector of the sweep-plane.origin
- Starting point of a pass.pre
- Pre-allocated BrepIterator
object (can be null
).
getProgress(cz.cuni.jagrlib.iface.BrepIterator, int[])
public double finishedSegment(BrepIterator iter)
finishedSegment
in interface GeometrySearch
iter
- Pass data.
public double getProgress(BrepIterator iter, int[] count)
getProgress
in interface GeometrySearch
iter
- Pass data.count
- Array to hold two counters: count[0]
.. number of objects
yet passed, count[1]
.. total number of objects
relevant to this pass (non-mandatory). Can be null
.
public int getStatistics(long[] counters)
counters[0] .. number of point-to-point distance calculations.
counters[1] .. number of point-to-box distance calculations.
counters[2] .. number of log(N) heap operations.
getStatistics
in interface GeometrySearch
counters
- Array to hold result. If null
functions returns required length.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |