
Added active Variable to the Lights Classes Added updated MD2Loader Class Added Model Filename and Texture File Name to the Model Class Added Active Flag to the Model Class Added DrawMode to the Model Class Added Texture and UV Variables to the Model Class Added UV Coordinates to the Polygon3D Class Added DrawString method to the Rasterizer to write text to the screen space Added Interpolate and Lerp Methods to the Rasterizer Added Select statement for drawing a current models draw mode Added DrawTextured Method to the Rasterizer Class Added UVCoord Class Added Texture Class Added = operator to the Vector3D Class Added UVCoord to the Vertex Class Moved Models and Texture Files into a subfolder Fixed issue with textures not loading properly because of the vector address problem
41 lines
819 B
C++
41 lines
819 B
C++
#pragma once
|
|
#include <cmath>
|
|
|
|
class Vector3D
|
|
{
|
|
public:
|
|
Vector3D();
|
|
Vector3D(float x, float y, float z);
|
|
Vector3D(const Vector3D& other);
|
|
|
|
~Vector3D();
|
|
|
|
// Accessors
|
|
float GetX() const;
|
|
void SetX(const float x);
|
|
float GetY() const;
|
|
void SetY(const float y);
|
|
float GetZ() const;
|
|
void SetZ(const float z);
|
|
|
|
const void Normalize();
|
|
|
|
static float DotProduct(const Vector3D v1, const Vector3D v2);
|
|
static float Length(const Vector3D v1, const Vector3D v2);
|
|
static Vector3D CrossProduct(const Vector3D v1, const Vector3D v2);
|
|
|
|
Vector3D& operator= (const Vector3D& rhs);
|
|
|
|
const Vector3D operator+ (const Vector3D& rhs) const;
|
|
const Vector3D operator/ (const int rhs) const;
|
|
const Vector3D operator/ (const float rhs) const;
|
|
|
|
private:
|
|
float _x;
|
|
float _y;
|
|
float _z;
|
|
|
|
void Copy(const Vector3D& other);
|
|
};
|
|
|