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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ambientColor: number[]
    diffuseColor: number[]
    disableLighting: boolean
    emissionColor: number[]
    fresnelIndexOfRefraction: number

    Gets or sets the Fresnel index of refraction of the material, default is 1.56

    fresnelReflections: boolean

    Gets or sets if Fresnel reflections are used.

    id: string

    Gets or sets the ID of the current instance.

    indexOfRefraction: number

    Gets or sets the index of refraction of the material, generally

    = 1.0 (speed of light in vacuum)/(speed of light in material)

    isSystemComponent: boolean

    True if this model component is a system constant. An incomplete list of system constant model components is below:ON_ModelComponent::Unset ON_InstanceDefinition::Empty ON_Linetype::UnsetON_Linetype::ContinuousON_Linetype::ByLayerON_Linetype::ByParent ON_Layer::UnsetON_Layer::Default ON_TextStyle::UnsetON_TextStyle::DefaultON_TextStyle::ByLayerON_TextStyle::ByParent ON_DimStyle::UnsetON_DimStyle::DefaultON_DimStyle::DefaultInchDecimalON_DimStyle::DefaultInchFractionalON_DimStyle::DefaultFootInchArchitectureON_DimStyle::DefaultMillimeterSmallON_DimStyle::DefaultMillimeterLargeON_DimStyle::DefaultMillimeterArchitecture

    isValid: boolean

    Tests an object to see if it is valid.

    isValidWithLog: [boolean, string]

    ...

    name: string
    previewColor: number[]

    Very simple preview color function for GUIs.

    reflectionColor: number[]
    reflectionGlossiness: number

    Gets or sets the reflection glossiness.

    reflectivity: number

    Gets or sets how reflective a material is, 0f is no reflection 1f is 100% reflective.

    refractionGlossiness: number

    Gets or sets the refraction glossiness.

    renderMaterialInstanceId: string
    renderPlugInId: string

    The Id of the RenderPlugIn that is associated with this material.

    shine: number

    Gets or sets the shine factor of the material.

    specularColor: number[]
    transparency: number

    Gets or sets the transparency of the material (0.0 = opaque to 1.0 = transparent)

    transparentColor: number[]
    userStringCount: number

    Gets the amount of user strings.

    Methods

    • Returns void

      Resets the HasId property of the model component to false, if possible.

    • Parameters

      • currentRemainder: number

        The current remainder value.

      Returns number

      The updated remainder value.

      Increments the Cyclic Redundancy Check value by this instance.

    • Returns void

      Set material to default settings.

    • ...

      Returns void

    • Returns Texture

    • Returns Texture

      A texture; or null if no bump texture has been added to this material.

      Gets the bump texture of this material.

    • Returns Texture

    • Parameters

      Returns Texture

      Get the texture that corresponds with the specified texture type for this material.

    • Returns Texture

    • 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

      Returns boolean

    • ...

      Parameters

      • filename: string

      Returns boolean

    • Parameters

      Returns boolean

    • ...

      Parameters

      • filename: string

      Returns boolean

    • Parameters

      Returns boolean

    • ...

      Parameters

      • filename: string

      Returns boolean

    • Parameters

      Returns boolean

    • ...

      Parameters

      • filename: string

      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.

    • Returns string

      Create a JSON string representation of this object

    • Returns void

    • ...

      Parameters

      Returns number

    • 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