|
||||||||||
| 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.testing.DepthSort
public class DepthSort
Depth-sorting example - incorrect behavior for general scenes with large faces.
| Nested Class Summary | |
|---|---|
protected class |
DepthSort.Face
Sorted-set item ( Brep face). |
| Field Summary | |
|---|---|
protected int[] |
arr
Pre-computed face ordering. |
protected int |
attrCoords
Accelerator: projected coordinates. |
protected static java.lang.String |
CATEGORY
Object category. |
protected java.lang.String |
coordsName
Brep-attribute name holding projected coordinates. |
protected int |
ctx
Actual Brep context to sort. |
protected Brep |
data
Accelerator: Brep database. |
protected int |
n
Index to arr - item to be returned next. |
static RegPiece |
reg
Static registration instance for this class. |
protected int |
sortOrder
Actual sort order. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected double[] |
vc
Tmp: vertex coordinate. |
protected BrepIterator |
vit
Tmp: vertices-in-face iterator. |
| Fields inherited from class cz.cuni.jagrlib.Piece |
|---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
| Fields inherited from interface cz.cuni.jagrlib.iface.BrepIterator |
|---|
CONTEXT, PROJ_COORDS, SORT_ASCENDING, SORT_DESCENDING, SORT_ORDER |
| Fields inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
| Constructor Summary | |
|---|---|
DepthSort()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
int |
left()
How many items remain in the set? |
int |
next()
Returns id of the next object. |
void |
reset()
Reset the iterator. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
protected boolean |
sort()
Precomputes the ordering, returns true if failed. |
int[] |
toArray(int[] pre)
Fills the provided array by all items (pre-allocated array could be null
or too small - in these cases new one will be created). |
| 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, setTemplateDynamic, stop |
| Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
|---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, 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 |
| Field Detail |
|---|
protected int sortOrder
protected int ctx
Brep context to sort.
protected java.lang.String coordsName
Brep-attribute name holding projected coordinates.
protected int attrCoords
protected Brep data
protected double[] vc
protected BrepIterator vit
protected int[] arr
protected int n
arr - item to be returned next.
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
| Constructor Detail |
|---|
public DepthSort()
| Method Detail |
|---|
protected boolean sort()
true if failed.
public void reset()
reset in interface BrepIteratorpublic int next()
next in interface BrepIteratorBrep.NULL if there is no next object available.public int[] toArray(int[] pre)
null
or too small - in these cases new one will be created).
End of the data is marked using Brep.NULL.
toArray in interface BrepIteratorpublic int left()
Brep.NULL if not implemented.
left in interface BrepIterator
public void set(java.lang.String key,
java.lang.Object value)
set in interface Propertyset in class DefaultPropertykey - Key string.value - The new value.Property.commit()public java.lang.Object get(java.lang.String key)
get in interface Propertyget in class DefaultPropertykey - Key string.
null.
public static int setTemplate(Template t,
int ord)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||