| Name | Required | Type | Description | Public |
| acceleration | yes | double | acceleration of this GameObject, in m / sē | yes |
| deceleration | no | double | breaking acceleration of this GameObject, in m / sē | yes |
| maxSpeed | yes | double | maximum speed this GameObject can reach, in m / s | yes |
| resistanceCoefficient | no | double | resistance coefficient, default: 0.6 | yes |
| windage | no | double | windage of this GameObject, default: 0.8 mē | yes |
| handling | no | int | handling for reaching maximum speed, keep maximum speed or stop acceleration to roll out, default: 0 (= KeepSpeed) | yes |
|
| | VelocityComponent (const int64_t id, const attributeMap ¶ms) |
| |
| | ~VelocityComponent () |
| |
| attributeMap | synchronize () const override |
| | synchronizes the Components state More...
|
| |
| std::string | getTemplateName () const override |
| | returns the name this template was registered with More...
|
| |
| std::vector< componentOptions > | getComponentOptions () override |
| | returns a vector containing all options of the Component being readable and writeable in the editor More...
|
| |
| void | accelerate (const Vec3 &acceleration, MaxSpeedHandling handling, const std::function< void(void)> &callback) |
| | accelerates the GameObject using acceleration reaching maxSpeed, it will perform as defined in handling parameter and callback will be called More...
|
| |
| void | accelerate (const std::function< void(void)> &callback) |
| |
| void | decelerate (const Vec3 &deceleration, DecelerationHandling handling, const std::function< void(void)> &callback) |
| | decelerates the GameObject using deceleration reaching 0 speed, it will perform as defined in handling parameter and callback will be called More...
|
| |
| void | decelerate (const std::function< void(void)> &callback) |
| |
| void | stopAcceleration () const |
| | stops current acceleration More...
|
| |
| void | setMaxSpeed (double maxSpeed) |
| | sets new maximum speed More...
|
| |
| void | setResistanceCoefficient (double coeff) |
| | sets new resistance coefficient More...
|
| |
| void | setWindage (double windage) |
| | sets new windage More...
|
| |
| void | setDecelerationHandling (DecelerationHandling handling) |
| | sets the deceleration handling More...
|
| |
| | 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...
|
| |
| virtual void | Tick () |
| | 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...
|
| |
| void | setDie () const |
| | component will be deleted soon More...
|
| |
| int64_t | getID () const |
| | returns the id of the component More...
|
| |
| virtual void | News (const GameMessage::Ptr &msg) |
| | Receives messages for this component override this function, if you expect messages. 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...
|
| |
| virtual std::pair< AddStrategy, int64_t > | howToAdd (const ComPtr &comp) const |
| | asks, how to handle a new component with the same type 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...
|
| |
Component for objects with more complex velocity handling than just setting an impulse, e.g. a car For creating a VelocityComponent, these keys are possible:
| Name | Required | Type | Description | Public |
| acceleration | yes | double | acceleration of this GameObject, in m / sē | yes |
| deceleration | no | double | breaking acceleration of this GameObject, in m / sē | yes |
| maxSpeed | yes | double | maximum speed this GameObject can reach, in m / s | yes |
| resistanceCoefficient | no | double | resistance coefficient, default: 0.6 | yes |
| windage | no | double | windage of this GameObject, default: 0.8 mē | yes |
| handling | no | int | handling for reaching maximum speed, keep maximum speed or stop acceleration to roll out, default: 0 (= KeepSpeed) | yes |
Definition at line 45 of file VelocityComponent.h.