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

Represents a point light source with a stencil in front of it. More...

Inheritance diagram for VectSharp.ThreeD.MaskedLightSource:

Public Member Functions

 MaskedLightSource (double intensity, Point3D position, NormalizedVector3D direction, double distance, GraphicsPath mask, double maskOrientation, double triangulationResolution)
 Creates a new MaskedLightSource by triangulating the specified GraphicsPath. More...
 
 MaskedLightSource (double intensity, Point3D position, NormalizedVector3D direction, double distance, IEnumerable< GraphicsPath > triangulatedMask, double maskOrientation)
 Creates a new MaskedLightSource using the specified triangulatedMask . 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]
 The position of the light source. More...
 
Point3D Origin [get]
 The projection of the Position on the mask plane along the light's Direction. More...
 
NormalizedVector3D Direction [get]
 The direction of the light. More...
 
double Distance [get]
 The distance between the light source and the mask plane. More...
 
double Intensity [get, set]
 The base intensity of the light. 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 away from the light's axis. Set to 0 to disable angular attenuation. More...
 
- Properties inherited from VectSharp.ThreeD.ILightSource
bool CastsShadow [get]
 Determines whether the light casts a shadow or not. More...
 

Detailed Description

Represents a point light source with a stencil in front of it.

Definition at line 385 of file Lights.cs.

Constructor & Destructor Documentation

◆ MaskedLightSource() [1/2]

VectSharp.ThreeD.MaskedLightSource.MaskedLightSource ( double  intensity,
Point3D  position,
NormalizedVector3D  direction,
double  distance,
GraphicsPath  mask,
double  maskOrientation,
double  triangulationResolution 
)

Creates a new MaskedLightSource by triangulating the specified GraphicsPath.

Parameters
intensityThe base intensity of the light.
positionThe position of the light source.
directionThe direction of the light.
distanceThe distance between the light source and the mask plane.
maskA GraphicsPath representing the transparent part of the mask.
maskOrientationAn angle in radians determining the orientation of the 2D mask in the mask plane.
triangulationResolutionThe resolution to use to triangulate the mask .

Definition at line 437 of file Lights.cs.

◆ MaskedLightSource() [2/2]

VectSharp.ThreeD.MaskedLightSource.MaskedLightSource ( double  intensity,
Point3D  position,
NormalizedVector3D  direction,
double  distance,
IEnumerable< GraphicsPath triangulatedMask,
double  maskOrientation 
)

Creates a new MaskedLightSource using the specified triangulatedMask .

Parameters
intensityThe base intensity of the light.
positionThe position of the light source.
directionThe direction of the light.
distanceThe distance between the light source and the mask plane.
triangulatedMaskA collection of GraphicsPaths representing the transparent part of the mask. Each GraphicsPath should represent a single triangle.
maskOrientationAn angle in radians determining the orientation of the 2D mask in the mask plane.

Definition at line 451 of file Lights.cs.

Member Function Documentation

◆ GetLightAt()

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

◆ GetObstruction()

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

Property Documentation

◆ AngleAttenuationExponent

double VectSharp.ThreeD.MaskedLightSource.AngleAttenuationExponent = 1
getset

An exponent determining how fast the light attenuates away from the light's axis. Set to 0 to disable angular attenuation.

Definition at line 425 of file Lights.cs.

◆ CastsShadow

bool VectSharp.ThreeD.MaskedLightSource.CastsShadow = true
getset

Determines whether the light casts a shadow or not.

Implements VectSharp.ThreeD.ILightSource.

Definition at line 388 of file Lights.cs.

◆ Direction

NormalizedVector3D VectSharp.ThreeD.MaskedLightSource.Direction
get

The direction of the light.

Definition at line 403 of file Lights.cs.

◆ Distance

double VectSharp.ThreeD.MaskedLightSource.Distance
get

The distance between the light source and the mask plane.

Definition at line 408 of file Lights.cs.

◆ DistanceAttenuationExponent

double VectSharp.ThreeD.MaskedLightSource.DistanceAttenuationExponent = 2
getset

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

Definition at line 420 of file Lights.cs.

◆ Intensity

double VectSharp.ThreeD.MaskedLightSource.Intensity
getset

The base intensity of the light.

Definition at line 415 of file Lights.cs.

◆ Origin

Point3D VectSharp.ThreeD.MaskedLightSource.Origin
get

The projection of the Position on the mask plane along the light's Direction.

Definition at line 398 of file Lights.cs.

◆ Position

Point3D VectSharp.ThreeD.MaskedLightSource.Position
get

The position of the light source.

Definition at line 393 of file Lights.cs.


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