Skip to content

raisin ​

namespace

The rayrai renderer (the namespace is spelled raisin): render windows, cameras, materials, lights, visuals and the TCP viewer.

Namespaces ​

Classes ​

Renderer A–L

  • struct AdditionalLight — Lightweight imported or viewer light used for extra fill/rim lighting.
  • struct BakedIrradianceGrid — Regular 3D grid of irradiance probes spanning an axis-aligned box.
  • struct Bc7TextureStorageResult — Outcome of compressRgbTextureBc7(); all zero when the texture was left unchanged.
  • class Camera — Camera for offscreen rendering and interaction.
  • class CameraFrustum — Visual helper that renders camera frustum edges.
  • class CloudTextures — CloudTextures owns the GPU textures used by the cloud rendering pipeline: baseTex: 3D RGBA8 Worley/Perlin noise (128^3) for the volumetric path detailTex: 3D RGBA8 Worley noise (32^3) for the…
  • class CoordinateFrame — Render helper for visualizing multiple coordinate frames.
  • struct DebugPassCapture — One debug view returned by RayraiWindow::captureDebugPasses() (final image, base color, normals, shadow terms, AO, fog, ...).
  • struct DirectionalShadowCascade — One cascade of a DirectionalShadowCascadePlan. Distances are view distances in metres.
  • struct DirectionalShadowCascadePlan — Directional-light cascade layout for a camera (RayraiWindow::planDirectionalShadowCascades()), derived from the RenderQualitySettings::directionalShadowCascade* fields.
  • struct DynamicQualityRecommendation — Quality reduction suggested from measured pass timings (RayraiWindow::recommendDynamicQuality()). Never applied automatically.
  • struct EnvironmentSidecarSettings — Optional environment/lighting overrides from a scene's environment sidecar JSON (<scene>.rayrai_environment.json, see RayraiWindow::loadEnvironmentSidecar()).
  • struct ExposureRecommendation — Bounded exposure suggestion derived from RgbaLuminanceMetrics (RayraiWindow::recommendExposure()). Never applied automatically.
  • struct FoliageGeometryAtlasOptions — Options for buildFoliageGeometryAtlasForMeshes().
  • struct FoliageGeometryAtlasResult — Outcome of buildFoliageGeometryAtlasForMeshes().
  • class FoliageMeshLodBaker — A textured 3D foliage LOD reconstructed from six or ten source-mesh captures.
  • struct FoliageTextureAtlasOptions — Options for buildFoliageTextureAtlasForMeshes().
  • struct FoliageTextureAtlasResult — Outcome of buildFoliageTextureAtlasForMeshes().
  • struct GeometryRefractionDiagnostics — State of the geometry-refraction tracer after the most recent frame (RayraiWindow::geometryRefractionDiagnostics()).
  • struct GeometryRefractionSamplingStatistics — Per-pixel sample statistics of the geometry-refraction history (RayraiWindow::geometryRefractionSamplingStatistics()).
  • class InstancedVisuals — Many copies of one shape or mesh drawn with GPU instancing.
  • struct IrradianceVolume — Oriented box that adds a constant diffuse irradiance to PBR surfaces inside it.
  • class LensDropletCompositeSystem — Owns the FBO + composite texture used by the lens-droplet pass. RGBA16F target, sized to the scene viewport.
  • class Light — Simple light with optional shadow map support.
  • struct LightInfluenceRange — Distance window over which a local light's contribution is faded out and then culled (world units, measured from the light position).
  • struct LocalFogVolume — Spherical local fog region evaluated in the post-process pass.

Renderer M–P

Renderer R

  • class RaisimObject — Render state of one raisim::Object, built from physics snapshots.
  • class RayraiGlobalAsset — A caching asset manager for 3D models and primitive meshes.
  • class RayraiWindow — Offscreen renderer and visual scene manager for raisim.
  • struct ReflectionProbe — Static local reflection probe registered with RayraiWindow::addReflectionProbe().
  • struct ReflectionProbeBlend — Result of RayraiWindow::selectReflectionProbeBlend() for one sample position.
  • struct ReflectionProbeCaptureFrame — Camera basis used to capture one cubemap face (RayraiWindow::reflectionProbeCaptureFrame()).
  • struct ReflectionProbeCaptureSettings — Explicit static reflection-probe capture settings.
  • struct ReflectionProbeDebugItem — Per-probe entry of a ReflectionProbeDebugView.
  • struct ReflectionProbeDebugOverlaySummary — CPU summary shown by the optional reflection-probe debug overlay (RayraiWindow::reflectionProbeDebugOverlaySummary()).
  • struct ReflectionProbeDebugView — Probe selection details at one position (RayraiWindow::reflectionProbeDebugView()).
  • struct ReflectionProbeFilterSettings — Explicit CPU filtering settings for captured local reflection probes.
  • struct ReflectionProbePlacementSuggestion — Probe placement suggested from scene bounds (RayraiWindow::suggestReflectionProbePlacementFromSceneBounds()).
  • struct ReflectionProbeSidecarProbe — One probe entry read from a scene's reflection-probe sidecar JSON (<scene>.rayrai_probes.json, see RayraiWindow::loadReflectionProbeSidecar()).
  • struct ReflectionProbeSidecarSettings — Optional quality overrides from the reflection-probe sidecar's "quality" block.
  • struct RenderOverrides — Override shaders and rendering toggles when using external cameras.
  • struct RenderPassAccounting — Estimated per-frame render passes for the current settings (RayraiWindow::estimateRenderPassAccounting()). CPU estimate only; no GPU timing.
  • struct RenderPassTiming — GPU time of one named render pass (from captureRenderPassTimings()).
  • struct RenderQualitySettings — Explicit runtime quality settings for viewer rendering.
  • struct RgbaCalibrationMetrics — Aggregate patch errors from RayraiWindow::analyzeRgbaCalibrationPatches(); averages are over valid patches only.
  • struct RgbaCalibrationPatch — Rectangular reference patch for RayraiWindow::analyzeRgbaCalibrationPatches().
  • struct RgbaCalibrationPatchResult — Measurement of one RgbaCalibrationPatch; all colors are display-space RGB in [0, 1].
  • struct RgbaCalibrationRecommendation — Output transform suggested from calibration patches (RayraiWindow::recommendCalibrationOutputTransform()). Never applied automatically.
  • struct RgbaLuminanceHistogram — Display-space luminance histogram of an RGBA8 image (RayraiWindow::analyzeRgbaLuminanceHistogram()).
  • struct RgbaLuminanceMetrics — Display-space luminance statistics of an RGBA8 image (RayraiWindow::analyzeRgbaLuminance()).
  • struct RgbaOutputTransform — CPU color transform for screenshots/reports (RayraiWindow::transformRgbaForOutput()).
  • struct RsceneRenderSettings — Render settings stored in a scene's environment, weather and rayrai_render records, with RaiSim Engine 2's defaults for what the file omits.
  • struct RsceneVisuals — Viewer objects created for a scene (see rsceneVisuals()).

Renderer S–T

  • struct SceneImportReport — Outcome of RayraiWindow::importVisualScene() (mesh load and optional light import).
  • class ScopedActiveTexture — RAII guard for glActiveTexture.
  • class ScopedCapability — RAII guard that enables or disables a GL capability and restores its previous state.
  • class ScopedClearColor — RAII guard for glClearColor.
  • class ScopedDepthFunc — RAII guard for glDepthFunc.
  • class ScopedDepthMask — RAII guard for glDepthMask.
  • class ScopedDrawBuffer — RAII guard that sets a single draw buffer and restores up to eight previous draw buffers.
  • class ScopedFramebuffer — RAII guard that binds a framebuffer and restores the previous binding of the same target.
  • class ScopedPixelUnpackBufferZero — Binds GL_PIXEL_UNPACK_BUFFER to 0 for the guard's lifetime, restoring the previous binding on destruction.
  • class ScopedReadBuffer — RAII guard for glReadBuffer.
  • class ScopedTightPixelUnpack — RAII guard that sets tightly packed GL unpack state (alignment 1, no row length/skips) and restores it.
  • class ScopedViewport — RAII guard for glViewport.
  • class ScreenSpaceDepthCopySystem — Owns a depth-texture copy of the opaque scene depth for transparent material effects that need to compare against already-rendered geometry without sampling the active depth attachment.
  • class ScreenSpaceRefractionSystem — Owns the opaque-color copy texture used by the screen-space refraction lookup. Reallocated automatically when the scene target size changes.
  • struct ShaderWarmupDiagnostics — Built-in shader compile statistics (RayraiWindow::shaderWarmupDiagnostics()).
  • struct ShadowAtlasPlan — Row-packed tile layout of the additional-light shadow atlas (RayraiWindow::planAdditionalShadowAtlas()).
  • struct ShadowAtlasTile — One tile of a ShadowAtlasPlan. Pixel values are atlas texels.
  • struct ShadowDebugOverlaySummary — CPU summary shown by the optional shadow debug overlay (RayraiWindow::shadowDebugOverlaySummary()).
  • class SkyAtmosphereSystem — Owner of the Hillaire sky-atmosphere LUT pipeline (transmittance, multi-scattering, sky-view, aerial-perspective volume).
  • struct SkyVisibilityGrid — Static, scalar environment visibility, x fastest, then y, then z. 1 = open environment; 0 = occluded.
  • class StreamedFoliage — Owns per-cell/species batches while the viewer retains shared mesh/texture assets.
  • class StreamedTerrain — A complete visual terrain cover with small patches near observers and coarse patches toward the horizon.
  • struct SupersampledCapture — Result of RayraiWindow::captureSupersampledRgba(): a frame rendered at scale times the camera resolution and box-filtered back down.
  • class TerrainPatch — CPU terrain geometry, sampled once at full resolution and decimated per patch.
  • struct TerrainPatchLevel — One level of detail of a TerrainPatch.
  • struct TerrainPatchRegion — One quadtree node of a terrain layout.
  • class TextureBindingCacheView — Internal: hot-loop handle to the calling thread's texture caches.
  • struct TransparentDrawDebugView — Transparent-pass state and draw order for a camera (RayraiWindow::transparentDrawDebugView()). Diagnostic only.
  • struct TransparentDrawItem — One transparent draw in a TransparentDrawDebugView.

Renderer V–W

  • class Visuals — Renderable visual object not owned by raisim::World.
  • struct WeatherDiagnostics — Resolved weather state for the current frame (RayraiWindow::weatherDiagnostics()).
  • struct WeatherSettings — Weather state applied on top of the renderer (RayraiWindow::setWeatherSettings()).
  • struct WeatherSidecarSettings — Weather state read from a scene's weather sidecar JSON (<scene>.rayrai_weather.json, see RayraiWindow::loadWeatherSidecar()).
  • struct WeatherSkyEnvironment — Sky cubemaps baked from the current weather (RayraiWindow::generateWeatherSkyEnvironment()).
  • class WeightedOitSystem — Owns the GL resources for weighted-blended order-independent transparency (Meshkin / McGuire-Bavoil): an RGBA16F accumulation target, an R16F reveal target, an RGBA8 opaque-color target, and a…
  • struct WorldCellBounds — Axis-aligned rectangle on the horizontal (x,y) plane.
  • struct WorldCellKey — Integer cell coordinate; (0,0) is the cell at the world's minimum corner.
  • struct WorldCellPlan — Result of WorldCells::plan().
  • class WorldCells — Bounded cell residency planning, independent of rendering and physics.
  • struct WorldInterest — A point that wants nearby cells resident (camera, sensor or body).

Enumerations ​

GeometryRefractionBackend ​

#include <rayrai/GeometryRefraction.hpp>

cpp
enum class GeometryRefractionBackend

Tracing backend requested for opt-in geometry refraction (RenderQualitySettings::geometryRefraction).

  • Automatic: use Vulkan hardware ray queries when available; otherwise (or if they fail) trace in OpenGL.
  • Portable: always use the portable OpenGL tracer.
  • VulkanRayQuery: require Vulkan hardware ray queries; rendering throws instead of falling back.
Enumerator
Automatic
Portable
VulkanRayQuery

LightType ​

#include <rayrai/Light.hpp>

cpp
enum class LightType

Light type selector for shading.

EnumeratorValueDescription
DIRECTIONAL0Infinitely distant light along direction; no attenuation.
POINT1Omnidirectional light at position (cubemap shadows).
SPOT2Cone light at position aimed along direction.
AREA3Rectangle at position spanned by areaRight/areaUp, emitting along direction.

MeshPreprocessLodFlavor ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
enum class MeshPreprocessLodFlavor

Kind of LOD chain; each flavor is cached in its own file.

Enumerator
Visual
Instanced
FoliagePartitioned
Foliage

RenderQualityPreset ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class RenderQualityPreset

Viewer-quality policy presets (RenderQualitySettings::preset()).

These presets affect interactive viewer rendering only. They do not change sensor world-object filtering or make sensor outputs include viewer-only visuals.

EnumeratorValueDescription
Fast0Simple (non-PBR) shading, texture clouds, no reflective ground.
Balanced1PBR + IBL with ACES tone mapping, texture clouds, reflective ground; no MSAA/SSAO/DoF/TAA.
High2Adds 2x MSAA, volumetric clouds, SSAO, DoF, FXAA, probe filtering, two shadowed lights.
Ultra3High plus 4x MSAA, AgX tone curve, TAA, larger shadow maps and probe filters.
Custom4Struct defaults plus texture clouds; also reported after any manual settings change.

ViewerColorMode ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class ViewerColorMode

Tone curve applied when RenderQualitySettings::pbrToneMapping is enabled.

With tone mapping disabled the mode has no effect.

EnumeratorValueDescription
FastLinear0Currently uses the same fitted ACES curve as AcesApprox.
AcesApprox1Fitted ACES filmic curve.
UnrealPreviewApprox2ACES with slight shadow lift and highlight desaturation.
FilmicApprox3Hejl/Burgess-Dawson style filmic curve.
AgXApprox4AgX-style log curve; hue-preserving and neutral.

ColorGradePreset ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class ColorGradePreset

ASC-CDL color grade presets applied at the end of the post-process chain.

These are stylistic; Neutral is a no-op. Strength is mixed with the ungraded color via viewerColorGradeStrength.

EnumeratorValueDescription
Neutral0No grading.
Warm1Warm highlights, slight teal shadows.
Cool2Cyan/blue cast.
Cinematic3Teal shadows, orange highlights.
Bleach4Low saturation, slight green push (bleach bypass).

CloudQuality ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class CloudQuality

Procedural cloud rendering path (RenderQualitySettings::cloudQuality).

Presets pick Texture for Fast, Balanced and Custom and Volumetric for High and Ultra. Enabled weather promotes Off to Texture when it shows a cloud layer.

EnumeratorValueDescription
Off0No clouds (sky only).
Texture1Cheap 2D cloud texture sampled at a ray-plane intersection.
Volumetric2Raymarched 3D noise with sun scattering.

GlowBlendMode ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class GlowBlendMode

How bloom (glow) is combined with the scene color.

EnumeratorValueDescription
Additive0color + glow.
Screen1Screen blend.
Softlight2Soft-light blend.
Replace3Output the glow only.
Mix4color * (1 - bloomMix) + glow.

ViewerUpscaleFilter ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class ViewerUpscaleFilter

Filter used to upscale the viewer image when viewerRenderScale is below 1.

EnumeratorValueDescription
Linear0Bilinear.
Mitchell1Mitchell-Netravali bicubic.

TemporalAaMethod ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class TemporalAaMethod

Legacy blends display history; Reprojected accumulates jittered scene color with camera/foliage-wind reprojection, depth rejection and variance clipping. The native-resolution reprojected method uses a single-sample scene target.

Legacy uses temporalAaBlend as its history weight; Reprojected uses temporalAaCurrentWeight and forces viewerMsaaSamples to 1 while temporal AA is on.

EnumeratorValue
Legacy0
Reprojected1

PostProcessDebugMode ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class PostProcessDebugMode

Debug views that replace the final post-processed image.

EnumeratorValueDescription
Final0Normal output.
BloomSource1Thresholded bloom source.
AmbientOcclusion2Denoised ambient occlusion.
AmbientOcclusionRaw3Ambient occlusion before denoising.
FogTransmittance4Fog transmittance.
FogDensity5Volumetric fog density.
FogScattering6Volumetric in-scattering.
WorldNormal7World normal reconstructed from depth.
DepthHeatmap8Linear depth as a heat map.
ScreenSpaceIndirectLighting9Screen-space indirect lighting term.

PointShadowPolicy ​

#include <rayrai/RenderQuality.hpp>

cpp
enum class PointShadowPolicy

Shadowing policy for point lights selected as additional shadow casters.

EnumeratorValueDescription
Disabled0Point lights never get shadow maps.
StandaloneCubemap1Point lights use their own 6-face depth cubemap.

VisualCategory ​

#include <rayrai/VisualCategory.hpp>

cpp
enum class VisualCategory

Render-category flag for user-created visuals and point clouds.

VisualCategory is render metadata. Rayrai uses it when a render policy asks for only capture/detection-visible helper geometry, for example external camera renders, capture paths that reuse external-camera rendering, detectable-only point-cloud rendering, and picking or shadow candidate passes that explicitly require detectable visualization objects.

This flag does not create a physics body, collision shape, dynamics object, or semantic label, and it does not hide an object from the normal interactive viewer. User-created Visuals, InstancedVisuals, PointCloud, and helpers built on top of Visuals default to NotDetectable so debug overlays, camera frustums, axes, labels, and other viewer-only aids do not contaminate external-camera or generated capture images.

Set a visual to Detectable when it should be included in those capture/detection render passes. RaiSim world objects are not controlled by this enum; they follow their own wrapper visibility and the active render pass policy. The RaiSim RGB/depth sensor-camera overloads intentionally disable custom visualization objects and point clouds regardless of this flag.

EnumeratorValueDescription
NotDetectable0Viewer-only by default; excluded from detectable-only render passes.
Detectable1Included when a rayrai render policy asks for detectable custom visuals.

WeatherPreset ​

#include <rayrai/Weather.hpp>

cpp
enum class WeatherPreset

Named weather configurations produced by RayraiWindow::defaultWeatherSettings().

Every preset except Custom enables weather at High quality, 13:00 local time (Snow 12:00, Storm 15:00, NightClear 22:00, NightRain 23:00) with wetness accumulation on, and sets cloud, fog, precipitation, wetness, wind and turbidity values for the named look.

EnumeratorValueDescription
Clear0Almost cloudless, no fog or precipitation.
Hazy1Light clouds, warm haze (1.4 km visibility).
Overcast2Full grey cloud deck, light fog.
Fog3Dense fog (160 m visibility).
Rain4Moderate rain, wet surfaces.
HeavyRain5Heavy rain, fully wet surfaces, stronger wind.
Snow6Snowfall with snow cover and bright ground albedo.
Storm7Heavy rain with lightning and strong wind.
NightClear8Clear night sky.
NightRain9Rain at night.
Custom10User-defined; defaultWeatherSettings(Custom) returns weather disabled.

WeatherQuality ​

#include <rayrai/Weather.hpp>

cpp
enum class WeatherQuality

Cost tier of the weather effects.

Low has no cloud layer and no precipitation particles. Medium adds the cloud layer and particles. High adds cloud shadows, lightning and lens droplets. Ultra adds volumetric fog and the largest particle budget.

EnumeratorValueDescription
Low0No clouds or precipitation particles.
Medium1Cloud layer and particles (1x budget).
High2Plus cloud shadows, lightning and lens droplets (2x budget).
Ultra3Plus volumetric fog (4x budget).

Type aliases ​

IrradianceProbe ​

#include <rayrai/BakedIrradiance.hpp>

cpp
using IrradianceProbe = std::array<glm::vec4, 3>

First-order spherical harmonics, convolved with cosine / pi. Each RGB channel stores (constant, x, y, z); evaluate dot(channel, vec4(1, normal)). Radiance and coefficients are linear, scene-referred, before exposure.

MeshList ​

#include <rayrai/helper.hpp>

cpp
using MeshList = std::shared_ptr<std::vector<std::shared_ptr<OpenGLMesh>>>

Convenience alias for a shared list of meshes returned by the GenMesh* helpers and consumed by Visuals/RaisimObject constructors.

The nested shared_ptr layout exists so that multiple visuals can share an underlying mesh set without copying the vector. Prefer this alias to the long nested type in new code.

Functions ​

accumulateIrradiance ​

#include <rayrai/BakedIrradiance.hpp>

cpp
void accumulateIrradiance(
    IrradianceProbe &probe,
    const glm::vec3 &radiance,
    const glm::vec3 &direction,
    float weight)

deringIrradiance ​

#include <rayrai/BakedIrradiance.hpp>

cpp
void deringIrradiance(IrradianceProbe &probe)

supportsBc7TextureStorage ​

#include <rayrai/Bc7TextureStorage.hpp>

cpp
bool supportsBc7TextureStorage()

True if the current context can store BC7 textures. Desktop GL 4.2 or the equivalent extension; unsupported contexts keep RGB8. No architecture-specific encoder, compute shader or worker thread is needed.

compressRgbTextureBc7 ​

#include <rayrai/Bc7TextureStorage.hpp>

cpp
Bc7TextureStorageResult compressRgbTextureBc7(unsigned int texture)

Re-encode a GL_TEXTURE_2D in place as BC7, using the driver's encoder. Loading-time, in-place storage optimization for owned, mutable RGB8/SRGB8 material textures. Alpha, depth, float, immutable and already compressed textures are left intact. Preserve every authored mip, filtering and texture ID. References to the implicit RGB alpha channel keep sampling exactly one. The driver's BC7 encoder is lossy; validate assets before enabling this policy. Requires a current GL context. Unsupported/ineligible textures return zero. GL bindings and pixel-store state are restored on return.

buildFoliageGeometryAtlasForMeshes ​

#include <rayrai/FoliageGeometryAtlas.hpp>

cpp
FoliageGeometryAtlasResult buildFoliageGeometryAtlasForMeshes(
    const std::shared_ptr<std::vector<std::shared_ptr<OpenGLMesh>>> &meshes,
    const FoliageGeometryAtlasOptions &options={})

Merge a multi-mesh foliage model into one vertex/index buffer.

Applies only when every mesh is a foliage-atlas candidate with compatible materials (at least two meshes). On success meshes is replaced in place by indexed-range views of a single atlas mesh, so the model can be drawn without rebinding buffers; otherwise it is left unchanged.

Parameters

ParameterDescription
meshesMesh list to rewrite.
optionsWarning behavior.

Returns What was done and why not, if skipped.

buildCoveragePreservingFoliageLods ​

#include <rayrai/FoliageGeometryLods.hpp>

cpp
std::array<std::shared_ptr<std::vector<std::shared_ptr<OpenGLMesh>>>, 6> buildCoveragePreservingFoliageLods(
    const InstancedVisuals &source,
    bool cpuOnly=false,
    std::array<float, 6> targetRatios={.62f,.38f,.22f,.10f,.035f,.002f})

Build six simplified LOD mesh lists from a foliage visual's prepared LOD 0. Real source geometry, with disconnected component extents and projected surface area protected. No directional texture captures or material baking. Moderate loss on small surviving pieces uses bounded growth inside source bounds; missing pieces retain original triangles. This is not a bound on the final alpha-masked screen silhouette. With cpuOnly=false, call on the owning GL thread with prepared source meshes. cpuOnly=true can run on a worker while the source remains immutable; upload generated meshes on the owning GL thread before installing the chain. Preserving tiny leaf pieces can limit reduction; measure the resulting cost.

Parameters

ParameterDescription
sourceVisual with prepared, opaque or alpha-masked triangle meshes.
cpuOnlyProduce CPU-only meshes (see above).
targetRatiosTarget index-count ratio per level; non-increasing, in (0, 1].

Returns One mesh list per LOD level, for InstancedVisuals::setPreparedMeshLods().

Exceptions

ExceptionDescription
std::invalid_argumentfor unprepared or unsupported source geometry or bad ratios.

buildFoliageTextureAtlasForMeshes ​

#include <rayrai/FoliageTextureAtlas.hpp>

cpp
FoliageTextureAtlasResult buildFoliageTextureAtlasForMeshes(
    const std::shared_ptr<std::vector<std::shared_ptr<OpenGLMesh>>> &meshes,
    const FoliageTextureAtlasOptions &options={})

Pack the albedo (and normal) textures of foliage meshes into one atlas.

Needs a current GL context. Requires at least two eligible meshes with two distinct albedo textures; eligible meshes have default UV transforms and UVs inside [0,1]. Rewritten meshes have their texture coordinates remapped into their atlas tile and reference the atlas textures.

Parameters

ParameterDescription
meshesMesh list whose materials are rewritten in place.
optionsPacking and warning options.

Returns Atlas handles and statistics.

requireCompleteFramebuffer ​

#include <rayrai/FramebufferValidation.hpp>

cpp
void requireCompleteFramebuffer(const char *label)

Throw std::runtime_error naming label if the bound GL_FRAMEBUFFER is incomplete.

logGlErrors ​

#include <rayrai/GlStateGuard.hpp>

cpp
void logGlErrors(const char *label, const char *file, int line)

Drain and print pending GL errors when RAYRAI_LOG_GL_ERRORS is set to a non-empty value other than "0" (debug builds only; use RAYRAI_GL_CHECK).

additionalLightInfluenceRange ​

#include <rayrai/LightInfluence.hpp>

cpp
LightInfluenceRange additionalLightInfluenceRange(
    const AdditionalLight &light,
    float budget,
    const glm::vec3 &colorScale=glm::vec3(1.f))

Conservative spherical influence range for a local additional light. budget is this light's share of the incident-radiance budget, not a final-pixel error tolerance. colorScale includes tint, fade and intensity. Directional, non-decaying, ambient-bearing or invalid lights stay unlimited. Existing Light::radius (source-size semantics) is intentionally untouched.

meshPreprocessCacheEnabled ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
bool meshPreprocessCacheEnabled()

Returns Always true; the cache cannot be disabled.

resetMeshPreprocessCacheStats ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
void resetMeshPreprocessCacheStats()

Zero all counters returned by meshPreprocessCacheStatsSnapshot().

meshPreprocessCacheStatsSnapshot ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
MeshPreprocessCacheStats meshPreprocessCacheStatsSnapshot()

Returns Current counter values.

computeMeshPreprocessMetadata ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
MeshPreprocessMetadata computeMeshPreprocessMetadata(const std::vector<std::shared_ptr<OpenGLMesh>> &meshes)

Scan meshes for counts, bounds and material flags.

Returns Metadata; MeshPreprocessMetadata::valid is false for empty geometry.

recordMeshPreprocessImportSources ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
void recordMeshPreprocessImportSources(
    const std::string &canonicalKey,
    const std::vector<assimp::ModelSourceFile> &files)

Record source snapshots taken during import. A changed import cannot publish stale results.

loadMeshPreprocessMetadata ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
bool loadMeshPreprocessMetadata(
    const std::string &canonicalKey,
    MeshPreprocessMetadata &metadata)

Load cached metadata for the source file canonicalKey.

Returns False on a miss or a stale/corrupt entry.

storeMeshPreprocessMetadata ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
bool storeMeshPreprocessMetadata(
    const std::string &canonicalKey,
    const MeshPreprocessMetadata &metadata)

Store metadata for the source file canonicalKey.

Returns False if the metadata is not cacheable or the write failed.

loadMeshPreprocessLods ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
std::shared_ptr<RayraiGlobalAsset::MeshLodChain> loadMeshPreprocessLods(
    const std::string &canonicalKey,
    const std::vector<std::shared_ptr<OpenGLMesh>> &sourceMeshes,
    MeshPreprocessLodFlavor flavor)

Load a cached LOD chain built from sourceMeshes.

Returns The chain, or null on a miss or a stale/incompatible entry.

storeMeshPreprocessLods ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
bool storeMeshPreprocessLods(
    const std::string &canonicalKey,
    const std::vector<std::shared_ptr<OpenGLMesh>> &sourceMeshes,
    MeshPreprocessLodFlavor flavor,
    const RayraiGlobalAsset::MeshLodChain &chain)

Store a LOD chain built from sourceMeshes.

Returns False for an empty chain or a failed write.

warnMeshPreprocessCacheFallbackOnce ​

#include <rayrai/MeshPreprocessCache.hpp>

cpp
void warnMeshPreprocessCacheFallbackOnce(
    const std::string &canonicalKey,
    uint32_t code,
    const std::string &detail={})

Print a cache fallback warning once per (key, code, detail). Code 0 is ignored; RAYRAI_SUPPRESS_MESH_PREPROCESS_CACHE_FALLBACK_WARNINGS silences all.

envFlagEnabled ​

#include <rayrai/RayraiEnv.hpp>

cpp
bool envFlagEnabled(const char *name)

True if environment variable name is set to a non-empty value not starting with '0'.

envIntValue ​

#include <rayrai/RayraiEnv.hpp>

cpp
int envIntValue(const char *name, int fallback=0)

Leading base-10 integer of environment variable name, or fallback if unset or not numeric.

syncRaisimCameraPose ​

#include <rayrai/RayraiWindow.hpp>

cpp
template <typename RaisimCamT>
void syncRaisimCameraPose(RaisimCamT &sensorCam, Camera &renderCam)

Synchronizes a rayrai render camera's pose with a raisim sensor camera.

Template parameters

ParameterDescription
RaisimCamTThe type of the raisim sensor camera (e.g., raisim::RGBCamera).

Parameters

ParameterDescription
sensorCamThe source raisim camera. Its pose will be updated and read.
renderCamThe destination rayrai camera. Its position, front, up and right vectors will be set.

Note

This function directly sets the position, front, up and right vectors of the renderCam. Calling renderCam.update() after this may lead to unexpected behavior, as update() recalculates orientation from yaw and pitch angles, which are not updated by this function. This function is intended for use cases where the camera's view matrix is used directly after synchronization, without an intermediate update() call.

rayraiProcessIsMultiThreaded ​

#include <rayrai/RayraiWindow.hpp>

cpp
bool rayraiProcessIsMultiThreaded()

Process-wide query: is the current rayrai installation running in multi-threaded mode (one RayraiWindow per worker thread)?

Returns true once the first RayraiWindow of the process was constructed with ThreadingMode::MultiThread (the first window fixes the mode), false before any window exists or in SingleThread mode. Nothing inside rayrai branches on this: rayrai's GL-state caches do not depend on the mode, because worker asset creation can touch that state before any window exists and so before the mode is known. It remains as the declared contract — construction still rejects a process whose renderers disagree — and as a query for applications that need to know which contract they are under.

Returns True in MultiThread mode.

rsceneRenderSettings ​

#include <rayrai/RsceneVisuals.hpp>

cpp
RsceneRenderSettings rsceneRenderSettings(const raisim::rscene::Scene &scene)

Reads the scene's render settings; throws std::runtime_error when a record is malformed. Omitted records and keys take RaiSim Engine 2's defaults.

setRsceneRenderSettings ​

#include <rayrai/RsceneVisuals.hpp>

cpp
void setRsceneRenderSettings(
    RayraiWindow &viewer,
    const RsceneRenderSettings &render)

Shows the viewer's world scene with these render settings instead of the file's, usually the file's own (rsceneRenderSettings()) after C++ changes. The scene is applied again in place of the constructor's application; its meshes are reused. Fatal when the viewer's world holds no scene.

rsceneVisuals ​

#include <rayrai/RsceneVisuals.hpp>

cpp
const RsceneVisuals &rsceneVisuals(const RayraiWindow &viewer)

The visuals and batches the viewer created for its world's scene. Empty when the viewer's world holds no scene.

terrainPatchLayout ​

#include <rayrai/TerrainPatchLayout.hpp>

cpp
std::vector<TerrainPatchRegion> terrainPatchLayout(
    WorldCellBounds world,
    std::span<const glm::dvec2> observers,
    double finestPatchSize=32,
    double splitScale=1.5,
    size_t patchBudget=2048)

A complete terrain cover: small patches around each observer, large ones toward the horizon. The returned regions partition the world without holes.

A node is split while it is wider than finestPatchSize and some observer lies within width * splitScale of it.

Exceptions

ExceptionDescription
std::invalid_argumentfor non-finite or empty inputs.
std::length_errorwhen more than patchBudget regions are needed.

textureBindingState ​

#include <rayrai/TextureBindingCache.hpp>

cpp
detail::TextureBindingState &textureBindingState()

textureStateCache ​

#include <rayrai/TextureBindingCache.hpp>

cpp
detail::TextureStateCache &textureStateCache()

activateTextureCacheContext ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void activateTextureCacheContext(uint64_t generation)

textureObjectExistsCached ​

#include <rayrai/TextureBindingCache.hpp>

cpp
bool textureObjectExistsCached(unsigned int textureId)

markTextureObjectExistsCached ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void markTextureObjectExistsCached(unsigned int textureId, bool exists=true)

textureSamplerStatePrepared ​

#include <rayrai/TextureBindingCache.hpp>

cpp
bool textureSamplerStatePrepared(
    unsigned int textureId,
    std::uint64_t samplerKey)

markTextureSamplerStatePrepared ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void markTextureSamplerStatePrepared(
    unsigned int textureId,
    std::uint64_t samplerKey)

invalidateTextureStateCacheForTexture ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void invalidateTextureStateCacheForTexture(unsigned int textureId)

invalidateFallbackTextureVerification ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void invalidateFallbackTextureVerification()

resetTextureBindingCache ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void resetTextureBindingCache()

Forget all cached unit bindings (call after any GL texture binding done outside these helpers).

invalidateTextureBindingCacheForTexture ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void invalidateTextureBindingCacheForTexture(unsigned int textureId)

invalidateTextureBindingCacheForTextures ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void invalidateTextureBindingCacheForTextures(
    gl::GLsizei count,
    const unsigned int *textureIds)

deleteTextureNameAndInvalidateCache ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void deleteTextureNameAndInvalidateCache(unsigned int textureId)

deleteTextureAndInvalidateCache ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void deleteTextureAndInvalidateCache(unsigned int &textureId)

Delete a texture, drop it from the calling thread's caches, and set textureId to 0. Use instead of raw glDeleteTextures so a recycled id is not mistaken for a cached binding.

deleteTexturesAndInvalidateCache ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void deleteTexturesAndInvalidateCache(
    gl::GLsizei count,
    const unsigned int *textureIds)

fallbackWhiteTexture2D ​

#include <rayrai/TextureBindingCache.hpp>

cpp
unsigned int fallbackWhiteTexture2D()

Returns Lazily created 1x1 opaque-white 2D texture for the current context (owned by the cache).

fallbackWhiteTextureCube ​

#include <rayrai/TextureBindingCache.hpp>

cpp
unsigned int fallbackWhiteTextureCube()

Returns Lazily created 1x1 opaque-white cubemap for the current context (owned by the cache).

fallbackWhiteTexture3D ​

#include <rayrai/TextureBindingCache.hpp>

cpp
unsigned int fallbackWhiteTexture3D()

Returns Lazily created 1x1x1 opaque-white 3D texture for the current context (owned by the cache).

bindTextureIfNeeded ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void bindTextureIfNeeded(
    int unit,
    gl::GLenum target,
    unsigned int textureId)

Free-function form of TextureBindingCacheView::bindTexture().

bindTexture2DIfNeeded ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void bindTexture2DIfNeeded(int unit, unsigned int textureId)

bindTexture2DWithFallbackIfNeeded ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void bindTexture2DWithFallbackIfNeeded(int unit, unsigned int textureId)

Bind a 2D texture, substituting fallbackWhiteTexture2D() for id 0.

bindTextureCubeIfNeeded ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void bindTextureCubeIfNeeded(int unit, unsigned int textureId)

bindTextureCubeWithFallbackIfNeeded ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void bindTextureCubeWithFallbackIfNeeded(int unit, unsigned int textureId)

Bind a cube map, substituting fallbackWhiteTextureCube() for id 0.

bindTexture3DIfNeeded ​

#include <rayrai/TextureBindingCache.hpp>

cpp
void bindTexture3DIfNeeded(int unit, unsigned int textureId)

toGlm ​

#include <rayrai/helper.hpp>

cpp
glm::dvec3 toGlm(const raisim::Vec<3> &v)

Convert a raisim::Vec<3> to a GLM vector.

Parameters

ParameterDescription
vRaisim vector in world coordinates.

Returns GLM vector with the same components.

cpp
glm::dmat3 toGlm(const raisim::Mat<3, 3> &R)

Convert a raisim::Mat<3,3> to a GLM matrix.

Parameters

ParameterDescription
RRaisim rotation matrix (column-major).

Returns GLM matrix with the same column-major layout.

GenMeshCube ​

#include <rayrai/helper.hpp>

cpp
MeshList GenMeshCube(float width, float height, float length)

Generate a cube mesh centered at the origin.

Parameters

ParameterDescription
widthCube size along X.
heightCube size along Y.
lengthCube size along Z.

Returns Shared mesh list containing a single cube mesh.

GenMeshPlane ​

#include <rayrai/helper.hpp>

cpp
MeshList GenMeshPlane(
    float width,
    float height,
    float uTiling=1.0f,
    float vTiling=1.0f,
    int subdivisions=1)

Generate a plane mesh centered at the origin on the XY plane.

Parameters

ParameterDescription
widthPlane size along X.
heightPlane size along Y.
uTilingTexture tiling factor in U.
vTilingTexture tiling factor in V.
subdivisionsNxN grid of quads. Tessellating a large plane bounds the clip-W ratio across each triangle, which is what perspective-correct interpolation needs for stable fp32 precision — a single huge quad degrades vPosWS at grazing angles and corrupts both the procedural checker and planar-reflection UV sampling.

Returns Shared mesh list containing a single plane mesh.

GenMeshSphere ​

#include <rayrai/helper.hpp>

cpp
MeshList GenMeshSphere(float radius, int rings, int sectors)

Generate a UV sphere mesh.

Parameters

ParameterDescription
radiusSphere radius.
ringsNumber of latitude rings.
sectorsNumber of longitude sectors.

Returns Shared mesh list containing a single sphere mesh.

GenMeshCylinder ​

#include <rayrai/helper.hpp>

cpp
MeshList GenMeshCylinder(float radius, float height, int sectors)

Generate a cylinder mesh oriented along Z.

Parameters

ParameterDescription
radiusCylinder radius.
heightCylinder height.
sectorsNumber of radial sectors.

Returns Shared mesh list containing a single cylinder mesh.

GenMeshCapsule ​

#include <rayrai/helper.hpp>

cpp
MeshList GenMeshCapsule(float radius, float height, int sectors)

Generate a capsule mesh oriented along Z.

Parameters

ParameterDescription
radiusCapsule radius.
heightCapsule height (cylinder portion).
sectorsNumber of radial sectors.

Returns Shared mesh list containing a single capsule mesh.

HeightmapVisualSampleCountForAxis ​

#include <rayrai/helper.hpp>

cpp
int HeightmapVisualSampleCountForAxis(
    int sourceSamples,
    float worldSizeMeters)

Choose visual heightmap samples for one axis without changing physics samples.

When source cells are coarser than 0.25 m, upsamples by an integer factor toward 0.25 m visual cells. The result never exceeds 769 samples per axis; inputs with at most 2 samples or a non-positive size are returned unchanged.

Parameters

ParameterDescription
sourceSamplesNumber of source heightmap samples on the axis.
worldSizeMetersPhysical size of the axis in metres.

Returns Visual sample count for rayrai rendering.

HeightmapVisualSampleCounts ​

#include <rayrai/helper.hpp>

cpp
glm::ivec2 HeightmapVisualSampleCounts(
    const std::vector<double> &height,
    int samplesX,
    int samplesY,
    float sizeX,
    float sizeY)

Choose heightmap visual grid dimensions while preserving non-finite source holes.

A grid containing NaN or infinity uses its source triangulation unchanged, so only triangles containing invalid source samples are omitted. Finite grids retain the normal visual tessellation and sample budget.

cpp
glm::ivec2 HeightmapVisualSampleCounts(
    const std::vector<float> &height,
    int samplesX,
    int samplesY,
    float sizeX,
    float sizeY)

Float-sample overload used by streamed heightmaps.

BuildHeightmapTriangleIndices ​

#include <rayrai/helper.hpp>

cpp
std::vector<unsigned int> BuildHeightmapTriangleIndices(
    int samplesX,
    int samplesY)

Build row-major heightmap triangles using the physics anti-diagonal.

Parameters

ParameterDescription
samplesXVertices per row.
samplesYNumber of rows.

Returns Triangle-list indices (empty if either count is below 2).

RemoveInvalidHeightmapTriangles ​

#include <rayrai/helper.hpp>

cpp
void RemoveInvalidHeightmapTriangles(
    std::vector<Vertex> &vertices,
    std::vector<unsigned int> &indices)

Remove heightmap triangles touching NaN or infinite heights.

Invalid, now unused vertex heights are replaced with zero for finite GPU geometry and bounds. The source height samples are not modified.

Parameters

ParameterDescription
verticesRow-major rendered heightmap vertices.
indicesTriangle-list indices into the vertices.

SampleHeightmapTriangulated ​

#include <rayrai/helper.hpp>

cpp
float SampleHeightmapTriangulated(
    const std::vector<double> &height,
    int samplesX,
    int samplesY,
    float sourceX,
    float sourceY)

Interpolate a row-major height grid on the same triangulation as BuildHeightmapTriangleIndices().

Parameters

ParameterDescription
heightHeights, x fastest.
samplesXSamples per row.
samplesYNumber of rows.
sourceXFractional sample coordinate along x (clamped to the grid).
sourceYFractional sample coordinate along y (clamped to the grid).

Returns Interpolated height, or 0 for an invalid grid.

cpp
float SampleHeightmapTriangulated(
    const std::vector<float> &height,
    int samplesX,
    int samplesY,
    float sourceX,
    float sourceY)

Float-sample overload used by streamed heightmaps.

FillHeightmapVerticesRaisim ​

#include <rayrai/helper.hpp>

cpp
bool FillHeightmapVerticesRaisim(
    raisim::HeightMap *hm,
    std::vector<Vertex> &vertices)

Generate heightmap vertices from a raisim heightmap without rebuilding indices/meshes.

Parameters

ParameterDescription
hmRaisim heightmap pointer.
verticesDestination vertex buffer.

Returns True when vertices were generated.

FillHeightmapVertexRowsRaisim ​

#include <rayrai/helper.hpp>

cpp
bool FillHeightmapVertexRowsRaisim(
    raisim::HeightMap *hm,
    size_t sourceMinY,
    size_t sourceMaxY,
    std::vector<Vertex> &vertices,
    int &visualMapX,
    int &visualMinY,
    int &visualRowCount)

Generate full-width visual vertex rows affected by an inclusive source-sample Y range.

The range is widened by a small margin so normals at the edges stay correct.

Parameters

ParameterDescription
hmRaisim heightmap pointer.
sourceMinYFirst changed source row.
sourceMaxYLast changed source row.
verticesOutput vertices for the visual rows, row-major.
visualMapXOutput visual samples per row.
visualMinYOutput first visual row written.
visualRowCountOutput number of visual rows written.

Returns False for a null or invalid heightmap.

HeightmapVisualRowsOfSourceRows ​

#include <rayrai/helper.hpp>

cpp
glm::ivec2 HeightmapVisualRowsOfSourceRows(
    int sourceRows,
    int visualRows,
    size_t sourceMinY,
    size_t sourceMaxY)

Visual rows whose vertices depend on an inclusive source-sample Y range.

Includes the margin FillHeightmapVertexRowsRaisim() refills, so normals at the edges stay correct.

Parameters

ParameterDescription
sourceRowsSource samples along Y.
visualRowsVisual samples along Y.
sourceMinYFirst changed source row.
sourceMaxYLast changed source row.

Returns First and last affected visual row.

FillHeightmapVisualRowsRaisim ​

#include <rayrai/helper.hpp>

cpp
bool FillHeightmapVisualRowsRaisim(
    raisim::HeightMap *hm,
    const glm::ivec2 &visualSamples,
    int firstRow,
    int rowCount,
    const std::function<Vertex *(int)> &rowVertices)

Generate visual vertex rows of a heightmap drawn with given visual sample counts.

Idle decode workers fill rows concurrently, so rowVertices is called from several threads.

Parameters

ParameterDescription
hmRaisim heightmap pointer.
visualSamplesVisual samples per axis, as HeightmapVisualSampleCounts() chooses them.
firstRowFirst visual row.
rowCountNumber of visual rows.
rowVerticesDestination of a visual row: visualSamples.x vertices.

Returns False for a null or invalid heightmap, or rows outside the visual grid.

GenMeshHeightmapRaisim ​

#include <rayrai/helper.hpp>

cpp
MeshList GenMeshHeightmapRaisim(raisim::HeightMap *hm)

Generate a heightmap mesh from a raisim heightmap object. Triangles containing NaN or infinite source heights are omitted. Such maps retain the source grid so all other source triangles remain visible.

Parameters

ParameterDescription
hmRaisim heightmap pointer.

Returns Shared mesh list containing a single heightmap mesh.

findAsMeshFile ​

#include <rayrai/helper.hpp>

cpp
std::string findAsMeshFile(
    const std::string &resourceDir,
    const std::string &file)

Resolve a mesh file path relative to a resource directory.

Tries file, then its base name, under resourceDir, its meshes/ and mesh/ subdirectories, and the same three locations one level up.

Parameters

ParameterDescription
resourceDirResource directory for the raisim object.
fileMesh file name stored in raisim.

Returns Resolved mesh file path, or an empty string (with a stderr message) if none exists.

parseColorLiteral ​

#include <rayrai/helper.hpp>

cpp
std::optional<glm::vec4> parseColorLiteral(std::string_view input)

Parse a numeric color literal such as "{1.0, 0.5, 0.0, 1.0}" or "1 0.5 0 1".

{, }, (, ), , and whitespace act as separators; parsing stops at any other non-numeric text. The first three numbers are taken as RGB; the optional fourth is the alpha (defaults to 1.0). If the largest RGB channel is in (1, 255], RGB (and an alpha above 1) are interpreted as 0..255 and rescaled. RGB is then clamped to [0, 1]; a non-negative alpha is clamped to [0, 1], while a negative alpha is kept as is.

Returns The parsed color, or std::nullopt if the input cannot be parsed.

parseNamedColor ​

#include <rayrai/helper.hpp>

cpp
std::optional<glm::vec4> parseNamedColor(std::string_view name)

Look up a CSS-style named color (case-insensitive, e.g. "red", "LightGray").

Recognised names match the table used by appearanceToGlmVec4(). A leading path prefix ("foo/red") or namespace prefix ("raisim::red") is stripped before lookup, and surrounding whitespace is ignored. The reserved names "hidden" and "default" both return the fallback grey (0.7, 0.7, 0.7, 1).

Returns The matched color, or std::nullopt for unknown names.

isHiddenAppearance ​

#include <rayrai/helper.hpp>

cpp
bool isHiddenAppearance(std::string_view appearance)

Check whether an appearance requests that an object be omitted from rendering.

The reserved values "hidden" and "invisible" are matched case-insensitively after trimming surrounding whitespace.

appearanceToGlmVec4 ​

#include <rayrai/helper.hpp>

cpp
glm::vec4 appearanceToGlmVec4(const std::string &appearance)

Converts an appearance string to a glm::vec4.

The appearance can be a named color (e.g., "red", "Blue", "LIGHTGRAY") or a string-formatted vector (e.g., "{1.0, 0.5, 0.0, 1.0}"). Named color matching is case-insensitive.

Convenience wrapper around parseColorLiteral() and parseNamedColor() — prefer those when you want to act on parse failure explicitly.

Parameters

ParameterDescription
appearanceThe input string representing the color.

Returns glm::vec4 The corresponding color vector. Returns grey (0.7, 0.7, 0.7, 1) on failure.

Variables ​

RAISIN_PHONG_SHADING ​

#include <rayrai/RayraiWindow.hpp>

cpp
constexpr int RAISIN_PHONG_SHADING

Shading selector used by the mesh shader.

RAISIN_FLAT_SHADING ​

#include <rayrai/RayraiWindow.hpp>

cpp
constexpr int RAISIN_FLAT_SHADING

Flat shading selector used by the mesh shader.

kMaxAdditionalLights ​

#include <rayrai/RenderQuality.hpp>

cpp
constexpr size_t kMaxAdditionalLights

Maximum number of additional lights per window; RayraiWindow::addAdditionalLight() drops extras.

kMaxAdditionalShadowLights ​

#include <rayrai/RenderQuality.hpp>

cpp
constexpr size_t kMaxAdditionalShadowLights

Maximum number of additional lights that can own a shadow map at the same time.

kMaxProjectedDecals ​

#include <rayrai/SceneEffects.hpp>

cpp
constexpr size_t kMaxProjectedDecals

Maximum number of projected decals; RayraiWindow::addProjectedDecal() ignores extra decals.

kMaxIrradianceVolumes ​

#include <rayrai/SceneEffects.hpp>

cpp
constexpr size_t kMaxIrradianceVolumes

Maximum number of irradiance volumes; RayraiWindow::addIrradianceVolume() ignores extra volumes.

kMaxLocalFogVolumes ​

#include <rayrai/Weather.hpp>

cpp
constexpr size_t kMaxLocalFogVolumes

Maximum number of local fog volumes; RayraiWindow::addLocalFogVolume() ignores extra volumes.

DEPTH_VERTEX_SHADER ​

#include <rayrai/shaders/DepthShader.hpp>

cpp
auto DEPTH_VERTEX_SHADER

Vertex shader for shadow map depth rendering.

DEPTH_FRAGMENT_SHADER ​

#include <rayrai/shaders/DepthShader.hpp>

cpp
auto DEPTH_FRAGMENT_SHADER

Fragment shader for shadow map depth rendering.

DEPTH_OPAQUE_FRAGMENT_SHADER ​

#include <rayrai/shaders/DepthShader.hpp>

cpp
auto DEPTH_OPAQUE_FRAGMENT_SHADER

FISHEYE_CAMERA_VERTEX_SHADER ​

#include <rayrai/shaders/FisheyeCameraShader.hpp>

cpp
static constexpr const char *FISHEYE_CAMERA_VERTEX_SHADER

FISHEYE_CAMERA_FRAGMENT_SHADER ​

#include <rayrai/shaders/FisheyeCameraShader.hpp>

cpp
static constexpr const char *FISHEYE_CAMERA_FRAGMENT_SHADER

INSTANCED_CULLING_COMPUTE_SHADER ​

#include <rayrai/shaders/InstancedCullingShader.hpp>

cpp
auto INSTANCED_CULLING_COMPUTE_SHADER

INSTANCED_DEPTH_VERTEX_SHADER ​

#include <rayrai/shaders/InstancedDepthShader.hpp>

cpp
auto INSTANCED_DEPTH_VERTEX_SHADER

Vertex shader for instanced shadow depth rendering.

INSTANCED_OPAQUE_DEPTH_FRAGMENT_SHADER ​

#include <rayrai/shaders/InstancedDepthShader.hpp>

cpp
auto INSTANCED_OPAQUE_DEPTH_FRAGMENT_SHADER

INSTANCED_DEPTH_FRAGMENT_SHADER ​

#include <rayrai/shaders/InstancedDepthShader.hpp>

cpp
auto INSTANCED_DEPTH_FRAGMENT_SHADER

Alpha-aware fragment shader for instanced shadow depth rendering.

INSTANCED_MESH_VERTEX_SHADER ​

#include <rayrai/shaders/InstancedMeshShader.hpp>

cpp
auto INSTANCED_MESH_VERTEX_SHADER

Vertex shader for instanced mesh rendering.

INSTANCED_MESH_FRAGMENT_SHADER ​

#include <rayrai/shaders/InstancedMeshShader.hpp>

cpp
auto INSTANCED_MESH_FRAGMENT_SHADER

Fragment shader for instanced mesh rendering.

LENS_DROPLET_VERTEX_SHADER ​

#include <rayrai/shaders/LensDropletShader.hpp>

cpp
auto LENS_DROPLET_VERTEX_SHADER

LENS_DROPLET_FRAGMENT_SHADER ​

#include <rayrai/shaders/LensDropletShader.hpp>

cpp
auto LENS_DROPLET_FRAGMENT_SHADER

MESH_VERTEX_SHADER ​

#include <rayrai/shaders/MeshShader.hpp>

cpp
auto MESH_VERTEX_SHADER

Vertex shader for mesh rendering with lighting and shadow projection.

MESH_FRAGMENT_SHADER ​

#include <rayrai/shaders/MeshShader.hpp>

cpp
auto MESH_FRAGMENT_SHADER

Fragment shader for mesh rendering with lighting, shadows, and fog.

PBR_CORE_MESH_FRAGMENT_SHADER ​

#include <rayrai/shaders/PbrCoreMeshShader.hpp>

cpp
auto PBR_CORE_MESH_FRAGMENT_SHADER

PBR_MESH_VERTEX_SHADER ​

#include <rayrai/shaders/PbrMeshShader.hpp>

cpp
auto PBR_MESH_VERTEX_SHADER

PBR_MESH_FRAGMENT_SHADER ​

#include <rayrai/shaders/PbrMeshShader.hpp>

cpp
auto PBR_MESH_FRAGMENT_SHADER

PICKING_VS ​

#include <rayrai/shaders/PickingShader.hpp>

cpp
constexpr const char *PICKING_VS

Vertex shader for object ID picking.

PICKING_FS ​

#include <rayrai/shaders/PickingShader.hpp>

cpp
constexpr const char *PICKING_FS

Fragment shader for object ID picking.

POINTCLOUD_VERTEX_SHADER ​

#include <rayrai/shaders/PointCloudShader.hpp>

cpp
auto POINTCLOUD_VERTEX_SHADER

Vertex shader for point cloud rendering.

POINTCLOUD_FRAGMENT_SHADER ​

#include <rayrai/shaders/PointCloudShader.hpp>

cpp
auto POINTCLOUD_FRAGMENT_SHADER

Fragment shader for point cloud rendering.

PRECIPITATION_VERTEX_SHADER ​

#include <rayrai/shaders/PrecipitationShader.hpp>

cpp
auto PRECIPITATION_VERTEX_SHADER

PRECIPITATION_FRAGMENT_SHADER ​

#include <rayrai/shaders/PrecipitationShader.hpp>

cpp
auto PRECIPITATION_FRAGMENT_SHADER

SKY_ATMOSPHERE_COMMON_GLSL ​

#include <rayrai/shaders/SkyAtmosphereCommon.hpp>

cpp
static constexpr const char *SKY_ATMOSPHERE_COMMON_GLSL

SKY_LUT_VERTEX_SHADER ​

#include <rayrai/shaders/SkyAtmosphereLutShaders.hpp>

cpp
static constexpr const char *SKY_LUT_VERTEX_SHADER

SKY_TRANSMITTANCE_LUT_FRAGMENT_HEADER ​

#include <rayrai/shaders/SkyAtmosphereLutShaders.hpp>

cpp
static constexpr const char *SKY_TRANSMITTANCE_LUT_FRAGMENT_HEADER

SKY_TRANSMITTANCE_LUT_FRAGMENT_BODY ​

#include <rayrai/shaders/SkyAtmosphereLutShaders.hpp>

cpp
static constexpr const char *SKY_TRANSMITTANCE_LUT_FRAGMENT_BODY

SKY_MULTISCAT_LUT_FRAGMENT_BODY ​

#include <rayrai/shaders/SkyAtmosphereLutShaders.hpp>

cpp
static constexpr const char *SKY_MULTISCAT_LUT_FRAGMENT_BODY

SKY_AP_VOLUME_LUT_FRAGMENT_BODY ​

#include <rayrai/shaders/SkyAtmosphereLutShaders.hpp>

cpp
static constexpr const char *SKY_AP_VOLUME_LUT_FRAGMENT_BODY

SKY_SKYVIEW_LUT_FRAGMENT_BODY ​

#include <rayrai/shaders/SkyAtmosphereLutShaders.hpp>

cpp
static constexpr const char *SKY_SKYVIEW_LUT_FRAGMENT_BODY

SKYBOX_VERTEX_SHADER ​

#include <rayrai/shaders/SkyboxShader.hpp>

cpp
static constexpr const char *SKYBOX_VERTEX_SHADER

SKYBOX_FRAGMENT_SHADER_HEADER ​

#include <rayrai/shaders/SkyboxShader.hpp>

cpp
static constexpr const char *SKYBOX_FRAGMENT_SHADER_HEADER

SKYBOX_FRAGMENT_SHADER_BODY ​

#include <rayrai/shaders/SkyboxShader.hpp>

cpp
static constexpr const char *SKYBOX_FRAGMENT_SHADER_BODY

SKYBOX_FRAGMENT_SHADER_SOURCE ​

#include <rayrai/shaders/SkyboxShader.hpp>

cpp
const std::string SKYBOX_FRAGMENT_SHADER_SOURCE

SKYBOX_FRAGMENT_SHADER ​

#include <rayrai/shaders/SkyboxShader.hpp>

cpp
const char *SKYBOX_FRAGMENT_SHADER

WEIGHTED_OIT_COMPOSITE_VERTEX_SHADER ​

#include <rayrai/shaders/WeightedOitShader.hpp>

cpp
auto WEIGHTED_OIT_COMPOSITE_VERTEX_SHADER

WEIGHTED_OIT_COMPOSITE_FRAGMENT_SHADER ​

#include <rayrai/shaders/WeightedOitShader.hpp>

cpp
auto WEIGHTED_OIT_COMPOSITE_FRAGMENT_SHADER

RaiSim — physics for robotics and AI.