RvmSaveOptions
Inheritance: java.lang.Object, com.aspose.threed.IOConfig, com.aspose.threed.SaveOptions
public class RvmSaveOptions extends SaveOptions
Save options for Aveva PDMS RVM file. Example: The following code shows how to export attribute in RVM.
Scene scene = new Scene();
var box = (new Box()).toMesh();
//node's name is required to export attributes
var boxNode = scene.getRootNode().createChildNode("box", box);
boxNode.setProperty("rvm:Price", 12.0);
boxNode.setProperty("rvm:Weight", 30.0);
var opt = new RvmSaveOptions();
//Properties with rvm: prefix will be exported.
opt.setExportAttributes(true);
opt.setAttributePrefix("rvm:");
opt.setAuthor("Aspose.3D");
opt.setFileNote("Test attribute export");
scene.save("output.rvm", opt);
Constructors
Constructor | Description |
---|---|
RvmSaveOptions() | Constructor of RvmSaveOptions |
RvmSaveOptions(FileContentType contentType) | Constructor of RvmSaveOptions |
Methods
Method | Description |
---|---|
equals(Object arg0) | |
getAttributeListFile() | Gets the file name of attribute list file, exporter will generate a name based on the .rvm file name when this property is undefined, default value is null. |
getAttributePrefix() | Gets the prefix of which attributes that will be exported, the exported property will contains no prefix, custom properties with different prefix will not be exported, default value is ‘rvm:’. |
getAuthor() | Author information, default value is ‘3d@aspose’ |
getClass() | |
getCreationTime() | The timestamp that exported this file, default value is current time |
getEncoding() | Gets the default encoding for text-based files. |
getExportAttributes() | Gets whether to export the attribute list to an external .att file, default value is false. |
getExportTextures() | Try to copy textures used in scene to output directory. |
getFileFormat() | Gets the file format that specified in current Save/Load option. |
getFileName() | The file name of the exporting/importing scene. |
getFileNote() | File note in the file header. |
getFileSystem() | Allow user to handle how to manage the external dependencies during load/save. |
getFileSystemFactory() | Gets the factory class for FileSystem. |
getLookupPaths() | Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load. |
hashCode() | |
notify() | |
notifyAll() | |
setAttributeListFile(String value) | Sets the file name of attribute list file, exporter will generate a name based on the .rvm file name when this property is undefined, default value is null. |
setAttributePrefix(String value) | Sets the prefix of which attributes that will be exported, the exported property will contains no prefix, custom properties with different prefix will not be exported, default value is ‘rvm:’. |
setAuthor(String value) | Author information, default value is ‘3d@aspose’ |
setCreationTime(String value) | The timestamp that exported this file, default value is current time |
setEncoding(Charset value) | Sets the default encoding for text-based files. |
setExportAttributes(boolean value) | Sets whether to export the attribute list to an external .att file, default value is false. |
setExportTextures(boolean value) | Try to copy textures used in scene to output directory. |
setFileName(String value) | The file name of the exporting/importing scene. |
setFileNote(String value) | File note in the file header. |
setFileSystem(FileSystem value) | Allow user to handle how to manage the external dependencies during load/save. |
setFileSystemFactory(FileSystemFactory value) | Sets the factory class for FileSystem. |
setLookupPaths(ArrayList | Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
RvmSaveOptions()
public RvmSaveOptions()
Constructor of RvmSaveOptions
RvmSaveOptions(FileContentType contentType)
public RvmSaveOptions(FileContentType contentType)
Constructor of RvmSaveOptions
Parameters:
Parameter | Type | Description |
---|---|---|
contentType | FileContentType | Text or binary RVM file? |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getAttributeListFile()
public String getAttributeListFile()
Gets the file name of attribute list file, exporter will generate a name based on the .rvm file name when this property is undefined, default value is null.
Returns: java.lang.String - the file name of attribute list file, exporter will generate a name based on the .rvm file name when this property is undefined, default value is null. Example: The following code shows how to export attribute in RVM.
Scene scene = new Scene();
var box = (new Box()).toMesh();
//node's name is required to export attributes
var boxNode = scene.getRootNode().createChildNode("box", box);
boxNode.setProperty("rvm:Price", 12.0);
boxNode.setProperty("rvm:Weight", 30.0);
var opt = new RvmSaveOptions();
//Properties with rvm: prefix will be exported.
opt.setExportAttributes(true);
opt.setAttributePrefix("rvm:");
opt.setAuthor("Aspose.3D");
opt.setFileNote("Test attribute export");
scene.save("output.rvm", opt);
getAttributePrefix()
public String getAttributePrefix()
Gets the prefix of which attributes that will be exported, the exported property will contains no prefix, custom properties with different prefix will not be exported, default value is ‘rvm:’. For example if a property is rvm:Refno=345, the exported attribute will be Refno = 345, the prefix is stripped.
Returns: java.lang.String - the prefix of which attributes that will be exported, the exported property will contains no prefix, custom properties with different prefix will not be exported, default value is ‘rvm:’. For example if a property is rvm:Refno=345, the exported attribute will be Refno = 345, the prefix is stripped. Example: The following code shows how to export attribute in RVM.
Scene scene = new Scene();
var box = (new Box()).toMesh();
//node's name is required to export attributes
var boxNode = scene.getRootNode().createChildNode("box", box);
boxNode.setProperty("rvm:Price", 12.0);
boxNode.setProperty("rvm:Weight", 30.0);
var opt = new RvmSaveOptions();
//Properties with rvm: prefix will be exported.
opt.setExportAttributes(true);
opt.setAttributePrefix("rvm:");
opt.setAuthor("Aspose.3D");
opt.setFileNote("Test attribute export");
scene.save("output.rvm", opt);
getAuthor()
public String getAuthor()
Author information, default value is ‘3d@aspose’
Returns: java.lang.String - Author information, default value is ‘3d@aspose’ Example: The following code shows how to export attribute in RVM.
Scene scene = new Scene();
var box = (new Box()).toMesh();
//node's name is required to export attributes
var boxNode = scene.getRootNode().createChildNode("box", box);
boxNode.setProperty("rvm:Price", 12.0);
boxNode.setProperty("rvm:Weight", 30.0);
var opt = new RvmSaveOptions();
//Properties with rvm: prefix will be exported.
opt.setExportAttributes(true);
opt.setAttributePrefix("rvm:");
opt.setAuthor("Aspose.3D");
opt.setFileNote("Test attribute export");
scene.save("output.rvm", opt);
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCreationTime()
public String getCreationTime()
The timestamp that exported this file, default value is current time
Returns: java.lang.String - The timestamp that exported this file, default value is current time
getEncoding()
public Charset getEncoding()
Gets the default encoding for text-based files. Default value is null which means the importer/exporter will decide which encoding to use.
Returns: java.nio.charset.Charset - the default encoding for text-based files. Default value is null which means the importer/exporter will decide which encoding to use.
getExportAttributes()
public boolean getExportAttributes()
Gets whether to export the attribute list to an external .att file, default value is false.
Returns: boolean - whether to export the attribute list to an external .att file, default value is false. Example: The following code shows how to export attribute in RVM.
Scene scene = new Scene();
var box = (new Box()).toMesh();
//node's name is required to export attributes
var boxNode = scene.getRootNode().createChildNode("box", box);
boxNode.setProperty("rvm:Price", 12.0);
boxNode.setProperty("rvm:Weight", 30.0);
var opt = new RvmSaveOptions();
//Properties with rvm: prefix will be exported.
opt.setExportAttributes(true);
opt.setAttributePrefix("rvm:");
opt.setAuthor("Aspose.3D");
opt.setFileNote("Test attribute export");
scene.save("output.rvm", opt);
getExportTextures()
public boolean getExportTextures()
Try to copy textures used in scene to output directory.
Returns: boolean - Try to copy textures used in scene to output directory.
getFileFormat()
public FileFormat getFileFormat()
Gets the file format that specified in current Save/Load option.
Returns: FileFormat - the file format that specified in current Save/Load option.
getFileName()
public String getFileName()
The file name of the exporting/importing scene. This is optional, but useful when serialize external assets like OBJ’s material.
Returns: java.lang.String - The file name of the exporting/importing scene. This is optional, but useful when serialize external assets like OBJ’s material.
getFileNote()
public String getFileNote()
File note in the file header.
Returns: java.lang.String - File note in the file header. Example: The following code shows how to export attribute in RVM.
Scene scene = new Scene();
var box = (new Box()).toMesh();
//node's name is required to export attributes
var boxNode = scene.getRootNode().createChildNode("box", box);
boxNode.setProperty("rvm:Price", 12.0);
boxNode.setProperty("rvm:Weight", 30.0);
var opt = new RvmSaveOptions();
//Properties with rvm: prefix will be exported.
opt.setExportAttributes(true);
opt.setAttributePrefix("rvm:");
opt.setAuthor("Aspose.3D");
opt.setFileNote("Test attribute export");
scene.save("output.rvm", opt);
getFileSystem()
public FileSystem getFileSystem()
Allow user to handle how to manage the external dependencies during load/save.
Returns: FileSystem - Allow user to handle how to manage the external dependencies during load/save. Example: The default FileSystem is LocalFileSystem, it is not safe in environment like server side, But you can override the file system access by specifying a different implementation. Aspose.3D provides different FileSystem implementation like:
- Memory-based file system
- Directory-based file system
- Dummy file system
- Zip file system
And you can also use your own implementation.
Scene scene = new Scene();
var material = new PhongMaterial();
var boxNode = scene.getRootNode().createChildNode(new Box());
boxNode.setMaterial(material);
var opt = new ObjSaveOptions();
var memFs = new HashMap<string, MemoryStream>();
opt.setFileSystem(FileSystem.createMemoryFileSystem(memFs));
opt.setFileName("output.obj");
try(var output = new ByteArrayOutputStream()) {
scene.save(output, opt);
//The material will be written to variable memFs named output.mtl
var materialInBytes = memFs["output.mtl"].toArray();
}
getFileSystemFactory()
public static FileSystemFactory getFileSystemFactory()
Gets the factory class for FileSystem. The default factory will create com.aspose.threed.LocalFileSystem which is not suitable for server environment.
Returns: FileSystemFactory - the factory class for FileSystem. The default factory will create com.aspose.threed.LocalFileSystem which is not suitable for server environment. Example: The default FileSystem in SaveOptions/LoadOptions is directory-based file system, You can override the default implementation by specify it through IOConfig.FileSystemFactory:
IOConfig.setFileSystemFactory(new FileSystemFactory() {
@Override
public FileSystem call() {
return FileSystem.createDummyFileSystem();
}
});
Scene scene = new Scene();
var material = new PhongMaterial();
var boxNode = scene.getRootNode().createChildNode(new Box());
boxNode.setMaterial(material);
//opt.FileSystem would be dummy file system now
var opt = new ObjSaveOptions();
scene.Save("output.obj", opt);
//the material file output.mtl will not be written to any places because we've configured a dummy file system as default implementation.
getLookupPaths()
public ArrayList<String> getLookupPaths()
Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load.
Returns: java.util.ArrayList<java.lang.String> - Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load. Example: The following code shows how to manually specify the look up textures, so the importer can find
var opt = new ObjLoadOptions();
//Specify the lookup paths, so the textures can be located.
opt.getLookupPaths().add("textures");
var scene = Scene.fromFile("input.obj", opt);
scene.save("output.glb");
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAttributeListFile(String value)
public void setAttributeListFile(String value)
Sets the file name of attribute list file, exporter will generate a name based on the .rvm file name when this property is undefined, default value is null.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | New value Example: The following code shows how to export attribute in RVM. |
Scene scene = new Scene();
var box = (new Box()).toMesh();
//node's name is required to export attributes
var boxNode = scene.getRootNode().createChildNode("box", box);
boxNode.setProperty("rvm:Price", 12.0);
boxNode.setProperty("rvm:Weight", 30.0);
var opt = new RvmSaveOptions();
//Properties with rvm: prefix will be exported.
opt.setExportAttributes(true);
opt.setAttributePrefix("rvm:");
opt.setAuthor("Aspose.3D");
opt.setFileNote("Test attribute export");
scene.save("output.rvm", opt);
``` |
### setAttributePrefix(String value) {#setAttributePrefix-java.lang.String-}
public void setAttributePrefix(String value)
Sets the prefix of which attributes that will be exported, the exported property will contains no prefix, custom properties with different prefix will not be exported, default value is 'rvm:'. For example if a property is rvm:Refno=345, the exported attribute will be Refno = 345, the prefix is stripped.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | New value **Example:** The following code shows how to export attribute in RVM.
Scene scene = new Scene(); var box = (new Box()).toMesh(); //node’s name is required to export attributes var boxNode = scene.getRootNode().createChildNode(“box”, box); boxNode.setProperty(“rvm:Price”, 12.0); boxNode.setProperty(“rvm:Weight”, 30.0); var opt = new RvmSaveOptions(); //Properties with rvm: prefix will be exported. opt.setExportAttributes(true); opt.setAttributePrefix(“rvm:”); opt.setAuthor(“Aspose.3D”); opt.setFileNote(“Test attribute export”); scene.save(“output.rvm”, opt);
### setAuthor(String value) {#setAuthor-java.lang.String-}
public void setAuthor(String value)
Author information, default value is '3d@aspose'
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | New value **Example:** The following code shows how to export attribute in RVM.
Scene scene = new Scene(); var box = (new Box()).toMesh(); //node’s name is required to export attributes var boxNode = scene.getRootNode().createChildNode(“box”, box); boxNode.setProperty(“rvm:Price”, 12.0); boxNode.setProperty(“rvm:Weight”, 30.0); var opt = new RvmSaveOptions(); //Properties with rvm: prefix will be exported. opt.setExportAttributes(true); opt.setAttributePrefix(“rvm:”); opt.setAuthor(“Aspose.3D”); opt.setFileNote(“Test attribute export”); scene.save(“output.rvm”, opt);
### setCreationTime(String value) {#setCreationTime-java.lang.String-}
public void setCreationTime(String value)
The timestamp that exported this file, default value is current time
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | New value |
### setEncoding(Charset value) {#setEncoding-java.nio.charset.Charset-}
public void setEncoding(Charset value)
Sets the default encoding for text-based files. Default value is null which means the importer/exporter will decide which encoding to use.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.nio.charset.Charset | New value |
### setExportAttributes(boolean value) {#setExportAttributes-boolean-}
public void setExportAttributes(boolean value)
Sets whether to export the attribute list to an external .att file, default value is false.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | New value **Example:** The following code shows how to export attribute in RVM.
Scene scene = new Scene(); var box = (new Box()).toMesh(); //node’s name is required to export attributes var boxNode = scene.getRootNode().createChildNode(“box”, box); boxNode.setProperty(“rvm:Price”, 12.0); boxNode.setProperty(“rvm:Weight”, 30.0); var opt = new RvmSaveOptions(); //Properties with rvm: prefix will be exported. opt.setExportAttributes(true); opt.setAttributePrefix(“rvm:”); opt.setAuthor(“Aspose.3D”); opt.setFileNote(“Test attribute export”); scene.save(“output.rvm”, opt);
### setExportTextures(boolean value) {#setExportTextures-boolean-}
public void setExportTextures(boolean value)
Try to copy textures used in scene to output directory.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | New value |
### setFileName(String value) {#setFileName-java.lang.String-}
public void setFileName(String value)
The file name of the exporting/importing scene. This is optional, but useful when serialize external assets like OBJ's material.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | New value |
### setFileNote(String value) {#setFileNote-java.lang.String-}
public void setFileNote(String value)
File note in the file header.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | New value **Example:** The following code shows how to export attribute in RVM.
Scene scene = new Scene(); var box = (new Box()).toMesh(); //node’s name is required to export attributes var boxNode = scene.getRootNode().createChildNode(“box”, box); boxNode.setProperty(“rvm:Price”, 12.0); boxNode.setProperty(“rvm:Weight”, 30.0); var opt = new RvmSaveOptions(); //Properties with rvm: prefix will be exported. opt.setExportAttributes(true); opt.setAttributePrefix(“rvm:”); opt.setAuthor(“Aspose.3D”); opt.setFileNote(“Test attribute export”); scene.save(“output.rvm”, opt);
### setFileSystem(FileSystem value) {#setFileSystem-com.aspose.threed.FileSystem-}
public void setFileSystem(FileSystem value)
Allow user to handle how to manage the external dependencies during load/save.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [FileSystem](../../com.aspose.threed/filesystem) | New value **Example:** The default FileSystem is LocalFileSystem, it is not safe in environment like server side, But you can override the file system access by specifying a different implementation. Aspose.3D provides different FileSystem implementation like:
* Memory-based file system
* Directory-based file system
* Dummy file system
* Zip file system
And you can also use your own implementation.
Scene scene = new Scene(); var material = new PhongMaterial(); var boxNode = scene.getRootNode().createChildNode(new Box()); boxNode.setMaterial(material);
var opt = new ObjSaveOptions();
var memFs = new HashMap<string, MemoryStream>();
opt.setFileSystem(FileSystem.createMemoryFileSystem(memFs));
opt.setFileName("output.obj");
try(var output = new ByteArrayOutputStream()) {
scene.save(output, opt);
//The material will be written to variable memFs named output.mtl
var materialInBytes = memFs["output.mtl"].toArray();
}
### setFileSystemFactory(FileSystemFactory value) {#setFileSystemFactory-com.aspose.threed.FileSystemFactory-}
public static void setFileSystemFactory(FileSystemFactory value)
Sets the factory class for FileSystem. The default factory will create com.aspose.threed.LocalFileSystem which is not suitable for server environment.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [FileSystemFactory](../../com.aspose.threed/filesystemfactory) | New value **Example:** The default FileSystem in SaveOptions/LoadOptions is directory-based file system, You can override the default implementation by specify it through IOConfig.FileSystemFactory:
IOConfig.setFileSystemFactory(new FileSystemFactory() { @Override public FileSystem call() { return FileSystem.createDummyFileSystem(); } });
Scene scene = new Scene();
var material = new PhongMaterial();
var boxNode = scene.getRootNode().createChildNode(new Box());
boxNode.setMaterial(material);
//opt.FileSystem would be dummy file system now
var opt = new ObjSaveOptions();
scene.Save("output.obj", opt);
//the material file output.mtl will not be written to any places because we've configured a dummy file system as default implementation.
### setLookupPaths(ArrayList<String> value) {#setLookupPaths-java.util.ArrayList-java.lang.String--}
public void setLookupPaths(ArrayList
Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.util.ArrayList<java.lang.String> | New value **Example:** The following code shows how to manually specify the look up textures, so the importer can find
var opt = new ObjLoadOptions(); //Specify the lookup paths, so the textures can be located. opt.getLookupPaths().add(“textures”); var scene = Scene.fromFile(“input.obj”, opt); scene.save(“output.glb”);
### toString() {#toString--}
public String toString()
**Returns:**
java.lang.String
### wait() {#wait--}
public final void wait()
### wait(long arg0) {#wait-long-}
public final void wait(long arg0)
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long | |
### wait(long arg0, int arg1) {#wait-long-int-}
public final void wait(long arg0, int arg1)
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long | |
| arg1 | int | |