[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

aeMaterial Class Reference

This class represents a material that can be applied onto an object. More...

#include <material.h>

Inheritance diagram for aeMaterial:

aeBase List of all members.

Public Member Functions

 aeMaterial ()
 Create a empty material.

 aeMaterial (char *, aeTexture *)
 Create a material given a name and a primary texture.

 aeMaterial (char *, aeTexture *, aeTexture *)
 Createa a material given a name and a primary texture and a secondary texture.

char * getName () const
 Get the material's name.

aeTexturegetPrimaryTexture () const
 Get The primary texture of this material.

aeTexturegetSecondaryTexture () const
 Get the secondary texture of this material.

void addTexture (aeTexture *)
 Add a texture to this material.

void setPrimaryTexture (aeTexture *)
 Set the primary texture of this material.

void setSecondaryTexture (aeTexture *)
 Set the secondary texture of this material.

unsigned int getTextureCount () const
 Get the texture count for this material.

bool hasPrimary () const
 Check if this material has a primary texture.

bool hasSecondary () const
 Check if this material has a secondary texture.


Private Attributes

aeTexturetex1
aeTexturetex2
int texCount
char * matName

Detailed Description

This class represents a material that can be applied onto an object.

Definition at line 33 of file material.h.


Constructor & Destructor Documentation

aeMaterial::aeMaterial  
 

Create a empty material.

aeMaterial::aeMaterial char *   ,
aeTexture  
 

Create a material given a name and a primary texture.

Parameters:
char * The material's name.
aeTexture * The material's primary texture.

aeMaterial::aeMaterial char *   ,
aeTexture  ,
aeTexture  
 

Createa a material given a name and a primary texture and a secondary texture.

Parameters:
char * The material's name.
aeTexture * The material's primary texture.
aeTexture * The material's secondary texture.


Member Function Documentation

void aeMaterial::addTexture aeTexture  
 

Add a texture to this material.

If the material is empty, the texture will be added as primary. If only primary texture is present, the texture will be added as secondary. If both primary and secondary textures are present this will simply do nothing.

Parameters:
aeTexture * The texture to add.

char* aeMaterial::getName   const [inline]
 

Get the material's name.

Returns:
The material's name.

Definition at line 73 of file material.h.

aeTexture* aeMaterial::getPrimaryTexture   const [inline]
 

Get The primary texture of this material.

Returns:
The primary texture.

Definition at line 81 of file material.h.

aeTexture* aeMaterial::getSecondaryTexture   const [inline]
 

Get the secondary texture of this material.

Returns:
The secondary texture.

Definition at line 89 of file material.h.

unsigned int aeMaterial::getTextureCount   const [inline]
 

Get the texture count for this material.

Can be either 0, 1, or 2.

Returns:
The texture count.

Definition at line 122 of file material.h.

bool aeMaterial::hasPrimary   const [inline]
 

Check if this material has a primary texture.

Returns:
True if the material has a primary texture.

Definition at line 130 of file material.h.

bool aeMaterial::hasSecondary   const [inline]
 

Check if this material has a secondary texture.

Returns:
True if the material has a secondary texture.

Definition at line 138 of file material.h.

void aeMaterial::setPrimaryTexture aeTexture  
 

Set the primary texture of this material.

Parameters:
aeTexture * The primary texture.

void aeMaterial::setSecondaryTexture aeTexture  
 

Set the secondary texture of this material.

Parameters:
aeTexture * The secondary texture.


The documentation for this class was generated from the following file:
AE Engine Public API Reference
Generated on Wed Apr 9 09:43:40 2003 by Doxygen.