mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:57:30 +02:00
commit
9ee49c3e1e
7 changed files with 513 additions and 515 deletions
|
@ -154,9 +154,9 @@ public:
|
||||||
DEFINE_PROPERTY_REF(PROP_HREF, Href, href, QString);
|
DEFINE_PROPERTY_REF(PROP_HREF, Href, href, QString);
|
||||||
DEFINE_PROPERTY_REF(PROP_DESCRIPTION, Description, description, QString);
|
DEFINE_PROPERTY_REF(PROP_DESCRIPTION, Description, description, QString);
|
||||||
DEFINE_PROPERTY(PROP_FACE_CAMERA, FaceCamera, faceCamera, bool);
|
DEFINE_PROPERTY(PROP_FACE_CAMERA, FaceCamera, faceCamera, bool);
|
||||||
|
DEFINE_PROPERTY_REF(PROP_ACTION_DATA, ActionData, actionData, QByteArray);
|
||||||
DEFINE_PROPERTY(PROP_NORMALS, Normals, normals, QVector<glm::vec3>);
|
DEFINE_PROPERTY(PROP_NORMALS, Normals, normals, QVector<glm::vec3>);
|
||||||
DEFINE_PROPERTY(PROP_STROKE_WIDTHS, StrokeWidths, strokeWidths, QVector<float>);
|
DEFINE_PROPERTY(PROP_STROKE_WIDTHS, StrokeWidths, strokeWidths, QVector<float>);
|
||||||
DEFINE_PROPERTY_REF(PROP_ACTION_DATA, ActionData, actionData, QByteArray);
|
|
||||||
DEFINE_PROPERTY_REF(PROP_X_TEXTURE_URL, XTextureURL, xTextureURL, QString);
|
DEFINE_PROPERTY_REF(PROP_X_TEXTURE_URL, XTextureURL, xTextureURL, QString);
|
||||||
DEFINE_PROPERTY_REF(PROP_Y_TEXTURE_URL, YTextureURL, yTextureURL, QString);
|
DEFINE_PROPERTY_REF(PROP_Y_TEXTURE_URL, YTextureURL, yTextureURL, QString);
|
||||||
DEFINE_PROPERTY_REF(PROP_Z_TEXTURE_URL, ZTextureURL, zTextureURL, QString);
|
DEFINE_PROPERTY_REF(PROP_Z_TEXTURE_URL, ZTextureURL, zTextureURL, QString);
|
||||||
|
|
|
@ -170,9 +170,10 @@ bool PolyLineEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
||||||
|
|
||||||
for (int i = 0; i < points.size(); i++) {
|
for (int i = 0; i < points.size(); i++) {
|
||||||
glm::vec3 point = points.at(i);
|
glm::vec3 point = points.at(i);
|
||||||
glm::vec3 pos = getPosition();
|
|
||||||
glm::vec3 halfBox = getDimensions() * 0.5f;
|
glm::vec3 halfBox = getDimensions() * 0.5f;
|
||||||
if ( (point.x < - halfBox.x || point.x > halfBox.x) || (point.y < -halfBox.y || point.y > halfBox.y) || (point.z < - halfBox.z || point.z > halfBox.z) ) {
|
if ((point.x < - halfBox.x || point.x > halfBox.x) ||
|
||||||
|
(point.y < -halfBox.y || point.y > halfBox.y) ||
|
||||||
|
(point.z < - halfBox.z || point.z > halfBox.z)) {
|
||||||
qDebug() << "Point is outside entity's bounding box";
|
qDebug() << "Point is outside entity's bounding box";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1108,13 +1108,12 @@ ExtractedMesh extractMesh(const FBXNode& object, unsigned int& meshIndex) {
|
||||||
if (subdata.name == "Materials") {
|
if (subdata.name == "Materials") {
|
||||||
materials = getIntVector(subdata);
|
materials = getIntVector(subdata);
|
||||||
} else if (subdata.name == "MappingInformationType") {
|
} else if (subdata.name == "MappingInformationType") {
|
||||||
if (subdata.properties.at(0) == "ByPolygon") {
|
if (subdata.properties.at(0) == "ByPolygon")
|
||||||
isMaterialPerPolygon = true;
|
isMaterialPerPolygon = true;
|
||||||
} else {
|
} else {
|
||||||
isMaterialPerPolygon = false;
|
isMaterialPerPolygon = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} else if (child.name == "LayerElementTexture") {
|
} else if (child.name == "LayerElementTexture") {
|
||||||
|
@ -1126,7 +1125,6 @@ ExtractedMesh extractMesh(const FBXNode& object, unsigned int& meshIndex) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool isMultiMaterial = false;
|
bool isMultiMaterial = false;
|
||||||
if (isMaterialPerPolygon) {
|
if (isMaterialPerPolygon) {
|
||||||
isMultiMaterial = true;
|
isMultiMaterial = true;
|
||||||
|
|
|
@ -123,9 +123,9 @@ public:
|
||||||
DepthTest(bool enabled = false, bool writeMask = true, ComparisonFunction func = LESS) :
|
DepthTest(bool enabled = false, bool writeMask = true, ComparisonFunction func = LESS) :
|
||||||
_function(func), _writeMask(writeMask), _enabled(enabled) {}
|
_function(func), _writeMask(writeMask), _enabled(enabled) {}
|
||||||
|
|
||||||
bool isEnabled() const { return _enabled; }
|
bool isEnabled() const { return _enabled != 0; }
|
||||||
ComparisonFunction getFunction() const { return ComparisonFunction(_function); }
|
ComparisonFunction getFunction() const { return ComparisonFunction(_function); }
|
||||||
bool getWriteMask() const { return _writeMask; }
|
uint8 getWriteMask() const { return _writeMask; }
|
||||||
|
|
||||||
int32 getRaw() const { return *(reinterpret_cast<const int32*>(this)); }
|
int32 getRaw() const { return *(reinterpret_cast<const int32*>(this)); }
|
||||||
DepthTest(int32 raw) { *(reinterpret_cast<int32*>(this)) = raw; }
|
DepthTest(int32 raw) { *(reinterpret_cast<int32*>(this)) = raw; }
|
||||||
|
@ -301,7 +301,7 @@ public:
|
||||||
DepthTest getDepthTest() const { return _values.depthTest; }
|
DepthTest getDepthTest() const { return _values.depthTest; }
|
||||||
|
|
||||||
bool isDepthTestEnabled() const { return getDepthTest().isEnabled(); }
|
bool isDepthTestEnabled() const { return getDepthTest().isEnabled(); }
|
||||||
bool getDepthTestWriteMask() const { return getDepthTest().getWriteMask(); }
|
uint8 getDepthTestWriteMask() const { return getDepthTest().getWriteMask(); }
|
||||||
ComparisonFunction getDepthTestFunc() const { return getDepthTest().getFunction(); }
|
ComparisonFunction getDepthTestFunc() const { return getDepthTest().getFunction(); }
|
||||||
|
|
||||||
// Stencil test
|
// Stencil test
|
||||||
|
|
|
@ -92,7 +92,7 @@ void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) {
|
||||||
// dQ = Q1 * Q0^
|
// dQ = Q1 * Q0^
|
||||||
btQuaternion deltaQ = target * bodyRotation.inverse();
|
btQuaternion deltaQ = target * bodyRotation.inverse();
|
||||||
float angle = deltaQ.getAngle();
|
float angle = deltaQ.getAngle();
|
||||||
const float MIN_ANGLE = 1.0e-4;
|
const float MIN_ANGLE = 1.0e-4f;
|
||||||
if (angle > MIN_ANGLE) {
|
if (angle > MIN_ANGLE) {
|
||||||
targetVelocity = (angle / _angularTimeScale) * deltaQ.getAxis();
|
targetVelocity = (angle / _angularTimeScale) * deltaQ.getAxis();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1808,7 +1808,6 @@ void Model::segregateMeshGroups() {
|
||||||
const FBXMesh& mesh = geometry.meshes.at(i);
|
const FBXMesh& mesh = geometry.meshes.at(i);
|
||||||
const MeshState& state = _meshStates.at(i);
|
const MeshState& state = _meshStates.at(i);
|
||||||
|
|
||||||
|
|
||||||
bool translucentMesh = networkMesh.getTranslucentPartCount(mesh) == networkMesh.parts.size();
|
bool translucentMesh = networkMesh.getTranslucentPartCount(mesh) == networkMesh.parts.size();
|
||||||
bool hasTangents = !mesh.tangents.isEmpty();
|
bool hasTangents = !mesh.tangents.isEmpty();
|
||||||
bool hasSpecular = mesh.hasSpecularTexture();
|
bool hasSpecular = mesh.hasSpecularTexture();
|
||||||
|
|
|
@ -44,7 +44,7 @@ const int16_t COLLISION_GROUP_OTHER_AVATAR = 1 << 6;
|
||||||
const int16_t COLLISION_GROUP_MY_ATTACHMENT = 1 << 7;
|
const int16_t COLLISION_GROUP_MY_ATTACHMENT = 1 << 7;
|
||||||
const int16_t COLLISION_GROUP_OTHER_ATTACHMENT = 1 << 8;
|
const int16_t COLLISION_GROUP_OTHER_ATTACHMENT = 1 << 8;
|
||||||
// ...
|
// ...
|
||||||
const int16_t COLLISION_GROUP_COLLISIONLESS = 1 << 15;
|
const int16_t COLLISION_GROUP_COLLISIONLESS = 1 << 14;
|
||||||
|
|
||||||
|
|
||||||
/* Note: In order for objectA to collide with objectB at the filter stage
|
/* Note: In order for objectA to collide with objectB at the filter stage
|
||||||
|
|
Loading…
Reference in a new issue