Changeset 339 in flair-src for trunk/lib/FlairSimulator/src/Blade.cpp


Ignore:
Timestamp:
Nov 28, 2019, 8:59:49 AM (2 years ago)
Author:
Sanahuja Guillaume
Message:

allow all blade rotations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/Blade.cpp

    r286 r339  
    3636namespace simulator {
    3737
    38 Blade::Blade(Model *parent, const vector3df &position, bool inverted, s32 id)
     38Blade::Blade(Model *parent, const vector3df &position,const vector3df &rotation, bool inverted, s32 id)
    3939    : ISceneNode(parent->getSceneNode(), getGui()->getSceneManager(), id,
    40                  position) {
     40                 position,rotation) {
    4141  ISceneManager *mgr = getGui()->getSceneManager();
    4242
     
    6464}
    6565
    66 Blade::Blade(ISceneNode *parent, const vector3df &position, bool inverted, s32 id)
     66Blade::Blade(ISceneNode *parent, const vector3df &position,const vector3df &rotation, bool inverted, s32 id)
    6767    : ISceneNode(parent, getGui()->getSceneManager(), id,
    68                  position) {
     68                 position,rotation) {
    6969  ISceneManager *mgr = getGui()->getSceneManager();
    7070
     
    9999}
    100100
    101 void Blade::SetRotationSpeed(float value) {
     101void Blade::SetRotationSpeed(const vector3df &value) {
    102102  IAttributes *attribs =
    103103      getSceneManager()->getFileSystem()->createEmptyAttributes();
    104104
    105105  attribs->setAttribute("Type", "rotation");
    106   attribs->setAttribute("Rotation", vector3df(0.f, 0.f, value));
     106  attribs->setAttribute("Rotation", value);
    107107  anim->deserializeAttributes(attribs);
    108108
Note: See TracChangeset for help on using the changeset viewer.