Accueil > > > CLASS BOX
CLASS BOX
Information sur la source
Description
Class utilisé avec Opengl pour la création de cube 3D
Source
- /*-----------------------------------------------------------------------*/
- /* Generic Class Version 1.0
- /*-----------------------------------------------------------------------*/
- /* Copyright (c) 2000-2003 Nemesys Group
- /*-----------------------------------------------------------------------*/
- /* Authors: Picard Vincent <vincent@nemesys.tv>
- /*-----------------------------------------------------------------------*/
- /* Contact : <development@nemesys.tv>
- /*-----------------------------------------------------------------------*/
-
- #ifndef _Class_Box_h_
- #define _Class_Box_h_
-
- /**----------------------------------------------------------------------*/
- /* Class declaration
- /*----------------------------------------------------------------------**/
-
- class Box
- {
- private:
-
- int m_X;
- int m_Y;
- int m_Z;
-
- int m_Width;
- int m_Height;
- int m_Lenght;
-
- public:
-
- /*-------------------------------------------------------------------*/
-
- inline int getX() const {return m_X;}
- inline int getY() const {return m_Y;}
- inline int getZ() const {return m_Z;}
-
- inline int getWidth() const {return m_Width; }
- inline int getHeight()const {return m_Height;}
- inline int getLenght()const {return m_Lenght;}
-
- /*-------------------------------------------------------------------*/
-
- inline void setX(int vi_X){m_X=vi_X;}
- inline void setY(int vi_Y){m_Y=vi_Y;}
- inline void setZ(int vi_Y){m_Y=vi_Y;}
-
- inline void setWidth (int vi_Width) {m_Width=vi_Width; }
- inline void setHeight(int vi_Height){m_Height=vi_Height;}
- inline void setLenght(int vi_Lenght){m_Lenght=vi_Lenght;}
-
- /*-------------------------------------------------------------------*/
-
- inline void addX(int vi_X){m_X+=vi_X;}
- inline void addY(int vi_Y){m_Y+=vi_Y;}
- inline void addZ(int vi_Y){m_Y+=vi_Y;}
-
- inline void addWidth (int vi_Width) {m_Width +=vi_Width;}
- inline void addHeight(int vi_Height){m_Height+=vi_Height;}
- inline void addLenght(int vi_Lenght){m_Lenght+=vi_Lenght;}
-
- /*-------------------------------------------------------------------*/
-
- bool isInside(Box * vi_Box);
- bool isOutside(Box * vi_Box);
-
- /*-------------------------------------------------------------------*/
-
- Box();
- Box(Box * vi_Box);
- Box(Box & vi_Box);
- Box(int vi_Width, int vi_Height, int vi_Lenght, int vi_X, int vi_Y, int vi_Z);
-
- virtual ~Box();
- };
-
- #endif
-
- /*-----------------------------------------------------------------------*/
- /* End of file
- /*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
/* Generic Class Version 1.0
/*-----------------------------------------------------------------------*/
/* Copyright (c) 2000-2003 Nemesys Group
/*-----------------------------------------------------------------------*/
/* Authors: Picard Vincent <vincent@nemesys.tv>
/*-----------------------------------------------------------------------*/
/* Contact : <development@nemesys.tv>
/*-----------------------------------------------------------------------*/
#ifndef _Class_Box_h_
#define _Class_Box_h_
/**----------------------------------------------------------------------*/
/* Class declaration
/*----------------------------------------------------------------------**/
class Box
{
private:
int m_X;
int m_Y;
int m_Z;
int m_Width;
int m_Height;
int m_Lenght;
public:
/*-------------------------------------------------------------------*/
inline int getX() const {return m_X;}
inline int getY() const {return m_Y;}
inline int getZ() const {return m_Z;}
inline int getWidth() const {return m_Width; }
inline int getHeight()const {return m_Height;}
inline int getLenght()const {return m_Lenght;}
/*-------------------------------------------------------------------*/
inline void setX(int vi_X){m_X=vi_X;}
inline void setY(int vi_Y){m_Y=vi_Y;}
inline void setZ(int vi_Y){m_Y=vi_Y;}
inline void setWidth (int vi_Width) {m_Width=vi_Width; }
inline void setHeight(int vi_Height){m_Height=vi_Height;}
inline void setLenght(int vi_Lenght){m_Lenght=vi_Lenght;}
/*-------------------------------------------------------------------*/
inline void addX(int vi_X){m_X+=vi_X;}
inline void addY(int vi_Y){m_Y+=vi_Y;}
inline void addZ(int vi_Y){m_Y+=vi_Y;}
inline void addWidth (int vi_Width) {m_Width +=vi_Width;}
inline void addHeight(int vi_Height){m_Height+=vi_Height;}
inline void addLenght(int vi_Lenght){m_Lenght+=vi_Lenght;}
/*-------------------------------------------------------------------*/
bool isInside(Box * vi_Box);
bool isOutside(Box * vi_Box);
/*-------------------------------------------------------------------*/
Box();
Box(Box * vi_Box);
Box(Box & vi_Box);
Box(int vi_Width, int vi_Height, int vi_Lenght, int vi_X, int vi_Y, int vi_Z);
virtual ~Box();
};
#endif
/*-----------------------------------------------------------------------*/
/* End of file
/*-----------------------------------------------------------------------*/
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
SESSION SILVERLIGHT 5 3D : SLIDES ET DEMOSSESSION SILVERLIGHT 5 3D : SLIDES ET DEMOS par Groc
Durant les techdays, j'ai eu le plaisir d'animer une session sur Silverlight 5 et la 3D avec Simon Ferquel. Comme promis, voici nos slides et mes démos (celles avec le viper BSG) ici et là. Pour mémoire, les démos utilisent toutes le viper BSG...
Cliquez pour lire la suite de l'article par Groc [TECHDAYS 2012] SESSION WEBMATRIX 2 : LE COUTEAU SUISSE GRATUIT POUR VOS DéVELOPPEMENTS WEB - SLIDES[TECHDAYS 2012] SESSION WEBMATRIX 2 : LE COUTEAU SUISSE GRATUIT POUR VOS DéVELOPPEMENTS WEB - SLIDES par gpommier
Suite à la session que j'ai présenté sur WebMatrix 2, vous pouvez trouver les slides ici, ainsi que les démos en packages nuget : démos1 et démos2 J'en profite pour remercier chaleureusement tous ceux qui sont venus très nombreux à cette sess...
Cliquez pour lire la suite de l'article par gpommier [SHAREPOINT] LES SESSIONS TECHDAYS 2012.[SHAREPOINT] LES SESSIONS TECHDAYS 2012. par Patrick Guimonet
Voici donc pour ceux qui n'ont pas pu venir, ou ceux qui n'ont pas pu toutes les suivre la liste des sessions SharePoint aux TechDays 2012, que je mettrais à jour dès que les liens des vidéo seront disponibles. Ou ici : http...
Cliquez pour lire la suite de l'article par Patrick Guimonet TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3 par ROMELARD Fabrice
Speaker: Bernard Ourghanlian Cette session est comme chaque jour transmise en live par BrainSonic, et j'ai donc suivi cette troisième pleinière par ce moyen sur mon iPad . Elle est dédiée comme chaque année à la mise en perspective de l'é...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE !MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE ! par Vko
Hier durant une session dédiée aux Techdays 2012, j'ai eu le plaisir d'annoncer la sortie de la Béta 2 de Mishra Reader. C'est quoi ? Pour les utilisateurs, c'est une vraie expérience de lecture de flux RSS sur Windows. Rien à voir avec les produit...
Cliquez pour lire la suite de l'article par Vko
Logiciels
Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning
|