|
||||||||||
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.piece.VEFDS
public class VEFDS
Boundary representation (B-rep) of 3D scene - implemented by simple arrays. Restricted mode uses triangle faces only, general mode could contain arbitrary simple polygons as faces.
Vertices, edges, faces, divisions and solids (Vs, Es, Fs, Ds, Ss) are represented by their handles (integer indices). Arbitrary attributes can be associated with Vs, Es, Fs, Ds or Ss by the user. Implicit attribute: vertex coordinates. Attributes are accessed by string identifiers or integer shortcuts.
More than one context can be used (e.g. for different scene views, rendering modes). Handles (indices) are shared among all contexts, some attributes can be shared, too.
Nested Class Summary | |
---|---|
protected class |
VEFDS.Attribute
Internal attribute representation. |
protected static class |
VEFDS.AttrKey
Attribute key - [ entity, context, ident ] compound. |
protected class |
VEFDS.DivisionIterator
Iterator for all divisions in the scene. |
protected class |
VEFDS.EdgeInFaceIterator
Iterator for edges in the given face. |
protected class |
VEFDS.EdgeIterator
Iterator for all edges in the scene. |
protected class |
VEFDS.FaceInSolidIterator
Iterator for faces in the given solid. |
protected class |
VEFDS.FaceIterator
Iterator for all faces in the scene. |
protected static class |
VEFDS.MapAttr
Support class - attribute map. |
protected class |
VEFDS.SolidIterator
Iterator for all solids in the scene. |
protected class |
VEFDS.VertexInFaceIterator
Iterator for vertices in the given face. |
protected class |
VEFDS.VertexIterator
Iterator for all vertices in the scene. |
Field Summary | |
---|---|
protected IntMap<VEFDS.Attribute> |
attributes
Global attribute map: handle -> Attribute . attributes-allocated. |
protected VEFDS.MapAttr |
attrMap
Attribute mappings (global, context, vertex, edge, face, division, solid -associated). |
protected static java.lang.String |
CATEGORY
Object category. |
protected boolean |
dirty
Coordinate types or edge mode were changed since the last init() . |
protected int |
edgeSize
Edge-record size ( Brep.WEDGE_SIZE in winged-edge mode). |
protected static int |
MIN_ARRAY
Minimum attribute-array length. |
protected int |
primaryProjType
Type of projected coordinate attribute COORD_PROJ . |
protected int |
primaryType
Type of primary coordinate attribute COORD . |
static RegPiece |
reg
Static registration instance for this class. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected int[] |
used
Number of actually used vertex, edge, face, division and solid handles (granul-allocated). |
protected java.util.BitSet |
usedContexts
Bit-mask of used context IDs. |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.Brep |
---|
ATTR_BOOLEAN, ATTR_COORD_2D, ATTR_COORD_2F, ATTR_COORD_2I, ATTR_COORD_3D, ATTR_COORD_3F, ATTR_COORD_3I, ATTR_COORDH_3D, ATTR_COORDH_3F, ATTR_COORDH_4D, ATTR_COORDH_4F, ATTR_DOUBLE, ATTR_FLOAT, ATTR_INTEGER, ATTR_LAST, ATTR_LONG, ATTR_OBJECT, ATTR_RGB_3F, ATTR_RGBA_4F, COLOR, CONTEXT, COORD, COORD_PROJ, CTX_DEFAULT, DATA, DIVISION, EDGE, EDGE_SIZE, ERROR, FACE, MATERIAL_A, NORMAL, NULL, PRIMARY_COORD_TYPE, PROJECTED_COORD_TYPE, SCENE, SOLID, SOLID_A, TEXTURE_0, TEXTURE_1, TEXTURE_2, TEXTURE_3, VERTEX, WEDGE_FL, WEDGE_FR, WEDGE_LN, WEDGE_LP, WEDGE_MODE, WEDGE_RN, WEDGE_RP, WEDGE_SIZE, WEDGE_V1, WEDGE_V2 |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
VEFDS()
|
Method Summary | |
---|---|
protected void |
adjustAttributes(int where,
int len)
Adjusts attribute-array lengths for the given entity. |
static int[] |
arrayAppend(int[] arr,
int item)
Appends the given integer to the 1-allocated array. |
int |
assertEdge(int v1,
int v2,
int face)
Finds an edge from its vertices. |
void |
commit()
Commits all previous changes to the internal object state. |
int |
copyAttribute(int attrFrom,
int ctx)
Copies the existing scene attribute to a new one (preserves attribute association / where /, type and identifier string /ident /). |
int |
copyAttribute(int attrFrom,
int ctx,
java.lang.String ident)
Copies the existing scene attribute to a new one (preserves attribute association / where / and type ). |
void |
copyCoordinates(int attrFrom,
int attrTo,
java.util.BitSet set)
Copies data from coordinate-attribute to another one. |
int |
copyCoordinates(int attrFrom,
int ctxTo,
java.lang.String identTo)
Copies data from coordinate-attribute to another one. |
int |
createAttribute(int where,
int ctx,
java.lang.String ident,
int type)
Creates a new scene attribute. |
int |
createContext(int ctxFrom)
Creates a new scene context (can be pre-initialized from one of existing contexts). |
int |
createDivision(int ctx)
Creates a new division (in the given context). |
int |
createEdge()
Creates a new edge. |
int |
createFace()
Creates a new face. |
int |
createSolid(int ctx)
Creates a new solid (in the given context). |
int |
createVertex()
Creates a new vertex. |
BrepIterator |
divisionInSolidIterator(int ctx,
int solid,
BrepIterator pre)
Initializes iterator for divisions within the given solid. |
BrepIterator |
divisionIterator(int ctx,
BrepIterator pre)
Initializes iterator for all divisions in the scene. |
BrepIterator |
edgeInFaceIterator(int face,
BrepIterator pre)
Initializes iterator for edges within the given face. |
BrepIterator |
edgeIterator(BrepIterator pre)
Initializes iterator for all edges in the scene. |
BrepIterator |
faceInSolidIterator(int ctx,
int solid,
BrepIterator pre)
Initializes iterator for faces within the given solid. |
BrepIterator |
faceIterator(int ctx,
BrepIterator pre)
Initializes iterator for all faces in the scene. |
protected double[] |
fetch(VEFDS.Attribute a,
int id,
double[] pre)
Fetches double[] value from the given Attribute . |
protected float[] |
fetch(VEFDS.Attribute a,
int id,
float[] pre)
Fetches float[] value from the given Attribute . |
protected int[] |
fetch(VEFDS.Attribute a,
int id,
int[] pre)
Fetches int[] value from the given Attribute . |
protected java.lang.Object |
fetch(VEFDS.Attribute a,
int id,
java.lang.Object pre)
Fetches one data item from the given Attribute . |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
int |
getAllDivisions(int ctx,
int[] div)
Returns all division handles in the given context of the database. |
int |
getAllEdges(int ctx,
int[] edge)
Returns all edge handles in the given context of the database. |
int |
getAllEdgeVertices(int ctx,
int[] vert)
Returns vertex handles of all edges in the given context of the database. |
int |
getAllFaces(int ctx,
int[] face)
Returns all face handles in the given context of the database. |
int |
getAllSolids(int ctx,
int[] solid)
Returns all solid handles in the given context of the database. |
int |
getAllTriangleEdges(int ctx,
int[] edge)
Returns edge handles of all triangles in the given context of the database. |
int |
getAllTriangleVertices(int ctx,
int[] vert)
Returns vertex handles of all triangles in the given context of the database. |
int |
getAllVertexCoords(int attr,
int dim,
double[] coord)
Returns all floating-point vertex-coordinates in the database (Cartesian or homogeneous). |
int |
getAllVertexCoords(int attr,
int dim,
float[] coord)
Returns all floating-point vertex-coordinates in the database (Cartesian or homogeneous). |
int |
getAllVertexCoords(int attr,
int dim,
int[] coord)
Returns all integer vertex-coordinates in the database (Cartesian - 2D or 3D). |
int |
getAllVertices(int[] vert)
Returns all vertex handles in the database. |
double[] |
getAttribute(int attr,
int id,
double[] coord)
Retrieves value of the given coordinate-attribute for the given entity (for double coordinate types). |
float[] |
getAttribute(int attr,
int id,
float[] coord)
Retrieves value of the given coordinate-attribute for the given entity (for float [coordinate] types). |
int[] |
getAttribute(int attr,
int id,
int[] coord)
Retrieves value of the given coordinate-attribute for the given entity (for int coordinate types). |
java.lang.Object |
getAttribute(int attr,
int id,
java.lang.Object pre)
Retrieves value of the given attribute for the given entity (general form). |
java.lang.Object |
getAttribute(int where,
int ctx,
java.lang.String ident,
int id,
java.lang.Object pre)
Retrieves value of the given attribute for the given entity (general form). |
int |
getAttributeContext(int attr)
Return a context of the given attribute (for non-shared attributes only). |
int |
getAttributeId(int where,
int ctx,
java.lang.String ident)
Finds a handle of the given scene attribute. |
java.lang.String |
getAttributeIdent(int attr)
Returns a string identifier of the given attribute. |
int |
getAttributeType(int attr)
Returns a type of the given attribute. |
int |
getAttributeWhere(int attr)
Return a where parameter of the given attribute (entity which the attribute
is associated with). |
boolean |
getBoolAttribute(int attr,
int id)
Retrieves value of the given flag-attribute for the given entity (for boolean attribute type). |
int |
getDivisionFaces(int ctx,
int div,
int[] up,
int[] down)
Returns face handles of the given division. |
double |
getDoubleAttribute(int attr,
int id)
Retrieves value of the given float-attribute for the given entity (for double attribute type). |
int[] |
getEdgeRecord(int edge,
int[] index)
Returns record of the given edge (useful particularly for winged-edges). |
int[] |
getEdgeVertices(int edge,
int[] vert)
Returns vertex handles of the given edge. |
int |
getFaceEdges(int face,
int[] edge)
Returns edge handles of the given face. |
int |
getFaceVertices(int face,
int[] vert)
Returns vertex handles of the given face. |
float |
getFloatAttribute(int attr,
int id)
Retrieves value of the given float-attribute for the given entity (for float attribute type). |
protected static int |
getGranulLength(int len)
Returns granul-based array length. |
int |
getIntAttribute(int attr,
int id)
Retrieves value of the given integer-attribute for the given entity (for int attribute type). |
long |
getLongAttribute(int attr,
int id)
Retrieves value of the given integer-attribute for the given entity (for long attribute type). |
int |
getSolidFaces(int ctx,
int solid,
int[] face)
Returns face handles of the given solid. |
double[] |
getVertexCoords(int ctx,
int vert,
double[] coord)
Returns floating-point coordinates of the given vertex (implicit attribute COORD ). |
float[] |
getVertexCoords(int ctx,
int vert,
float[] coord)
Returns floating-point coordinates of the given vertex (implicit attribute COORD ). |
int[] |
getVertexCoords(int ctx,
int vert,
int[] coord)
Returns integer coordinates of the given vertex (implicit attribute COORD_PROJ ) (Cartesian 2D or 3D). |
void |
init()
Database (re-)initialization. |
protected int |
insertAttribute(VEFDS.Attribute a)
Assigns an attribute-handle to the new attribute. |
void |
insertFaceIntoSolid(int ctx,
int solid,
int face)
Inserts another face handle into the given solid. |
int |
nextItem(BrepIterator iter)
Returns the next entity-handle. |
void |
removeAttribute(int attr)
Removes the given scene attribute. |
void |
removeContext(int ctx)
Removes an existing scene context. |
void |
resetSolid(int ctx,
int solid)
Resets the given solid. |
int |
roundCoordinates(int attrFrom,
int ctxTo,
java.lang.String identTo,
TrMatrix tr)
Transforms data from coordinate-attribute to another one. |
void |
roundCoordinates(int attrFrom,
int attrTo,
TrMatrix tr,
java.util.BitSet set)
Transforms data from coordinate-attribute to another one. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
void |
setAttribute(int attr,
int id,
java.lang.Object val)
Sets value of the given attribute of the given entity (general form). |
void |
setCoordTypes(int baseType,
int baseProjType)
Set default coordinate types. |
void |
setDivisionFaces(int ctx,
int div,
int[] up,
int[] down)
Sets face handles of the given division. |
void |
setEdgeMode(boolean wedge)
Set winged-edge mode. |
void |
setEdgeVertices(int edge,
int v1,
int v2)
Sets vertex handles of the given edge. |
void |
setFaceEdges(int face,
int[] edge)
Sets edge handles of the given face. |
void |
setFaceVertices(int face,
int[] vert)
Sets vertex handles of the given face. |
void |
setSolidFaces(int ctx,
int solid,
int[] face)
Sets face handles of the given solid. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
setTriangleEdges(int face,
int e1,
int e2,
int e3)
Sets edge handles of the given triangle. |
void |
setTriangleVertices(int face,
int v1,
int v2,
int v3)
Sets vertex handles of the given triangle. |
void |
setVertexCoords(int ctx,
int vert,
double[] coord)
Sets floating-point coordinates of the given vertex (implicit attribute COORD ) (Cartesian or homogeneous). |
void |
setVertexCoords(int ctx,
int vert,
float[] coord)
Sets floating-point coordinates of the given vertex (implicit attribute COORD ) (Cartesian or homogeneous). |
void |
setVertexCoords(int ctx,
int vert,
int[] coord)
Sets integer coordinates of the given vertex (implicit attribute COORD_PROJ ) (Cartesian 2D or 3D). |
BrepIterator |
solidIterator(BrepIterator pre)
Initializes iterator for all solids in the scene. |
protected void |
store(VEFDS.Attribute a,
int id,
java.lang.Object val)
Stores one data item into the given Attribute . |
int |
transformCoordinates(int attrFrom,
int ctxTo,
java.lang.String identTo,
TrMatrix tr)
Transforms data from coordinate-attribute to another one. |
void |
transformCoordinates(int attrFrom,
int attrTo,
TrMatrix tr,
java.util.BitSet set)
Transforms data from coordinate-attribute to another one. |
BrepIterator |
vertexInFaceIterator(int face,
BrepIterator pre)
Initializes iterator for vertices within the given face. |
BrepIterator |
vertexIterator(BrepIterator pre)
Initializes iterator for all vertices in the scene. |
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, 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 |
Field Detail |
---|
protected static final int MIN_ARRAY
protected final VEFDS.MapAttr attrMap
protected final int[] used
protected final IntMap<VEFDS.Attribute> attributes
-> Attribute
. attributes-allocated.
protected final java.util.BitSet usedContexts
protected int primaryType
COORD
.
protected int primaryProjType
COORD_PROJ
.
protected int edgeSize
Brep.WEDGE_SIZE
in winged-edge mode).
protected boolean dirty
init()
.
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public VEFDS()
Method Detail |
---|
protected static final int getGranulLength(int len)
len
- Required array length.
protected void adjustAttributes(int where, int len)
where
- The entity code.len
- New length of an entity-array.protected int insertAttribute(VEFDS.Attribute a)
protected void store(VEFDS.Attribute a, int id, java.lang.Object val)
Attribute
.
a
- The attribute which data will be stored to.id
- Entity handle (array index).val
- Attribute value.protected java.lang.Object fetch(VEFDS.Attribute a, int id, java.lang.Object pre)
Attribute
.
a
- The attribute which data will be fetched from.id
- Entity handle (array index).pre
- Pre-allocated result object (can be null
).
protected int[] fetch(VEFDS.Attribute a, int id, int[] pre)
int[]
value from the given Attribute
.
a
- The attribute which data will be fetched from.id
- Entity handle (array index).pre
- Pre-allocated result object (can be null
).
protected float[] fetch(VEFDS.Attribute a, int id, float[] pre)
float[]
value from the given Attribute
.
a
- The attribute which data will be fetched from.id
- Entity handle (array index).pre
- Pre-allocated result object (can be null
).
protected double[] fetch(VEFDS.Attribute a, int id, double[] pre)
double[]
value from the given Attribute
.
a
- The attribute which data will be fetched from.id
- Entity handle (array index).pre
- Pre-allocated result object (can be null
).
public static final int[] arrayAppend(int[] arr, int item)
public int assertEdge(int v1, int v2, int face)
public void setCoordTypes(int baseType, int baseProjType)
setCoordTypes
in interface Brep
baseType
- Base type for the COORD
attribute.baseProjType
- Base type for the COORD_PROJ
(projected) attribute.public void setEdgeMode(boolean wedge)
false
(don't use winged edge).
setEdgeMode
in interface Brep
wedge
- Winged-edges will be used?getEdgeRecord(int, int[])
,
Brep.WEDGE_SIZE
public void init()
init
in interface Brep
public int createContext(int ctxFrom)
createContext
in interface Brep
ctxFrom
- Context handle for initialization (non-mandatory parameter -
can be NULL
).
copyAttribute(int,int,String)
,
copyAttribute(int,int)
,
removeContext(int)
public void removeContext(int ctx)
Brep.CTX_DEFAULT
cannot be removed.
removeContext
in interface Brep
ctx
- Handle to a context to be destroyed.createContext(int)
public int createAttribute(int where, int ctx, java.lang.String ident, int type)
createAttribute
in interface Brep
where
- Entity which a new attribute will be associated with (VERTEX
,
EDGE
, ..).ctx
- Handle to a context (can be NULL
for shared attributes).ident
- String identifier of the attribute.type
- Attribute type (ATTR_*
constant).
copyAttribute(int,int,String)
,
copyAttribute(int,int)
,
removeAttribute(int)
,
copyCoordinates(int,int,String)
,
roundCoordinates(int,int,String,TrMatrix)
,
transformCoordinates(int,int,String,TrMatrix)
public int copyAttribute(int attrFrom, int ctx, java.lang.String ident)
where
/ and type
).
copyAttribute
in interface Brep
attrFrom
- Handle to a source attribute.ctx
- Handle to a context (cannot be NULL
).ident
- String identifier of the attribute.
createAttribute(int, int, java.lang.String, int)
,
copyAttribute(int,int)
,
removeAttribute(int)
,
copyCoordinates(int,int,String)
,
roundCoordinates(int,int,String,TrMatrix)
,
transformCoordinates(int,int,String,TrMatrix)
public final int copyAttribute(int attrFrom, int ctx)
where
/, type
and identifier string /ident
/).
copyAttribute
in interface Brep
attrFrom
- Handle to a source attribute.ctx
- Handle to a context (cannot be NULL
).
createAttribute(int, int, java.lang.String, int)
,
copyAttribute(int,int,String)
,
removeAttribute(int)
,
copyCoordinates(int,int,String)
,
roundCoordinates(int,int,String,TrMatrix)
,
transformCoordinates(int,int,String,TrMatrix)
public void removeAttribute(int attr)
removeAttribute
in interface Brep
attr
- Handle to an attribute.copyAttribute(int,int,String)
,
copyAttribute(int,int)
,
createAttribute(int, int, java.lang.String, int)
public final int getAttributeId(int where, int ctx, java.lang.String ident)
getAttributeId
in interface Brep
where
- Entity which the attribute is associated with (VERTEX
,
EDGE
, ..).ctx
- Handle to a context (can be NULL
for shared attributes).ident
- String identifier of the attribute.
public final int getAttributeWhere(int attr)
where
parameter of the given attribute (entity which the attribute
is associated with).
getAttributeWhere
in interface Brep
attr
- Handle to the attribute.
where
parameter.public final int getAttributeContext(int attr)
getAttributeContext
in interface Brep
attr
- Handle to the attribute.
NULL
).public final java.lang.String getAttributeIdent(int attr)
getAttributeIdent
in interface Brep
attr
- Handle to the attribute.
null
if failed).public final int getAttributeType(int attr)
type
of the given attribute.
getAttributeType
in interface Brep
attr
- Handle to the attribute.
type
parameter.public final java.lang.Object getAttribute(int where, int ctx, java.lang.String ident, int id, java.lang.Object pre)
getAttribute
in interface Brep
where
- Entity which the attribute is associated with (VERTEX
,
EDGE
, ..).ctx
- Handle to a context (can be NULL
for shared attributes).ident
- String identifier of the attribute.id
- Handle to the entity.pre
- Pre-allocated result object (can be null
).
public final java.lang.Object getAttribute(int attr, int id, java.lang.Object pre)
getAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.pre
- Pre-allocated result object (can be null
).
public final void setAttribute(int attr, int id, java.lang.Object val)
setAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.val
- New attribute value (can be null
).public final float[] getAttribute(int attr, int id, float[] coord)
float
[coordinate] types).
getAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.coord
- Optional pre-allocated result array.
coord
if possible).public final double[] getAttribute(int attr, int id, double[] coord)
double
coordinate types).
getAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.coord
- Optional pre-allocated result array.
coord
if possible).public int[] getAttribute(int attr, int id, int[] coord)
int
coordinate types).
getAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.coord
- Optional pre-allocated result array.
coord
if possible).public boolean getBoolAttribute(int attr, int id)
boolean
attribute type).
getBoolAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.
public int getIntAttribute(int attr, int id)
int
attribute type).
getIntAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.
public long getLongAttribute(int attr, int id)
long
attribute type).
getLongAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.
public double getDoubleAttribute(int attr, int id)
double
attribute type).
getDoubleAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.
public float getFloatAttribute(int attr, int id)
float
attribute type).
getFloatAttribute
in interface Brep
attr
- Handle to the attribute.id
- Handle to the entity.
public int copyCoordinates(int attrFrom, int ctxTo, java.lang.String identTo)
copyCoordinates
in interface Brep
attrFrom
- Handle to a source coordinate attribute.ctxTo
- Handle to a context (can be NULL
for shared attributes).identTo
- String identifier of the attribute.
createAttribute(int, int, java.lang.String, int)
,
roundCoordinates(int,int,String,TrMatrix)
,
transformCoordinates(int,int,String,TrMatrix)
public void copyCoordinates(int attrFrom, int attrTo, java.util.BitSet set)
copyCoordinates
in interface Brep
attrFrom
- Handle to a source coordinate attribute.attrTo
- Handle to a destination coordinate attribute.set
- Entity handle-set (for null
everything will be copied).createAttribute(int, int, java.lang.String, int)
,
roundCoordinates(int,int,TrMatrix,BitSet)
,
transformCoordinates(int,int,TrMatrix,BitSet)
public int roundCoordinates(int attrFrom, int ctxTo, java.lang.String identTo, TrMatrix tr)
roundCoordinates
in interface Brep
attrFrom
- Handle to a source coordinate attribute.ctxTo
- Handle to a context (can be NULL
for shared attributes).identTo
- String identifier of the attribute.tr
- Linear (projection-plane) transformation.
createAttribute(int, int, java.lang.String, int)
,
copyCoordinates(int,int,String)
,
transformCoordinates(int,int,String,TrMatrix)
public void roundCoordinates(int attrFrom, int attrTo, TrMatrix tr, java.util.BitSet set)
roundCoordinates
in interface Brep
attrFrom
- Handle to a source coordinate attribute.attrTo
- Handle to a destination coordinate attribute.tr
- Linear (projection-plane) transformation.set
- Entity handle-set (for null
everything will be transformed).createAttribute(int, int, java.lang.String, int)
,
copyCoordinates(int,int,BitSet)
,
transformCoordinates(int,int,TrMatrix,BitSet)
public int transformCoordinates(int attrFrom, int ctxTo, java.lang.String identTo, TrMatrix tr)
transformCoordinates
in interface Brep
attrFrom
- Handle to a source coordinate attribute.ctxTo
- Handle to a context (can be NULL
for shared attributes).identTo
- String identifier of the attribute.tr
- Linear matrix transformation.
createAttribute(int, int, java.lang.String, int)
,
copyCoordinates(int,int,String)
,
roundCoordinates(int,int,String,TrMatrix)
public void transformCoordinates(int attrFrom, int attrTo, TrMatrix tr, java.util.BitSet set)
transformCoordinates
in interface Brep
attrFrom
- Handle to a source coordinate attribute.attrTo
- Handle to a destination coordinate attribute.tr
- Linear matrix transformation.set
- Entity handle-set (for null
everything will be transformed).createAttribute(int, int, java.lang.String, int)
,
copyCoordinates(int,int,BitSet)
,
roundCoordinates(int,int,TrMatrix,BitSet)
public BrepIterator vertexIterator(BrepIterator pre)
vertexIterator
in interface Brep
pre
- Pre-allocated BrepIterator
object (can be null
).
vertexInFaceIterator(int, cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator vertexInFaceIterator(int face, BrepIterator pre)
vertexInFaceIterator
in interface Brep
face
- Handle to the face.pre
- Pre-allocated BrepIterator
object (can be null
).
vertexIterator(cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator edgeIterator(BrepIterator pre)
edgeIterator
in interface Brep
pre
- Pre-allocated BrepIterator
object (can be null
).
edgeInFaceIterator(int, cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator edgeInFaceIterator(int face, BrepIterator pre)
edgeInFaceIterator
in interface Brep
face
- Handle to the face.pre
- Pre-allocated BrepIterator
object (can be null
).
edgeIterator(cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator faceIterator(int ctx, BrepIterator pre)
faceIterator
in interface Brep
ctx
- Handle to a context.pre
- Pre-allocated BrepIterator
object (can be null
).
faceInSolidIterator(int, int, cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator faceInSolidIterator(int ctx, int solid, BrepIterator pre)
faceInSolidIterator
in interface Brep
ctx
- Handle to a context.solid
- Handle to the face.pre
- Pre-allocated BrepIterator
object (can be null
).
faceIterator(int, cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator divisionIterator(int ctx, BrepIterator pre)
divisionIterator
in interface Brep
ctx
- Handle to a context.pre
- Pre-allocated BrepIterator
object (can be null
).
divisionInSolidIterator(int, int, cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator divisionInSolidIterator(int ctx, int solid, BrepIterator pre)
divisionInSolidIterator
in interface Brep
ctx
- Handle to a context.solid
- Handle to the face.pre
- Pre-allocated BrepIterator
object (can be null
).
divisionIterator(int, cz.cuni.jagrlib.iface.BrepIterator)
,
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public BrepIterator solidIterator(BrepIterator pre)
solidIterator
in interface Brep
pre
- Pre-allocated BrepIterator
object (can be null
).
nextItem(cz.cuni.jagrlib.iface.BrepIterator)
public int nextItem(BrepIterator iter)
nextItem
in interface Brep
iter
- Associated iterator data.
NULL
at the end of an iteration.public int[] getVertexCoords(int ctx, int vert, int[] coord)
COORD_PROJ
) (Cartesian 2D or 3D).
getVertexCoords
in interface Brep
ctx
- Handle of the context.vert
- Handle of the vertex.coord
- Pre-allocated coordinate vector.
coord
if possible).getVertexCoords(int,int,double[])
,
getVertexCoords(int,int,float[])
public double[] getVertexCoords(int ctx, int vert, double[] coord)
COORD
).
getVertexCoords
in interface Brep
ctx
- Handle of the context.vert
- Handle of the vertex.coord
- Optional pre-allocated coordinate vector (Cartesian or homogeneous).
coord
if possible).getVertexCoords(int,int,int[])
,
getVertexCoords(int,int,float[])
public float[] getVertexCoords(int ctx, int vert, float[] coord)
COORD
).
getVertexCoords
in interface Brep
ctx
- Handle of the context.vert
- Handle of the vertex.coord
- Optional pre-allocated coordinate vector (Cartesian or homogeneous).
coord
if possible).getVertexCoords(int,int,int[])
,
getVertexCoords(int,int,double[])
public int[] getEdgeVertices(int edge, int[] vert)
getEdgeVertices
in interface Brep
edge
- Handle of the edge.vert
- Optional pre-allocated array to hold two vertex handles.
vert
if possible).public int[] getEdgeRecord(int edge, int[] index)
int[]
array, user of this
method receives such array and origin of the particular edge record.
getEdgeRecord
in interface Brep
edge
- Handle of the edge.index
- Pre-allocated int[]
array to receive starting index of the edge-record.
If this array is longer than int[1]
, actual record-size will be returned after
the starting index. If {code index} is null
, R/O edge record is returned.
public int getFaceEdges(int face, int[] edge)
getFaceEdges
in interface Brep
face
- Handle of the face.edge
- Pre-allocated array to hold edge handles (or null
to get the
face size).
getFaceVertices(int, int[])
public int getFaceVertices(int face, int[] vert)
getFaceVertices
in interface Brep
face
- Handle of the face.vert
- Pre-allocated array to hold vertex handles (or null
to get the
face size).
getFaceEdges(int, int[])
public int getDivisionFaces(int ctx, int div, int[] up, int[] down)
getDivisionFaces
in interface Brep
ctx
- Handle of the context.div
- Handle of the division.up
- Pre-allocated array to hold predecessor-face handles (will be terminated by
NULL
). null
to get number of predecessors.down
- Pre-allocated array to hold successor-face handles (will be terminated by
NULL
). null
to get number of successors.
up == null
).public int getSolidFaces(int ctx, int solid, int[] face)
getSolidFaces
in interface Brep
ctx
- Handle of the context.solid
- Handle of the solid.face
- Pre-allocated array to hold face handles (or null
to get the
solid size).
public int getAllVertices(int[] vert)
getAllVertices
in interface Brep
vert
- Pre-allocated array to hold vertex handles (or null
to get
the array size).
getAllVertexCoords(int,int,int[])
,
getAllVertexCoords(int,int,double[])
public int getAllVertexCoords(int attr, int dim, int[] coord)
getAllVertexCoords
in interface Brep
attr
- Handle to the attribute (e.g. COORD_PROJ
).dim
- Size of coordinate vector (2
or 3
).coord
- Pre-allocated array to hold vertex coordinates (or null
to get
the array size).
getAllVertices(int[])
,
getAllVertexCoords(int,int,double[])
public int getAllVertexCoords(int attr, int dim, double[] coord)
getAllVertexCoords
in interface Brep
attr
- Handle to the attribute (e.g. COORD
).dim
- Size of coordinate vector (2
to 4
).coord
- Pre-allocated array to hold vertex coordinates (or null
to get
the array size).
getAllVertices(int[])
,
getAllVertexCoords(int,int,int[])
public int getAllVertexCoords(int attr, int dim, float[] coord)
getAllVertexCoords
in interface Brep
attr
- Handle to the attribute (e.g. COORD
).dim
- Size of coordinate vector (2
to 4
).coord
- Pre-allocated array to hold vertex coordinates (or null
to get
the array size).
getAllVertices(int[])
,
getAllVertexCoords(int,int,int[])
public int getAllEdges(int ctx, int[] edge)
getAllEdges
in interface Brep
ctx
- Handle of the context.edge
- Pre-allocated array to hold edge handles (or null
to get
the array size).
getAllEdgeVertices(int, int[])
public int getAllEdgeVertices(int ctx, int[] vert)
getAllEdgeVertices
in interface Brep
ctx
- Handle of the context.vert
- Pre-allocated array to hold vertex handles (or null
to get
the array size).
getAllEdges(int, int[])
public int getAllFaces(int ctx, int[] face)
getAllFaces
in interface Brep
ctx
- Handle of the context.face
- Pre-allocated array to hold face handles (or null
to get
the array size).
public int getAllTriangleEdges(int ctx, int[] edge)
getAllTriangleEdges
in interface Brep
ctx
- Handle of the context.edge
- Pre-allocated array to hold edge handles (or null
to get
the array size). It will hold data only for triangle faces.
getAllTriangleVertices(int, int[])
public int getAllTriangleVertices(int ctx, int[] vert)
getAllTriangleVertices
in interface Brep
ctx
- Handle of the context.vert
- Pre-allocated array to hold vertex handles (or null
to get
the array size). It will hold data only for triangle faces.
getAllTriangleEdges(int, int[])
public int getAllDivisions(int ctx, int[] div)
getAllDivisions
in interface Brep
ctx
- Handle of the context.div
- Pre-allocated array to hold division handles (or null
to get
the array size).
public int getAllSolids(int ctx, int[] solid)
getAllSolids
in interface Brep
ctx
- Handle of the context.solid
- Pre-allocated array to hold solid handles (or null
to get
the array size).
public int createVertex()
createVertex
in interface Brep
public void setVertexCoords(int ctx, int vert, int[] coord)
COORD_PROJ
) (Cartesian 2D or 3D).
setVertexCoords
in interface Brep
ctx
- Handle of the context.vert
- Handle of the vertex.coord
- Coordinate vector (2D or 3D).createVertex()
public void setVertexCoords(int ctx, int vert, double[] coord)
COORD
) (Cartesian or homogeneous).
setVertexCoords
in interface Brep
ctx
- Handle of the context.vert
- Handle of the vertex.coord
- Coordinate vector (2D to 4D).createVertex()
public void setVertexCoords(int ctx, int vert, float[] coord)
COORD
) (Cartesian or homogeneous).
setVertexCoords
in interface Brep
ctx
- Handle of the context.vert
- Handle of the vertex.coord
- Coordinate vector (2D to 4D).createVertex()
public int createEdge()
createEdge
in interface Brep
public void setEdgeVertices(int edge, int v1, int v2)
setEdgeVertices
in interface Brep
edge
- Handle of the edge.v1
- Handle of the 1st vertex.v2
- Handle of the 2nd vertex.createEdge()
public int createFace()
createFace
in interface Brep
public void setTriangleEdges(int face, int e1, int e2, int e3)
setTriangleEdges
in interface Brep
face
- Handle of the face.e1
- Handle of the 1st edge.e2
- Handle of the 2nd edge.e3
- Handle of the 3rd edge.createFace()
public void setTriangleVertices(int face, int v1, int v2, int v3)
setTriangleVertices
in interface Brep
face
- Handle of the face.v1
- Handle of the 1st vertex.v2
- Handle of the 2nd vertex.v3
- Handle of the 3rd vertex.createFace()
public void setFaceVertices(int face, int[] vert)
setFaceVertices
in interface Brep
face
- Handle of the face.vert
- Handles of the vertices (Brep.NULL
breaks the sequence}).createFace()
public void setFaceEdges(int face, int[] edge)
setFaceEdges
in interface Brep
face
- Handle of the face.edge
- Array of edge handles (can be prematurely terminated by NULL
).createFace()
public void setSolidFaces(int ctx, int solid, int[] face)
setSolidFaces
in interface Brep
ctx
- Handle of the context.solid
- Handle of the solid.face
- Array of face handles (can be prematurely terminated by NULL
).createSolid(int)
public int createDivision(int ctx)
createDivision
in interface Brep
ctx
- Handle of the context.
public void setDivisionFaces(int ctx, int div, int[] up, int[] down)
setDivisionFaces
in interface Brep
ctx
- Handle of the context.div
- Handle of the division.up
- Array of predecessor-face handles (can be prematurely terminated by
NULL
).down
- Array of successor-face handles (can be prematurely terminated by
NULL
).createDivision(int)
public int createSolid(int ctx)
createSolid
in interface Brep
ctx
- Handle of the context.
public void resetSolid(int ctx, int solid)
resetSolid
in interface Brep
ctx
- Handle of the context.solid
- Handle of the solid.createSolid(int)
,
insertFaceIntoSolid(int, int, int)
public void insertFaceIntoSolid(int ctx, int solid, int face)
insertFaceIntoSolid
in interface Brep
ctx
- Handle of the context.solid
- Handle of the solid.face
- Handle of the new face.resetSolid(int, int)
public void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
null
.public void commit()
commit
in interface Property
commit
in class DefaultProperty
public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |