libsf3
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions
sf3_physics_model.h File Reference
#include "sf3_core.h"
Include dependency graph for sf3_physics_model.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sf3_shape_ellipsoid
 
struct  sf3_shape_box
 A box shape described by the half-widths along the principal axes. More...
 
struct  sf3_shape_cylinder
 A cylindrical shape described by two radii and a half-height. More...
 
struct  sf3_shape_pill
 A pill-box shape described by two radii and a half-height. More...
 
struct  sf3_shape_mesh
 A convex hull described by its edge vertices. More...
 
struct  sf3_physics_shape
 
struct  sf3_physics_model
 

Macros

#define SF3_FORMAT_ID_PHYSICS_MODEL   0x06
 The format_id for a physics model file.
 

Enumerations

enum  sf3_physics_shape_type {
  SF3_PHYSICS_SHAPE_ELLIPSOID = 0x01 , SF3_PHYSICS_SHAPE_BOX = 0x02 , SF3_PHYSICS_SHAPE_CYLINDER = 0x03 , SF3_PHYSICS_SHAPE_PILL = 0x04 ,
  SF3_PHYSICS_SHAPE_MESH = 0x05
}
 The shape types that can be stored in a physics model. More...
 

Functions

SF3_INLINE const struct sf3_physics_shapesf3_physics_model_next_shape (const struct sf3_physics_shape *shape)
 
SF3_EXPORT const char * sf3_physics_shape_type (enum sf3_physics_shape_type type)
 Return a human-readable string description of the shape type.
 
SF3_EXPORT size_t sf3_physics_model_size (const struct sf3_physics_model *physics_model)
 Computes the size of the physics model file in bytes.
 

Macro Definition Documentation

◆ SF3_FORMAT_ID_PHYSICS_MODEL

#define SF3_FORMAT_ID_PHYSICS_MODEL   0x06

The format_id for a physics model file.

Definition at line 6 of file sf3_physics_model.h.

Enumeration Type Documentation

◆ sf3_physics_shape_type

The shape types that can be stored in a physics model.

Enumerator
SF3_PHYSICS_SHAPE_ELLIPSOID 

The shape is an sf3_shape_ellipsoid.

SF3_PHYSICS_SHAPE_BOX 

The shape is an sf3_shape_box.

SF3_PHYSICS_SHAPE_CYLINDER 

The shape is an sf3_shape_cylinder.

SF3_PHYSICS_SHAPE_PILL 

The shape is an sf3_shape_pill.

SF3_PHYSICS_SHAPE_MESH 

The shape is an sf3_shape_mesh.

Definition at line 9 of file sf3_physics_model.h.

Function Documentation

◆ sf3_physics_model_next_shape()

SF3_INLINE const struct sf3_physics_shape * sf3_physics_model_next_shape ( const struct sf3_physics_shape shape)

Access the next shape after this one. Note that this function does not perform any bounds checking whatsoever. It is up to you to ensure you do not call this with the last shape of a physics model.

Definition at line 117 of file sf3_physics_model.h.

◆ sf3_physics_model_size()

SF3_EXPORT size_t sf3_physics_model_size ( const struct sf3_physics_model physics_model)

Computes the size of the physics model file in bytes.

Definition at line 149 of file sf3_physics_model.h.

◆ sf3_physics_shape_type()

Return a human-readable string description of the shape type.

Definition at line 137 of file sf3_physics_model.h.