Ocean
|
This class implements utility functions for the rendering library. More...
Static Public Member Functions | |
static TransformRef | createBox (const EngineRef &engine, const Vector3 &dimension, BoxRef *box=nullptr, AttributeSetRef *attributeSet=nullptr, GeometryRef *geometry=nullptr) |
Returns a Transform object holding a visible box, no material is applied. More... | |
static TransformRef | createBox (const EngineRef &engine, const Vector3 &dimension, const RGBAColor &color, BoxRef *box=nullptr, AttributeSetRef *attributeSet=nullptr, MaterialRef *material=nullptr, GeometryRef *geometry=nullptr) |
Returns a Transform object holding a visible box, further a material is applied. More... | |
static TransformRef | createBox (const EngineRef &engine, const Vector3 &dimension, const Media::FrameMediumRef textureMedium, MediaTexture2DRef *texture=nullptr, const bool createMipmaps=true, AttributeSetRef *attributeSet=nullptr, GeometryRef *geometry=nullptr, const RGBAColor *color=nullptr) |
Returns a Transform object holding a visible box, further a texture is applied. More... | |
static TransformRef | createBox (const EngineRef &engine, const Vector3 &dimension, Frame &&frame, FrameTexture2DRef *texture=nullptr, const bool createMipmaps=true, AttributeSetRef *attributeSet=nullptr, GeometryRef *geometry=nullptr, const RGBAColor *color=nullptr) |
Returns a Transform object holding a visible box, further a texture is applied. More... | |
static TransformRef | createSphere (const EngineRef &engine, const Scalar radius, SphereRef *sphere=nullptr, AttributeSetRef *attributeSet=nullptr, GeometryRef *geometry=nullptr) |
Returns a Transform object holding a visible sphere, no material is applied. More... | |
static TransformRef | createSphere (const EngineRef &engine, const Scalar radius, const RGBAColor &color, SphereRef *sphere=nullptr, AttributeSetRef *attributeSet=nullptr, MaterialRef *material=nullptr, GeometryRef *geometry=nullptr) |
Returns a Transform object holding a visible sphere, further a material is applied. More... | |
static TransformRef | createSphere (const EngineRef &engine, const Scalar radius, Frame &&frame, FrameTexture2DRef *texture=nullptr, const bool createMipmaps=true, AttributeSetRef *attributeSet=nullptr, GeometryRef *geometry=nullptr, const RGBAColor *color=nullptr) |
Returns a Transform object holding a visible sphere, further a texture is applied. More... | |
static TransformRef | createCylinder (const EngineRef &engine, const Scalar radius, const Scalar height, const RGBAColor &color, CylinderRef *cylinder=nullptr, AttributeSetRef *attributeSet=nullptr, MaterialRef *material=nullptr, GeometryRef *geometry=nullptr) |
Returns a Transform object holding a visible cylinder, further a material is applied. More... | |
static TransformRef | createCone (const EngineRef &engine, const Scalar radius, const Scalar height, const RGBAColor &color, ConeRef *cone=nullptr, AttributeSetRef *attributeSet=nullptr, MaterialRef *material=nullptr, GeometryRef *geometry=nullptr) |
Returns a Transform object holding a visible cone, further a material is applied. More... | |
static TransformRef | createCoordinateSystem (const EngineRef &engine, const Scalar length, const Scalar topLength, const Scalar radius) |
Returns a Transform object holding a visible coordinate system rendered as cylinders with cones. More... | |
static TransformRef | createCoordinateSystems (const Engine &engine, const HomogenousMatrices4 &world_T_coordinateSystems, const Scalar length, VertexSetRef *vertexSet=nullptr) |
Returns a Transform object holding several individual visible coordinate system rendered as thin lines. More... | |
static TransformRef | createArrow (const EngineRef &engine, const Scalar length, const Scalar topLength, const Scalar radius, const RGBAColor &color) |
Returns an arrow with specified length and radius. More... | |
static TransformRef | createMesh (const EngineRef &engine, const Vectors3 &vertices, const TriangleFaces &triangleFaces, const RGBAColor &color, const Normals &normals=Normals(), const TextureCoordinates &textureCoordinates=TextureCoordinates(), Frame &&textureFrame=Frame(), const Media::FrameMediumRef &textureMedium=Media::FrameMediumRef(), AttributeSetRef *attributeSet=nullptr, GeometryRef *geometry=nullptr, VertexSetRef *vertexSet=nullptr, Texture2DRef *texture=nullptr) |
Returns a mesh by a given set of vertices and their corresponding triangulation. More... | |
static TransformRef | createTexturedPlane (const EngineRef &engine, const Scalar width, const Scalar height, const Media::FrameMediumRef textureMedium, MediaTexture2DRef *texture=nullptr, const bool createMipmaps=true, AttributeSetRef *attributeSet=nullptr, GeometryRef *geometry=nullptr) |
Returns a textured plane with z-axis a normal. More... | |
static TransformRef | createText (const Engine &engine, const std::string &textString, const RGBAColor &foregroundColor, const RGBAColor &backgroundColor, const bool shaded, const Scalar fixedWidth, const Scalar fixedHeight, const Scalar fixedLineHeight, const Text::AlignmentMode alignmentMode=Text::AM_LEFT, const Text::HorizontalAnchor horizontalAnchor=Text::HA_LEFT, const Text::VerticalAnchor verticalAnchor=Text::VA_TOP, const std::string &fontFamily=std::string(), const std::string &styleName=std::string(), TextRef *text=nullptr, MaterialRef *foregroundMaterial=nullptr, MaterialRef *backgroundMaterial=nullptr) |
Returns a planar text within the x,y plane. More... | |
static TransformRef | createPoints (const Engine &engine, const Vectors3 &vertices, const RGBAColor &emissiveColor, const Scalar pointSize=Scalar(5), const RGBAColors &colorsPerVertex=RGBAColors(), MaterialRef *material=nullptr, AttributeSetRef *attributeSet=nullptr, PointsRef *points=nullptr, VertexSetRef *vertexSet=nullptr) |
Returns a Transform holding a geometry with points. More... | |
static TransformRef | createLines (const Engine &engine, const Vectors3 &vertices, const VertexIndexGroups &lineIndexGroups, const RGBAColor &emissiveColor, const Scalar lineWidth=Scalar(1), const RGBAColors &colorsPerVertex=RGBAColors(), MaterialRef *material=nullptr, AttributeSetRef *attributeSet=nullptr, LineStripsRef *lineStrips=nullptr, VertexSetRef *vertexSet=nullptr) |
Returns a Transform holding a geometry with lines. More... | |
static TransformRef | createLines (const Engine &engine, const Vectors3 &vertices, const TriangleFaces &triangleFaces, const RGBAColor &emissiveColor, const Scalar lineWidth=Scalar(1), const RGBAColors &colorsPerVertex=RGBAColors(), MaterialRef *material=nullptr, AttributeSetRef *attributeSet=nullptr, LinesRef *lines=nullptr, VertexSetRef *vertexSet=nullptr) |
Returns a Transform holding a geometry with lines (a wireframe of a mesh). More... | |
static TransformRef | createLines (const Engine &engine, const Vector3 *points, const Vector3 *normals, const size_t size, const Scalar scale, const RGBAColor &emissiveColor, const Scalar lineWidth=Scalar(1), MaterialRef *material=nullptr, VertexSetRef *vertexSet=nullptr) |
Returns a Transform holding a geometry with lines (normals for given points). More... | |
static AttributeSetRef | findAttributeSet (const NodeRef &node) |
Returns the first attribute set object that is located in a given node tree. More... | |
Static Protected Member Functions | |
static uint64_t | makeSortedIndex64 (const uint32_t indexA, const uint32_t indexB) |
Returns a 64-bit index based on two 32-bit indices. More... | |
This class implements utility functions for the rendering library.
|
static |
Returns an arrow with specified length and radius.
engine | Rendering engine to be used |
length | The length of the arrow, with range [0, infinity) |
topLength | Length of the arrow top, with range [0, infinity) |
radius | of the arrow, with range [0, infinity) |
color | The color to be applied, must be valid |
|
static |
Returns a Transform object holding a visible box, no material is applied.
engine | Rendering engine to be used |
dimension | The dimension of the box in x, y and z direction, with range [0, infinity)x[0, infinity)x[0, infinity) |
box | Optional resulting box object which is attached with the geometry |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
|
static |
Returns a Transform object holding a visible box, further a texture is applied.
engine | Rendering engine to be used |
dimension | The dimension of the box in x, y and z direction |
textureMedium | The frame medium which is used for the texture |
texture | Optional resulting texture object which is attached with the resulting box |
createMipmaps | True, to create a texture with mipmaps; False, to create a texture without mipmaps |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
color | Optional color to be used, nullptr to create a box without material |
|
static |
Returns a Transform object holding a visible box, further a material is applied.
engine | Rendering engine to be used |
dimension | The dimension of the box in x, y and z direction |
color | Diffuse color to be used |
box | Optional resulting box object which is attached with the geometry |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
material | Optional resulting material object which is attached with the resulting box |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
|
static |
Returns a Transform object holding a visible box, further a texture is applied.
engine | Rendering engine to be used |
dimension | The dimension of the box in x, y and z direction |
frame | The frame which is used for the texture, must own the image memory, must be valid |
texture | Optional resulting texture object which is attached with the resulting box |
createMipmaps | True, to create a texture with mipmaps; False, to create a texture without mipmaps |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
color | Optional color to be used, nullptr to create a box without material |
|
static |
Returns a Transform object holding a visible cone, further a material is applied.
engine | Rendering engine to be used |
radius | The radius of the cone, with range (0, infinity) |
height | The height of the cone, with range (0, infinity) |
color | Diffuse color to be used |
cone | Optional resulting cone object which is attached with the geometry |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
material | Optional resulting material object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
|
static |
Returns a Transform object holding a visible coordinate system rendered as cylinders with cones.
engine | Rendering engine to be used |
length | The length of the arrow, with range (0, infinity) |
topLength | Length of the arrow top, with range (0, infinity) |
radius | of the arrow, with range (0, infinity) |
|
static |
Returns a Transform object holding several individual visible coordinate system rendered as thin lines.
engine | Rendering engine to be used |
world_T_coordinateSystems | The individual coordinate systems, at least one |
length | The length of each axis, with range (0, infinity) |
vertexSet | Optional result vertex set object which holds the vertices of the 3D object, six vertices for each coordinate system, with order (origin, x-axis, origin, y-axis, origin, z-axis) |
|
static |
Returns a Transform object holding a visible cylinder, further a material is applied.
engine | Rendering engine to be used |
radius | The radius of the cylinder, with range (0, infinity) |
height | The height of the cylinder, with range (0, infinity) |
color | Diffuse color to be used |
cylinder | Optional resulting cylinder object which is attached with the geometry |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
material | Optional resulting material object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
|
static |
Returns a Transform holding a geometry with lines (normals for given points).
engine | Rendering engine to be used |
points | The starting points where the normals will start, at least one |
normals | The normal vectors, one for each point |
size | The number of points (and normals), with range [1, infinity) |
scale | The scale which will be applied to each normal (allowing to control the length of the normals), with range (-infinity, infinity) |
emissiveColor | The emissiveColor of all normals, can be transparent |
lineWidth | The width of the lines in pixels, with range [1, infinity) |
material | Optional resulting Material node |
vertexSet | Optional result vertex set object which holds the vertices of the 3D normals, two vertices for each normal |
|
static |
Returns a Transform holding a geometry with lines (a wireframe of a mesh).
engine | The rendering engine to be used |
vertices | The vertices of all points to be rendered, at least one |
triangleFaces | The indices of triangle vertices for which lines will be created, at least one |
emissiveColor | The emissiveColor of all vertices in case 'colorsPerVertex' is empty, can be transparent |
lineWidth | The width of the lines in pixels, with range [1, infinity) |
colorsPerVertex | The optional colors of the individual vertices, one for each vertex or empty to use the 'emissiveColor' |
material | Optional resulting Material node; will be invalid if colorPerVertex is not empty |
attributeSet | Optional resulting AttributeSet node |
lines | Optional resulting Lines node |
vertexSet | Optional resulting VertexSet node |
|
static |
Returns a Transform holding a geometry with lines.
engine | The rendering engine to be used |
vertices | The vertices of all points to be rendered, at least one |
lineIndexGroups | The group of vertex indices defining several individual lines, at least one |
emissiveColor | The emissiveColor of all vertices in case 'colorsPerVertex' is empty, can be transparent |
lineWidth | The width of the lines in pixels, with range [1, infinity) |
colorsPerVertex | The optional colors of the individual vertices, one for each vertex or empty to use the 'emissiveColor' |
material | Optional resulting Material node; will be invalid if colorPerVertex is not empty |
attributeSet | Optional resulting AttributeSet node |
lineStrips | Optional resulting LineStrips node |
vertexSet | Optional resulting VertexSet node |
|
static |
Returns a mesh by a given set of vertices and their corresponding triangulation.
engine | Rendering engine to be used |
vertices | The vertices defining the mesh |
triangleFaces | Triangulation defining the topology |
color | The color to be applied to the entire mesh, invalid to create an unlit mesh |
normals | Optional normals of each vertex |
textureCoordinates | Optional texture coordinates, one for each given vertex |
textureFrame | Optional frame to be used as texture, most be owner of the memory if provided, invalid to use no texture or to use the textureMedium instead |
textureMedium | Optional texture medium, invalid to use no texture or to use the textureFrame instead |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
vertexSet | Optional result vertex set object which holds the vertices of the 3D object |
texture | Optional resulting texture object |
|
static |
Returns a Transform holding a geometry with points.
engine | The rendering engine to be used |
vertices | The vertices of all points to be rendered, at least one |
emissiveColor | The emissiveColor of all vertices in case 'colorsPerVertex' is empty, can be transparent |
pointSize | The size of the points, with range [1, infinity) |
colorsPerVertex | The optional colors of the individual vertices, one for each vertex or empty to use the 'emissiveColor' |
material | Optional resulting Material node; will be invalid if colorPerVertex is not empty |
attributeSet | Optional resulting AttributeSet node |
points | Optional resulting Points node |
vertexSet | Optional resulting VertexSet node |
|
static |
Returns a Transform object holding a visible sphere, further a material is applied.
engine | Rendering engine to be used |
radius | The radius of the sphere, with range [0, infinity) |
color | Diffuse color to be used |
sphere | Optional resulting sphere object which is attached with the geometry |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
material | Optional resulting material object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
|
static |
Returns a Transform object holding a visible sphere, further a texture is applied.
engine | Rendering engine to be used |
radius | The radius of the sphere, with range [0, infinity) |
frame | The frame which is used for the texture, must own the image memory, must be valid |
texture | Optional resulting texture object which is attached with the resulting sphere |
createMipmaps | True, to create a texture with mipmaps; False, to create a texture without mipmaps |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
color | Optional color to be used, nullptr to create a sphere without material |
|
static |
Returns a Transform object holding a visible sphere, no material is applied.
engine | Rendering engine to be used |
radius | The radius of the sphere, with range [0, infinity) |
sphere | Optional resulting sphere object which is attached with the geometry |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
|
static |
Returns a planar text within the x,y plane.
engine | The rendering engine to be used |
textString | The actual text to show |
foregroundColor | The foreground color to be used |
backgroundColor | The background color to be used, a transparent color to create a text without background |
shaded | True, to create a text with shading/lighting; False, to create a text constant color |
fixedWidth | The optional fixed width, with range [0, infinity) |
fixedHeight | The optional fixed height, with range [0, infinity) |
fixedLineHeight | The optional fixed line height, with range [0, infinity) |
alignmentMode | The text's alignment mode |
horizontalAnchor | The text's horizontal anchor |
verticalAnchor | The text's vertical anchor |
fontFamily | The font family to be used, empty to use a default font family |
styleName | The font style to be used, empty to use the default font style |
text | Optional resulting text node which will be part of the resulting Transform node, nullptr of not of interest |
foregroundMaterial | Optional resulting foreground material of the new text, nullptr if not of interest |
backgroundMaterial | Optional resulting background material of the new text, nullptr if not of interest |
|
static |
Returns a textured plane with z-axis a normal.
engine | Rendering engine to be used, must be valid |
width | The width of the plane in object domain (the size of the plane in x-direction), with range (0, infinity) |
height | The height of the plane in object domain (the size of the plane, in y-direction), with range (0, infinity) |
textureMedium | The frame medium which is used for the texture |
texture | Optional resulting texture object which is attached with the resulting box |
createMipmaps | True, to create a texture with mipmaps; False, to create a texture without mipmaps |
attributeSet | Optional resulting AttributeSet object which is attached with the geometry |
geometry | Optional resulting geometry object which is encapsulating the 3D object |
|
static |
Returns the first attribute set object that is located in a given node tree.
node | The node defining the root of the tree in that the attribute set is located |
|
inlinestaticprotected |
Returns a 64-bit index based on two 32-bit indices.
indexA | The first 32-bit index |
indexB | The second 32-bit index |