playrho::d2::WorldConf Struct Reference

World configuration data. More...

#include <WorldConf.hpp>

Public Member Functions

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

Public Attributes

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

Related Functions

(Note that these are not member functions.)

PLAYRHO_CONSTEXPR WorldConf GetDefaultWorldConf () noexcept
 

Detailed Description

World configuration data.

Examples
World.cpp.

Definition at line 34 of file WorldConf.hpp.

Member Function Documentation

◆ UseMinVertexRadius()

PLAYRHO_CONSTEXPR WorldConf & playrho::d2::WorldConf::UseMinVertexRadius ( Positive< Length value)
inlinenoexcept

Uses the given min vertex radius value.

Examples
World.cpp.

Definition at line 68 of file WorldConf.hpp.

◆ UseMaxVertexRadius()

PLAYRHO_CONSTEXPR WorldConf & playrho::d2::WorldConf::UseMaxVertexRadius ( Positive< Length value)
inlinenoexcept

Uses the given max vertex radius value.

Examples
World.cpp.

Definition at line 74 of file WorldConf.hpp.

◆ UseInitialTreeSize()

PLAYRHO_CONSTEXPR WorldConf & playrho::d2::WorldConf::UseInitialTreeSize ( ContactCounter  value)
inlinenoexcept

Uses the given value as the initial dynamic tree size.

Definition at line 80 of file WorldConf.hpp.

Friends And Related Function Documentation

◆ GetDefaultWorldConf()

PLAYRHO_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"

Definition at line 92 of file WorldConf.hpp.

Member Data Documentation

◆ 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.

Definition at line 55 of file WorldConf.hpp.

◆ 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.

Definition at line 62 of file WorldConf.hpp.

◆ initialTreeSize

ContactCounter playrho::d2::WorldConf::initialTreeSize = 4096

Initial tree size.

Definition at line 65 of file WorldConf.hpp.


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