Week8 [16/11] - [19/11]
Added Light Base Class Added AmbientLight, DirectionalLight and PointLight Classes Added Constructor to the Camera Class Added Light CoEff's to the Model Class Added Color Variables to Polygon3D Class Added Light Vector to hold the lights in the Rasteriser Added Camera Vector to hold multiple Cameras and Methods to set which is the current Added Lighting to the Rasterizer Added DrawSolidFlat method to the Rastorizer Added Bounds Check to the SharedTools for Int and Float values Added Color Enum Class Added Normalize Method to the Vector3D Class Renamed the TransformTools to SharedTools since adding more non transform methods to it
This commit is contained in:
22
Model.h
22
Model.h
@ -15,7 +15,7 @@ public:
|
||||
Model();
|
||||
~Model();
|
||||
|
||||
const vector<Polygon3D>& GetPolygons(void);
|
||||
vector<Polygon3D>& GetPolygons(void);
|
||||
const vector<Vertex>& GetVertices(void);
|
||||
const vector<Matrix>& GetPendingTransforms(void);
|
||||
|
||||
@ -28,9 +28,20 @@ public:
|
||||
void EnqueueTransform(Matrix transform);
|
||||
void ClearPendingTransforms();
|
||||
|
||||
const Polygon3D& GetPolygon(int index);
|
||||
const Vertex& GetVertex(int polygonIndex, int vertexPolygonIndex);
|
||||
const Vertex& GetVertex(int index);
|
||||
const Polygon3D& GetPolygon(int index) const;
|
||||
const Vertex& GetVertex(int polygonIndex, int vertexPolygonIndex) const;
|
||||
const Vertex& GetVertex(int index) const;
|
||||
|
||||
void SetReflectionCoefficient(float red, float green, float blue);
|
||||
void SetReflectionCoefficient(ColRef color, float value);
|
||||
void SetRedReflectionCoefficient(float value);
|
||||
void SetGreenReflectionCoefficient(float value);
|
||||
void SetBlueReflectionCoefficient(float value);
|
||||
|
||||
float GetReflectionCoefficient(ColRef color) const;
|
||||
float GetRedReflectionCoefficient() const;
|
||||
float GetGreenReflectionCoefficient() const;
|
||||
float GetBlueReflectionCoefficient() const;
|
||||
|
||||
void ApplyTransformToLocalVertices(const Matrix& transform);
|
||||
void ApplyTransformToTransformedVertices(const Matrix& transform);
|
||||
@ -45,5 +56,8 @@ private:
|
||||
vector<Vertex> _transformedVertices;
|
||||
vector<Matrix> _pendingTransforms;
|
||||
|
||||
float _kdRed;
|
||||
float _kdGreen;
|
||||
float _kdBlue;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user