|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--harmonic.mz.manager.MZ_HighLevels
These are high level alternatives to the regular API. Handy for macros. The idea of this class is that a macro could use this class exclusivly instead of the using the Modelzilla development API. But feel free to use the regular API if this class doesn't have the methods you need. Some methods here seem to be more like fully interactive commands. This is because we are experimenting with a command line interface, and it is nice if the more programatic methods are integrated with the one liners.
A Macro instantiates an MZ_HighLevels and high levels from application modules like CAD_HighLevels. For example:
CAD_HighLevels cad = new CAD_HighLevels(); MZ_HighLevels mz = new MZ_HighLevels(); ... cad.sphere(...); mz.redraw(); ...
| Constructor Summary | |
MZ_HighLevels()
|
|
| Method Summary | |
void |
close(FileNode file)
Close the given file |
boolean |
confirm(java.lang.String msg)
Send a modal message with yes/no response. |
harmonic.viewer3D.Viewport |
currentViewport()
|
DataNode |
firstSelection()
Return the first node of the current selection. |
void |
fitAndCenterViewpoint(ShapeNode[] shapeDefs)
Validates, fits, and centers given shapes. |
void |
fitViewpoint(ShapeNode[] shapeDefs)
Validates and fits given shapes. |
FileNode |
getCurrentFile()
Returns the current FileNode. |
harmonic.meshGeom.math.TMat |
getGlobalPerUCS()
Return the UCS matrix. |
harmonic.meshGeom.math.TMat |
getViewpoint()
Get the view per global matrix of the current viewport |
void |
hide(ShapeNode node)
Hide the node from all viewports |
Module |
loadModule(java.lang.String className)
Load the specified module |
void |
msg(java.lang.String msg)
Send a message. |
DataNode |
node(java.lang.String name)
Return the node with the given name in the current file, or null if there is none. |
DataNode |
nodeNumber(int number)
Return the node with the given serial number in the current file, or null if there is none. |
FileNode |
open(java.lang.String filename)
open(filename, true, false); |
FileNode |
open(java.lang.String filename,
boolean bMakeCurrent,
boolean bLocked)
Open a repository file. |
FileNode |
openLocal(java.lang.String filename)
Opens a file and return reference to it. |
void |
purge()
Do a purge |
void |
recallUCS(java.lang.String name)
Recall current ucs matrix from given name in ucs list |
void |
redraw()
Does a redraw of current viewport. |
void |
remove(ModelNode node)
Remove the node from the repository. |
void |
removeUCS(java.lang.String name)
Remove a saved ucs name |
void |
save(FileNode file)
save(file, file.getFilename(), false, false, ""); |
void |
save(FileNode file,
java.lang.String filename,
boolean bSaveImage,
boolean bCompress,
java.lang.String desc)
Save the given file |
void |
saveLocal(FileNode file)
This is like openLocal(). |
void |
saveUCS(java.lang.String name)
Save current ucs matrix to given name in ucs list, creating new name |
DataNode[] |
selection()
Return the current selection. |
void |
setGlobalPerUCS(harmonic.meshGeom.math.TMat mat)
Sets the UCS matrix. |
void |
setViewpoint(harmonic.meshGeom.math.TMat mat)
Set the view per global matrix of the current viewport |
void |
show(ShapeNode node)
Show the node in all viewports |
void |
showGCS(boolean b)
Set visibility of gcs triple |
void |
showUCS(boolean b)
Set visibility of ucs triple |
void |
takeScreenShot(java.lang.String filename,
java.lang.String encodingType,
boolean bAntiAlias)
Returns a BufferedImage of the current viewport. |
void |
takeScreenShot(java.lang.String filename,
java.lang.String encodingType,
int width,
int height,
boolean bAntiAlias)
Saves and image file of the current viewport. |
void |
unloadModule(java.lang.String className)
Unload the specified module |
void |
updateUCS(java.lang.String name)
Save current ucs matrix to given name in ucs list, using existing name |
void |
validate()
Validation causes repository nodes to compute derived data, which ends up in the viewport. |
void |
validate(ModelNode node)
Validate the node |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MZ_HighLevels()
| Method Detail |
public void msg(java.lang.String msg)
public boolean confirm(java.lang.String msg)
public DataNode node(java.lang.String name)
public DataNode nodeNumber(int number)
public DataNode firstSelection()
public DataNode[] selection()
public Module loadModule(java.lang.String className)
className - Fully specified class name
public void unloadModule(java.lang.String className)
public void hide(ShapeNode node)
public void show(ShapeNode node)
public void validate(ModelNode node)
public void remove(ModelNode node)
public void purge()
public FileNode open(java.lang.String filename)
public FileNode open(java.lang.String filename,
boolean bMakeCurrent,
boolean bLocked)
bMakeCurrent - If true, file become target of modificationsbLocked - If true, file cannot be modifiedpublic FileNode openLocal(java.lang.String filename)
public FileNode getCurrentFile()
public void close(FileNode file)
public void save(FileNode file)
public void save(FileNode file,
java.lang.String filename,
boolean bSaveImage,
boolean bCompress,
java.lang.String desc)
public void saveLocal(FileNode file)
public harmonic.meshGeom.math.TMat getGlobalPerUCS()
public void setGlobalPerUCS(harmonic.meshGeom.math.TMat mat)
public void saveUCS(java.lang.String name)
public void recallUCS(java.lang.String name)
public void updateUCS(java.lang.String name)
public void removeUCS(java.lang.String name)
public void showGCS(boolean b)
public void showUCS(boolean b)
public void fitAndCenterViewpoint(ShapeNode[] shapeDefs)
public void fitViewpoint(ShapeNode[] shapeDefs)
public void setViewpoint(harmonic.meshGeom.math.TMat mat)
public harmonic.meshGeom.math.TMat getViewpoint()
public harmonic.viewer3D.Viewport currentViewport()
public void redraw()
ViewerCore.viewports().getCurrentView().renderNow();
public void takeScreenShot(java.lang.String filename,
java.lang.String encodingType,
boolean bAntiAlias)
public void takeScreenShot(java.lang.String filename,
java.lang.String encodingType,
int width,
int height,
boolean bAntiAlias)
public void validate()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||