mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 17:35:45 +02:00
beginnings of ObjectAction class
This commit is contained in:
parent
a6fac2e780
commit
b24cd82b80
2 changed files with 58 additions and 0 deletions
21
libraries/physics/src/ObjectAction.cpp
Normal file
21
libraries/physics/src/ObjectAction.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
//
|
||||
// ObjectAction.cpp
|
||||
// libraries/physcis/src
|
||||
//
|
||||
// Created by Seth Alves 2015.6.2
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include "ObjectAction.h"
|
||||
|
||||
ObjectAction::ObjectAction(EntityItemPointer ownerEntity) :
|
||||
btActionInterface(),
|
||||
_id(QUuid::createUuid()),
|
||||
_ownerEntity(ownerEntity) {
|
||||
}
|
||||
|
||||
ObjectAction::~ObjectAction() {
|
||||
}
|
37
libraries/physics/src/ObjectAction.h
Normal file
37
libraries/physics/src/ObjectAction.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
//
|
||||
// ObjectAction.h
|
||||
// libraries/physcis/src
|
||||
//
|
||||
// Created by Seth Alves 2015.6.2
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#ifndef hifi_ObjectAction_h
|
||||
#define hifi_ObjectAction_h
|
||||
|
||||
#include <btBulletDynamicsCommon.h>
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
#include <EntityItem.h>
|
||||
|
||||
// http://bulletphysics.org/Bullet/BulletFull/classbtActionInterface.html
|
||||
|
||||
class ObjectAction : public btActionInterface {
|
||||
public:
|
||||
ObjectAction(EntityItemPointer ownerEntity);
|
||||
virtual ~ObjectAction();
|
||||
|
||||
const QUuid& getID() const { return _id; }
|
||||
|
||||
// virtual void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep) = 0
|
||||
|
||||
private:
|
||||
QUuid _id;
|
||||
EntityItemPointer _ownerEntity;
|
||||
};
|
||||
|
||||
#endif // hifi_ObjectAction_h
|
Loading…
Reference in a new issue