Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "composant.hpp"
- //Point
- Point::Point():m_Xp(0),m_Yp(0),m_Zp(0){ //Point constructor
- }
- void Point::SetLocation(int x,int y,int z){
- m_Xp = x;
- m_Yp = y;
- m_Zp = z;
- }
- int Point::getXp(){
- return m_Xp;
- }
- int Point::getYp(){
- return m_Yp;
- }
- int Point::getZp(){
- return m_Zp;
- }
- //Vecteur
- Vecteur::Vecteur():m_Xv(0),m_Yv(0),m_Zv(0){ //Vecteur constructor
- }
- void Vecteur::SetDirection(int x,int y,int z){
- m_Xv = x;
- m_Yv = y;
- m_Zv = z;
- }
- void Vecteur::SetDirectionBP(Point point1,Point point2){
- m_Xv = point2.getYp() - point1.getYp();
- m_Yv = point2.getYp() - point1.getYp();
- m_Yv = point2.getYp() - point1.getYp();
- }
- int Vecteur::getXv(){
- return m_Xv;
- }
- int Vecteur::getYv(){
- return m_Yv;
- }
- int Vecteur::getZv(){
- return m_Zv;
- }
- //Face
- Face::Face(){ //Face constructor
- vecteur1 = new Vecteur();
- vecteur2 = new Vecteur();
- }
- Face::~Face(){ //Face constructor
- delete vecteur1;
- delete vecteur2;
- }
- void Face::SetComp(Vecteur vec1,Vecteur vec2){
- *vecteur1 = vec1;
- *vecteur2 = vec2;
- }
- //Camera
- Camera::Camera():m_Xc(),m_Yc(),m_Zc(){
- direction = new Vecteur();
- }
- void Camera::SetDirection(int x, int y, int z){
- direction->SetDirection( x, y, z);
- }
- void Camera::SetLocation(int x, int y, int z){
- m_Xc = x;
- m_Yc = y;
- m_Zc = z;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement