public class PwTransform extends PjWorkshop
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
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwTransform()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close workshop and remove itself as listener from various classes.
|
void |
compute(PgPointSet geom,
boolean selectedOnly)
Perform all functional evaluations on vertex set of geometry.
|
void |
init()
Initialize the workshop.
|
void |
reset()
Reset workshop and reset the geometry with its backup version.
|
static void |
rotate(PgPointSet geom,
double angle,
int coord)
Method rotates the given geometry around the specified coordinate axis.
|
static void |
rotate(PgPointSet geom,
double angle,
int coord,
boolean selectedOnly)
Method rotates the given geometry around the specified coordinate axis.
|
static void |
rotate(PgPointSet geom,
double angle,
int coord,
PdVector centerOfRotation)
Method rotates the given geometry around the specified coordinate axis.
|
static void |
rotate(PgPointSet geom,
double angle,
int coord,
PdVector centerOfRotation,
boolean selectedOnly)
Method rotates the given geometry around the specified coordinate axis.
|
static void |
scale(PgPointSet geom,
double value)
Method scales the geometry geometry by a given factor.
|
static void |
scale(PgPointSet geom,
double value,
int coord)
Method scales one coordinate of the geometry geometry by a given factor.
|
static void |
scale(PgPointSet geom,
double value,
int coord,
PdVector center,
boolean selectedOnly)
Method scales one coordinate of the geometry geometry by a given factor.
|
static void |
scale(PgPointSet geom,
double value,
PdVector center,
boolean selectedOnly)
Method scales the geometry geometry by a given factor.
|
void |
setDimension(int dim)
Initialize the workshop with the given dimension.
|
void |
setGeometry(PgGeometry geom)
Assign a geometry on which this workshop operates,
and create a backup copy if workshop is canceled.
|
static void |
translate(PgPointSet geom,
double value,
int coord)
Method translates the given geometry in the directions of the given coordinate axis.
|
static void |
translate(PgPointSet geom,
double value,
int coord,
boolean selectedOnly)
Method translates the given geometry in the directions of the given coordinate axis.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
cancel, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, openDialog, removeGeometry, setDisplay, setDisplays, setModal, setMode, setStandalone, setViewer
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFather, getName, setParent
public void init()
init
in class PjWorkshop
public void reset()
reset
in class PjWorkshop
public void close()
close
in class PjWorkshop
public void setGeometry(PgGeometry geom)
setGeometry
in interface PjWorkshopIf
setGeometry
in class PjWorkshop
geom
- the workshop modifies this geometry.public void setDimension(int dim)
dim
- dimensions of space, number of rotation axis.public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void compute(PgPointSet geom, boolean selectedOnly)
public static void translate(PgPointSet geom, double value, int coord)
geom
- geom that will be translatedvalue
- length of the translationcoord
- translation in direction of the specified coordinate axispublic static void translate(PgPointSet geom, double value, int coord, boolean selectedOnly)
geom
- geom that will be translatedvalue
- length of the translationcoord
- translation in direction of the specified coordinate axisselectedOnly
- transform the selected vertices onlypublic static void scale(PgPointSet geom, double value)
geom
- geom that will be scaledvalue
- factor of the scalingpublic static void scale(PgPointSet geom, double value, PdVector center, boolean selectedOnly)
geom
- geom that will be scaledvalue
- factor of the scalingcenter
- Center for scalingselectedOnly
- transform the selected vertices onlypublic static void scale(PgPointSet geom, double value, int coord)
geom
- geom that will be scaledvalue
- factor of the scalingcoord
- scale only of the specified coordinatepublic static void scale(PgPointSet geom, double value, int coord, PdVector center, boolean selectedOnly)
geom
- geom that will be scaledvalue
- factor of the scalingcoord
- scale only of the specified coordinateselectedOnly
- transform the selected vertices onlypublic static void rotate(PgPointSet geom, double angle, int coord)
geom
- geom that will be rotatedangle
- angle of the rotation in radianscoord
- rotation around the specified coordinate axispublic static void rotate(PgPointSet geom, double angle, int coord, boolean selectedOnly)
geom
- geom that will be rotatedangle
- angle of the rotation in radianscoord
- rotation around the specified coordinate axisselectedOnly
- transform the selected vertices onlypublic static void rotate(PgPointSet geom, double angle, int coord, PdVector centerOfRotation, boolean selectedOnly)
geom
- geom that will be rotatedangle
- angle of the rotation in radianscoord
- rotation around the specified coordinate axiscenterOfRotation
- rotate geometry around the specified centerselectedOnly
- transform the selected vertices onlypublic static void rotate(PgPointSet geom, double angle, int coord, PdVector centerOfRotation)
geom
- geom that will be rotatedangle
- angle of the rotation in radianscoord
- rotation around the specified coordinate axiscenterOfRotation
- rotate geometry around the specified center"