RTCFormat(3)

πŸ“¦ version 3.13.5, in epel 9, fedora 43, fedora 44

πŸ’– RTCFormat(3) β€” bestie's guide to buffer formats πŸ’–

okay so this is the RTCFormat page from the Embree Ray Tracing Kernels 3 manual, and honestly? it's the little enum that decides what shape your data is. slay. let's get into it πŸ¦‹


✨ NAME ✨

RTCFormat β€” specifies format of data in buffers

like, it literally just tells Embree "hey girl, this chunk of memory is uint3s, not float3s" and Embree is like "say less" πŸ’…


🌸 SYNOPSIS 🌸

#include <embree3/rtcore_ray.h>

enum RTCFormat
{
  RTC_FORMAT_UINT,
  RTC_FORMAT_UINT2,
  RTC_FORMAT_UINT3,
  RTC_FORMAT_UINT4,

  RTC_FORMAT_FLOAT,
  RTC_FORMAT_FLOAT2,
  RTC_FORMAT_FLOAT3,
  RTC_FORMAT_FLOAT4,
  RTC_FORMAT_FLOAT5,
  RTC_FORMAT_FLOAT6,
  RTC_FORMAT_FLOAT7,
  RTC_FORMAT_FLOAT8,
  RTC_FORMAT_FLOAT9,
  RTC_FORMAT_FLOAT10,
  RTC_FORMAT_FLOAT11,
  RTC_FORMAT_FLOAT12,
  RTC_FORMAT_FLOAT13,
  RTC_FORMAT_FLOAT14,
  RTC_FORMAT_FLOAT15,
  RTC_FORMAT_FLOAT16,

  RTC_FORMAT_FLOAT3X4_ROW_MAJOR,
  RTC_FORMAT_FLOAT4X4_ROW_MAJOR,

  RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR,
  RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR,

  RTC_FORMAT_GRID,

};

yes bestie that IS a lot of floats. they really said "how many floats do you want" and answered their own question twenty times 😭


πŸ‘‘ DESCRIPTION πŸ‘‘

The RTFormat structure defines the data format stored in data buffers that you hand over to Embree using the rtcSetGeometryBuffer, rtcSetSharedGeometryBuffer, and rtcSetNewGeometryBuffer API calls. that's the whole job. she's an enum and she's thriving 🌈


πŸ”’ the UINT girlies

The RTC_FORMAT_UINT/2/3/4 formats are used to specify that data buffers store unsigned integers, or unsigned integer vectors of size 2, 3 or 4.

This format has typically to get used when specifying index buffers β€” e.g. RTC_FORMAT_UINT3 for triangle meshes. three indices per triangle, one for each corner, no notes πŸ’…


🌊 the FLOAT girlies

The RTC_FORMAT_FLOAT/2/3/4... formats are used to specify that data buffers store single precision floating point values, or vectors thereof (size 2, 3, 4, etc.).

This format is typcally used to specify to format of vertex buffers β€” e.g. the RTC_FORMAT_FLOAT3 type for vertex buffers of triangle meshes. x, y, z. that's the vibe. ⭐


πŸŽ€ the matrix girlies

The RTC_FORMAT_FLOAT3X4_ROW_MAJOR and RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR formats specify a 3x4 floating point matrix layed out either row major or column major.

The RTC_FORMAT_FLOAT4X4_ROW_MAJOR and RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR formats specify a 4x4 floating point matrix layed out either row major or column major.

These matrix formats are used in the rtcSetGeometryTransform function in order to set a transformation matrix for geometries. yes, row major vs column major MATTERS, this is not a drill, pick the right one or your geometry is gonna be doing interpretive dance πŸ’€


🧚 the grid girlie (special guest)

The RTC_FORMAT_GRID is a special data format used to specify grid primitives of layout RTCGrid when creating grid geometries (see RTC_GEOMETRY_TYPE_GRID).

she's special. she's built different. main character energy fr fr πŸ”₯


🫢 EXIT STATUS 🫢

bestie... there is literally nothing here. the section exists and it is empty. iconic of her honestly πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

  • rtcSetGeometryBuffer
  • rtcSetSharedGeometryBuffer
  • rtcSetNewGeometryBuffer
  • rtcSetGeometryTransform

ngl if you're passing a buffer to Embree without a format, you're giving it a mystery box and it will NOT be grateful 🎁

okay that's the whole page bestie, we ate and left no crumbs πŸ“ this was RTCFormat(3) out of the Embree Ray Tracing Kernels 3 manual β€” that's the version, that's the source, and she's out here living her best life with no date stamp on her footer. go format some buffers, you've got this πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from