public abstract class PgSurfaceDescr extends PgDomainDescr
calc_
. If derivatives are
not overridden, this superclass approximates derivatives using finite differences.
External classes must call the public methods, and not the calc_ methods, since
the public classes are optimized using buffers with previously computed values.
A function object should be create somewhere else and set via setFunction()
.
For example, a subclass may do the task. If there exists a function object, and a user
has modified this function object in the info panel, then the descriptor no longer
uses the smooth derivatives but approximates derivatives using the finite difference
methods.
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
Constructor and Description |
---|
PgSurfaceDescr() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(PsObject parm)
Store function parameters in vector as PuDouble and PuInteger objects.
|
boolean |
calc_f(PdVector f,
double u,
double v)
Internal function called by eval(..) to compute function value.
|
PdMatrix[] |
christoffel(double u,
double v) |
java.lang.Object |
clone()
Duplicate geometry by recursively cloning all instance variables
except inspector panels and lists of registered listeners.
|
void |
copy(PsObject object)
Copy instance variables by duplication, not by copying a reference.
|
PdVector |
ddf_dUdU(double u,
double v) |
PdVector |
ddf_dUdV(double u,
double v) |
PdVector |
ddf_dVdV(double u,
double v) |
PdVector |
df_dU(double u,
double v)
Buffered versions, used by all other classes, should not be overwritten.
|
PdVector |
df_dV(double u,
double v) |
PdMatrix |
df(double u,
double v) |
PdVector |
dN_dU(double u,
double v) |
PdVector |
dN_dV(double u,
double v) |
PdMatrix |
dN(double u,
double v) |
PdVector |
eval(PdVector f,
double u,
double v)
Buffered version of calc_f, should not be overridden.
|
PdMatrix |
firstFundamental(double u,
double v) |
int |
getAmbientProjection()
Get projection mode of ambient space used in model transformations.
|
int |
getAmbientSpace()
Get ambient space used in model transformations.
|
int |
getDimOfSurface()
Get dimension of ambient space in which surface is immersed.
|
PuFunction |
getFunction()
Get function object, e.g. to modify function strings.
|
static java.lang.String[] |
getListOfScenes()
Get list of existing scenes.
|
static java.lang.String[] |
getListOfSurfaces()
Get list of existing surface descriptors.
|
PsObject |
getParameter(java.lang.String parmLabel)
Return stored function parameters as PuDouble or PuInteger objects.
|
java.util.Enumeration |
getParameters()
Return stored function parameters as PuDouble or PuInteger objects.
|
void |
init()
Initialize and reset data structure and all instance variables.
|
boolean |
isUPeriodic()
Determine if surface is periodic in u-direction.
|
boolean |
isVPeriodic()
Determine if surface is periodic in v-direction.
|
PdVector |
normal(double u,
double v) |
PdMatrix |
secondFundamental(double u,
double v) |
void |
setAmbientProjection(int mode)
Set projection mode of ambient space used in model transformations.
|
void |
setAmbientSpace(int mode)
Set ambient space used in model transformations.
|
void |
setDimOfSurface(int dim)
Set dimension of ambient space in which surface is immersed.
|
boolean |
setFunction(PuFunction fun)
Set function object, which has been setup somewhere else.
|
boolean |
update(java.lang.Object event)
Catch events from function strings.
|
boolean |
useFunctionExpression()
Check whether function string has been modified by user.
|
void |
useFunctionExpression(boolean flag)
Set flag whether function string has been modified by user.
|
PdMatrix |
weingarten(double u,
double v) |
eval, getNameOfLines, getNumULines, getNumVLines, getUMax, getUMin, getVMax, getVMin, isShowingULine, isShowingVLine, setDiscr, setDiscrBounds, setMaxSize, setNameOfLines, setNumULines, setNumVLines, setSize, setUMax, setUMin, setVMax, setVMin, showULine, showVLine, toString
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, updatePanels
public void init()
PgDomainDescr
init
in class PgDomainDescr
public java.lang.Object clone()
null
.clone
in class PgDomainDescr
copy(PsObject)
public void copy(PsObject object)
The argument was changed from PgGeometry to PsObject since there were problems in J/Link which preferred to use jv.object.PsObject#copy(PsObject) instead of jv.project.PgGeometry#copy(PsObject).
copy
in class PgDomainDescr
clone()
public int getAmbientSpace()
public void setAmbientSpace(int mode)
public int getAmbientProjection()
public void setAmbientProjection(int mode)
public int getDimOfSurface()
public void setDimOfSurface(int dim)
If function expressions exist, then the number of function expressions must be equal to the surface dimension. Otherwise, the number of expressions is adjusted in this method.
public static java.lang.String[] getListOfSurfaces()
public static java.lang.String[] getListOfScenes()
public PuFunction getFunction()
public boolean setFunction(PuFunction fun)
public boolean useFunctionExpression()
public void useFunctionExpression(boolean flag)
public boolean isUPeriodic()
public boolean isVPeriodic()
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PgDomainDescr
event
- carries a lot of informationPsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void addParameter(PsObject parm)
getParameter(String)
to return parameter objects.getParameter(String)
public PsObject getParameter(java.lang.String parmLabel)
addParameter(PsObject)
to store function parameter.addParameter(PsObject)
public java.util.Enumeration getParameters()
addParameter(PsObject)
to store function parameter.addParameter(PsObject)
public boolean calc_f(PdVector f, double u, double v)
If function set flag m_bUseFunctionExpression==false
then we use this indicator that
function has not been overridden and use the string functions.
This function must be overwritten by subclasses to compute surfaces, for example, if a subclass wants to perform the function calculation itself.
f
- vector where to place the function values.true
if function has been overridden and evaluated successfully.eval(PdVector, double, double)
public PdVector eval(PdVector f, double u, double v)
public final PdVector df_dU(double u, double v)
public final PdVector df_dV(double u, double v)
public final PdMatrix df(double u, double v)
public final PdVector ddf_dUdU(double u, double v)
public final PdVector ddf_dUdV(double u, double v)
public final PdVector ddf_dVdV(double u, double v)
public final PdVector normal(double u, double v)
public final PdVector dN_dU(double u, double v)
public final PdVector dN_dV(double u, double v)
public final PdMatrix dN(double u, double v)
public final PdMatrix firstFundamental(double u, double v)
public final PdMatrix secondFundamental(double u, double v)
public final PdMatrix weingarten(double u, double v)
public final PdMatrix[] christoffel(double u, double v)
"