Watermark

Inheritance: java.lang.Object

public class Watermark

Utility to encode/decode blind watermark to/from a mesh. 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

MethodDescription
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.
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:

ParameterTypeDescription
inputMeshThe 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:

ParameterTypeDescription
inputMeshThe mesh to extract watermark
passwordjava.lang.StringThe 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:

ParameterTypeDescription
inputMeshMesh to encode a blind watermark
textjava.lang.StringText to encode to the mesh

Returns: Mesh - A new mesh instance with blind watermark encoded 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:

ParameterTypeDescription
inputMeshMesh to encode a blind watermark
textjava.lang.StringText to encode to the mesh
passwordjava.lang.StringPassword to protect the watermark, it’s optional

Returns: Mesh - A new mesh instance with blind watermark encoded 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:

ParameterTypeDescription
arg0java.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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int