VectSharp 2.6.1
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.ThreeD.AreaLightSource Class Reference

Represents a light source emitting light from a circular area. More...

Inheritance diagram for VectSharp.ThreeD.AreaLightSource:

Public Member Functions

 AreaLightSource (double intensity, Point3D center, double radius, double penumbraRadius, NormalizedVector3D direction, double sourceDistance, int shadowSamplingPointCount)
 Creates a new AreaLightSource instance. More...
 
LightIntensity GetLightAt (Point3D point)
 Computes the light intensity at the specified point, without taking into account any obstructions.
Parameters
pointThe Point3DElement at which the light intensity should be computed.
Returns
More...
 
double GetObstruction (Point3D point, IEnumerable< Triangle3DElement > shadowingTriangles)
 Determines the amount of obstruction of the light that results at point due to the specified shadowingTriangles .
Parameters
pointThe Point3D at which the obstruction should be computed.
shadowingTrianglesA collection of Triangle3DElement casting shadows.
Returns
1 if the light is completely obstructed, 0 if the light is completely visible, a value between these if the light is partially obstructed.
More...
 
LightIntensity GetLightAt (Point3D point)
 Computes the light intensity at the specified point, without taking into account any obstructions. More...
 
double GetObstruction (Point3D point, IEnumerable< Triangle3DElement > shadowingTriangles)
 Determines the amount of obstruction of the light that results at point due to the specified shadowingTriangles . More...
 

Properties

bool CastsShadow = true [get, set]
 Determines whether the light casts a shadow or not. More...
 
Point3D Center [get]
 The centre of the light-emitting area. More...
 
NormalizedVector3D Direction [get]
 The direction of the light's main axis, i.e. the normal to the plane containing the light-emitting area. More...
 
double Radius [get]
 The radius of the light emitting area. More...
 
double PenumbraRadius [get]
 The radius of the penumbra area. More...
 
double Intensity [get, set]
 The base intensity of the light. More...
 
double SourceDistance [get]
 The distance between the focal point of the light and the light's Center. More...
 
double DistanceAttenuationExponent = 2 [get, set]
 An exponent determining how fast the light attenuates with increasing distance. Set to 0 to disable distance attenuation. More...
 
double PenumbraAttenuationExponent = 1 [get, set]
 An exponent determining how fast the light attenuates between the light-emitting area radius and the penumbra radius. More...
 
int ShadowSamplingPointCount [get]
 The number of points to use when determining the amount of light that is obstructed at a certain point. More...
 
- Properties inherited from VectSharp.ThreeD.ILightSource
bool CastsShadow [get]
 Determines whether the light casts a shadow or not. More...
 

Detailed Description

Represents a light source emitting light from a circular area.

Definition at line 579 of file Lights.cs.

Constructor & Destructor Documentation

◆ AreaLightSource()

VectSharp.ThreeD.AreaLightSource.AreaLightSource ( double  intensity,
Point3D  center,
double  radius,
double  penumbraRadius,
NormalizedVector3D  direction,
double  sourceDistance,
int  shadowSamplingPointCount 
)

Creates a new AreaLightSource instance.

Parameters
intensityThe base intensity of the light.
centerThe centre of the light-emitting area.
radiusThe radius of the light-emitting area.
penumbraRadiusThe radius of the penumbra area.
directionThe direction of the light.
sourceDistanceThe distance between the focal point of the light and the light's center.
shadowSamplingPointCountThe number of points to use when determining the amount of light that is obstructed at a certain point.

Definition at line 643 of file Lights.cs.

Member Function Documentation

◆ GetLightAt()

LightIntensity VectSharp.ThreeD.AreaLightSource.GetLightAt ( Point3D  point)

Computes the light intensity at the specified point, without taking into account any obstructions.

Parameters
pointThe Point3DElement at which the light intensity should be computed.
Returns

Implements VectSharp.ThreeD.ILightSource.

Definition at line 690 of file Lights.cs.

◆ GetObstruction()

double VectSharp.ThreeD.AreaLightSource.GetObstruction ( Point3D  point,
IEnumerable< Triangle3DElement >  shadowingTriangles 
)

Determines the amount of obstruction of the light that results at point due to the specified shadowingTriangles .

Parameters
pointThe Point3D at which the obstruction should be computed.
shadowingTrianglesA collection of Triangle3DElement casting shadows.
Returns
1 if the light is completely obstructed, 0 if the light is completely visible, a value between these if the light is partially obstructed.

Implements VectSharp.ThreeD.ILightSource.

Definition at line 763 of file Lights.cs.

Property Documentation

◆ CastsShadow

bool VectSharp.ThreeD.AreaLightSource.CastsShadow = true
getset

Determines whether the light casts a shadow or not.

Implements VectSharp.ThreeD.ILightSource.

Definition at line 582 of file Lights.cs.

◆ Center

Point3D VectSharp.ThreeD.AreaLightSource.Center
get

The centre of the light-emitting area.

Definition at line 587 of file Lights.cs.

◆ Direction

NormalizedVector3D VectSharp.ThreeD.AreaLightSource.Direction
get

The direction of the light's main axis, i.e. the normal to the plane containing the light-emitting area.

Definition at line 594 of file Lights.cs.

◆ DistanceAttenuationExponent

double VectSharp.ThreeD.AreaLightSource.DistanceAttenuationExponent = 2
getset

An exponent determining how fast the light attenuates with increasing distance. Set to 0 to disable distance attenuation.

Definition at line 619 of file Lights.cs.

◆ Intensity

double VectSharp.ThreeD.AreaLightSource.Intensity
getset

The base intensity of the light.

Definition at line 609 of file Lights.cs.

◆ PenumbraAttenuationExponent

double VectSharp.ThreeD.AreaLightSource.PenumbraAttenuationExponent = 1
getset

An exponent determining how fast the light attenuates between the light-emitting area radius and the penumbra radius.

Definition at line 624 of file Lights.cs.

◆ PenumbraRadius

double VectSharp.ThreeD.AreaLightSource.PenumbraRadius
get

The radius of the penumbra area.

Definition at line 604 of file Lights.cs.

◆ Radius

double VectSharp.ThreeD.AreaLightSource.Radius
get

The radius of the light emitting area.

Definition at line 599 of file Lights.cs.

◆ ShadowSamplingPointCount

int VectSharp.ThreeD.AreaLightSource.ShadowSamplingPointCount
get

The number of points to use when determining the amount of light that is obstructed at a certain point.

Definition at line 629 of file Lights.cs.

◆ SourceDistance

double VectSharp.ThreeD.AreaLightSource.SourceDistance
get

The distance between the focal point of the light and the light's Center.

Definition at line 614 of file Lights.cs.


The documentation for this class was generated from the following file: