• 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 Light

    Describes a light source in the scene. Assimp supports multiple light sources including spot, point, and directional lights. All are defined by a single structure and distinguished by their parameters. Lights have corresponding nodes in the scenegraph.

    Some file formats such as 3DS and ASE export a "target point", e.g. the point a spot light is looking at (it can even be animated). Assimp writes the target point as a subnode of a spotlight's main node called "spotName.Target". However, this is just additional information then, the transform tracks of the main node make the spot light already point in the right direction.

    Inheritance
    object
    Light
    Implements
    IMarshalable<Light, AiLight>
    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 Light : IMarshalable<Light, AiLight>

    Constructors

    | Edit this page View Source

    Light()

    Constructs a new instance of the Light class.

    Declaration
    public Light()

    Properties

    | Edit this page View Source

    AngleInnerCone

    Gets or sets the inner angle of a spot light's light cone. The spot light has maximum influence on objects inside this angle. The angle is given in radians, it is 2PI for point lights and defined for directional lights.

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

    AngleOuterCone

    Gets or sets the outer angle of a spot light's light cone. The spot light does not affect objects outside this angle. The angle is given in radians. It is 2PI for point lights and undefined for directional lights. The outer angle must be greater than or equal to the inner angle.

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

    AreaSize

    Gets or sets the Width (X) and Height (Y) of the area that represents an Area light.

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

    AttenuationConstant

    Gets or sets the constant light attenuation factor. The intensity of the light source at a given distance 'd' from the light position is

    Atten = 1 / (att0 + att1 * d + att2 * d*d)
    .

    This member corresponds to the att0 variable in the equation and is undefined for directional lights.

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

    AttenuationLinear

    Gets or sets the linear light attenuation factor. The intensity of the light source at a given distance 'd' from the light position is

    Atten = 1 / (att0 + att1 * d + att2 * d*d)

    This member corresponds to the att1 variable in the equation and is undefined for directional lights.

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

    AttenuationQuadratic

    Gets or sets the quadratic light attenuation factor. The intensity of the light source at a given distance 'd' from the light position is

    Atten = 1 / (att0 + att1 * d + att2 * d*d)
    .

    This member corresponds to the att2 variable in the equation and is undefined for directional lights.

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

    ColorAmbient

    Gets or sets the ambient color of the light source. The ambient light color is multiplied with the ambient material color to obtain the final color that contributes to the ambient shading term.

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

    ColorDiffuse

    Gets or sets the diffuse color of the light source. The diffuse light color is multiplied with the diffuse material color to obtain the final color that contributes to the diffuse shading term.

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

    ColorSpecular

    Gets or sets the specular color of the light source. The specular light color is multiplied with the specular material color to obtain the final color that contributes to the specular shading term.

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

    Direction

    Gets or sets the direction of the light source in space, relative to the transformation of the node corresponding to the light. This is undefined for point lights.

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

    LightType

    Gets or sets the type of light source. This should never be undefined.

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

    Name

    Gets or sets the name of the light source. This corresponds to a node present in the scenegraph.

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

    Position

    Gets or sets the position of the light source in space, relative to the transformation of the node corresponding to the light. This is undefined for directional lights.

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

    Up

    Gets or sets the up vector of the light source in space, relative to the transformation of the node corresponding to the light. This is undefined for point lights.

    Declaration
    public Vector3 Up { get; set; }
    Property Value
    Type Description
    Vector3

    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.

    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