mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:03:58 +02:00
Added referentials base class
This commit is contained in:
parent
f0b64c11bc
commit
92b75d29cf
2 changed files with 56 additions and 0 deletions
18
libraries/avatars/src/Referential.cpp
Normal file
18
libraries/avatars/src/Referential.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Referential.cpp
|
||||
//
|
||||
//
|
||||
// Created by Clement on 7/30/14.
|
||||
// Copyright 2014 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 "Referential.h"
|
||||
|
||||
Referential::Referential(AvatarData* avatar) :
|
||||
_isValid(true),
|
||||
_avatar(avatar)
|
||||
{
|
||||
}
|
38
libraries/avatars/src/Referential.h
Normal file
38
libraries/avatars/src/Referential.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
//
|
||||
// Referential.h
|
||||
//
|
||||
//
|
||||
// Created by Clement on 7/30/14.
|
||||
// Copyright 2014 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_Referential_h
|
||||
#define hifi_Referential_h
|
||||
|
||||
#include "AvatarData.h"
|
||||
|
||||
class Referential {
|
||||
public:
|
||||
virtual bool isValid() { return _isValid; }
|
||||
virtual void update() = 0;
|
||||
|
||||
protected:
|
||||
Referential(AvatarData* avatar);
|
||||
|
||||
bool _isValid;
|
||||
AvatarData* _avatar;
|
||||
|
||||
glm::vec3 _refPosition;
|
||||
glm::quat _refRotation;
|
||||
float _refScale;
|
||||
|
||||
glm::vec3 _translation;
|
||||
glm::quat _rotation;
|
||||
float _scale;
|
||||
};
|
||||
|
||||
|
||||
#endif // hifi_Referential_h
|
Loading…
Reference in a new issue