New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CartoonEdgeFilter failing to override read() and write() #1640
Labels
Milestone
Comments
Thanks for documenting the issue! |
Do you also plan to submit a fix? |
stephengold
added
defect
Something that is supposed to work, but doesn't. Less severe than a "bug"
Easy first fix
labels
Nov 6, 2021
I think the code to add is this. I prefer to let you complete the optimizations, you are more experienced than me :) @Override
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule oc = ex.getCapsule(this);
oc.write(edgeWidth, "edgeWidth", 1.0f);
oc.write(edgeIntensity, "edgeIntensity", 1.0f);
oc.write(normalThreshold, "normalThreshold", 0.5f);
oc.write(depthThreshold, "depthThreshold", 0.1f);
oc.write(normalSensitivity, "normalSensitivity", 1.0f);
oc.write(depthSensitivity, "depthSensitivity", 10.0f);
oc.write(edgeColor, "edgeColor", ColorRGBA.Black);
}
@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule ic = im.getCapsule(this);
edgeWidth = ic.readFloat("edgeWidth", 1.0f);
edgeIntensity = ic.readFloat("edgeIntensity", 1.0f);
normalThreshold = ic.readFloat("normalThreshold", 0.5f);
depthThreshold = ic.readFloat("depthThreshold", 0.1f);
normalSensitivity = ic.readFloat("normalSensitivity", 1.0f);
depthSensitivity = ic.readFloat("depthSensitivity", 10.0f);
edgeColor = (ColorRGBA) ic.readSavable("edgeColor", ColorRGBA.Black.clone());
} |
Would you like to gain experience? |
I can try. Write me the details on the forum in private chat. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CartoonEdgeFilter class does not override read() and write()
The text was updated successfully, but these errors were encountered: