Selva Compute API Reference - v2.1.0
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    hasId: boolean
    id: string

    The unique Id for this texture mapping object.

    isPeriodic: boolean
    isValid: boolean

    Tests an object to see if it is valid.

    isValidWithLog: [boolean, string]

    ...

    requiresVertexNormals: boolean
    userStringCount: number

    Gets the amount of user strings.

    Methods

    • ...

      Returns void

    • Parameters

      • p: number[]

        Vertex location

      • n: number[]

        If the mapping projection is ray_projection, then this is the vertex unit normal. Otherwise n is ignored.

      Returns object

      [number, number[]] (number) Nonzero if evaluation is successful. When the mapping is a box or capped cylinder mapping, the value indicates which side was evaluated. Cylinder mapping: 1 = cylinder wall, 2 = bottom cap, 3 = top cap Box mapping: 1 = front, 2 = right, 3 = back, 4 = left, 5 = bottom, 6 = top (number[]) Texture coordinate (u,v,w)

      Evaluate the mapping to get a texture coordinate

    • Parameters

      • key: string

        id used to retrieve the string.

      Returns string

      string associated with the key if successful. null if no key was found.

      Gets user string from this geometry.

    • Returns string[]

      Gets a copy of all (user key string, user value string) pairs attached to this geometry.

    • ...

      Returns string

    • ...

      Parameters

      • direction: number

      Returns boolean

    • Parameters

      • key: string

        id used to retrieve this string.

      • value: string

        string associated with key.

      Returns boolean

      true if successful, false if not.

      Attach a user string (key,value combination) to this geometry.

    • ...

      Parameters

      • i: number
      • j: number

      Returns boolean

    • ...

      Parameters

      • direction: number
      • count: number
      • offset: number

      Returns boolean

    • Returns string

      Create a JSON string representation of this object

    • Returns Cylinder

      Returns true if a valid cylinder is returned.

      Get a cylindrical projection parameters from this texture mapping.

    • Returns Sphere

      Returns true if a valid sphere is returned.

      Get a spherical projection parameters from this texture mapping.

    • Parameters

      • plane: Plane

        The sides of the box the box are parallel to the plane's coordinate planes. The dx, dy, dz intervals determine the location of the sides.

      • dx: number[]

        Determines the location of the front and back planes. The vector plane.xaxis is perpendicular to these planes and they pass through plane.PointAt(dx[0],0,0) and plane.PointAt(dx[1],0,0), respectively.

      • dy: number[]

        Determines the location of the left and right planes. The vector plane.yaxis is perpendicular to these planes and they pass through plane.PointAt(0,dy[0],0) and plane.PointAt(0,dy[1],0), respectively.

      • dz: number[]

        Determines the location of the top and bottom planes. The vector plane.zaxis is perpendicular to these planes and they pass through plane.PointAt(0,0,dz[0]) and plane.PointAt(0,0,dz[1]), respectively.

      • capped: boolean

        If true, the box is treated as a finite capped box.

      Returns TextureMapping

      TextureMapping instance if input is valid

      Create a box projection texture mapping.

    • Parameters

      • cylinder: Cylinder

        cylinder in world space used to define a cylindrical coordinate system. The angular parameter maps (0,2pi) to texture "u" (0,1), The height parameter maps (height[0],height[1]) to texture "v" (0,1), and the radial parameter maps (0,r) to texture "w" (0,1).

      • capped: boolean

        If true, the cylinder is treated as a finite capped cylinder

      Returns TextureMapping

      TextureMapping instance if input is valid

      Create a cylindrical projection texture mapping.

    • Parameters

      • plane: Plane

        A plane to use for mapping.

      • dx: number[]

        portion of the plane's x axis that is mapped to [0,1] (can be a decreasing interval)

      • dy: number[]

        portion of the plane's y axis that is mapped to [0,1] (can be a decreasing interval)

      • dz: number[]

        portion of the plane's z axis that is mapped to [0,1] (can be a decreasing interval)

      Returns TextureMapping

      TextureMapping instance if input is valid

      Create a planar UV projection texture mapping

    • Parameters

      • sphere: Sphere

        sphere in world space used to define a spherical coordinate system. The longitude parameter maps (0,2pi) to texture "u" (0,1). The latitude parameter maps (-pi/2,+pi/2) to texture "v" (0,1). The radial parameter maps (0,r) to texture "w" (0,1).

      Returns TextureMapping

      TextureMapping instance if input is valid

      Create a spherical projection texture mapping.

    • Returns TextureMapping

      TextureMapping instance or null if failed.

      Create a mapping that will convert surface parameters into normalized(0,1)x(0,1) texture coordinates.

    • Parameters

      • json: object

        A json formatted object in the following format (values are orientative):

        {
        version: 10000,
        archive3dm: 60,
        opennurbs: -1877964208,
        data: 'encoded 3dm object data'
        }

      Returns CommonObject

      Decodes a Rhino Object