[x3d-public] HAnim 1.0, 2.0 joint, segment, featurePoint names implemented in X3DUOM, X3DJSAIL

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sat May 18 17:51:25 PDT 2019


This validating code block for checking correct parent-child relationships is finally integrated into X3DJSAIL.

Further work needed to confirm examples through testing, and to also confirm that alias names are validated effectively.

Looks like this will someday lead to creation of a suite of unit-test example scenes for correctly patterned humanoid models and patient records.

Thanks Joe for steady scrutiny, also for looking ahead to facial expressions and internal organs build on the same baseline patterns in HAnim specification.

On 4/3/2019 5:21 PM, Brutzman, Donald (Don) (CIV) wrote:
> Here is example child-parent validation code sent to HAnim list earlier.  I will continue on integrating that design pattern into X3DJSAIL autogeneration of validation tests.
> 
> FYI work in progress:
> 
>           // test for correct parent
>           X3DConcreteElement parent = getParentObject();
>           if (getParentObject() != null) // TODO hasParentObject()
>           {
>               if      (parent.getElementName().equals(HAnimJointObject.NAME))
>               {
>                   // now test for correct parent-child LOA4 relationship pair
>                   if (!hasSegmentNameParent(((HAnimJointObject)parent).getName()))
>                   {
>                       String errorNotice = ConfigurationProperties.ERROR_ILLEGAL_VALUE +
>                           ": illegal parent name found: '" + ((HAnimJointObject)parent).getName() + "' instead of TODO" ;
>                       validationResult.append(errorNotice).append("\n");
>                       throw new InvalidFieldException(errorNotice); // report error
>                   }
>               }
>               else if (!parent.getElementName().equals(fieldObject.NAME) && !parent.getElementName().equals(fieldValueObject.NAME) &&
>                        !parent.getElementName().equals(ProtoBodyObject.NAME))
>               {
>                   String errorNotice = ConfigurationProperties.ERROR_ILLEGAL_VALUE +
>                       ": illegal parent found: '" + parent.getElementName() + "'";
>                   validationResult.append(errorNotice).append("\n");
>                   throw new InvalidFieldException(errorNotice); // report error
>               }
>           }


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