Light

Overview

Light is a class in Aspose.3D FOSS for .NET. Inherits from: Frustum, INamedObject, IOrientable.

The light illuminates the scene. The formula to calculate the total attenuation of light is: A = ConstantAttenuation + (Dist * LinearAttenuation) + ((Dist^2) * QuadraticAttenuation)

This class provides 10 methods for working with Light objects in .NET programs. Available methods include: A3DObject, Entity, FindProperty, GetBoundingBox, GetEntityRendererKey, GetProperty, Light, RemoveProperty, SceneObject, SetProperty. All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package. Properties: Aspect, CastLight, CastShadows, Color, ConstantAttenuation, Direction, and 20 more.

Properties

NameTypeAccessDescription
ColorVector3Read/WriteGets or sets the color.
LightTypeLightTypeRead/WriteGets or sets the light type.
CastLightboolRead/WriteGets or sets the cast light.
IntensitydoubleRead/WriteGets or sets the intensity.
HotSpotdoubleRead/WriteGets or sets the hot spot.
FalloffdoubleRead/WriteGets or sets the falloff.
ConstantAttenuationdoubleRead/WriteGets or sets the constant attenuation.
LinearAttenuationdoubleRead/WriteGets or sets the linear attenuation.
QuadraticAttenuationdoubleRead/WriteGets or sets the quadratic attenuation.
CastShadowsboolRead/WriteGets or sets the cast shadows.
ShadowColorVector3Read/WriteGets or sets the shadow color.
RotationModeRotationModeRead/WriteGets or sets the rotation mode.
NearPlanedoubleRead/WriteGets or sets the near plane.
FarPlanedoubleRead/WriteGets or sets the far plane.
AspectdoubleRead/WriteGets or sets the aspect.
OrthoHeightdoubleRead/WriteGets or sets the ortho height.
UpVector3Read/WriteGets or sets the up.
LookAtVector3Read/WriteGets or sets the look at.
DirectionVector3Read/WriteGets or sets the direction.
TargetNodeRead/WriteGets or sets the target.
ExcludedboolRead/WriteGets or sets the excluded.
ParentNodesList<Node>ReadGets the parent nodes.
ParentNodeNodeRead/WriteGets or sets the parent node.
SceneSceneReadGets the scene.
NamestringRead/WriteGets or sets the name.
PropertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
Light()Sets the light’s Type and assigns the given name to the light
Light(name: string)
Light(name: string, type: LightType)
Entity(name: string)
GetBoundingBox()Gets the bounding box of current entity in its object space coordinate system.
GetEntityRendererKey()Gets the key of the entity renderer registered in the renderer
SceneObject(name: string)
A3DObject()
RemoveProperty(property: Property)Removes a dynamic property.
GetProperty(property: string)Get the value of specified property
SetProperty(property: string, value: object?)Sets the value of specified property
FindProperty(propertyName: string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

See Also