Lightweight 2D rigid-body physics engine
Nova Physics is back with a massive optimization update!
nvStruct
and nvEnum
namings for every struct and enum.constants.h
(and few new constants).nvBody_reset_velocities
method for clearing body's velocities.nvArray_clear
method.--enable-tracy
argument to start profiling with Tracy.nvBroadPhaseAlg_...
enum for readability.--target=...
argument for targeting a specific compiler.--no-profiler
argument for disabling built-in profiler.--no-simd
argument for disabling usage of SIMD intrinsics.Full changelog: https://github.com/kadir014/nova-physics/compare/0.6.0...0.7.0
example_base.h
.cloth.c
and hull.c
nv_Contant
struct is now used to store contact point information.gravity_scale
attribute that indicates how are they affected by gravity.nv_ShapeFactory_Rect
& Box
to create rectangle shapes.nv_ShapeFactory_NGon
to create regular n-gon shapes.nv_ShapeFactory_ConvexHull
to create a convex hull from an array of points.nv_Space_set_broadphase
method to change the current broadphase algorithm.nv_Body.collision_group
, nv_Body.collision_category
and nv_Body.collision_mask
are 32-bit unsigned integers, last two are used as bitmasks.-j<n>
option to set the number of processed fired to n
-x
option to target MSVC.NULL
to body parameter. The anchor point should be changed to world-space.nv_Profiler
structs hold information about simulation's various profiling data.nv_Space.collision_persistance
attribute defines the number of frames a collision resolution stays alive for.nv_Space_remove
& nv_Space_kill
nv_Space.kill_bounds
& nv_Space.use_kill_bounds
).varying_friction.c
and domino.c
nova_builder.py
build script.nv_BroadPhase_SPATIAL_HASH_GRID
& nv_BroadPhase_BRUTE_FORCE
.nv_Shape
& nv_ShapeType
.nv_presolve_...
fountain.c
.
NV_VEC2()
, NV_VEC2_NEW
, NV_TO_VEC2
, NV_TO_VEC2P
nv_float
which can be configured while building by the developer.nv_Body_apply_impulse
(and nv_Body_apply_pseudo_impulse
) methods are used in the solver.nv_Space_clear
method to clear all the Space content.nv_Space -> warmstarting
field to toggle warm-starting accumulated impulses.nv_Space -> sleep_energy_threshold
field to determine sleeping energy thresholdnv_Space -> sleep_timer_threshold
field to determine sleeping time thresholdnv_Space -> wake_energy_threshold
field to determine waking energy thresholdnv_Material
struct and presets like nv_Material_STEEL
, nv_Material_WOOD
, etc..