Libraries.Game.Graphics.TextureAttribute Documentation

Inherits from: Libraries.Game.Graphics.Attribute, Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
text BUMP_ALIAS
text SPECULAR_ALIAS
text EMISSIVE_ALIAS
Libraries.Game.Graphics.TextureDescriptor descriptor
number offsetV
number offsetU
text REFLECTION_ALIAS
integer uvIndexThe index of the texture coordinate vertex attribute to use for this TextureAttribute. Whether this value is used, depends on the shader and Attribute type value. For basic (model specific) types (e.g. Diffuse, Normal, etc.), this value is usually ignored and the first texture coordinate vertex attribute is use
number scaleV
number scaleU
text NORMAL_ALIAS
text DIFFUSE_ALIAS
text AMBIENT_ALIAS

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Copy()
CreateAmbient(Libraries.Game.Graphics.Texture texture)
CreateAmbient(Libraries.Game.Graphics.TextureDescriptor texture)
CreateBump(Libraries.Game.Graphics.Texture texture)
CreateBump(Libraries.Game.Graphics.TextureDescriptor texture)
CreateDiffuse(Libraries.Game.Graphics.Texture texture)The index of the texture coordinate vertex attribute to use for this TextureAttribute.
CreateDiffuse(Libraries.Game.Graphics.TextureDescriptor texture)
CreateEmissive(Libraries.Game.Graphics.TextureDescriptor texture)
CreateEmissive(Libraries.Game.Graphics.Texture texture)
CreateNormal(Libraries.Game.Graphics.TextureDescriptor texture)
CreateNormal(Libraries.Game.Graphics.Texture texture)
CreateReflection(Libraries.Game.Graphics.Texture texture)
CreateReflection(Libraries.Game.Graphics.TextureDescriptor texture)
CreateSpecular(Libraries.Game.Graphics.TextureDescriptor texture)
CreateSpecular(Libraries.Game.Graphics.Texture texture)
Equals(Libraries.Game.Graphics.Attribute other)This action will test to see if two Attributes are of the same type.
Equals(Libraries.Language.Object object)This action determines if the given object is equal to this Attribute.
GetAmbientValue()This action returns the integer value representing an Ambient TextureAttribut
GetAttributeAlias(integer type)GetAttributeAlias will take an integer code for a particular type of Attribute and return a text alias representing that type.
GetAttributeMask()This action returns the sum of all supported value types for a TextureAttribut
GetAttributeType(text alias)GetAttributeType will take a text alias for a particular type of Attribute and return an integer code representing that type.
GetBumpValue()This action returns the integer value representing a Bump TextureAttribut
GetDiffuseValue()This action returns the integer value representing a Diffuse TextureAttribut
GetEmissiveValue()This action returns the integer value representing an Emissive TextureAttribut
GetHashCode()This action gets the hash code for an object.
GetNormalValue()This action returns the integer value representing a Normal TextureAttribut
GetReflectionValue()This action returns the integer value representing a reflection TextureAttribut
GetSpecularValue()This action returns the integer value representing a Specular TextureAttribut
HashCode()This action will return a hash code that identifies an Attribute by its type.
SetAttribute(integer setType, Libraries.Game.Graphics.TextureDescriptor description, number offU, number offV, number sU, number sV)
SetAttribute(integer setType, Libraries.Game.Graphics.Texture texture)
SetAttribute(integer setType, Libraries.Game.Graphics.TextureDescriptor description)
SetAttribute(integer setType)SetAttribute will set data used by this Attribute.
SupportsAttribute(integer type)This aciton will test if the given integer value represents a supported attribute type for a TextureAttribut

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Copy()

Return

Libraries.Game.Graphics.Attribute

CreateAmbient(Libraries.Game.Graphics.Texture texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateAmbient(Libraries.Game.Graphics.TextureDescriptor texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateBump(Libraries.Game.Graphics.Texture texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateBump(Libraries.Game.Graphics.TextureDescriptor texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateDiffuse(Libraries.Game.Graphics.Texture texture)

The index of the texture coordinate vertex attribute to use for this TextureAttribute. Whether this value is used, depends on the shader and Attribute type value. For basic (model specific) types (e.g. Diffuse, Normal, etc.), this value is usually ignored and the first texture coordinate vertex attribute is use

Parameters

Return

Libraries.Game.Graphics.TextureAttribute:

CreateDiffuse(Libraries.Game.Graphics.TextureDescriptor texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateEmissive(Libraries.Game.Graphics.TextureDescriptor texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateEmissive(Libraries.Game.Graphics.Texture texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateNormal(Libraries.Game.Graphics.TextureDescriptor texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateNormal(Libraries.Game.Graphics.Texture texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateReflection(Libraries.Game.Graphics.Texture texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateReflection(Libraries.Game.Graphics.TextureDescriptor texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateSpecular(Libraries.Game.Graphics.TextureDescriptor texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

CreateSpecular(Libraries.Game.Graphics.Texture texture)

Parameters

Return

Libraries.Game.Graphics.TextureAttribute

Equals(Libraries.Game.Graphics.Attribute other)

This action will test to see if two Attributes are of the same type. Note that it will not test if the contents of the Attributes are the same.

Example Code

use Libraries.Game.Game
    use Libraries.Game.Graphics.ColorAttribute
    use Libraries.Game.Graphics.Attribute
    use Libraries.Game.Graphics.Color

    class Main is Game

        action Main
            StartGame()
        end

        action CreateGame
            Color color

            // Using the ColorAttribute class, which inherits from Attribute.
            ColorAttribute attribute1

            attribute1:SetAttribute(attribute1:GetDiffuseValue(), color:Green())
            Attribute attribute2 = attribute1:Copy()

            output "attribute1 = attribute2 is " + attribute1:Equals(attribute2)

        end
    e

Parameters

Return

boolean: Whether or not the two attributes are of the same type.

Equals(Libraries.Language.Object object)

This action determines if the given object is equal to this Attribute.

Parameters

Return

boolean: True if the object is an Attribute with the same type, otherwise it returns fals

GetAmbientValue()

This action returns the integer value representing an Ambient TextureAttribut

Return

integer:

GetAttributeAlias(integer type)

GetAttributeAlias will take an integer code for a particular type of Attribute and return a text alias representing that type. Each class that inherits from Attribute will contain a series of actions that will return an integer code for a given type. The contents of this Attribute are not considered during this action, and can be ignored.

Example Code

use Libraries.Game.Game
    use Libraries.Game.Graphics.TextureAttribute

    class Main is Game

        action Main
            StartGame()
        end

        action CreateGame
            // Using the TextureAttribute class, which inherits from Attribute.
            TextureAttribute attribute
            text alias = attribute:GetAttributeAlias(attribute:GetDiffuseValue())

            output "The alias for a diffuse TextureAttribute is " + alias
        end
    e

Parameters

Return

text: A text alias representing the described Attribute type.

GetAttributeMask()

This action returns the sum of all supported value types for a TextureAttribut

Return

integer:

GetAttributeType(text alias)

GetAttributeType will take a text alias for a particular type of Attribute and return an integer code representing that type. Each class that inherits from Attribute will contain a series of public constant text fields that contain an alias for a given type. The contents of this Attribute are not considered during this action, and can be ignored.

Example Code

use Libraries.Game.Game
    use Libraries.Game.Graphics.TextureAttribute

    class Main is Game

        action Main
            StartGame()
        end

        action CreateGame
            // Using the TextureAttribute class, which inherits from Attribute.
            TextureAttribute attribute
            integer code = attribute:GetAttributeType(attribute:DIFFUSE_ALIAS)

            output "The type code for a diffuse TextureAttribute is " + code
        end
    e

Parameters

Return

integer: An integer code representing the described Attribute type.

GetBumpValue()

This action returns the integer value representing a Bump TextureAttribut

Return

integer:

GetDiffuseValue()

This action returns the integer value representing a Diffuse TextureAttribut

Return

integer:

GetEmissiveValue()

This action returns the integer value representing an Emissive TextureAttribut

Return

integer:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

GetNormalValue()

This action returns the integer value representing a Normal TextureAttribut

Return

integer:

GetReflectionValue()

This action returns the integer value representing a reflection TextureAttribut

Return

integer:

GetSpecularValue()

This action returns the integer value representing a Specular TextureAttribut

Return

integer:

HashCode()

This action will return a hash code that identifies an Attribute by its type.

Example Code

use Libraries.Game.Game
    use Libraries.Game.Graphics.ColorAttribute
    use Libraries.Game.Graphics.Attribute
    use Libraries.Game.Graphics.Color

    class Main is Game

        action Main
            StartGame()
        end

        action CreateGame
            // Using the ColorAttribute class, which inherits from Attribute.
            ColorAttribute attribute
            Color green
            green:SetColor(0, 1, 0, 1)
            attribute:SetAttribute(attribute:GetDiffuseValue(), green)

            output "The hash code for the attribute is " + attribute:GetHashCode()
        end
    e

Return

integer:

SetAttribute(integer setType, Libraries.Game.Graphics.TextureDescriptor description, number offU, number offV, number sU, number sV)

Parameters

SetAttribute(integer setType, Libraries.Game.Graphics.Texture texture)

Parameters

SetAttribute(integer setType, Libraries.Game.Graphics.TextureDescriptor description)

Parameters

SetAttribute(integer setType)

SetAttribute will set data used by this Attribute. Note that most classes which inherit from Attribute will have their own implementations of SetAttribute which may require different parameters - e.g., to use SetAttribute in the ColorAttribute class, it requires both an integer type, but also a color. Most users should not use this action directly.

Parameters

SupportsAttribute(integer type)

This aciton will test if the given integer value represents a supported attribute type for a TextureAttribut

Parameters

Return

boolean: