All Frameworks Class Hierarchy This Framework Previous Next Indexes
VisualizationBase Class CATGraphicMaterial
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---System.CATEventSubscriber
|
+---CATGraphicMaterial
Usage: you must use this class as is. You should never derive it.
public class CATGraphicMaterial
Class to create graphic material used to increase visual realism.
Usage of this class requires basic knowledge of OpenGL.
Constructor and Destructor Index
- o
CATGraphicMaterial()
- Constructs a default graphic material.
- o
CATGraphicMaterial(CATGraphicMaterial&)
- Copy constructor.
- o
CATGraphicMaterial(CATTexturePixelImage*,CATTextureFunction,CATTextureFilter,CATTextureFilter,CATMappingFunction,CATTextureWrapping,CATTextureWrapping,float*,CATMappingOperator*)
- Constructs a graphic material.
- o
CATGraphicMaterial(float*,float*,float*,float,float,float,float,float,float)
- Constructs a graphic material.
Method Index
- o
AddReference()
- Increments the reference counter of the graphic material.
- o
GetCoefficient(CATCoefficientType)
- Returns the multiplication factors of the graphic material.
- o
GetColor(CATColorType,float&,float&,float&)
- Sets the color components of the material.
- o
GetMappingOperator()
- Returns the mapping operator associated to the graphic material.
- o
GetMaterialPropertiesActivation()
- Returns the activation mode of the graphic material.
- o
GetReferenceNumber()
- Returns the reference counter value of the graphic material.
- o
GetTextureImage()
- Returns the texture of the graphic material.
- o
SetCoefficient(CATCoefficientType,float)
- Sets the multiplication factors of the graphic material.
- o
SetColor(CATColorType,float,float,float)
- Sets the color components of the material.
- o
SetMappingOperator(CATMappingOperator*)
- Sets the mapping operator associated to the graphic material.
- o
SetMaterialPropertiesActivation(int)
- Activates the graphic material.
- o
SetTextureImage(CATTexturePixelImage*)
- Sets the texture of the graphic material.
- o
SubReference()
- Decrements the reference counter of the graphic material.
- o
operator =(CATGraphicMaterial&)
- Assignement operator.
Constructor and Destructor
o CATGraphicMaterial
public CATGraphicMaterial( | ) |
-
Constructs a default graphic material.
o CATGraphicMaterial
-
Copy constructor.
o CATGraphicMaterial
-
Constructs a graphic material.
- Parameters:
-
- iImage
- Texture to be applied with the graphic material.
- iFunction
- Application mode of the texture.
- iMagnification
- Texture filtering mode for magnification (CATNearest or CATLinear).
- iMinification
- Texture filtering mode for minification (Any).
- iMappingFunction
- Mapping function for the texture.
- iSValue
- Wrapping mode along the horizontal direction of the texture.
- iTValue
- Wrapping mode along the vertical direction of the texture.
- iBlendColor
- array of 4 float values in the range [0,1].
- iOperator
- User mapping operator for texture coordinates calculations.
o CATGraphicMaterial
public CATGraphicMaterial( | const float* | iAmbientColor, |
| const float* | iDiffuseColor, |
| const float* | iSpecularColor, |
| const float | iSpecExponent | = .5859, |
| const float | iAmbientCoef | = 1.0, |
| const float | iDiffuseCoef | = 1.0, |
| const float | iSpecularCoef | = 1.0, |
| const float | iTransparencyCoef | = 0.0, |
| const float | iReflectivityCoef | = 0.0) |
-
Constructs a graphic material.
- Parameters:
-
- iAmbientColor
- array of 4 float values in the range [0,1]
corresponding to the red, green, blue and alpha channels.
- iDiffuseColor
- array of 4 float values in the range [0,1]
corresponding to the red, green, blue and alpha channels.
- iSpecularColor
- array of 4 float values in the range [0,1]
corresponding to the red, green, blue and alpha channels.
- iSpecExponent
- Exponent value used for specular calculations.
- iAmbientCoef
- Multiplication factor applied iAmbientColor.
- iDiffuseCoef
- Multiplication factor applied iDiffuseColor.
- iSpecularCoef
- Multiplication factor applied iSpecularColor.
- iTransparencyCoef
- float value in the range [0,1].
value 0 is totally opaque, value 1 is totally transparent.
- iReflectivityCoef
- float value in the range [0,1].
value 0 indicate no reflection, value 1 indicates total reflection.
Methods
o AddReference
public void AddReference( | ) |
-
Increments the reference counter of the graphic material.
o GetCoefficient
-
Returns the multiplication factors of the graphic material.
- Parameters:
-
- iParam
- indicates which multiplication factor is returned.
o GetColor
public virtual void GetColor( | const CATColorType | iParam, |
| float& | oRed, |
| float& | oGreen, |
| float& | oBlue) const |
-
Sets the color components of the material.
- Parameters:
-
- iParam
- To indicate ambient, diffuse or specular color component.
- iRed
- Red channel of given color component.
- iGreen
- Green channel of given color component.
- iBlue
- Blue channel of given color component.
o GetMappingOperator
-
Returns the mapping operator associated to the graphic material.
o GetMaterialPropertiesActivation
public int GetMaterialPropertiesActivation( | )const |
-
Returns the activation mode of the graphic material.
o GetReferenceNumber
public int GetReferenceNumber( | )const |
-
Returns the reference counter value of the graphic material.
o GetTextureImage
-
Returns the texture of the graphic material.
o SetCoefficient
-
Sets the multiplication factors of the graphic material.
- Parameters:
-
- iParam
- indicates which multiplication factor is set.
- iValue
- Value in the range [0,1].
o SetColor
public virtual void SetColor( | const CATColorType | iParam, |
| float | iRed, |
| float | iGreen, |
| float | iBlue) |
-
Sets the color components of the material.
- Parameters:
-
- iParam
- To indicate ambient, diffuse or specular color component.
- iRed
- Red channel of given color component.
- iGreen
- Green channel of given color component.
- iBlue
- Blue channel of given color component.
o SetMappingOperator
-
Sets the mapping operator associated to the graphic material.
- Parameters:
-
- iOperator
- Mapping operator used to calculate texture coordinates.
o SetMaterialPropertiesActivation
public void SetMaterialPropertiesActivation( | const int | iMode) |
-
Activates the graphic material.
- Parameters:
-
- iMode
-
- 0 : color is retrieved from the graphic attributes of the associated representation.
- 1 : color is retrieved from the graphic material.
o SetTextureImage
-
Sets the texture of the graphic material.
- Parameters:
-
- iTexture
- New texture to be used afterwards.
o SubReference
public void SubReference( | ) |
-
Decrements the reference counter of the graphic material.
o operator =
-
Assignement operator.
This object is included in the file: CATGraphicMaterial.h
If needed, your Imakefile.mk should include the module: CATViz