PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::d2::WorldConf Struct Reference

World configuration data. More...

#include <WorldConf.hpp>

Collaboration diagram for playrho::d2::WorldConf:
[legend]

Public Member Functions

constexpr WorldConfUseMinVertexRadius (Positive< Length > value) noexcept
 Uses the given min vertex radius value.
 
constexpr WorldConfUseMaxVertexRadius (Positive< Length > value) noexcept
 Uses the given max vertex radius value.
 
constexpr WorldConfUseInitialTreeSize (ContactCounter value) noexcept
 Uses the given value as the initial dynamic tree size.
 

Public Attributes

Positive< LengthminVertexRadius = DefaultMinVertexRadius
 Minimum vertex radius. More...
 
Positive< LengthmaxVertexRadius = DefaultMaxVertexRadius
 Maximum vertex radius. More...
 
ContactCounter initialTreeSize = 4096
 Initial tree size.
 

Related Functions

(Note that these are not member functions.)

constexpr WorldConf GetDefaultWorldConf () noexcept
 Gets the default definitions value. More...
 

Detailed Description

World configuration data.

Examples
World.cpp.

Friends And Related Function Documentation

◆ GetDefaultWorldConf()

constexpr WorldConf GetDefaultWorldConf ( )
related

Gets the default definitions value.

Note
This method exists as a work-around for providing the World constructor a default value without otherwise getting a compiler error such as: "cannot use defaulted constructor of '<code>Conf</code>' within '<code>World</code>' outside of member functions because 'gravity' has an initializer"

Member Data Documentation

◆ maxVertexRadius

Positive<Length> playrho::d2::WorldConf::maxVertexRadius = DefaultMaxVertexRadius

Maximum vertex radius.

This is the maximum vertex radius that this world establishes which bodies shall allow fixtures to be created with. Trying to create a fixture with a shape having a larger vertex radius shall be rejected with a nullptr returned value.

◆ minVertexRadius

Positive<Length> playrho::d2::WorldConf::minVertexRadius = DefaultMinVertexRadius

Minimum vertex radius.

This is the minimum vertex radius that this world establishes which bodies shall allow fixtures to be created with. Trying to create a fixture with a shape having a smaller vertex radius shall be rejected with a nullptr returned value.

Note
This value probably should not be changed except to experiment with what can happen.
Making it smaller means some shapes could have insufficient buffer for continuous collision.
Making it larger may create artifacts for vertex collision.

Referenced by playrho::d2::WorldImpl::WorldImpl().


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