Watermark
Inheritance: java.lang.Object
public class Watermark
Utility to encode/decode blind watermark to/from a mesh. Remarks: Both Watermark and Watermark will perform license check Trial usage will throw exception, you can use TrialException.getSuppressTrialException to suppress the exception, but it will not lift the restriction here. A valid license is required to use these features without any restrictions. Example: The following code shows how to encode a blind watermark into a mesh and decode it.
Mesh mesh = (new Cylinder()).toMesh();
Mesh encodedMesh = Watermark.encodeWatermark(mesh, "Hello", null);
String watermark = Watermark.decodeWatermark(encodedMesh, null);
Methods
| Method | Description |
|---|---|
| decodeWatermark(Mesh input) | Decode the watermark from a mesh |
| decodeWatermark(Mesh input, String password) | Decode the watermark from a mesh |
| encodeWatermark(Mesh input, String text) | Encode a text into mesh’ blind watermark. |
| encodeWatermark(Mesh input, String text, String password) | Encode a text into mesh’ blind watermark. |
| encodeWatermark(Mesh input, String text, String password, boolean permanent) | Encode a text into mesh’ blind watermark. |
| equals(Object arg0) | |
| getClass() | |
| hashCode() | |
| notify() | |
| notifyAll() | |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
decodeWatermark(Mesh input)
public static String decodeWatermark(Mesh input)
Decode the watermark from a mesh
Parameters:
| Parameter | Type | Description |
|---|---|---|
| input | Mesh | The mesh to extract watermark |
Returns: java.lang.String - Blind watermark or null if no watermark decoded.
decodeWatermark(Mesh input, String password)
public static String decodeWatermark(Mesh input, String password)
Decode the watermark from a mesh
Parameters:
| Parameter | Type | Description |
|---|---|---|
| input | Mesh | The mesh to extract watermark |
| password | java.lang.String | The password to decrypt the watermark |
Returns: java.lang.String - Blind watermark or null if no watermark decoded.
encodeWatermark(Mesh input, String text)
public static Mesh encodeWatermark(Mesh input, String text)
Encode a text into mesh’ blind watermark.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| input | Mesh | Mesh to encode a blind watermark |
| text | java.lang.String | Text to encode to the mesh |
Returns: Mesh - A new mesh instance with blind watermark encoded Remarks: Both Watermark and Watermark will perform license check Trial usage will throw exception, you can use TrialException.getSuppressTrialException to suppress the exception, but it will not lift the restriction here. A valid license is required to use these features without any restrictions. Example: The following code shows how to encode a blind watermark into a mesh and save to ply file
Mesh mesh = (new Cylinder()).toMesh();
Mesh encodedMesh = Watermark.encodeWatermark(mesh, "Hello");
new Scene(encodedMesh).save("test.ply");
encodeWatermark(Mesh input, String text, String password)
public static Mesh encodeWatermark(Mesh input, String text, String password)
Encode a text into mesh’ blind watermark.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| input | Mesh | Mesh to encode a blind watermark |
| text | java.lang.String | Text to encode to the mesh |
| password | java.lang.String | Password to protect the watermark, it’s optional |
Returns: Mesh - A new mesh instance with blind watermark encoded Remarks: Both Watermark and Watermark will perform license check Trial usage will throw exception, you can use TrialException.getSuppressTrialException to suppress the exception, but it will not lift the restriction here. A valid license is required to use these features without any restrictions. Example: The following code shows how to encode a blind watermark into a mesh and save to ply file
Mesh mesh = (new Cylinder()).toMesh();
var encodedMesh = Watermark.encodeWatermark(mesh, "Hello", "password");
new Scene(encodedMesh).save("test.ply");
encodeWatermark(Mesh input, String text, String password, boolean permanent)
public static Mesh encodeWatermark(Mesh input, String text, String password, boolean permanent)
Encode a text into mesh’ blind watermark.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| input | Mesh | Mesh to encode a blind watermark |
| text | java.lang.String | Text to encode to the mesh |
| password | java.lang.String | Password to protect the watermark, it’s optional |
| permanent | boolean | The permanent watermark will not be overwritten or removed. |
Returns: Mesh - A new mesh instance with blind watermark encoded Remarks: Both Watermark and Watermark will perform license check Trial usage will throw exception, you can use TrialException.getSuppressTrialException to suppress the exception, but it will not lift the restriction here. A valid license is required to use these features without any restrictions. Example: The following code shows how to encode a blind watermark into a mesh and save to ply file
Mesh mesh = (new Cylinder()).toMesh();
var encodedMesh = Watermark.encodeWatermark(mesh, "Hello", "password");
new Scene(encodedMesh).save("test.ply");
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |