Merge pull request #3461 from inhosens/dev_1016
glTF1's orthgraphic camera & glTF2's skinningpull/3231/head
commit
fc11ca2f5e
|
@ -1060,7 +1060,7 @@ inline void Mesh::Decode_O3DGC(const SCompression_Open3DGC &pCompression_Open3DG
|
||||||
inline void Camera::Read(Value &obj, Asset & /*r*/) {
|
inline void Camera::Read(Value &obj, Asset & /*r*/) {
|
||||||
type = MemberOrDefault(obj, "type", Camera::Perspective);
|
type = MemberOrDefault(obj, "type", Camera::Perspective);
|
||||||
|
|
||||||
const char *subobjId = (type == Camera::Orthographic) ? "ortographic" : "perspective";
|
const char *subobjId = (type == Camera::Orthographic) ? "orthographic" : "perspective";
|
||||||
|
|
||||||
Value *it = FindObject(obj, subobjId);
|
Value *it = FindObject(obj, subobjId);
|
||||||
if (!it) throw DeadlyImportError("GLTF: Camera missing its parameters");
|
if (!it) throw DeadlyImportError("GLTF: Camera missing its parameters");
|
||||||
|
@ -1071,10 +1071,10 @@ inline void Camera::Read(Value &obj, Asset & /*r*/) {
|
||||||
perspective.zfar = MemberOrDefault(*it, "zfar", 100.f);
|
perspective.zfar = MemberOrDefault(*it, "zfar", 100.f);
|
||||||
perspective.znear = MemberOrDefault(*it, "znear", 0.01f);
|
perspective.znear = MemberOrDefault(*it, "znear", 0.01f);
|
||||||
} else {
|
} else {
|
||||||
ortographic.xmag = MemberOrDefault(obj, "xmag", 1.f);
|
ortographic.xmag = MemberOrDefault(*it, "xmag", 1.f);
|
||||||
ortographic.ymag = MemberOrDefault(obj, "ymag", 1.f);
|
ortographic.ymag = MemberOrDefault(*it, "ymag", 1.f);
|
||||||
ortographic.zfar = MemberOrDefault(obj, "zfar", 100.f);
|
ortographic.zfar = MemberOrDefault(*it, "zfar", 100.f);
|
||||||
ortographic.znear = MemberOrDefault(obj, "znear", 0.01f);
|
ortographic.znear = MemberOrDefault(*it, "znear", 0.01f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue