RvmSaveOptions
Inheritance: java.lang.Object, com.aspose.threed.IOConfig, com.aspose.threed.SaveOptions
public class RvmSaveOptions extends SaveOptions
Opzioni di salvataggio per file Aveva PDMS RVM. Esempio: Il codice seguente mostra come esportare l’attributo 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);
Costruttori
| Costruttore | Descrizione |
|---|---|
| RvmSaveOptions() | Costruttore di RvmSaveOptions |
| RvmSaveOptions(FileContentType contentType) | Costruttore di RvmSaveOptions |
Metodi
| Metodo | Descrizione |
|---|---|
| equals(Object arg0) | |
| getAttributeListFile() | Restituisce il nome file del file di elenco attributi; l’esportatore genererà un nome basato sul nome del file .rvm quando questa proprietà è indefinita, il valore predefinito è null. |
| getAttributePrefix() | Restituisce il prefisso degli attributi che verranno esportati; la proprietà esportata non conterrà alcun prefisso, le proprietà personalizzate con prefisso diverso non saranno esportate, il valore predefinito è ‘rvm:’. |
| getAuthor() | Informazioni sull’autore, il valore predefinito è ‘3d@aspose’ |
| getClass() | |
| getCreationTime() | Il timestamp che ha esportato questo file, il valore predefinito è l’ora corrente |
| getEncoding() | Restituisce la codifica predefinita per i file di testo. |
| getExportAttributes() | Restituisce se esportare l’elenco degli attributi in un file .att esterno, il valore predefinito è false. |
| getExportTextures() | Prova a copiare le texture usate nella scena nella directory di output. |
| getFileFormat() | Restituisce il formato file specificato nell’opzione Salva/Carica corrente. |
| getFileName() | Il nome file della scena di esportazione/importazione. |
| getFileNote() | Nota del file nell’intestazione del file. |
| getFileSystem() | Consente all’utente di decidere come gestire le dipendenze esterne durante il caricamento/salvataggio. |
| getFileSystemFactory() | Restituisce la classe factory per FileSystem. |
| getLookupPaths() | Alcuni file, come OBJ, dipendono da file esterni; i percorsi di ricerca consentono ad Aspose.3D di cercare il file esterno da caricare. |
| hashCode() | |
| notify() | |
| notifyAll() | |
| setAttributeListFile(String value) | Imposta il nome del file dell’elenco degli attributi, l’esportatore genererà un nome basato sul nome del file .rvm quando questa proprietà è indefinita, il valore predefinito è null. |
| setAttributePrefix(String value) | Imposta il prefisso degli attributi da esportare, la proprietà esportata non conterrà alcun prefisso, le proprietà personalizzate con prefisso diverso non saranno esportate, il valore predefinito è ‘rvm:’. |
| setAuthor(String value) | Informazioni sull’autore, il valore predefinito è ‘3d@aspose’ |
| setCreationTime(String value) | Il timestamp che ha esportato questo file, il valore predefinito è l’ora corrente |
| setEncoding(Charset value) | Imposta la codifica predefinita per i file di testo. |
| setExportAttributes(boolean value) | Imposta se esportare l’elenco degli attributi in un file .att esterno, il valore predefinito è false. |
| setExportTextures(boolean value) | Prova a copiare le texture usate nella scena nella directory di output. |
| setFileName(String value) | Il nome file della scena di esportazione/importazione. |
| setFileNote(String value) | Nota del file nell’intestazione del file. |
| setFileSystem(FileSystem value) | Consente all’utente di decidere come gestire le dipendenze esterne durante il caricamento/salvataggio. |
| setFileSystemFactory(FileSystemFactory value) | Imposta la classe factory per FileSystem. |
| setLookupPaths(ArrayList | Alcuni file, come OBJ, dipendono da file esterni; i percorsi di ricerca consentono ad Aspose.3D di cercare il file esterno da caricare. |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
RvmSaveOptions()
public RvmSaveOptions()
Costruttore di RvmSaveOptions
RvmSaveOptions(FileContentType contentType)
public RvmSaveOptions(FileContentType contentType)
Costruttore di RvmSaveOptions
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| contentType | FileContentType | File RVM di testo o binario? |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getAttributeListFile()
public String getAttributeListFile()
Restituisce il nome file del file di elenco attributi; l’esportatore genererà un nome basato sul nome del file .rvm quando questa proprietà è indefinita, il valore predefinito è null.
Returns: java.lang.String - il nome del file dell’elenco degli attributi, l’esportatore genererà un nome basato sul nome del file .rvm quando questa proprietà è indefinita, il valore predefinito è null. Example: Il codice seguente mostra come esportare l’attributo 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()
Restituisce il prefisso degli attributi da esportare, la proprietà esportata non conterrà alcun prefisso, le proprietà personalizzate con prefisso diverso non saranno esportate, il valore predefinito è ‘rvm:’. Ad esempio, se una proprietà è rvm:Refno=345, l’attributo esportato sarà Refno = 345, il prefisso viene rimosso.
Returns: java.lang.String - il prefisso degli attributi da esportare, la proprietà esportata non conterrà alcun prefisso, le proprietà personalizzate con prefisso diverso non saranno esportate, il valore predefinito è ‘rvm:’. Ad esempio, se una proprietà è rvm:Refno=345, l’attributo esportato sarà Refno = 345, il prefisso viene rimosso. Example: Il codice seguente mostra come esportare l’attributo 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()
Informazioni sull’autore, il valore predefinito è ‘3d@aspose’
Returns: java.lang.String - Informazioni sull’autore, il valore predefinito è ‘3d@aspose’ Example: Il codice seguente mostra come esportare l’attributo 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()
Il timestamp che ha esportato questo file, il valore predefinito è l’ora corrente
Returns: java.lang.String - Il timestamp che ha esportato questo file, il valore predefinito è l’ora corrente
getEncoding()
public Charset getEncoding()
Restituisce la codifica predefinita per i file di testo. Il valore predefinito è null, il che significa che l’importatore/esportatore deciderà quale codifica utilizzare.
Returns: java.nio.charset.Charset - la codifica predefinita per i file di testo. Il valore predefinito è null, il che significa che l’importatore/esportatore deciderà quale codifica utilizzare.
getExportAttributes()
public boolean getExportAttributes()
Restituisce se esportare l’elenco degli attributi in un file .att esterno, il valore predefinito è false.
Returns: boolean - se esportare l’elenco degli attributi in un file .att esterno, il valore predefinito è false. Example: Il codice seguente mostra come esportare l’attributo 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()
Prova a copiare le texture usate nella scena nella directory di output.
Returns: boolean - Prova a copiare le texture usate nella scena nella directory di output.
getFileFormat()
public FileFormat getFileFormat()
Restituisce il formato file specificato nell’opzione Salva/Carica corrente.
Returns: FileFormat - the file format that specified in current Save/Load option.
getFileName()
public String getFileName()
Il nome file della scena di esportazione/importazione. È opzionale, ma utile quando si serializzano risorse esterne come il materiale di OBJ.
Returns: java.lang.String - Il nome file della scena di esportazione/importazione. È opzionale, ma utile quando si serializzano risorse esterne come il materiale di OBJ.
getFileNote()
public String getFileNote()
Nota del file nell’intestazione del file.
Returns: java.lang.String - Nota del file nell’intestazione del file. Example: Il codice seguente mostra come esportare l’attributo 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()
Consente all’utente di decidere come gestire le dipendenze esterne durante il caricamento/salvataggio.
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
E puoi anche utilizzare la tua implementazione.
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()
Ottiene la classe factory per FileSystem. La factory predefinita creerà com.aspose.threed.LocalFileSystem, che non è adatta per l’ambiente server.
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()
Alcuni file, come OBJ, dipendono da file esterni; i percorsi di ricerca consentono ad Aspose.3D di cercare il file esterno da caricare.
Returns: java.util.ArrayList<java.lang.String> - Alcuni file come OBJ dipendono da file esterni; i percorsi di ricerca consentiranno ad Aspose.3D di cercare i file esterni da caricare. Esempio: Il codice seguente mostra come specificare manualmente le texture di ricerca, così l’importatore può trovarle
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)
Imposta il nome del file dell’elenco degli attributi, l’esportatore genererà un nome basato sul nome del file .rvm quando questa proprietà è indefinita, il valore predefinito è null.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| valore | java.lang.String |
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)
Imposta il prefisso degli attributi da esportare, la proprietà esportata non conterrà alcun prefisso, le proprietà personalizzate con prefisso diverso non saranno esportate, il valore predefinito è 'rvm:'. Ad esempio, se una proprietà è rvm:Refno=345, l'attributo esportato sarà Refno = 345, il prefisso viene rimosso.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| | valore | java.lang.String | Nuovo valore **Example:** Il codice seguente mostra come esportare l'attributo 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)
Informazioni sull'autore, il valore predefinito è '3d@aspose'
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| | valore | java.lang.String | Nuovo valore **Example:** Il codice seguente mostra come esportare l'attributo 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)
Il timestamp che ha esportato questo file, il valore predefinito è l'ora corrente
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| valore | java.lang.String | Nuovo valore |
### setEncoding(Charset value) {#setEncoding-java.nio.charset.Charset-}
public void setEncoding(Charset value)
Imposta la codifica predefinita per i file basati su testo. Il valore predefinito è null, il che significa che l'importatore/esportatore deciderà quale codifica utilizzare.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| valore | java.nio.charset.Charset | Nuovo valore |
### setExportAttributes(boolean value) {#setExportAttributes-boolean-}
public void setExportAttributes(boolean value)
Imposta se esportare l'elenco degli attributi in un file .att esterno, il valore predefinito è false.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| | valore | boolean | Nuovo valore **Example:** Il codice seguente mostra come esportare l'attributo 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)
Prova a copiare le texture usate nella scena nella directory di output.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| valore | boolean | Nuovo valore |
### setFileName(String value) {#setFileName-java.lang.String-}
public void setFileName(String value)
Il nome file della scena di esportazione/importazione. È opzionale, ma utile quando si serializzano risorse esterne come il materiale di OBJ.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| valore | java.lang.String | Nuovo valore |
### setFileNote(String value) {#setFileNote-java.lang.String-}
public void setFileNote(String value)
Nota del file nell'intestazione del file.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| | valore | java.lang.String | Nuovo valore **Example:** Il codice seguente mostra come esportare l'attributo 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)
Consente all'utente di decidere come gestire le dipendenze esterne durante il caricamento/salvataggio.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| | value | [FileSystem](../../com.aspose.threed/filesystem) | Nuovo valore **Esempio:** Il FileSystem predefinito è LocalFileSystem, non è sicuro in ambienti come il lato server, ma è possibile sovrascrivere l'accesso al file system specificando un'implementazione diversa. Aspose.3D fornisce diverse implementazioni di FileSystem come: |
* Memory-based file system
* Directory-based file system
* Dummy file system
* Zip file system
E puoi anche utilizzare la tua implementazione.
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)
Imposta la classe factory per FileSystem. La factory predefinita creerà com.aspose.threed.LocalFileSystem, che non è adatta per l'ambiente server.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| | value | [FileSystemFactory](../../com.aspose.threed/filesystemfactory) | Nuovo valore **Esempio:** Il FileSystem predefinito in SaveOptions/LoadOptions è un file system basato su directory; è possibile sovrascrivere l'implementazione predefinita specificandola tramite 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
Alcuni file, come OBJ, dipendono da file esterni; i percorsi di ricerca consentono ad Aspose.3D di cercare il file esterno da caricare.
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| | valore | java.util.ArrayList<java.lang.String> | Nuovo valore **Esempio:** Il codice seguente mostra come specificare manualmente le texture di ricerca, così l'importatore può trovarle |
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:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| arg0 | long | |
### wait(long arg0, int arg1) {#wait-long-int-}
public final void wait(long arg0, int arg1)
**Parameters:**
| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| arg0 | long | |
| arg1 | int | |