#include "ObjectPosSelector.h"
|
| ObjectPosSelector (float x, float y, float size, float dist) |
|
void | AddUsedPos (float size, float angle, float dist) |
|
void | InitializeAngle () |
|
bool | FirstAngle (float &angle) |
|
bool | NextAngle (float &angle) |
|
bool | NextUsedAngle (float &angle) |
|
bool | NextPosibleAngle (float &angle) |
|
bool | CheckAngle (UsedPosList::value_type const &nextUsedPos, float sign, float angle) const |
|
bool | CheckOriginal () const |
|
bool | IsNonBalanced () const |
|
bool | NextAngleFor (UsedPosList::value_type const &usedPos, float sign, UsedPosType uptype, float &angle) |
|
bool | NextSmallStepAngle (float sign, UsedPosType uptype, float &angle) |
|
UsedPosList::value_type const * | nextUsedPos (UsedPosType uptype) |
|
float | GetAngle (UsedPos const &usedPos) const |
|
◆ UsedPosList
◆ ObjectPosSelector()
ObjectPosSelector::ObjectPosSelector |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
size, |
|
|
float |
dist |
|
) |
| |
22{
24
27
30
33
36}
@ USED_POS_PLUS
Definition: ObjectPosSelector.h:25
@ USED_POS_MINUS
Definition: ObjectPosSelector.h:25
float m_center_x
Definition: ObjectPosSelector.h:140
float m_smallStepAngle[2]
Definition: ObjectPosSelector.h:150
float m_size
Definition: ObjectPosSelector.h:142
UsedPosList::const_iterator m_nextUsedPos[2]
Definition: ObjectPosSelector.h:147
float m_dist
Definition: ObjectPosSelector.h:143
bool m_smallStepOk[2]
Definition: ObjectPosSelector.h:151
float m_center_y
Definition: ObjectPosSelector.h:141
UsedPosList::value_type const * m_smallStepNextUsedPos[2]
Definition: ObjectPosSelector.h:152
float m_anglestep
Definition: ObjectPosSelector.h:144
UsedPosList m_UsedPosLists[2]
Definition: ObjectPosSelector.h:146
References m_anglestep, m_dist, m_nextUsedPos, m_size, m_smallStepAngle, m_smallStepNextUsedPos, m_smallStepOk, m_UsedPosLists, USED_POS_MINUS, and USED_POS_PLUS.
◆ AddUsedPos()
void ObjectPosSelector::AddUsedPos |
( |
float |
size, |
|
|
float |
angle, |
|
|
float |
dist |
|
) |
| |
◆ CheckAngle()
bool ObjectPosSelector::CheckAngle |
( |
UsedPosList::value_type const & |
nextUsedPos, |
|
|
float |
sign, |
|
|
float |
angle |
|
) |
| const |
|
inline |
58 {
60
63 next_angle = 2 * M_PI - next_angle;
64
65 return std::fabs(angle) + angle_step2 <= next_angle;
66 }
UsedPosList::value_type const * nextUsedPos(UsedPosType uptype)
Definition: ObjectPosSelector.cpp:38
float GetAngle(UsedPos const &usedPos) const
Definition: ObjectPosSelector.h:138
References GetAngle(), and nextUsedPos().
Referenced by CheckOriginal(), NextAngleFor(), and NextSmallStepAngle().
◆ CheckOriginal()
bool ObjectPosSelector::CheckOriginal |
( |
| ) |
const |
|
inline |
◆ FirstAngle()
bool ObjectPosSelector::FirstAngle |
( |
float & |
angle | ) |
|
◆ GetAngle()
float ObjectPosSelector::GetAngle |
( |
UsedPos const & |
usedPos | ) |
const |
|
inline |
◆ InitializeAngle()
void ObjectPosSelector::InitializeAngle |
( |
| ) |
|
◆ IsNonBalanced()
bool ObjectPosSelector::IsNonBalanced |
( |
| ) |
const |
|
inline |
◆ NextAngle()
bool ObjectPosSelector::NextAngle |
( |
float & |
angle | ) |
|
◆ NextAngleFor()
bool ObjectPosSelector::NextAngleFor |
( |
UsedPosList::value_type const & |
usedPos, |
|
|
float |
sign, |
|
|
UsedPosType |
uptype, |
|
|
float & |
angle |
|
) |
| |
|
inline |
◆ NextPosibleAngle()
bool ObjectPosSelector::NextPosibleAngle |
( |
float & |
angle | ) |
|
113{
114
117 {
118 bool ok;
121 else
123
124 if (!ok)
126 return ok;
127 }
128
130 {
131 bool ok;
134 else
136
137 if (!ok)
139 return ok;
140 }
141 else
142 {
145
148 }
149
150
151 return false;
152}
bool NextSmallStepAngle(float sign, UsedPosType uptype, float &angle)
Definition: ObjectPosSelector.h:102
References m_nextUsedPos, m_smallStepAngle, m_smallStepOk, m_UsedPosLists, NextAngleFor(), NextSmallStepAngle(), USED_POS_MINUS, and USED_POS_PLUS.
Referenced by NextAngle(), and NextUsedAngle().
◆ NextSmallStepAngle()
bool ObjectPosSelector::NextSmallStepAngle |
( |
float |
sign, |
|
|
UsedPosType |
uptype, |
|
|
float & |
angle |
|
) |
| |
|
inline |
◆ NextUsedAngle()
bool ObjectPosSelector::NextUsedAngle |
( |
float & |
angle | ) |
|
◆ nextUsedPos()
ObjectPosSelector::UsedPosList::value_type const * ObjectPosSelector::nextUsedPos |
( |
UsedPosType |
uptype | ) |
|
◆ m_anglestep
float ObjectPosSelector::m_anglestep |
◆ m_center_x
float ObjectPosSelector::m_center_x |
◆ m_center_y
float ObjectPosSelector::m_center_y |
◆ m_dist
float ObjectPosSelector::m_dist |
◆ m_nextUsedPos
UsedPosList::const_iterator ObjectPosSelector::m_nextUsedPos[2] |
◆ m_size
float ObjectPosSelector::m_size |
◆ m_smallStepAngle
float ObjectPosSelector::m_smallStepAngle[2] |
◆ m_smallStepNextUsedPos
UsedPosList::value_type const* ObjectPosSelector::m_smallStepNextUsedPos[2] |
◆ m_smallStepOk
bool ObjectPosSelector::m_smallStepOk[2] |
◆ m_UsedPosLists