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
| Name | Type | Access | Description |
|---|---|---|---|
Color | Vector3 | Read/Write | Gets or sets the color. |
LightType | LightType | Read/Write | Gets or sets the light type. |
CastLight | bool | Read/Write | Gets or sets the cast light. |
Intensity | double | Read/Write | Gets or sets the intensity. |
HotSpot | double | Read/Write | Gets or sets the hot spot. |
Falloff | double | Read/Write | Gets or sets the falloff. |
ConstantAttenuation | double | Read/Write | Gets or sets the constant attenuation. |
LinearAttenuation | double | Read/Write | Gets or sets the linear attenuation. |
QuadraticAttenuation | double | Read/Write | Gets or sets the quadratic attenuation. |
CastShadows | bool | Read/Write | Gets or sets the cast shadows. |
ShadowColor | Vector3 | Read/Write | Gets or sets the shadow color. |
RotationMode | RotationMode | Read/Write | Gets or sets the rotation mode. |
NearPlane | double | Read/Write | Gets or sets the near plane. |
FarPlane | double | Read/Write | Gets or sets the far plane. |
Aspect | double | Read/Write | Gets or sets the aspect. |
OrthoHeight | double | Read/Write | Gets or sets the ortho height. |
Up | Vector3 | Read/Write | Gets or sets the up. |
LookAt | Vector3 | Read/Write | Gets or sets the look at. |
Direction | Vector3 | Read/Write | Gets or sets the direction. |
Target | Node | Read/Write | Gets or sets the target. |
Excluded | bool | Read/Write | Gets or sets the excluded. |
ParentNodes | List<Node> | Read | Gets the parent nodes. |
ParentNode | Node | Read/Write | Gets or sets the parent node. |
Scene | Scene | Read | Gets the scene. |
Name | string | Read/Write | Gets or sets the name. |
Properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
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) |