com.supermap.ar.areffect.preset

Class Shape

    • Constructor Detail

      • Shape

        public Shape(BaseShape.MatType matType)
        Construction method
        Parameters:
        matType - texture type (transparent/opaque)
    • Method Detail

      • drawPolygon

        public void drawPolygon(BaseShape.Mode mode,
                                java.util.List<Point3D> pointList)
        Draws polygons through the points set
        Parameters:
        mode - The drawing mode.
        pointList - 3D point set
      • drawHorizontalPolygon

        public void drawHorizontalPolygon(java.util.List<Point3D> pointList)
        Draws horizontal polygons through the points set The point set should have end-to-end points Suggestions: these points should be in the same plane (the same height)
        Parameters:
        pointList - 3D point set
      • drawCube

        public void drawCube(Vector offset,
                             Vector size)
        Draws a cube in size
        Parameters:
        offset - offset vector (takes the parent node as base. It is the offset on the parent node)
        size - The size.
      • drawCubeOutline

        public void drawCubeOutline(Vector offset,
                                    Vector size)
        Draws the contour lines of the cube
        Parameters:
        offset -
        size -
      • drawSphere

        public void drawSphere(Vector offset,
                               float radius)
        Draws a sphere
        Parameters:
        offset - the offset (relative to the parent node)
        radius - sphere radius
      • drawSphere

        public void drawSphere(float radius)
        Draws a sphere
        Parameters:
        radius - sphere radius
      • drawPrism

        public void drawPrism(java.util.List<Point3D> bottomPointList,
                              java.util.List<Point3D> topPointList)
        Draws prism
        Parameters:
        bottomPointList - bottom vertex set
        topPointList - top surface vertex set Note: the vertexes of the top surface need to correspond with the vertexes of the bottom one by one. The vertexes of the bottom surface (top surface) should be end to end.
      • drawCylinder

        public void drawCylinder(Vector vector,
                                 float radius)
        Draws a cylinder based on the radius of the bottom circle and height
        Parameters:
        vector - the height of the cylinder
        radius - Radius
      • drawCylinder

        public void drawCylinder(Point3D fromP3d,
                                 Point3D toP3d,
                                 float radius)
        Draws a cylinder based on the center and radius of the bottom (top) circle.
        Parameters:
        fromP3d - the starting position (the position of the center of the bottom circle)
        toP3d - the end position (the position of the center of the top circle)
        radius - 0.0005f
      • drawCylinder

        @Deprecated
        public void drawCylinder(Vector3 from,
                                              Vector3 to,
                                              float radius)
        Deprecated. 
        Draws a cylinder based on the center and radius of the bottom (top) circle.
        Parameters:
        from - the starting position (the position of the center of the bottom circle)
        to - the end position (the position of the center of the top circle)
        radius - 0.0005f
      • drawLine

        public void drawLine(Vector vector)
        Takes the parent node as a starting point and "vector" as vector to draw lines
        Parameters:
        vector - direction vector
      • drawLine

        public void drawLine(Point3D fromP3d,
                             Point3D toP3d)
        Draws lines between two points
        Parameters:
        fromP3d - starting position
        toP3d - end position
      • drawLine

        public void drawLine(java.util.List<Point3D> point3DList)
        Draws lines among multiple continuous points
        Parameters:
        point3DList -
      • drawTorus

        public void drawTorus(float r1,
                              float r2,
                              int side)
        Draws a horizontal circular object
        Parameters:
        r1 -
        r2 -
        side -
      • drawHalfTorus

        public void drawHalfTorus(float r1,
                                  float r2,
                                  int side)
        Draws a horizontal semi ring object
        Parameters:
        r1 -
        r2 -
        side -
      • drawRegularPolygon

        public void drawRegularPolygon(float r,
                                       int side)
        Draws regular polygons
        Parameters:
        r - the distance between the geometrical center and vertex
        side - the number of sides of the polygon
      • clear

        public void clear()
        Clears objects
        Overrides:
        clear in class BaseShape
      • drawBuildingOneSide

        public void drawBuildingOneSide(java.util.List<Point3D> pList)
        update author: rophy date: 2022-03-15 content: render One side of the wall
        Parameters:
        pList - the vertex list of the side which the order is 2+++++++++++++1 + + + + 3+++++++++++++0
      • drawBuildingOneSide

        public void drawBuildingOneSide(Vector3 vector0,
                                        Vector3 vector1,
                                        Vector3 vector2,
                                        Vector3 vector3)
        update author: rophy date: 2022-03-15 content: render One side of the wall V2++++++++++++V1 + + + + V3++++++++++++V0
      • drawPolygon

        public void drawPolygon(BaseShape.Mode mode,
                                java.util.List<Point3D> pointList,
                                java.util.ArrayList<Vector> normalVectorList)
        From the point set, draw a polygon
        Parameters:
        mode - Draw mode
        pointList - Set of 3D points
        normalVectorList - Vertex normal
      • setParentNode

        public void setParentNode(AREffectElement element)
        Setting the parent node
        Parameters:
        element -
      • setParentNode

        public void setParentNode(EffectView arView)
        Setting the parent node
        Parameters:
        arView -
      • getParentElement

        public AREffectElement getParentElement()
        Get the parent node
        Returns: