{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class MeshPrimitiveBase | Unity glTFast | 6.0.1
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MeshPrimitiveBase

    Geometry to be rendered with the given material.

    Inheritance
    object
    MeshPrimitiveBase
    MeshPrimitiveBase<TExtensions>
    Implements
    ICloneable
    Inherited Members
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: GLTFast.Schema
    Assembly: solution.dll
    Syntax
    [Serializable]
    public abstract class MeshPrimitiveBase : ICloneable

    Fields

    Name Description
    attributes

    A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.

    indices

    The index of the accessor that contains mesh indices. When this is not defined, the primitives should be rendered without indices using drawArrays(). When defined, the accessor must contain indices: the bufferView referenced by the accessor must have a target equal to 34963 (ELEMENT_ARRAY_BUFFER); a byteStride that is tightly packed, i.e., 0 or the byte size of componentType in bytes; componentType must be 5121 (UNSIGNED_BYTE), 5123 (UNSIGNED_SHORT) or 5125 (UNSIGNED_INT), the latter is only allowed when OES_element_index_uint extension is used; type must be \"SCALAR\".

    material

    The index of the material to apply to this primitive when rendering.

    mode

    The type of primitives to render. All valid values correspond to WebGL enums.

    targets

    An array of Morph Targets, each Morph Target is a dictionary mapping attributes to their deviations in the Morph Target (index of the accessor containing the attribute displacements' data).

    Properties

    Name Description
    Extensions

    Mesh primitive extensions

    IsDracoCompressed

    Methods

    Name Description
    Clone()

    Clones the object

    Equals(object)

    Primitives are considered equal if their attributes and morph targets (if existing) are equal. This is practical when clustering primitives of a mesh together, that end up in a single Unity Mesh.

    GetHashCode()

    Default hash function.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)