• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpAssimp
      • Animation
      • AnimationBehaviour
      • AnimationInterpolation
      • AssimpContext
      • AssimpException
      • BlendMode
      • Bone
      • BoundingBox
      • Camera
      • CompileFlags
      • ConsoleLogStream
      • DefaultLogStream
      • EmbeddedTexture
      • ExcludeComponent
      • ExportDataBlob
      • ExportFormatDescription
      • Face
      • FileIOMode
      • FileIOSystem
      • FreeNativeDelegate
      • IMarshalable<Managed, Native>
      • INativeCustomMarshaler
      • IOStream
      • IOSystem
      • ImporterDescription
      • ImporterFeatureFlags
      • Light
      • LightSourceType
      • LogStream
      • LoggingCallback
      • Material
      • Material.PBRMaterialProperties
      • Material.ShaderMaterialProperties
      • MaterialProperty
      • Matrix3x3
      • MemoryHelper
      • Mesh
      • MeshAnimationAttachment
      • MeshAnimationChannel
      • MeshKey
      • MeshMorphAnimationChannel
      • MeshMorphKey
      • MeshMorphingMethod
      • MetaDataType
      • Metadata
      • Metadata.Entry
      • NativeCustomMarshalerAttribute
      • Node
      • NodeAnimationChannel
      • NodeCollection
      • Origin
      • PostProcessPreset
      • PostProcessSteps
      • PrimitiveType
      • PropertyType
      • QuaternionKey
      • Ray
      • ReturnCode
      • Scene
      • SceneFlags
      • ShadingMode
      • Texel
      • TextureFlags
      • TextureMapping
      • TextureOperation
      • TextureSlot
      • TextureType
      • TextureWrapMode
      • UVTransform
      • UVTransformFlags
      • VectorKey
      • VertexWeight
    • SharpAssimp.Configs
      • ACEvaluateSubdivisionConfig
      • ACSeparateBackfaceCullConfig
      • ASEReconstructNormalsConfig
      • AnimationAccuracyConfig
      • AppScaleConfig
      • BooleanPropertyConfig
      • ColladaIgnoreUpDirectionConfig
      • ColladaUseColladaNamesConfig
      • DeboneAllOrNoneConfig
      • DeboneThresholdConfig
      • ExportPointCloudsConfig
      • FBXConvertToMetersConfig
      • FBXImportAllGeometryLayersConfig
      • FBXImportAllMaterialsConfig
      • FBXImportAnimationsConfig
      • FBXImportCamerasConfig
      • FBXImportEmbeddedTexturesConfig
      • FBXImportEmbeddedTexturesLegacyNamingConfig
      • FBXImportLightsConfig
      • FBXImportMaterialsConfig
      • FBXOptimizeEmptyAnimationCurvesConfig
      • FBXPreservePivotsConfig
      • FBXStrictModeConfig
      • FavorSpeedConfig
      • FloatPropertyConfig
      • GlobalKeyFrameImportConfig
      • GlobalScaleConfig
      • IFCCylindricalTessellationConfig
      • IFCSkipSpaceRepresentationsConfig
      • IFCSmoothingAngleConfig
      • IFCUseCustomTriangulationConfig
      • IRRAnimationFrameRateConfig
      • IgnoreTextureCoordinatesConfig
      • IntegerPropertyConfig
      • KeepSceneHierarchyConfig
      • LWOImportOneLayerConfig
      • LWSAnimationEndConfig
      • LWSAnimationStartConfig
      • MD2KeyFrameImportConfig
      • MD3HandleMultiPartConfig
      • MD3KeyFrameImportConfig
      • MD3ShaderSourceConfig
      • MD3SkinNameConfig
      • MD5NoAnimationAutoLoadConfig
      • MDLColorMapConfig
      • MDLKeyFrameImportConfig
      • MaterialExcludeListConfig
      • MatrixPropertyConfig
      • MaxBoneCountConfig
      • MeasureTimeConfig
      • MeshTriangleLimitConfig
      • MeshVertexLimitConfig
      • MultithreadingConfig
      • NoSkeletonMeshesConfig
      • NodeExcludeListConfig
      • NormalSmoothingAngleConfig
      • NormalizeVertexComponentsConfig
      • OgreMaterialFileConfig
      • OgreTextureTypeFromFilenameConfig
      • PropertyConfig
      • RemoveComponentConfig
      • RemoveDegeneratePrimitivesCheckAreaConfig
      • RemoveDegeneratePrimitivesConfig
      • RemoveEmptyBonesConfig
      • RootTransformationConfig
      • SMDKeyFrameImportConfig
      • SmdLoadAnimationListConfig
      • SortByPrimitiveTypeConfig
      • StringPropertyConfig
      • TangentSmoothingAngleConfig
      • TangentTextureChannelIndexConfig
      • TerragenComputeTexCoordsConfig
      • TransformUVConfig
      • UnrealHandleFlagsConfig
      • UnrealKeyFrameImportConfig
      • VertexBoneWeightLimitConfig
      • VertexCacheSizeConfig
      • XFileUseDoublesConfig
    • SharpAssimp.Unmanaged
      • AiAnimMesh
      • AiAnimation
      • AiBone
      • AiCamera
      • AiConfigs
      • AiDefines
      • AiExportDataBlob
      • AiExportFormatDesc
      • AiFace
      • AiFile
      • AiFileCloseProc
      • AiFileFlushProc
      • AiFileIO
      • AiFileOpenProc
      • AiFileReadProc
      • AiFileSeek
      • AiFileTellProc
      • AiFileWriteProc
      • AiImporterDesc
      • AiLight
      • AiLogStream
      • AiLogStreamCallback
      • AiMatKeys
      • AiMaterial
      • AiMaterialProperty
      • AiMemoryInfo
      • AiMesh
      • AiMeshAnim
      • AiMeshColorArray
      • AiMeshMorphAnim
      • AiMeshMorphKey
      • AiMeshTextureCoordinateArray
      • AiMeshUVComponentArray
      • AiMetadata
      • AiMetadataEntry
      • AiNode
      • AiNodeAnim
      • AiScene
      • AiString
      • AiTexture
      • AssimpLibrary
      • Platform
      • UnmanagedFunctionNameAttribute
      • UnmanagedLibrary
      • UnmanagedLibraryResolver

    Class MaterialProperty

    A key-value pairing that represents some material property.

    Inheritance
    object
    MaterialProperty
    Implements
    IMarshalable<MaterialProperty, AiMaterialProperty>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SharpAssimp
    Assembly: SharpAssimp.dll
    Syntax
    public sealed class MaterialProperty : IMarshalable<MaterialProperty, AiMaterialProperty>

    Constructors

    | Edit this page View Source

    MaterialProperty()

    Constructs a new instance of the MaterialProperty class.

    Declaration
    public MaterialProperty()
    | Edit this page View Source

    MaterialProperty(string, bool)

    Constructs a new instance of the MaterialProperty class. Constructs a boolean property.

    Declaration
    public MaterialProperty(string baseName, bool value)
    Parameters
    Type Name Description
    string baseName

    Name of the property

    bool value

    Property value

    | Edit this page View Source

    MaterialProperty(string, byte[])

    Constructs a new instance of the MaterialProperty class. Constructs a buffer property.

    Declaration
    public MaterialProperty(string baseName, byte[] buffer)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    byte[] buffer

    Property value

    | Edit this page View Source

    MaterialProperty(string, int)

    Constructs a new instance of the MaterialProperty class. Constructs an integer property.

    Declaration
    public MaterialProperty(string baseName, int value)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    int value

    Property value

    | Edit this page View Source

    MaterialProperty(string, int[])

    Constructs a new instance of the MaterialProperty class. Creates a int array property.

    Declaration
    public MaterialProperty(string baseName, int[] values)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    int[] values

    Property values

    | Edit this page View Source

    MaterialProperty(string, Vector3)

    Constructs a new instance of the MaterialProperty class. Creates a Vector3 property.

    Declaration
    public MaterialProperty(string baseName, Vector3 value)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    Vector3 value

    Property value

    | Edit this page View Source

    MaterialProperty(string, Vector4)

    Constructs a new instance of the MaterialProperty class. Creates a Vector4 property.

    Declaration
    public MaterialProperty(string baseName, Vector4 value)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    Vector4 value

    Property value

    | Edit this page View Source

    MaterialProperty(string, float)

    Constructs a new instance of the MaterialProperty class. Constructs a float property.

    Declaration
    public MaterialProperty(string baseName, float value)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    float value

    Property value

    | Edit this page View Source

    MaterialProperty(string, float[])

    Constructs a new instance of the MaterialProperty class. Creates a float array property.

    Declaration
    public MaterialProperty(string baseName, float[] values)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    float[] values

    Property values

    | Edit this page View Source

    MaterialProperty(string, string)

    Constructs a new instance of the MaterialProperty class. Creates a string property.

    Declaration
    public MaterialProperty(string baseName, string value)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    string value

    Property value

    | Edit this page View Source

    MaterialProperty(string, string, TextureType, int)

    Constructs a new instance of the MaterialProperty class. Creates a texture property.

    Declaration
    public MaterialProperty(string baseName, string value, TextureType texType, int textureIndex)
    Parameters
    Type Name Description
    string baseName

    Base name of the property

    string value

    Property value

    TextureType texType

    Texture type

    int textureIndex

    Texture index

    Properties

    | Edit this page View Source

    ByteCount

    Gets the raw byte data count.

    Declaration
    public int ByteCount { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    FullyQualifiedName

    Gets the property's fully qualified name. Format: "{base name},{texture type semantic},{texture index}". E.g. "$clr.diffuse,0,0". This is the key that is used to index the property in the material property map.

    Declaration
    public string FullyQualifiedName { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    HasRawData

    Checks if the property has data.

    Declaration
    public bool HasRawData { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Name

    Gets or sets the property key name. E.g. $tex.file. This corresponds to the "AiMatKeys" base name constants.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    PropertyType

    Gets or sets the type of property.

    Declaration
    public PropertyType PropertyType { get; set; }
    Property Value
    Type Description
    PropertyType
    | Edit this page View Source

    RawData

    Gets the raw byte data. To modify/read this data, see the Get/SetXXXValue methods.

    Declaration
    public byte[]? RawData { get; }
    Property Value
    Type Description
    byte[]
    | Edit this page View Source

    TextureIndex

    Gets or sets the texture index, for non-texture properties this is always zero.

    Declaration
    public int TextureIndex { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    TextureType

    Gets or sets the texture type semantic, for non-texture properties this is always None.

    Declaration
    public TextureType TextureType { get; set; }
    Property Value
    Type Description
    TextureType

    Methods

    | Edit this page View Source

    FreeNative(nint, bool)

    Frees unmanaged memory created by ToNative(nint, out Native).

    Declaration
    public static void FreeNative(nint nativeValue, bool freeNative)
    Parameters
    Type Name Description
    nint nativeValue

    Native value to free

    bool freeNative

    True if the unmanaged memory should be freed, false otherwise.

    | Edit this page View Source

    GetBooleanValue()

    Gets the property raw data as a boolean.

    Declaration
    public bool GetBooleanValue()
    Returns
    Type Description
    bool

    Boolean

    | Edit this page View Source

    GetDoubleArrayValue()

    Gets the property raw data as a double array.

    Declaration
    public double[]? GetDoubleArrayValue()
    Returns
    Type Description
    double[]

    Double array

    | Edit this page View Source

    GetDoubleValue()

    Gets the property raw data as a double.

    Declaration
    public double GetDoubleValue()
    Returns
    Type Description
    double

    Double

    | Edit this page View Source

    GetFloatArrayValue()

    Gets the property raw data as a float array.

    Declaration
    public float[]? GetFloatArrayValue()
    Returns
    Type Description
    float[]

    Float array

    | Edit this page View Source

    GetFloatArrayValue(int)

    Gets the property raw data as a float array.

    Declaration
    public float[]? GetFloatArrayValue(int count)
    Parameters
    Type Name Description
    int count

    Number of elements to get

    Returns
    Type Description
    float[]

    Float array

    | Edit this page View Source

    GetFloatValue()

    Gets the property raw data as a float.

    Declaration
    public float GetFloatValue()
    Returns
    Type Description
    float

    Float

    | Edit this page View Source

    GetIntegerArrayValue()

    Gets the property raw data as an integer array.

    Declaration
    public int[]? GetIntegerArrayValue()
    Returns
    Type Description
    int[]

    Integer array

    | Edit this page View Source

    GetIntegerArrayValue(int)

    Gets the property raw data as an integer array.

    Declaration
    public int[]? GetIntegerArrayValue(int count)
    Parameters
    Type Name Description
    int count

    Number of elements to get

    Returns
    Type Description
    int[]

    Integer array

    | Edit this page View Source

    GetIntegerValue()

    Gets the property raw data as an integer.

    Declaration
    public int GetIntegerValue()
    Returns
    Type Description
    int

    Integer

    | Edit this page View Source

    GetStringValue()

    Gets the property raw data as a string.

    Declaration
    public string? GetStringValue()
    Returns
    Type Description
    string

    String

    | Edit this page View Source

    GetVector3Value()

    Gets the property raw data as a Vector3.

    Declaration
    public Vector3 GetVector3Value()
    Returns
    Type Description
    Vector3

    Vector3

    | Edit this page View Source

    GetVector4Value()

    Gets the property raw data as a Vector4.

    Declaration
    public Vector4 GetVector4Value()
    Returns
    Type Description
    Vector4

    Vector4

    | Edit this page View Source

    SetBooleanValue(bool)

    Sets the property raw data as a boolean.

    Declaration
    public bool SetBooleanValue(bool value)
    Parameters
    Type Name Description
    bool value

    Boolean value

    Returns
    Type Description
    bool

    True if successful, false otherwise

    | Edit this page View Source

    SetDoubleArrayValue(double[])

    Sets the property raw data as a double array.

    Declaration
    public bool SetDoubleArrayValue(double[] values)
    Parameters
    Type Name Description
    double[] values

    Values to set

    Returns
    Type Description
    bool

    True if successful, otherwise false

    | Edit this page View Source

    SetDoubleValue(double)

    Sets the property raw data with a double.

    Declaration
    public bool SetDoubleValue(double value)
    Parameters
    Type Name Description
    double value

    Double.

    Returns
    Type Description
    bool

    True if successful, false otherwise.

    | Edit this page View Source

    SetFloatArrayValue(float[])

    Sets the property raw data as a float array.

    Declaration
    public bool SetFloatArrayValue(float[] values)
    Parameters
    Type Name Description
    float[] values

    Values to set

    Returns
    Type Description
    bool

    True if successful, otherwise false

    | Edit this page View Source

    SetFloatValue(float)

    Sets the property raw data with a float.

    Declaration
    public bool SetFloatValue(float value)
    Parameters
    Type Name Description
    float value

    Float.

    Returns
    Type Description
    bool

    True if successful, false otherwise

    | Edit this page View Source

    SetIntegerArrayValue(int[])

    Sets the property raw data as an integer array.

    Declaration
    public bool SetIntegerArrayValue(int[] values)
    Parameters
    Type Name Description
    int[] values

    Values to set

    Returns
    Type Description
    bool

    True if successful, otherwise false

    | Edit this page View Source

    SetIntegerValue(int)

    Sets the property raw data as an integer.

    Declaration
    public bool SetIntegerValue(int value)
    Parameters
    Type Name Description
    int value

    Integer

    Returns
    Type Description
    bool

    True if successful, false otherwise

    | Edit this page View Source

    SetStringValue(string)

    Sets the property raw data as string.

    Declaration
    public bool SetStringValue(string value)
    Parameters
    Type Name Description
    string value

    String

    Returns
    Type Description
    bool

    True if successful, false otherwise

    | Edit this page View Source

    SetVector3Value(Vector3)

    Sets the property raw data as a Vector3.

    Declaration
    public bool SetVector3Value(Vector3 value)
    Parameters
    Type Name Description
    Vector3 value

    Vector3

    Returns
    Type Description
    bool

    True if successful, false otherwise

    | Edit this page View Source

    SetVector4Value(Vector4)

    Sets the property raw data as a Vector4.

    Declaration
    public bool SetVector4Value(Vector4 value)
    Parameters
    Type Name Description
    Vector4 value

    Vector4

    Returns
    Type Description
    bool

    True if successful, false otherwise

    Implements

    IMarshalable<Managed, Native>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2012-2020 Nicholas Woodfield, (c) 2024 Salvage, (c) 2025 Jérémy Ansel