JavaView® v2.00.008

vgp.curve.geodesic
Class PjGeodesic

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jv.project.PjProject
              |
              +--jv.loader.PjImportModel
                    |
                    +--vgp.curve.geodesic.PjGeodesic
All Implemented Interfaces:
java.lang.Cloneable, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf, java.io.Serializable

public class PjGeodesic
extends PjImportModel

Project Straightest Geodesics on triangulations extends PjImportModel.

Version:
30.6.99, 1.00 created (ep)
Author:
Eike Preuß
See Also:
PjImportModel, Serialized Form

Field Summary
protected static double initialLength
          inital length of the geodesic
protected  PuInteger m_angle
          actual angle (in degree) of the geodesic in element m_elemInd
protected  PdBary m_bary
          barycentric coordinates of the initial point in element m_elemInd
protected  PgPolygon m_curve
          calculated geodesic in world coordinates
protected  PuInteger m_elemInd
          element index where the initial point lies
protected  PuDouble m_length
          actual length of the geodesic
protected  PgPolygonOnElementSet m_poly
          calculated geodesic in coordinates on the triangulation
protected  PsPanel m_superpanel
          panel which allows user to select and load models
 
Fields inherited from class jv.loader.PjImportModel
CONFIRM_CANCEL, CONFIRM_CLICKED, CONFIRM_OK, DIR_LIST, FULL_INFO_PANEL, m_baseDir, m_category, m_confirm, m_defBaseDir, m_defCategory, m_defFileName, m_fileName, m_fullFileName, m_geomList, m_infoPanelType, m_numModels, m_parentProject, SMALL_INFO_PANEL
 
Fields inherited from class jv.project.PjProject
m_anim, m_bAutoFit, m_display, m_displayList, m_geometry, m_parm, m_rootGeometry
 
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
PjGeodesic()
          Constructor.
 
Method Summary
 void calculateCurve()
          Calculates the geodesic with given initial values.
 int getAngle()
          initial angle of geodesic in degree
 PdBary getBary()
          reference to barycentric coordinates of initial point
 int getElement()
          element on which initial point lies
 double getLength()
          maximum length of the geodesic
 PsPanel getSuperInfoPanel()
          Gets the panel of project PjImportModel.
 void init()
          Initializes length, angle, elementindex, geometry
 boolean load(java.lang.String fullFileName)
          Calls PjImportModel.load(fullFileName) and then hides the elements, triangulates, updates the number of elements, removes the previous geodesic and fits that all in the display.
 void pickInitial(PvPickEvent pos)
          Gets barycentric coordinates and element index from pickevent and initiates calculation of the curve.
 void start()
          Just calls super.start().
 boolean update(java.lang.Object event)
          Initiates re-calculation of geodesic if one of the parameter panels changed.
 
Methods inherited from class jv.loader.PjImportModel
getBaseDir, getCategory, getConfirm, getFileName, getInfoPanel, setBase, setCategory, setConfirm, setFileName, setParentProject, setTypeOfInfoPanel
 
Methods inherited from class jv.project.PjProject
addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setDisplay, setEnabledAutoFit, setParameter, setTime, setViewer, stop, unmarkVertices
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, clearTag, clone, clone, clone, copy, getFather, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.anim.PsTimeListenerIf
getName
 
Methods inherited from interface jv.project.PvPickListenerIf
getName
 
Methods inherited from interface jv.object.PsUpdateIf
getFather, getName, setParent
 

Field Detail

m_curve

protected PgPolygon m_curve
calculated geodesic in world coordinates

m_poly

protected PgPolygonOnElementSet m_poly
calculated geodesic in coordinates on the triangulation

m_superpanel

protected PsPanel m_superpanel
panel which allows user to select and load models

initialLength

protected static final double initialLength
inital length of the geodesic

m_length

protected PuDouble m_length
actual length of the geodesic

m_angle

protected PuInteger m_angle
actual angle (in degree) of the geodesic in element m_elemInd

m_bary

protected PdBary m_bary
barycentric coordinates of the initial point in element m_elemInd

m_elemInd

protected PuInteger m_elemInd
element index where the initial point lies
Constructor Detail

PjGeodesic

public PjGeodesic()
Constructor. If class is an instance of PjGeodesic it calls init-method
Method Detail

getSuperInfoPanel

public PsPanel getSuperInfoPanel()
Gets the panel of project PjImportModel. By this panel the user may select and load models.
Returns:
panel of superclass PjImportModel
See Also:
PjImportModel, PjImportModel_IP

init

public void init()
Initializes length, angle, elementindex, geometry
Overrides:
init in class PjImportModel

start

public void start()
Just calls super.start().
Overrides:
start in class PjImportModel
Following copied from class: jv.project.PjProject
See Also:
PvViewerIf.start(), #isEnabledAutoFit(boolean)

update

public boolean update(java.lang.Object event)
Initiates re-calculation of geodesic if one of the parameter panels changed.
Overrides:
update in class PsObject
Following copied from interface: jv.object.PsUpdateIf
Parameters:
event - carries a lot of information
Returns:
true if event has been handled, otherwise false
See Also:
PsObject, PsUpdateIf.getFather(), PsUpdateIf.setParent(PsUpdateIf)

getLength

public double getLength()
maximum length of the geodesic

getAngle

public int getAngle()
initial angle of geodesic in degree

getBary

public PdBary getBary()
reference to barycentric coordinates of initial point

getElement

public int getElement()
element on which initial point lies

calculateCurve

public void calculateCurve()
Calculates the geodesic with given initial values.
See Also:
getLength(), getAngle(), getBary(), getElement()

pickInitial

public void pickInitial(PvPickEvent pos)
Gets barycentric coordinates and element index from pickevent and initiates calculation of the curve.
Overrides:
pickInitial in class PjProject
Following copied from class: jv.project.PjProject
Parameters:
pos - Pick event issued by the display
See Also:
PvPickListenerIf

load

public boolean load(java.lang.String fullFileName)
Calls PjImportModel.load(fullFileName) and then hides the elements, triangulates, updates the number of elements, removes the previous geodesic and fits that all in the display.
Overrides:
load in class PjImportModel
Following copied from class: jv.loader.PjImportModel
Parameters:
fullFileName - fully specified file name including code base, or URL.
Returns:
true if model has been successfully loaded.

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.