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

Represents a material that uses a Phong reflection model to determine the colour of the material based on the light sources that hit it. More...

Inheritance diagram for VectSharp.ThreeD.PhongMaterial:

Public Member Functions

 PhongMaterial (Colour colour)
 Creates a new PhongMaterial instance. More...
 
Colour GetColour (Point3D point, NormalizedVector3D surfaceNormal, Camera camera, IList< ILightSource > lights, IList< double > obstructions)
 Obtains the Colour at the specified point.
Parameters
pointThe point whose colour should be determined.
surfaceNormalThe normal to the surface at the specified point .
cameraThe camera being used to render the scene.
lightsA list of light sources that are present in the scene.
obstructionsA list of values indicating how obstructed each light source is.
Returns
The Colour of the specified point.
More...
 
Colour GetColour (Point3D point, NormalizedVector3D surfaceNormal, Camera camera, IList< ILightSource > lights, IList< double > obstructions)
 Obtains the Colour at the specified point. More...
 

Properties

Colour Colour [get]
 The base colour of the material. More...
 
double AmbientReflectionCoefficient = 1 [get, set]
 A coefficient determining how much ambient light is reflected by the material. More...
 
double DiffuseReflectionCoefficient = 1 [get, set]
 A coefficient determining how much directional light is reflected by the material. More...
 
double SpecularReflectionCoefficient = 1 [get, set]
 A coefficient determining the intensity of specular highlights. More...
 
double SpecularShininess = 1 [get, set]
 A coefficient determining the extent of specular highlights. More...
 

Detailed Description

Represents a material that uses a Phong reflection model to determine the colour of the material based on the light sources that hit it.

Definition at line 74 of file Materials.cs.

Constructor & Destructor Documentation

◆ PhongMaterial()

VectSharp.ThreeD.PhongMaterial.PhongMaterial ( Colour  colour)

Creates a new PhongMaterial instance.

Parameters
colourThe base colour of the material.

Definition at line 111 of file Materials.cs.

Member Function Documentation

◆ GetColour()

Colour VectSharp.ThreeD.PhongMaterial.GetColour ( Point3D  point,
NormalizedVector3D  surfaceNormal,
Camera  camera,
IList< ILightSource lights,
IList< double >  obstructions 
)

Obtains the Colour at the specified point.

Parameters
pointThe point whose colour should be determined.
surfaceNormalThe normal to the surface at the specified point .
cameraThe camera being used to render the scene.
lightsA list of light sources that are present in the scene.
obstructionsA list of values indicating how obstructed each light source is.
Returns
The Colour of the specified point.

Implements VectSharp.ThreeD.IMaterial.

Definition at line 142 of file Materials.cs.

Property Documentation

◆ AmbientReflectionCoefficient

double VectSharp.ThreeD.PhongMaterial.AmbientReflectionCoefficient = 1
getset

A coefficient determining how much ambient light is reflected by the material.

Definition at line 90 of file Materials.cs.

◆ Colour

Colour VectSharp.ThreeD.PhongMaterial.Colour
get

The base colour of the material.

Definition at line 79 of file Materials.cs.

◆ DiffuseReflectionCoefficient

double VectSharp.ThreeD.PhongMaterial.DiffuseReflectionCoefficient = 1
getset

A coefficient determining how much directional light is reflected by the material.

Definition at line 95 of file Materials.cs.

◆ SpecularReflectionCoefficient

double VectSharp.ThreeD.PhongMaterial.SpecularReflectionCoefficient = 1
getset

A coefficient determining the intensity of specular highlights.

Definition at line 100 of file Materials.cs.

◆ SpecularShininess

double VectSharp.ThreeD.PhongMaterial.SpecularShininess = 1
getset

A coefficient determining the extent of specular highlights.

Definition at line 105 of file Materials.cs.


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