i6engine
1.0
|
moves an object around a point in a circular way For creating a MoverCircleComponent, these keys are possible:
Name | Required | Type | Description | Public |
---|---|---|---|---|
pos | yes | Vec3 | center of the circle | yes |
axis | yes | Vec3 | axis around which the mover should circle | yes |
radius | yes | double | radius of the circle | yes |
realCenterPos | no | Vec3 | the real start pos of the circle | no |
#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/api/components/MoverCircleComponent.h>
Public Member Functions | |
MoverCircleComponent (const int64_t id, const attributeMap ¶ms) | |
~MoverCircleComponent () | |
void | setPositioning (const Positioning posing) |
void | setCircleParameters (const Vec3 &cC, const Vec3 &cA, const double &cR) |
void | start (Vec3 &startPos) override |
starts the moving the startPos position should be the starting position of the movement the object will be moved to this position, or in case of a circle automatically in the circle path More... | |
Vec3 | getCircleAxis () const |
double | getCircleRadius () const |
attributeMap | synchronize () const override |
synchronizes the Components state More... | |
std::string | getTemplateName () const override |
returns the name this template was registered with More... | |
void | reset () override |
resets progress to initial status More... | |
std::vector< componentOptions > | getComponentOptions () override |
returns a vector containing all options of the Component being readable and writeable in the editor More... | |
Public Member Functions inherited from i6e::api::MoverComponent | |
MoverComponent (const int64_t id, const attributeMap ¶ms) | |
virtual | ~MoverComponent () |
virtual void | Tick () override |
Components can have Tick method like normal Subsystems this method is called by the ObjectController during every Tick if the component registered itself at the ObjectFacade. More... | |
virtual void | Init () override |
Initializes the Component. More... | |
virtual void | Finalize () override |
finalizes the component More... | |
void | setDuration (const uint64_t duration) |
void | setPositioning (const Positioning posing) |
void | stop () |
stops movement More... | |
std::pair< AddStrategy, int64_t > | howToAdd (const ComPtr &comp) const override |
asks, how to handle a new component with the same type More... | |
void | shatter (const GOPtr &go) override |
Is called after a collision is detected. More... | |
std::vector< componentOptions > | getComponentOptions () override |
returns a vector containing all options of the Component being readable and writeable in the editor More... | |
Public Member Functions inherited from i6e::api::ShatterComponent | |
ShatterComponent (int64_t id, const attributeMap ¶ms) | |
Constructor of the component with a given id. More... | |
virtual | ~ShatterComponent () |
Destructor of the component. More... | |
void | resetRespawn () |
Public Member Functions inherited from i6e::api::Component | |
Component () | |
Constructor for Component. More... | |
Component (const int64_t id, const attributeMap ¶ms) | |
Constructor for Component. More... | |
virtual | ~Component () |
Destructor of Component. Must be implemented in derived class. More... | |
void | setOwnerGO (const WeakGOPtr &objGo) |
Sets the GameObject that owns this Component. More... | |
GOPtr | getOwnerGO () |
Get the GameObject that owns this Component. More... | |
uint32_t | getComponentID () const |
Returns the component identification string. More... | |
uint32_t | getFamilyID () const |
Returns the family identification string. More... | |
std::string | getIdentifier () const |
Returns the family identification string. More... | |
void | setDie () const |
component will be deleted soon More... | |
int64_t | getID () const |
returns the id of the component More... | |
void | setSync (bool b) |
sets whether this object has to be synchronized or not More... | |
bool | getSync () const |
void | enableTicking (bool allowTicking) const |
triggers doEnableTicking threadsafe More... | |
void | setSelf (const WeakComPtr &self) |
sets weak_ptr on self for registration of ticker More... | |
std::vector< ComPtr > | getSubComponents () const |
returns all SubComponents attached to this Component More... | |
Additional Inherited Members | |
Public Types inherited from i6e::api::MoverComponent | |
enum | Positioning : uint16_t { Positioning::POSITIONING_ABSOLUTE, Positioning::POSITIONING_RELATIVE } |
Static Public Member Functions inherited from i6e::api::Component | |
template<typename T > | |
static ComPtr | createC (const int64_t id, const attributeMap ¶ms) |
Protected Member Functions inherited from i6e::api::MoverComponent | |
MoverComponent (const MoverComponent &)=delete | |
const MoverComponent & | operator= (const MoverComponent &)=delete |
Protected Member Functions inherited from i6e::api::Component | |
void | addTicker () |
adds this component to ticklist More... | |
void | removeTicker () |
removes this component from ticklist More... | |
void | doEnableTicking (bool allowTicking) |
sets ticking status for this Component per default all Components are allowed to tick and calling addTicker will start ticking, but in some cases, e.g. for level editor, ticking has to be disabled and just a few components are allowed to tick More... | |
Protected Attributes inherited from i6e::api::MoverComponent | |
uint64_t | _duration |
duration for one path More... | |
Positioning | _positioning |
type of positioning More... | |
utils::weakPtr< PhysicalStateComponent, Component > | _psc |
PSC of the GameObject. More... | |
uint64_t | _startTime |
time the moving started More... | |
Vec3 | _lastPos |
last position value calculated in imaginary path used for RELATIVE positioning More... | |
Vec3 | _realStartPos |
real starting position needed for synchronizing More... | |
Quaternion | _lastRot |
last rotation value calculated in imaginary path used for RELATIVE positioning More... | |
bool | _moving |
current status More... | |
bool | _initial |
whether the call to start() will start or continue the movement More... | |
bool | _started |
whether the Mover should be started on creation or not More... | |
bool | _linkable |
whether the object on the Mover should be linked and moved with the Mover More... | |
std::vector< int64_t > | _linked |
vector of all linked GameObject IDs More... | |
Protected Attributes inherited from i6e::api::Component | |
int64_t | _objOwnerID |
ID of the GameObject that owns this Component. More... | |
WeakGOPtr | _objOwnerGO |
Owning GameObject. More... | |
uint32_t | _objComponentID |
Component ID of the Component. More... | |
uint32_t | _objFamilyID |
Family ID of the Component. More... | |
std::vector< ComPtr > | _subComps |
vector containing the other componetns of the same type if this is the dispatcher component More... | |
std::string | _identifier |
identifies the subcomponent More... | |
int64_t | _id |
id of this component More... | |
bool | _sync |
WeakComPtr | _self |
a weak_ptr on the own shared_ptr More... | |
bool | _tickingAllowed |
status if this object is allowed to tick or not More... | |
bool | _wantsToTick |
stores if a Component which isn't allowed to tick want to tick, so it can start ticking when ticking will be allowed More... | |
bool | _isTicking |
stores whether this Component is actually ticking More... | |
moves an object around a point in a circular way For creating a MoverCircleComponent, these keys are possible:
Name | Required | Type | Description | Public |
---|---|---|---|---|
pos | yes | Vec3 | center of the circle | yes |
axis | yes | Vec3 | axis around which the mover should circle | yes |
radius | yes | double | radius of the circle | yes |
realCenterPos | no | Vec3 | the real start pos of the circle | no |
Definition at line 49 of file MoverCircleComponent.h.
i6e::api::MoverCircleComponent::MoverCircleComponent | ( | const int64_t | id, |
const attributeMap & | params | ||
) |
i6e::api::MoverCircleComponent::~MoverCircleComponent | ( | ) |
|
inline |
Definition at line 69 of file MoverCircleComponent.h.
|
inline |
Definition at line 70 of file MoverCircleComponent.h.
|
overridevirtual |
returns a vector containing all options of the Component being readable and writeable in the editor
Implements i6e::api::Component.
|
inlineoverridevirtual |
returns the name this template was registered with
Implements i6e::api::Component.
Definition at line 77 of file MoverCircleComponent.h.
|
overridevirtual |
resets progress to initial status
Implements i6e::api::MoverComponent.
|
inline |
Definition at line 56 of file MoverCircleComponent.h.
|
inline |
Definition at line 54 of file MoverCircleComponent.h.
|
overridevirtual |
starts the moving the startPos position should be the starting position of the movement the object will be moved to this position, or in case of a circle automatically in the circle path
Implements i6e::api::MoverComponent.
|
overridevirtual |
synchronizes the Components state
Reimplemented from i6e::api::MoverComponent.