mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
returning true from set line points
This commit is contained in:
parent
2b4146125f
commit
6a5deaaef1
3 changed files with 6 additions and 2 deletions
|
@ -443,7 +443,7 @@ bool EntityScriptingInterface::setVoxels(QUuid entityID,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EntityScriptingInterface::setPoints(QUuid entityID, std::function<bool(LineEntityItem&)> actor) {
|
bool EntityScriptingInterface::setPoints(QUuid entityID, std::function<bool(LineEntityItem&)> actor) {
|
||||||
if (_entityTree) {
|
if (!_entityTree) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,6 +453,7 @@ bool EntityScriptingInterface::setPoints(QUuid entityID, std::function<bool(Line
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityTypes::EntityType entityType = entity->getType();
|
EntityTypes::EntityType entityType = entity->getType();
|
||||||
|
|
||||||
if (entityType != EntityTypes::Line) {
|
if (entityType != EntityTypes::Line) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
static int vec4MetaTypeId = qRegisterMetaType<glm::vec4>();
|
static int vec4MetaTypeId = qRegisterMetaType<glm::vec4>();
|
||||||
static int vec3MetaTypeId = qRegisterMetaType<glm::vec3>();
|
static int vec3MetaTypeId = qRegisterMetaType<glm::vec3>();
|
||||||
|
static int qVectorVec3MetaTypeId = qRegisterMetaType<QVector<glm::vec3>>();
|
||||||
static int vec2MetaTypeId = qRegisterMetaType<glm::vec2>();
|
static int vec2MetaTypeId = qRegisterMetaType<glm::vec2>();
|
||||||
static int quatMetaTypeId = qRegisterMetaType<glm::quat>();
|
static int quatMetaTypeId = qRegisterMetaType<glm::quat>();
|
||||||
static int xColorMetaTypeId = qRegisterMetaType<xColor>();
|
static int xColorMetaTypeId = qRegisterMetaType<xColor>();
|
||||||
|
@ -31,6 +32,7 @@ static int collisionMetaTypeId = qRegisterMetaType<Collision>();
|
||||||
void registerMetaTypes(QScriptEngine* engine) {
|
void registerMetaTypes(QScriptEngine* engine) {
|
||||||
qScriptRegisterMetaType(engine, vec4toScriptValue, vec4FromScriptValue);
|
qScriptRegisterMetaType(engine, vec4toScriptValue, vec4FromScriptValue);
|
||||||
qScriptRegisterMetaType(engine, vec3toScriptValue, vec3FromScriptValue);
|
qScriptRegisterMetaType(engine, vec3toScriptValue, vec3FromScriptValue);
|
||||||
|
qScriptRegisterMetaType(engine, qVectorVec3ToScriptValue, qVectorVec3FromScriptValue);
|
||||||
qScriptRegisterMetaType(engine, vec2toScriptValue, vec2FromScriptValue);
|
qScriptRegisterMetaType(engine, vec2toScriptValue, vec2FromScriptValue);
|
||||||
qScriptRegisterMetaType(engine, quatToScriptValue, quatFromScriptValue);
|
qScriptRegisterMetaType(engine, quatToScriptValue, quatFromScriptValue);
|
||||||
qScriptRegisterMetaType(engine, qRectToScriptValue, qRectFromScriptValue);
|
qScriptRegisterMetaType(engine, qRectToScriptValue, qRectFromScriptValue);
|
||||||
|
|
|
@ -57,8 +57,9 @@ QScriptValue qURLToScriptValue(QScriptEngine* engine, const QUrl& url);
|
||||||
void qURLFromScriptValue(const QScriptValue& object, QUrl& url);
|
void qURLFromScriptValue(const QScriptValue& object, QUrl& url);
|
||||||
|
|
||||||
QScriptValue qVectorVec3ToScriptValue(QScriptEngine* engine, const QVector<glm::vec3>& vector);
|
QScriptValue qVectorVec3ToScriptValue(QScriptEngine* engine, const QVector<glm::vec3>& vector);
|
||||||
|
void qVectorVec3FromScriptValue( const QScriptValue& array, QVector<glm::vec3>& vector);
|
||||||
QVector<glm::vec3> qVectorVec3FromScriptValue( const QScriptValue& array);
|
QVector<glm::vec3> qVectorVec3FromScriptValue( const QScriptValue& array);
|
||||||
void qVectorVec3FromScriptValue( const QScriptValue& array, QVector<glm::vec3> vector);
|
|
||||||
|
|
||||||
class PickRay {
|
class PickRay {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue