Rapier C — 3D / f64 0.36.0+c.0
Loading...
Searching...
No Matches
R3ShapeDesc Struct Reference

Non-owning shape description. More...

#include <rapier.h>

Data Fields

uint32_t kind
 Discriminant selecting which description fields are read.
struct R3Vector a
 Half extents, endpoint/vertex, or halfspace normal, selected by kind.
struct R3Vector b
 Second endpoint or triangle vertex, selected by kind.
struct R3Vector c
 Third triangle vertex.
R3Real radius
 Radius for the selected primitive or recipe.
R3Real halfHeight
 Half the height of a cylinder or cone.
R3Real borderRadius
 Rounding radius of a round cylinder or round cone (the round cuboid reads radius instead).
struct R3VectorView vertices
 Borrowed vertex positions.
struct R3TriangleView triangles
 Borrowed triangle topology; count is triangles.
struct R3EdgeView edges
 Borrowed edge topology; count is edges.
uint32_t flags
 TRIMESH_*, POLYLINE_*, or HEIGHTFIELD_* bitmask selected by kind.
struct R3RealView heights
 Borrowed height samples; 3D uses column-major rows * columns samples.
size_t rows
 Number of heightfield rows.
size_t columns
 Number of heightfield columns.
struct R3Vector scale
 Shape scale along each axis.
const R3SharedShape * sharedShape
 Borrowed shared geometry; keep its wrapper alive through build/insert.
struct R3CompoundShapeView children
 Borrowed compound children and their nested geometry views.

Detailed Description

Non-owning shape description.

Only fields selected by kind are read. a = cuboid half extents, capsule/segment endpoint, triangle vertex, or halfspace normal. b/c = remaining endpoints/vertices. radius is also the rounded-cuboid border radius. Mesh views count edges or triangles; heightfields are column-major. Arrays, compound children, and sharedShape remain borrowed until build/insert returns.

Field Documentation

◆ a

struct R3Vector R3ShapeDesc::a

Half extents, endpoint/vertex, or halfspace normal, selected by kind.

◆ b

struct R3Vector R3ShapeDesc::b

Second endpoint or triangle vertex, selected by kind.

◆ borderRadius

R3Real R3ShapeDesc::borderRadius

Rounding radius of a round cylinder or round cone (the round cuboid reads radius instead).

◆ c

struct R3Vector R3ShapeDesc::c

Third triangle vertex.

◆ children

struct R3CompoundShapeView R3ShapeDesc::children

Borrowed compound children and their nested geometry views.

◆ columns

size_t R3ShapeDesc::columns

Number of heightfield columns.

◆ edges

struct R3EdgeView R3ShapeDesc::edges

Borrowed edge topology; count is edges.

◆ flags

uint32_t R3ShapeDesc::flags

TRIMESH_*, POLYLINE_*, or HEIGHTFIELD_* bitmask selected by kind.

◆ halfHeight

R3Real R3ShapeDesc::halfHeight

Half the height of a cylinder or cone.

◆ heights

struct R3RealView R3ShapeDesc::heights

Borrowed height samples; 3D uses column-major rows * columns samples.

◆ kind

uint32_t R3ShapeDesc::kind

Discriminant selecting which description fields are read.

◆ radius

R3Real R3ShapeDesc::radius

Radius for the selected primitive or recipe.

◆ rows

size_t R3ShapeDesc::rows

Number of heightfield rows.

◆ scale

struct R3Vector R3ShapeDesc::scale

Shape scale along each axis.

◆ sharedShape

const R3SharedShape* R3ShapeDesc::sharedShape

Borrowed shared geometry; keep its wrapper alive through build/insert.

◆ triangles

struct R3TriangleView R3ShapeDesc::triangles

Borrowed triangle topology; count is triangles.

◆ vertices

struct R3VectorView R3ShapeDesc::vertices

Borrowed vertex positions.


The documentation for this struct was generated from the following file: