[x3d-public] python pyjnius mapping: setDEF troubleshooting

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Wed May 15 04:56:42 PDT 2019

On 5/15/2019 4:39 AM, Brutzman, Donald (Don) (CIV) wrote:
> Looking very closely at ViewpointObject method invocation
> 	@Override
> 	public final ViewpointObject setDEF(String newValue)
> ... via Netbeans IDE shows that this method actually overrides*two*  parent methods, which is atypical.  One overwritten method is in X3DConcreteNode (which is OK) and one in interface org.web3d.x3d.sai.Navigation.Viewpoint which is bad and likely cause of our unintended misdirection in the class hierarchy.

a. Also documented in detail in Javadoc.


     public final ViewpointObject setDEF(java.lang.String newValue)

     Accessor method to assign String value to inputOutput SFString field named DEF.

     Tooltip: DEF defines a unique ID name for this node, referenceable by other nodes.
         Hint: descriptive DEF names improve clarity and help document a model.
         Hint: well-defined names can simplify design and debugging through improved author understanding.
         Hint: X3D Scene Authoring Hints, Naming Conventions http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions

     Note that setting the DEF value clears the USE value.

     Specified by:
         setDEF in interface X3DBindableNode
     Specified by:
         setDEF in interface X3DChildNode
     Specified by:
         setDEF in interface X3DNode
     Specified by:
         setDEF in interface Viewpoint
     Specified by:
         setDEF in interface X3DViewpointNode
     Specified by:
         setDEF in class X3DConcreteNode
         newValue - is new value for the DEF field.
         ViewpointObject - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).

repeating expected next step: remove setDEF in interface Viewpoint, simplifying above.

b.  Also there is much-less-entangled interface setDEF(SFStringObject newValue) which has no overrides.  This would further explain why typecasting setDEF((SFStringObject)someValue) doesn't provoke the pyjnius difficulty.


all the best, Don
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman

More information about the x3d-public mailing list