10 #define RAMSES_SCENE_H
28 class PerspectiveCamera;
29 class OrthographicCamera;
32 class GeometryBinding;
34 class RamsesClientImpl;
35 class AnimationSystem;
36 class AnimationSystemRealTime;
43 class RenderTargetDescription;
45 class TextureSamplerMS;
46 class TextureSamplerExternal;
65 class Texture2DBuffer;
70 class EffectDescription;
404 uint32_t anisotropyLevel = 1,
405 const char* name =
nullptr);
425 const char* name =
nullptr);
446 uint32_t anisotropyLevel = 1,
447 const char* name =
nullptr);
468 uint32_t anisotropyLevel = 1,
469 const char* name =
nullptr);
490 uint32_t anisotropyLevel = 1,
491 const char* name =
nullptr);
509 const char* name =
nullptr);
543 const char* name =
nullptr);
563 uint32_t numElements,
564 const void* arrayData,
566 const char* name =
nullptr);
591 uint32_t mipMapCount,
593 bool generateMipChain =
false,
596 const char* name =
nullptr);
621 uint32_t mipMapCount,
623 bool generateMipChain =
false,
625 const char* name =
nullptr);
647 uint32_t mipMapCount,
649 bool generateMipChain =
false,
652 const char* name =
nullptr);
1014 friend class RamsesClientImpl;
#define RAMSES_API
Definition: APIExport.h:35
The AnimationSystemRealTime is a special version of AnimationSystem that is designed to use system ti...
Definition: AnimationSystemRealTime.h:33
The AnimationSystem holds all animation related data.
Definition: AnimationSystem.h:57
The Appearance describes how an object should look like. This includes GLSL uniform values,...
Definition: Appearance.h:34
The ArrayBuffer is a data object used to provide vertex or index data to ramses::GeometryBinding::set...
Definition: ArrayBuffer.h:27
The ArrayResource stores a data array of a given type. The data is immutable. The resource can be use...
Definition: ArrayResource.h:26
The BlitPass blits contents of one RendeBuffer to another. The source and destination RenderBuffer ob...
Definition: BlitPass.h:25
The ClientObject is a base class for all client API objects owned by a RamsesClient.
Definition: ClientObject.h:20
The DataFloat data object stores a float value within a scene.
Definition: DataFloat.h:22
The DataInt32 data object stores an 32-bit integer value within a scene.
Definition: DataInt32.h:22
The DataMatrix22f data object stores a matrix with 4 float components (2 rows, 2 columns) within a sc...
Definition: DataMatrix22f.h:22
The DataMatrix33f data object stores a matrix with 9 float components (3 rows, 3 columns) within a sc...
Definition: DataMatrix33f.h:22
The DataMatrix44f data object stores a matrix with 16 float components (4 rows, 4 columns) within a s...
Definition: DataMatrix44f.h:22
The DataObject is a base class for data container for storing data in a scene.
Definition: DataObject.h:29
The DataVector2f data object stores a vector with 2 float components within a scene.
Definition: DataVector2f.h:22
The DataVector2i data object stores a vector with two 32-bit-integer components within a scene.
Definition: DataVector2i.h:22
The DataVector3f data object stores a vector with 3 float components within a scene.
Definition: DataVector3f.h:22
The DataVector3i data object stores a vector with 3 integer components within a scene.
Definition: DataVector3i.h:22
The DataVector4f data object stores a vector with 4 float components within a scene.
Definition: DataVector4f.h:22
The DataVector4i data object stores a vector with 4 integer components within a scene.
Definition: DataVector4i.h:22
An effect description holds all necessary information for an effect to be created.
Definition: EffectDescription.h:21
An effect describes how an object will be rendered to the screen.
Definition: Effect.h:26
A geometry binding together with an appearance describe how an object will be rendered to the screen.
Definition: GeometryBinding.h:25
The MeshNode holds all information which is needed to render an object to the screen.
Definition: MeshNode.h:25
The Node is the base class of all nodes and provides scene graph functionality which propagates to it...
Definition: Node.h:23
The OrthographicCamera is a local camera which defines an orthographic view into the scene.
Definition: OrthographicCamera.h:22
The PerspectiveCamera is a local camera which defines a perspective view into the scene.
Definition: PerspectiveCamera.h:23
PickableObject provides a way to specify a 'pickable' area.
Definition: PickableObject.h:44
Entry point of RAMSES client API.
Definition: RamsesClient.h:34
The RamsesObject is a base class for all client API objects owned by the framework.
Definition: RamsesObject.h:21
RenderBuffer can be used with RenderTarget as buffer for writing or with TextureSampler as buffer for...
Definition: RenderBuffer.h:25
The RenderGroup is a container used to collect renderables which are supposed to be rendered together...
Definition: RenderGroup.h:31
The RenderPass is a container used to collect meshes which are supposed to be rendered together.
Definition: RenderPass.h:31
RenderTargetDescription holds all necessary information for a RenderTarget to be created.
Definition: RenderTargetDescription.h:22
The RenderTarget can be used as an output for a RenderPass.
Definition: RenderTarget.h:20
The Resource is the base class of all resources, such as arrays and textures.
Definition: Resource.h:20
The SceneObject is a base class for all client API objects owned by a Scene.
Definition: SceneObject.h:20
The SceneReference object refers to another ramses scene using its sceneId.
Definition: SceneReference.h:37
The Scene holds a scene graph. It is the essential class for distributing content to the ramses syste...
Definition: Scene.h:83
OrthographicCamera * createOrthographicCamera(const char *name=nullptr)
Creates a Orthographic Camera in this Scene.
PickableObject * createPickableObject(const ArrayBuffer &geometryBuffer, const pickableObjectId_t id, const char *name=nullptr)
Create a PickableObject.
MeshNode * createMeshNode(const char *name=nullptr)
Creates a scene graph MeshNode. MeshNode is a Node with additional properties and bindings that repre...
int32_t getUniformTimeMs() const
Gets the current value used for the semantic uniform ramses::EEffectUniformSemantic::TimeMs Value wra...
Resource * getResource(resourceId_t id)
Get a resource which is owned by the scene by id.
Effect * createEffect(const EffectDescription &effectDesc, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
Create a new Effect by parsing a GLSL shader described by an EffectDescription instance....
DataMatrix22f * createDataMatrix22f(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Matrix22f.
DataVector3i * createDataVector3i(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Vector3i.
Node * createNode(const char *name=nullptr)
Creates a scene graph node. The basic purpose of Node is to define topology in scene graph by links t...
SceneReference * createSceneReference(sceneId_t referencedScene, const char *name=nullptr)
Creates a new SceneReference object.
TextureSamplerMS * createTextureSamplerMS(const RenderBuffer &renderBuffer, const char *name)
Creates a multisampled texture sampler object.
status_t unpublish()
Unpublish the scene from the ramses system.
status_t unlinkData(SceneReference *consumerReference, dataConsumerId_t consumerId)
Removes an existing link between two scenes (see ramses::Scene::linkData).
RamsesObject * findObjectByName(const char *name)
Get an object from the scene by name.
DataMatrix44f * createDataMatrix44f(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Matrix44f.
RenderBuffer * createRenderBuffer(uint32_t width, uint32_t height, ERenderBufferType bufferType, ERenderBufferFormat bufferFormat, ERenderBufferAccessMode accessMode, uint32_t sampleCount=0u, const char *name=nullptr)
Create a RenderBuffer to be used with RenderTarget for rendering into and TextureSampler for sampling...
Texture2DBuffer * createTexture2DBuffer(ETextureFormat textureFormat, uint32_t width, uint32_t height, uint32_t mipLevelCount, const char *name=nullptr)
Create a new Texture2DBuffer. The created object is a mutable buffer object that can be used as a tex...
DataVector4f * createDataVector4f(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Vector4f.
Texture3D * createTexture3D(ETextureFormat format, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipMapCount, const MipLevelData mipLevelData[], bool generateMipChain=false, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
Create a new Texture3D. It makes a copy of the given data of a certain type as a resource,...
GeometryBinding * createGeometryBinding(const Effect &effect, const char *name=nullptr)
Creates a new GeometryBinding.
ArrayResource * createArrayResource(EDataType type, uint32_t numElements, const void *arrayData, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
Create a new ArrayResource. It makes a copy of the given data of a certain type as a resource,...
status_t publish(EScenePublicationMode publicationMode=EScenePublicationMode_LocalAndRemote)
Publishes the scene to the ramses system.
TextureCube * createTextureCube(ETextureFormat format, uint32_t size, uint32_t mipMapCount, const CubeMipLevelData mipLevelData[], bool generateMipChain=false, const TextureSwizzle &swizzle={}, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
Create a new Cube Texture. It makes a copy of the given data of a certain type as a resource,...
status_t saveToFile(const char *fileName, bool compress) const
Saves all scene contents to a file.
const SceneObject * findObjectById(sceneObjectId_t id) const
Get an object from the scene by id.
status_t linkData(SceneReference *providerReference, dataProviderId_t providerId, SceneReference *consumerReference, dataConsumerId_t consumerId)
Tell the RamsesRenderer to link a data provider to a data consumer across two scenes.
RenderPass * createRenderPass(const char *name=nullptr)
Create a render pass in the scene.
const Resource * getResource(resourceId_t id) const
Get a resource which is owned by the scene by id.
Appearance * createAppearance(const Effect &effect, const char *name=nullptr)
Creates a new Appearance.
status_t setExpirationTimestamp(uint64_t ptpExpirationTimestampInMilliseconds)
Expiration timestamp is a point in time till which the scene is considered to be up-to-date.
status_t updateTextureProvider(const Texture2D &texture, dataProviderId_t dataId)
Sets a new texture to an existing provider. This allows the provider to change the provided content w...
DataInt32 * createDataInt32(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type int32.
status_t createTextureProvider(const Texture2D &texture, dataProviderId_t dataId)
Annotates a Texture2D as a content provider. Texture provider and texture consumer can be linked on R...
StreamTexture * createStreamTexture(const Texture2D &fallbackTexture, waylandIviSurfaceId_t source, const char *name=nullptr)
Create a Stream Texture.
AnimationSystem * createAnimationSystem(uint32_t flags=EAnimationSystemFlags_Default, const char *name=nullptr)
Create a new animation system. The animation system will be updated on renderer side after calls to A...
RenderTarget * createRenderTarget(const RenderTargetDescription &rtDesc, const char *name=nullptr)
Create a render target providing a set of RenderBuffers.
DataVector2i * createDataVector2i(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Vector2i.
status_t destroy(SceneObject &object)
Destroys a previously created object using this scene The object must be owned by this scene in order...
Texture2D * createTexture2D(ETextureFormat format, uint32_t width, uint32_t height, uint32_t mipMapCount, const MipLevelData mipLevelData[], bool generateMipChain=false, const TextureSwizzle &swizzle={}, resourceCacheFlag_t cacheFlag=ResourceCacheFlag_DoNotCache, const char *name=nullptr)
Create a new Texture2D. It makes a copy of the given data of a certain type as a resource,...
RenderGroup * createRenderGroup(const char *name=nullptr)
Create a RenderGroup instance in the scene.
Scene & operator=(const Scene &other)
Assignment operator of Scene.
PerspectiveCamera * createPerspectiveCamera(const char *name=nullptr)
Creates a Perspective Camera in this Scene.
SceneObject * findObjectById(sceneObjectId_t id)
Get an object from the scene by id.
DataVector4i * createDataVector4i(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Vector4i.
status_t createDataConsumer(const DataObject &dataObject, dataConsumerId_t dataId)
Annotates a DataObject as a data consumer. Data provider and data consumer can be linked on Ramses Re...
Scene(SceneImpl &pimpl)
Constructor of the Scene.
AnimationSystemRealTime * createRealTimeAnimationSystem(uint32_t flags=EAnimationSystemFlags_Default, const char *name=nullptr)
Create a new animation system that is designed to work with system time. The animation system will be...
DataVector3f * createDataVector3f(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Vector3f.
status_t createDataProvider(const DataObject &dataObject, dataProviderId_t dataId)
Annotates a DataObject as a data provider. Data provider and data consumer can be linked on Ramses Re...
sceneId_t getSceneId() const
Returns scene id defined at scene creation time.
ArrayBuffer * createArrayBuffer(EDataType dataType, uint32_t maxNumElements, const char *name=nullptr)
Create a new ramses::ArrayBuffer. The created object is a mutable buffer object that can be used as i...
TextureSampler * createTextureSampler(ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureAddressMode wrapRMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const Texture3D &texture, const char *name=nullptr)
Creates a texture sampler object.
status_t createTransformationDataConsumer(const Node &node, dataConsumerId_t dataId)
Annotates a Node as a transformation data consumer. Data provider and data consumer can be linked on ...
status_t createTextureConsumer(const TextureSamplerMS &sampler, dataConsumerId_t dataId)
Annotates a ramses::TextureSamplerMS as a content consumer. Texture provider and texture consumer can...
status_t createTextureConsumer(const TextureSamplerExternal &sampler, dataConsumerId_t dataId)
Annotates a ramses::TextureSamplerExternal as a content consumer. Texture provider and texture consum...
status_t resetUniformTimeMs()
resets the semantic uniform ramses::EEffectUniformSemantic::TimeMs The uniform value will contain the...
const RamsesObject * findObjectByName(const char *name) const
Get an object from the scene by name.
DataMatrix33f * createDataMatrix33f(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Matrix33f.
status_t createTransformationDataProvider(const Node &node, dataProviderId_t dataId)
Annotates a Node as a transformation data provider. Data provider and data consumer can be linked on ...
DataFloat * createDataFloat(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type float.
SceneImpl & impl
Definition: Scene.h:309
std::string getLastEffectErrorMessages() const
Get the GLSL error messages that were produced at the creation of the last Effect.
status_t flush(sceneVersionTag_t sceneVersionTag=InvalidSceneVersionTag)
Commits all changes done to the scene since the last flush or since scene creation....
RamsesClient & getRamsesClient()
Getter for ramses::RamsesClient this Scene was created from.
TextureSampler * createTextureSampler(ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const TextureCube &texture, uint32_t anisotropyLevel=1, const char *name=nullptr)
Creates a texture sampler object.
Scene(const Scene &other)
Copy constructor of Scene.
virtual ~Scene()
Destructor of the Scene.
TextureSampler * createTextureSampler(ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const Texture2DBuffer &texture2DBuffer, uint32_t anisotropyLevel=1, const char *name=nullptr)
Creates a texture sampler object for mutable texture.
DataVector2f * createDataVector2f(const char *name=nullptr)
Creates a data object within the scene, which holds a data value of type Vector2f.
TextureSampler * createTextureSampler(ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const RenderBuffer &renderBuffer, uint32_t anisotropyLevel=1, const char *name=nullptr)
Creates a texture sampler object.
TextureSamplerExternal * createTextureSamplerExternal(ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const char *name=nullptr)
Creates a texture sampler object that can sample from external textures.
TextureSampler * createTextureSampler(ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const Texture2D &texture, uint32_t anisotropyLevel=1, const char *name=nullptr)
Creates a texture sampler object.
bool isPublished() const
Returns whether scene is currently published to the ramses system.
BlitPass * createBlitPass(const RenderBuffer &sourceRenderBuffer, const RenderBuffer &destinationRenderBuffer, const char *name=nullptr)
Create a blit pass in the scene. Source and destination render buffers must have same type,...
status_t createTextureConsumer(const TextureSampler &sampler, dataConsumerId_t dataId)
Annotates a ramses::TextureSampler as a content consumer. Texture provider and texture consumer can b...
TextureSampler * createTextureSampler(ETextureAddressMode wrapUMode, ETextureAddressMode wrapVMode, ETextureSamplingMethod minSamplingMethod, ETextureSamplingMethod magSamplingMethod, const StreamTexture &streamTexture, const char *name=nullptr)
Creates a texture sampler object.
StreamTexture is a special kind of texture, which holds a reference to a "fallback texture" and a str...
Definition: StreamTexture.h:25
Helper class to create strongly typed values out of various types.
Definition: StronglyTypedValue.h:23
The Texture2DBuffer is a mutable texture buffer used to hold texture data with the possibility to per...
Definition: Texture2DBuffer.h:26
Texture represents a 2-D texture resource.
Definition: Texture2D.h:24
Texture represents a texture resource.
Definition: Texture3D.h:22
TextureCube stores pixel data with 6 equally sized quadratic faces.
Definition: TextureCube.h:26
The ramses::TextureSamplerExternal is used to sample from external textures data when bound to a rams...
Definition: TextureSamplerExternal.h:21
The ramses::TextureSamplerMS is used to sample multisampled data when bound to a ramses::Appearance u...
Definition: TextureSamplerMS.h:21
The TextureSampler holds a texture and its sampling parameters.
Definition: TextureSampler.h:29
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
ERenderBufferFormat
Enum for format of a RenderBuffer.
Definition: TextureEnums.h:136
ETextureFormat
Texture data format.
Definition: TextureEnums.h:40
ETextureSamplingMethod
Texture sampling method.
Definition: TextureEnums.h:19
ETextureAddressMode
Texture address mode.
Definition: TextureEnums.h:31
EScenePublicationMode
Definition: EScenePublicationMode.h:21
@ EScenePublicationMode_LocalAndRemote
Definition: EScenePublicationMode.h:22
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26
@ EAnimationSystemFlags_Default
Definition: AnimationSystemEnums.h:19
EDataType
Specifies the data type used for creating data buffers.
Definition: EDataType.h:20
constexpr const resourceCacheFlag_t ResourceCacheFlag_DoNotCache
Requests the render to not cache a resource. This is the default value.
Definition: RamsesFrameworkTypes.h:212
uint64_t sceneVersionTag_t
Scene version tag used to refer to content versions of a scene. A scene version may be updated along ...
Definition: RamsesFrameworkTypes.h:49
ERenderBufferType
Enum for type of a RenderBuffer.
Definition: TextureEnums.h:128
constexpr const sceneVersionTag_t InvalidSceneVersionTag
Scene version tag used to refer to an invalid scene version.
Definition: RamsesFrameworkTypes.h:54
ERenderBufferAccessMode
Enum for access mode of a RenderBuffer.
Definition: TextureEnums.h:169
Struct containing information about one mip-map level of a cube texture. All faces of the cube textur...
Definition: MipLevelData.h:60
Struct containing information about one mip-map level of a texture.
Definition: MipLevelData.h:24
Information of how color channels of a texture are reordered or set to fixed value (one,...
Definition: TextureSwizzle.h:23
Resource identifier used to refer to a resource.
Definition: RamsesFrameworkTypes.h:84