|
sKit
0.0.9
|
The base class of BRect implemented as CRTP. Do not use directly. More...
#include <BRectBase.hpp>
Public Types | |
| enum | Orientation { Orientation::VERTICAL, Orientation::HORIZONTAL } |
Public Member Functions | |
| BRectBase ()=default | |
| auto | subdivide (unsigned int numLevels, glm::vec2 _id={0, 0}, SplitFn splitfn=BRectBase< Derived >::splitfn) -> void |
| auto | getLeaves () -> std::vector< std::shared_ptr< Derived >> |
| auto | getLeafAt (int x, int y) -> std::optional< std::shared_ptr< Derived >> |
Public Attributes | |
| std::shared_ptr< Derived > | left |
| std::shared_ptr< Derived > | right |
Static Protected Member Functions | |
| const static float | splitfn (unsigned int _level, glm::vec2 _id) |
Protected Attributes | |
| Orientation | orientation_ = Orientation::VERTICAL |
| float | x_ |
| float | y_ |
| float | width_ |
| float | height_ |
| glm::vec2 | id |
| int | levels |
| bool | vertical |
The base class of BRect implemented as CRTP. Do not use directly.
Definition at line 13 of file BRectBase.hpp.
|
strong |
| Enumerator | |
|---|---|
| VERTICAL | |
| HORIZONTAL | |
Definition at line 33 of file BRectBase.hpp.
|
default |
| auto sKit::structure::BRectBase< Derived >::getLeafAt | ( | int | x, |
| int | y | ||
| ) | -> std::optional<std::shared_ptr<Derived>> |
Definition at line 90 of file BRectBase.hpp.
| auto sKit::structure::BRectBase< Derived >::getLeaves |
BRect, i.e. nodes without left and without right children. Definition at line 101 of file BRectBase.hpp.
|
inlinestaticprotected |
The default function for generating the split value for subdividing rects.
Definition at line 38 of file BRectBase.hpp.
| auto sKit::structure::BRectBase< Derived >::subdivide | ( | unsigned int | numLevels, |
| glm::vec2 | _id = {0, 0}, |
||
| SplitFn | splitfn = BRectBase<Derived>::splitfn |
||
| ) | -> void |
Definition at line 51 of file BRectBase.hpp.
|
protected |
Definition at line 43 of file BRectBase.hpp.
|
protected |
Definition at line 45 of file BRectBase.hpp.
| std::shared_ptr<Derived> sKit::structure::BRectBase< Derived >::left |
Definition at line 31 of file BRectBase.hpp.
|
protected |
Definition at line 46 of file BRectBase.hpp.
|
protected |
Definition at line 42 of file BRectBase.hpp.
| std::shared_ptr<Derived> sKit::structure::BRectBase< Derived >::right |
Definition at line 31 of file BRectBase.hpp.
|
protected |
Definition at line 47 of file BRectBase.hpp.
|
protected |
Definition at line 43 of file BRectBase.hpp.
|
protected |
Definition at line 43 of file BRectBase.hpp.
|
protected |
Definition at line 43 of file BRectBase.hpp.