From dabed7f56e8583a2a1afc892146174b0642bf89b Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Thu, 9 Aug 2018 18:23:32 -0700 Subject: [PATCH] fix wedges direction --- .../structure/visual/polymer-direction-wedge.ts | 2 +- src/mol-math/linear-algebra/3d/mat4.ts | 2 ++ src/mol-view/stage.ts | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts b/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts index fcd583315..9069d6f38 100644 --- a/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts +++ b/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts @@ -73,7 +73,7 @@ async function createPolymerDirectionWedgeMesh(ctx: RuntimeContext, unit: Unit, } Mat4.targetTo(t, v.p3, v.p1, upVec) - Mat4.mul(t, t, Mat4.rotY90) + Mat4.mul(t, t, Mat4.rotY90Z180) Mat4.scale(t, t, Vec3.set(sVec, height, width, depth)) Mat4.setTranslation(t, v.p2) builder.addWedge(t) diff --git a/src/mol-math/linear-algebra/3d/mat4.ts b/src/mol-math/linear-algebra/3d/mat4.ts index 968870259..ddc230eb5 100644 --- a/src/mol-math/linear-algebra/3d/mat4.ts +++ b/src/mol-math/linear-algebra/3d/mat4.ts @@ -893,6 +893,8 @@ namespace Mat4 { export const rotZYZ90: ReadonlyMat4 = Mat4.mul(Mat4.identity(), rotZY90, rotZ90) /** Rotation matrix for 90deg around first z-axis and then 180deg around x-axis */ export const rotZ90X180: ReadonlyMat4 = Mat4.mul(Mat4.identity(), rotZ90, rotX180) + /** Rotation matrix for 90deg around first y-axis and then 180deg around z-axis */ + export const rotY90Z180: ReadonlyMat4 = Mat4.mul(Mat4.identity(), rotY90, rotZ180) } export default Mat4 \ No newline at end of file diff --git a/src/mol-view/stage.ts b/src/mol-view/stage.ts index 6b0998765..228cfd166 100644 --- a/src/mol-view/stage.ts +++ b/src/mol-view/stage.ts @@ -98,7 +98,7 @@ export class Stage { // this.loadPdbid('3sn6') // discontinuous chains // this.loadPdbid('2zex') // contains carbohydrate polymer // this.loadPdbid('3sgj') // contains carbohydrate polymer - this.loadPdbid('3ina') // contains GlcN and IdoA + // this.loadPdbid('3ina') // contains GlcN and IdoA // this.loadPdbid('1umz') // contains Xyl (Xyloglucan) // this.loadPdbid('1mfb') // contains Abe // this.loadPdbid('2gdu') // contains sucrose @@ -106,7 +106,7 @@ export class Stage { // this.loadPdbid('4zs9') // contains raffinose // this.loadPdbid('2yft') // contains kestose // this.loadPdbid('2b5t') // contains large carbohydrate polymer - // this.loadPdbid('1b5f') // contains carbohydrate with alternate locations + this.loadPdbid('1b5f') // contains carbohydrate with alternate locations // this.loadMmcifUrl(`../../examples/1cbs_full.bcif`) // this.loadMmcifUrl(`../../examples/1cbs_updated.cif`) // this.loadMmcifUrl(`../../examples/1crn.cif`) -- GitLab