Package org.jmol.g3d

Class CylinderRenderer


  • class CylinderRenderer
    extends java.lang.Object

    Draws shaded cylinders in 3D.

    Cylinders are used to draw bonds.

    Author:
    Miguel, miguel@jmol.org
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private int allocRaster​(boolean isPrecision, int[][] xyzf, float[][] xyzt)  
      private void calcArgbEndcap​(boolean tCylinder, boolean isFloat)  
      private void calcCosSin​(float dx, float dy, float dz)  
      private void calcPoints​(int count, boolean isPrecise)  
      private void calcRotatedPoint​(float t, int i, boolean isPrecision, int[][] xyzf, float[][] xyzt)  
      private void generateBaseEllipsePrecisely​(boolean isBarb)  
      private void interpolate​(int iLower, int iUpper, int[][] xyzf, float[][] xyzt)  
      private void interpolatePrecisely​(int iLower, int iUpper, int[][] xyzf, float[][] xyzt)  
      (package private) void renderBits​(short colixA, short colixB, int screen, byte endcaps, int diameter, javajs.util.P3i ptA, javajs.util.P3i ptB)  
      (package private) void renderConeOld​(short colix, byte endcap, int diameter, float xa, float ya, float za, float xtip, float ytip, float ztip, boolean doFill, boolean isBarb)  
      private void renderFlatEndcap​(boolean isCylinder, boolean isPrecise, int[][] xyzf)  
      (package private) void renderOld​(short colixA, short colixB, int screen, byte endcaps, int diameter, int xa, int ya, int za, int xb, int yb, int zb)  
      private void renderSphericalEndcaps()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • shader

        private final Shader shader
      • colixA

        private short colixA
      • colixB

        private short colixB
      • shadesA

        private int[] shadesA
      • shadesB

        private int[] shadesB
      • xA

        private int xA
      • yA

        private int yA
      • zA

        private int zA
      • dxB

        private int dxB
      • dyB

        private int dyB
      • dzB

        private int dzB
      • xAf

        private float xAf
      • yAf

        private float yAf
      • zAf

        private float zAf
      • dxBf

        private float dxBf
      • dyBf

        private float dyBf
      • dzBf

        private float dzBf
      • tEvenDiameter

        private boolean tEvenDiameter
      • diameter

        private int diameter
      • endcaps

        private byte endcaps
      • endCapHidden

        private boolean endCapHidden
      • xEndcap

        private int xEndcap
      • yEndcap

        private int yEndcap
      • zEndcap

        private int zEndcap
      • argbEndcap

        private int argbEndcap
      • colixEndcap

        private short colixEndcap
      • endcapShadeIndex

        private int endcapShadeIndex
      • radius

        private float radius
      • radius2

        private float radius2
      • cosTheta

        private float cosTheta
      • cosPhi

        private float cosPhi
      • sinPhi

        private float sinPhi
      • clipped

        private boolean clipped
      • rasterCount

        private int rasterCount
      • xyztRaster

        private float[][] xyztRaster
      • xyzfRaster

        private int[][] xyzfRaster
      • ptA0

        private javajs.util.P3i ptA0
      • ptB0

        private javajs.util.P3i ptB0
      • xTip

        private float xTip
      • yTip

        private float yTip
      • zTip

        private float zTip
    • Constructor Detail

      • CylinderRenderer

        CylinderRenderer​(Graphics3D g3d)
    • Method Detail

      • renderOld

        void renderOld​(short colixA,
                       short colixB,
                       int screen,
                       byte endcaps,
                       int diameter,
                       int xa,
                       int ya,
                       int za,
                       int xb,
                       int yb,
                       int zb)
      • renderBits

        void renderBits​(short colixA,
                        short colixB,
                        int screen,
                        byte endcaps,
                        int diameter,
                        javajs.util.P3i ptA,
                        javajs.util.P3i ptB)
      • renderConeOld

        void renderConeOld​(short colix,
                           byte endcap,
                           int diameter,
                           float xa,
                           float ya,
                           float za,
                           float xtip,
                           float ytip,
                           float ztip,
                           boolean doFill,
                           boolean isBarb)
      • generateBaseEllipsePrecisely

        private void generateBaseEllipsePrecisely​(boolean isBarb)
      • calcPoints

        private void calcPoints​(int count,
                                boolean isPrecise)
      • calcCosSin

        private void calcCosSin​(float dx,
                                float dy,
                                float dz)
      • calcRotatedPoint

        private void calcRotatedPoint​(float t,
                                      int i,
                                      boolean isPrecision,
                                      int[][] xyzf,
                                      float[][] xyzt)
      • allocRaster

        private int allocRaster​(boolean isPrecision,
                                int[][] xyzf,
                                float[][] xyzt)
      • interpolate

        private void interpolate​(int iLower,
                                 int iUpper,
                                 int[][] xyzf,
                                 float[][] xyzt)
      • interpolatePrecisely

        private void interpolatePrecisely​(int iLower,
                                          int iUpper,
                                          int[][] xyzf,
                                          float[][] xyzt)
      • renderFlatEndcap

        private void renderFlatEndcap​(boolean isCylinder,
                                      boolean isPrecise,
                                      int[][] xyzf)
      • renderSphericalEndcaps

        private void renderSphericalEndcaps()
      • calcArgbEndcap

        private void calcArgbEndcap​(boolean tCylinder,
                                    boolean isFloat)