|
Scene * | createScene (sceneId_t sceneId, const SceneConfig &sceneConfig=SceneConfig(), const char *name=nullptr) |
| Create a new empty Scene. More...
|
|
Scene * | loadSceneFromFile (const char *fileName, bool localOnly=false) |
| Loads scene contents and resources from a file. More...
|
|
Scene * | loadSceneFromMemory (std::unique_ptr< unsigned char[], void(*)(const unsigned char *)> data, size_t size, bool localOnly=false) |
| Loads scene contents and resources from a memory buffer. More...
|
|
Scene * | loadSceneFromFileDescriptor (int fd, size_t offset, size_t length, bool localOnly=false) |
| Loads scene contents and resources from an open file descriptor. More...
|
|
Scene * | loadSceneFromFileDescriptor (sceneId_t sceneId, int fd, size_t offset, size_t length, bool localOnly=false) |
| Loads scene contents and resources from an open file descriptor. This overload overrides the sceneId stored in the file. More...
|
|
status_t | loadSceneFromFileAsync (const char *fileName, bool localOnly=false) |
| Loads scene contents and resources asynchronously from a file. The file format has to match current Ramses SDK version in major and minor version number. This method is not backwards compatible and will fail if trying to load scene files saved using older Ramses SDK version. More...
|
|
status_t | destroy (Scene &scene) |
| Destroys the given Scene. The reference of Scene is invalid after this call. More...
|
|
const Scene * | findSceneByName (const char *name) const |
| Find a scene from the client by name. More...
|
|
Scene * | findSceneByName (const char *name) |
| Find a scene from the client by name. More...
|
|
const Scene * | getScene (sceneId_t sceneId) const |
| Get a scene from the client by scene id. More...
|
|
Scene * | getScene (sceneId_t sceneId) |
| Get a scene from the client by scene id. More...
|
|
status_t | dispatchEvents (IClientEventHandler &clientEventHandler) |
| Some methods on the client provide asynchronous results. These can be synchronously received by calling this functions at regular intervals. More...
|
|
| RamsesClient (RamsesClientImpl &) |
| Constructor of RamsesClient. More...
|
|
| RamsesClient ()=delete |
| Deleted default constructor. More...
|
|
| RamsesClient (const RamsesClient &other)=delete |
| Deleted copy constructor. More...
|
|
RamsesClient & | operator= (const RamsesClient &other)=delete |
| Deleted copy assignment. More...
|
|
const char * | getName () const |
| Returns the name of the object. More...
|
|
status_t | setName (const char *name) |
| Changes the name of the object. More...
|
|
ERamsesObjectType | getType () const |
| Gets type of the object. More...
|
|
bool | isOfType (ERamsesObjectType type) const |
| Checks if the object is of given type. More...
|
|
status_t | validate () const |
| Generates verbose validation of the object. More...
|
|
const char * | getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const |
| Provides verbose report in human readable form generated by validate. More...
|
|
const char * | getStatusMessage (status_t status) const |
| Get the string description for a status provided by a RAMSES API function. More...
|
|
| StatusObject (const StatusObject &other)=delete |
| Deleted copy constructor. More...
|
|
StatusObject & | operator= (const StatusObject &other)=delete |
| Deleted copy assignment. More...
|
|
Scene* ramses::RamsesClient::loadSceneFromFileDescriptor |
( |
int |
fd, |
|
|
size_t |
offset, |
|
|
size_t |
length, |
|
|
bool |
localOnly = false |
|
) |
| |
Loads scene contents and resources from an open file descriptor.
The file format has to match current Ramses SDK version in major and minor version number. This method is not back compatible and will fail if trying to load scene files saved using older Ramses SDK version.
The ramses scene must be in the already opened filedescriptor at absolute position offset within the file. The filedescriptor must be opened for read access and may not be modified anymore after this call. The filedescriptor must support seeking. Ramses takes ownership of the filedescriptor and will close it when not needed anymore.
The behavior is undefined if the filedescriptor does not contain a complete serialized ramses scene at offset.
- Parameters
-
[in] | fd | Open and readable filedescriptor. |
[in] | offset | Absolute starting position of ramses scenen within fd. |
[in] | length | Size of the scene data within fd. |
[in] | localOnly | Marks the scene to be loaded as valid for local only optimization. This has the same effect as calling SceneConfig::setPublicationMode(EScenePublicationMode_LocalOnly) before saving. |
- Returns
- New instance of scene with contents loaded from a file.
Scene* ramses::RamsesClient::loadSceneFromFileDescriptor |
( |
sceneId_t |
sceneId, |
|
|
int |
fd, |
|
|
size_t |
offset, |
|
|
size_t |
length, |
|
|
bool |
localOnly = false |
|
) |
| |
Loads scene contents and resources from an open file descriptor. This overload overrides the sceneId stored in the file.
The file format has to match current Ramses SDK version in major and minor version number. This method is not back compatible and will fail if trying to load scene files saved using older Ramses SDK version.
The ramses scene must be in the already opened filedescriptor at absolute position offset within the file. The filedescriptor must be opened for read access and may not be modified anymore after this call. The filedescriptor must support seeking. Ramses takes ownership of the filedescriptor and will close it when not needed anymore.
The behavior is undefined if the filedescriptor does not contain a complete serialized ramses scene at offset.
- Parameters
-
[in] | sceneId | The sceneId to use for the returned scene. |
[in] | fd | Open and readable filedescriptor. |
[in] | offset | Absolute starting position of ramses scenen within fd. |
[in] | length | Size of the scene data within fd. |
[in] | localOnly | Marks the scene to be loaded as valid for local only optimization. This has the same effect as calling SceneConfig::setPublicationMode(EScenePublicationMode_LocalOnly) before saving. |
- Returns
- New instance of scene with contents loaded from a file.
Scene* ramses::RamsesClient::loadSceneFromMemory |
( |
std::unique_ptr< unsigned char[], void(*)(const unsigned char *)> |
data, |
|
|
size_t |
size, |
|
|
bool |
localOnly = false |
|
) |
| |
Loads scene contents and resources from a memory buffer.
The file format has to match current Ramses SDK version in major and minor version number. This method is not back compatible and will fail if trying to load scene files saved using older Ramses SDK version.
Ramses takes ownership of the memory buffer passed in via data and will delete it via the provided deleter from unique_ptr when not used anymore. The caller may not modify the referenced memory anymore after this call. The behavior is undefined if data does not contain a complete serialized ramses scene or if size does not match the size of the scene data in bytes.
The deleter on data allows safe memory ownership passing on windows when ramses is used as dll. For more details and a convenience wrapper see ramses::RamsesUtils::LoadSceneFromMemory.
- Parameters
-
[in] | data | Memory buffer to load the scene from. |
[in] | size | The size in bytes of the data memory. |
[in] | localOnly | Marks the scene to be loaded as valid for local only optimization. This has the same effect as calling SceneConfig::setPublicationMode(EScenePublicationMode_LocalOnly) before saving. |
- Returns
- New instance of scene with contents loaded from a file.