@Override public YoGraphicPosition duplicate(YoVariableRegistry newRegistry) { YoDouble x = (YoDouble) newRegistry.getVariable(this.x.getFullNameWithNameSpace()); YoDouble y = (YoDouble) newRegistry.getVariable(this.y.getFullNameWithNameSpace()); YoDouble z = (YoDouble) newRegistry.getVariable(this.z.getFullNameWithNameSpace()); return new YoGraphicPosition(getName(), x, y, z, scale, appearance, type); } }
/** * Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given * {@link YoVariableRegistry}. * <p> * This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate * of the registry that was used to create {@code this}, this method searches for the duplicated * {@code YoVariable}s and use them to duplicate {@code this}. * </p> * * @param newRegistry YoVariableRegistry to duplicate {@code this} to. * @return the duplicate of {@code this}. */ public YoFrameYawPitchRoll duplicate(YoVariableRegistry newRegistry) { YoDouble yaw = (YoDouble) newRegistry.getVariable(this.yaw.getFullNameWithNameSpace()); YoDouble pitch = (YoDouble) newRegistry.getVariable(this.pitch.getFullNameWithNameSpace()); YoDouble roll = (YoDouble) newRegistry.getVariable(this.roll.getFullNameWithNameSpace()); return new YoFrameYawPitchRoll(yaw, pitch, roll, getReferenceFrame()); }
/** * Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given * {@link YoVariableRegistry}. * <p> * This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate * of the registry that was used to create {@code this}, this method searches for the duplicated * {@code YoVariable}s and use them to duplicate {@code this}. * </p> * * @param newRegistry YoVariableRegistry to duplicate {@code this} to. * @return the duplicate of {@code this}. */ public YoFramePoint3D duplicate(YoVariableRegistry newRegistry) { YoDouble x = (YoDouble) newRegistry.getVariable(getYoX().getFullNameWithNameSpace()); YoDouble y = (YoDouble) newRegistry.getVariable(getYoY().getFullNameWithNameSpace()); YoDouble z = (YoDouble) newRegistry.getVariable(getYoZ().getFullNameWithNameSpace()); return new YoFramePoint3D(x, y, z, getReferenceFrame()); } }
/** * Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given * {@link YoVariableRegistry}. * <p> * This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate * of the registry that was used to create {@code this}, this method searches for the duplicated * {@code YoVariable}s and use them to duplicate {@code this}. * </p> * * @param newRegistry YoVariableRegistry to duplicate {@code this} to. * @return the duplicate of {@code this}. */ public YoFrameQuaternion duplicate(YoVariableRegistry newRegistry) { YoDouble x = (YoDouble) newRegistry.getVariable(getYoQx().getFullNameWithNameSpace()); YoDouble y = (YoDouble) newRegistry.getVariable(getYoQy().getFullNameWithNameSpace()); YoDouble z = (YoDouble) newRegistry.getVariable(getYoQz().getFullNameWithNameSpace()); YoDouble s = (YoDouble) newRegistry.getVariable(getYoQs().getFullNameWithNameSpace()); return new YoFrameQuaternion(x, y, z, s, getReferenceFrame()); }
/** * Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given * {@link YoVariableRegistry}. * <p> * This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate * of the registry that was used to create {@code this}, this method searches for the duplicated * {@code YoVariable}s and use them to duplicate {@code this}. * </p> * * @param newRegistry YoVariableRegistry to duplicate {@code this} to. * @return the duplicate of {@code this}. */ public YoFrameVector3D duplicate(YoVariableRegistry newRegistry) { YoDouble x = (YoDouble) newRegistry.getVariable(getYoX().getFullNameWithNameSpace()); YoDouble y = (YoDouble) newRegistry.getVariable(getYoY().getFullNameWithNameSpace()); YoDouble z = (YoDouble) newRegistry.getVariable(getYoZ().getFullNameWithNameSpace()); return new YoFrameVector3D(x, y, z, getReferenceFrame()); } }
/** * Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given * {@link YoVariableRegistry}. * <p> * This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate * of the registry that was used to create {@code this}, this method searches for the duplicated * {@code YoVariable}s and use them to duplicate {@code this}. * </p> * * @param newRegistry YoVariableRegistry to duplicate {@code this} to. * @return the duplicate of {@code this}. */ public YoFrameVector2D duplicate(YoVariableRegistry newRegistry) { YoDouble x = (YoDouble) newRegistry.getVariable(getYoX().getFullNameWithNameSpace()); YoDouble y = (YoDouble) newRegistry.getVariable(getYoY().getFullNameWithNameSpace()); return new YoFrameVector2D(x, y, getReferenceFrame()); } }
/** * Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given * {@link YoVariableRegistry}. * <p> * This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate * of the registry that was used to create {@code this}, this method searches for the duplicated * {@code YoVariable}s and use them to duplicate {@code this}. * </p> * * @param newRegistry YoVariableRegistry to duplicate {@code this} to. * @return the duplicate of {@code this}. */ public YoFramePoint2D duplicate(YoVariableRegistry newRegistry) { YoDouble x = (YoDouble) newRegistry.getVariable(getYoX().getFullNameWithNameSpace()); YoDouble y = (YoDouble) newRegistry.getVariable(getYoY().getFullNameWithNameSpace()); return new YoFramePoint2D(x, y, getReferenceFrame()); } }