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

Represents a conic spotlight. More...

Inheritance diagram for VectSharp.ThreeD.SpotlightLightSource:

Public Member Functions

 SpotlightLightSource (double intensity, Point3D position, NormalizedVector3D direction, double beamWidthAngle, double cutoffAngle)
 Creates a new SpotlightLightSource 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 Position [get, set]
 The position of the light source. More...
 
NormalizedVector3D Direction [get, set]
 The direction of the cone axis. More...
 
double Intensity [get, set]
 The base intensity of the light. More...
 
double BeamWidthAngle [get, set]
 The angular size of the light cone, in radians. More...
 
double CutoffAngle [get, set]
 The angular size of the cutoff cone, in radians. 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 AngleAttenuationExponent = 1 [get, set]
 An exponent determining how fast the light attenuates between the main light cone and the cutoff cone. More...
 
- Properties inherited from VectSharp.ThreeD.ILightSource
bool CastsShadow [get]
 Determines whether the light casts a shadow or not. More...
 

Detailed Description

Represents a conic spotlight.

Definition at line 256 of file Lights.cs.

Constructor & Destructor Documentation

◆ SpotlightLightSource()

VectSharp.ThreeD.SpotlightLightSource.SpotlightLightSource ( double  intensity,
Point3D  position,
NormalizedVector3D  direction,
double  beamWidthAngle,
double  cutoffAngle 
)

Creates a new SpotlightLightSource instance.

Parameters
intensityThe intensity of the light.
positionThe position of the light source.
directionThe direction of the cone's axis.
beamWidthAngleThe angular size of the light cone, in radians.
cutoffAngleThe angular size of the cutoff cone, in radians.

Definition at line 304 of file Lights.cs.

Member Function Documentation

◆ GetLightAt()

LightIntensity VectSharp.ThreeD.SpotlightLightSource.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 314 of file Lights.cs.

◆ GetObstruction()

double VectSharp.ThreeD.SpotlightLightSource.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 362 of file Lights.cs.

Property Documentation

◆ AngleAttenuationExponent

double VectSharp.ThreeD.SpotlightLightSource.AngleAttenuationExponent = 1
getset

An exponent determining how fast the light attenuates between the main light cone and the cutoff cone.

Definition at line 294 of file Lights.cs.

◆ BeamWidthAngle

double VectSharp.ThreeD.SpotlightLightSource.BeamWidthAngle
getset

The angular size of the light cone, in radians.

Definition at line 279 of file Lights.cs.

◆ CastsShadow

bool VectSharp.ThreeD.SpotlightLightSource.CastsShadow = true
getset

Determines whether the light casts a shadow or not.

Implements VectSharp.ThreeD.ILightSource.

Definition at line 259 of file Lights.cs.

◆ CutoffAngle

double VectSharp.ThreeD.SpotlightLightSource.CutoffAngle
getset

The angular size of the cutoff cone, in radians.

Definition at line 284 of file Lights.cs.

◆ Direction

NormalizedVector3D VectSharp.ThreeD.SpotlightLightSource.Direction
getset

The direction of the cone axis.

Definition at line 269 of file Lights.cs.

◆ DistanceAttenuationExponent

double VectSharp.ThreeD.SpotlightLightSource.DistanceAttenuationExponent = 2
getset

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

Definition at line 289 of file Lights.cs.

◆ Intensity

double VectSharp.ThreeD.SpotlightLightSource.Intensity
getset

The base intensity of the light.

Definition at line 274 of file Lights.cs.

◆ Position

Point3D VectSharp.ThreeD.SpotlightLightSource.Position
getset

The position of the light source.

Definition at line 264 of file Lights.cs.


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