|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jv.geom.PgBndConstraint
Descriptor for boundary constraints used in variational problems. The member variables have different meanings depending on the shape of the boundary curve. The following describes their meaning and shows how to generate a curve for given constraints.
if (hasShape(FIX_STRAIGHT)) {
// m_start = start point on line;
// m_end = end point on line;
// m_dir = unit length direction of line;
// To compute the line:
for (j=0; j<bndLen; j++) {
v = (double)j / (double)(bndLen-1.);
m_vertex[j].blend(1.-v, p, v, q);
}
// To constrain the line:
for (j=0; j<bndLen; j++) {
m_vertex[j].projectPointToLine(m_vertex[j], m_start, m_dir);
}
} else if (hasShape(FIX_PLANE)) {
// m_start = start point of planar curve;
// m_end = end point of planar curve;
// m_dir = unit length normal of plane;
// m_startDir = direction along m_start may vary;
// m_endDir = direction along m_end may vary;
// m_startDir and m_endDir are addtn'l contraints depending on the adjacent boundaries
// Each vector determines a line along which the corresponding start and end point
// is allowed to vary. This is used if either of the two adjacent boundary curves
// is of type FIX_PLANE too:
// To compute the plane:
// To constrain the line:
for (j=0; j<bndLen; j++) {
m_vertex[j].projectPointToPlane(m_vertex[j], m_start, m_dir);
}
} else if (hasShape(FIX_CIRCLE)) {
// m_start = start point on circle;
// m_end = end point on circle;
// m_vec1 = mid point of circle;
// m_vec2 = orient, i.e. normal of circle;
// To compute the circle:
for (j=0; j<bndLen; j++) {
v = (double)j / (double)(bndLen-1.);
m_vertex[j].evalCircle(mid, orient, start, end, v);
}
// To constrain the circle:
radius = m_vec1.dist(m_start);
for (j=0; j<bndLen; j++) {
m_vertex[j].projectPointToCircle(m_vertex[j], m_vec1, m_vec2, radius);
}
} else if (hasShape(FIX_HELIX)) {
// m_start = start point on helix;
// m_end = end point on helix;
// m_vec1 = axis bottom of helix;
// m_vec2 = axis direction of helix;
// To compute the helix:
for (j=0; j<bndLen; j++) {
v = (double)j / (double)(bndLen-1.);
m_vertex[j].evalHelix(bot, axisDir, start, end, v);
}
else if (m_bndShapeBits[anInd].get(PgBndConstraint.FIX_SPLINE)) {
// m_start = start point on spline;
// m_end = end point on spline;
// m_vec1 = tangent of spline at start point;
// m_vec2 = tangent of spline at end point;
// To compute the spline:
for (j=0; j<bndLen; j++) {
v = (double)j / (double)(bndLen-1.);
m_vertex[j].evalSpline(m_vec1, m_vec2, m_start, m_end, v);
}
}
| Field Summary | |
static int |
EDGE_CIRCLE
|
static int |
EDGE_HELIX
|
static int |
EDGE_SPLINE
|
static int |
EDGE_STRAIGHT
|
static int |
FIX_CIRCLE
Not yet supported by *bd files, new in Java version. |
static int |
FIX_CURVE
All of the following bits exactly match the octal bits in *.bd files, therfore do not modify the following bits. |
static int |
FIX_HELIX
|
static int |
FIX_PLANE
|
static int |
FIX_POLYGON
|
static int |
FIX_STRAIGHT
|
static int |
FIX_THREAD
|
protected int |
m_dim
Dimension of vertices and vectors used as constraints. |
PdVector |
m_dir
|
PdVector |
m_end
|
PdVector |
m_endDir
|
protected static int |
m_numShapeBits
|
protected java.util.BitSet |
m_shape
|
PdVector |
m_start
|
PdVector |
m_startDir
|
PdVector |
m_vec1
|
PdVector |
m_vec2
|
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS |
| Constructor Summary | |
PgBndConstraint(int dim)
|
|
| Method Summary | |
void |
clearShape(int aBit)
Remove shape constraint. |
java.lang.Object |
clone()
Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. |
void |
copy(PsObject anObj)
Copy argument object into this object by recursively copying all instance variables. |
boolean |
hasShape(int aBit)
Check whether shape constraint is set. |
void |
init()
Initializes and resets instance. |
void |
setShape(java.util.BitSet shape)
Deprecated. Set individual bits using setShape(int). |
void |
setShape(int aBit)
Set shape constraint. |
java.lang.String |
toString()
Create a multi-line string representation with detailed information about all instance variables. |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, update, updatePanels |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int m_dim
public static final int FIX_CURVE
public static final int FIX_STRAIGHT
public static final int FIX_PLANE
public static final int FIX_THREAD
public static final int EDGE_STRAIGHT
public static final int EDGE_CIRCLE
public static final int EDGE_HELIX
public static final int EDGE_SPLINE
public static final int FIX_CIRCLE
public static final int FIX_HELIX
public static final int FIX_POLYGON
protected static final int m_numShapeBits
protected java.util.BitSet m_shape
public PdVector m_start
public PdVector m_end
public PdVector m_vec1
public PdVector m_vec2
public PdVector m_dir
public PdVector m_startDir
public PdVector m_endDir
| Constructor Detail |
public PgBndConstraint(int dim)
| Method Detail |
public void init()
init in class PsObjectpublic java.lang.Object clone()
null.
Tags of this object are not copied but maybe copied of subclasses.
Display list is not cloned but set to null. Method menu is cloned.
clone in class PsObject#copy(PgGeometry)public void copy(PsObject anObj)
copy in class PsObjectjv.object.PsObjectPsObject.clone()public void clearShape(int aBit)
PgBndConstraint.public boolean hasShape(int aBit)
PgBndConstraint.public void setShape(int aBit)
PgBndConstraint.public void setShape(java.util.BitSet shape)
public java.lang.String toString()
toString in class PsObject
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||