Click here to Skip to main content
15,886,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCan you tell me what does the getnameinfo() return? Pin
wood10-May-03 22:03
wood10-May-03 22:03 
GeneralCreate edit control inside thread Pin
Nena19769-May-03 17:01
Nena19769-May-03 17:01 
GeneralRe: Create edit control inside thread Pin
valikac10-May-03 5:55
valikac10-May-03 5:55 
Generalcall fuction from another class Pin
aguest9-May-03 13:18
aguest9-May-03 13:18 
GeneralRe: call fuction from another class Pin
Wes Aday9-May-03 13:45
professionalWes Aday9-May-03 13:45 
GeneralRe: call fuction from another class Pin
aguest9-May-03 14:07
aguest9-May-03 14:07 
GeneralRe: call fuction from another class Pin
Toni789-May-03 14:15
Toni789-May-03 14:15 
GeneralRe: call fuction from another class Pin
aguest9-May-03 15:29
aguest9-May-03 15:29 
// creatfoufou.cpp: implementation of the creatfoufou class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "OpenGl.h"
#include "creatfoufou.h"
#include "foufou.h"

#include

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

creatfoufou::creatfoufou()
{

}

creatfoufou::~creatfoufou()
{

}

void creatfoufou::creatfou(int amount)
{
foufou *newfoufouPtr;
int randomX,randomY,randomZ;
int speed,steer;

for(int index=0;index {
newfoufouPtr = new foufou();
fou_caracter.push_back( newfoufouPtr );
//ici vien l'integration ou le dessin de foufou dans la scene
randomX = ( ( 1 + rand( ) % 900 ) - 450 );
randomY = ( ( 1 + rand( ) % 100 ) - 50 );
randomZ = ( ( 1 + rand( ) % 900 ) - 450 );

setposition(randomX,randomY,randomZ);
//speed =

//steer =

//lui attribue sa vitesse
//lui attribuer son emplacement
//lui attribuer sa direction

}
}

void creatfoufou::setposition(int newX, int newY, int newZ)
{
-->the mistak RePaint(randomX,randomY,randomZ);
}


and here when i declared
// foufou.cpp: implementation of the foufou class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "OpenGl.h"
#include "foufou.h"
#include

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

foufou::foufou()
{

}

foufou::~foufou()
{

}



//Propriétés réflectives de l'objet touché par la lumière
GLfloat Material_Ambiante[]={0.5,0.5, 0.5, 1 };
GLfloat Material_Difuse[]={0.5, 0.5, 0.5, 1};
GLfloat Material_Specular[]={0.5, 0.5, 0.5, 1};



//Propriété de la lumière

GLfloat Light_Ambiante[]={0.2, 0.2, 0.2, 0.1};
GLfloat Light_Difuse[]={0.5, 0.5, 0.5, 1.0 };
GLfloat Light_Specular[]={1.0, 1.0, 1.1, 1.0 };
GLfloat Light_Position[]={10, 12, 10, 1.0 };



GLfloat Light_Direction[]={0.0,-1.0, 0.0, 1.0};








void foufou::Initial()
{
//Définir les propriété de l'objet touché par la lumière ainsi que la lumière

glMaterialfv( GL_FRONT, GL_AMBIENT, Material_Ambiante);
glMaterialfv( GL_FRONT, GL_DIFFUSE, Material_Difuse);
glMaterialfv( GL_FRONT, GL_SPECULAR,Material_Specular);
glMaterialf( GL_FRONT, GL_SHININESS, 20);

glLightfv( GL_LIGHT0, GL_AMBIENT,Light_Ambiante );
glLightfv( GL_LIGHT0, GL_DIFFUSE, Light_Difuse );
glLightfv( GL_LIGHT0, GL_SPECULAR, Light_Specular);
glLightfv( GL_LIGHT0, GL_POSITION, Light_Position );




//Activation de l'éclairage
glEnable( GL_LIGHTING );


//Activation de la première lumière
glEnable( GL_LIGHT0 );



//Activation du test de profondeur
glEnable( GL_DEPTH_TEST );

};

void foufou::RePaint(int xpos,int ypos,int zpos)
{
//Vidage du contenu situé à l'écran
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//glClearColor(0.3, 0.3, 0.3, 1.0);


//On réénitialise la matrice modélisation-visualisation
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();


//On place la caméra dans la scène

gluPerspective (90, 1, 5, 50);
gluLookAt (2,2, -15, -4,0.0, 1, 0.0, 1.0, 0.0 );


//surface avec rotation de 45°
glPushMatrix();


//rotation de la surface
// glTranslated(0.0, 30.0, 15.0 );
// glRotated( 15, 0.0, 0.0, 0.0 );

////////
//Proprité de réfléction ambiante de la matière
glColorMaterial( GL_FRONT, GL_AMBIENT );
glColor4f(0.5, 0.5, 0.6, 1.0 );
//Proprité de réfléction diffuse de la matière}
glColorMaterial( GL_FRONT, GL_DIFFUSE );
glColor4f( 0.5, 0.2, 0.8, 1.0 );
//Proprité de réfléction speculaire de la matière}
glColorMaterial( GL_FRONT, GL_SPECULAR );
glColor4f( 0.9, 0.8, 1.0, 1.0 );
//Création de la surface 30 x 30}


//glutSolidCube(3);

glTranslated(-xpos, ypos, zpos );
glutSolidSphere(0.9,30,40);
glDisable( GL_LIGHTING );

glPopMatrix();




//glDisable(GL_TEXTURE_2D);

SwapBuffers(wglGetCurrentDC());

};


GeneralRe: call fuction from another class Pin
Toni789-May-03 15:44
Toni789-May-03 15:44 
GeneralRe: call fuction from another class Pin
aguest9-May-03 15:41
aguest9-May-03 15:41 
GeneralRe: call fuction from another class Pin
Toni789-May-03 15:46
Toni789-May-03 15:46 
GeneralRe: call fuction from another class Pin
aguest9-May-03 18:19
aguest9-May-03 18:19 
GeneralRe: call fuction from another class Pin
Toni789-May-03 18:32
Toni789-May-03 18:32 
GeneralDepricating functions Pin
Jack Handy9-May-03 9:26
Jack Handy9-May-03 9:26 
GeneralRe: Depricating functions Pin
Tim Smith9-May-03 9:34
Tim Smith9-May-03 9:34 
GeneralRe: Depricating functions Pin
Jack Handy9-May-03 9:46
Jack Handy9-May-03 9:46 
GeneralRe: Depricating functions Pin
Tim Smith9-May-03 9:49
Tim Smith9-May-03 9:49 
GeneralRe: Depricating functions Pin
aguest9-May-03 15:16
aguest9-May-03 15:16 
GeneralRe: Depricating functions Pin
Jack Handy9-May-03 22:07
Jack Handy9-May-03 22:07 
Generalnamespaces and forward declarations Pin
Member 9076299-May-03 8:58
Member 9076299-May-03 8:58 
GeneralRe: namespaces and forward declarations Pin
Orhun Birsoy9-May-03 9:46
Orhun Birsoy9-May-03 9:46 
QuestionIs it possible to import a set of menus? Pin
adonisv9-May-03 8:54
adonisv9-May-03 8:54 
AnswerRe: Is it possible to import a set of menus? Pin
basementman9-May-03 9:01
basementman9-May-03 9:01 
GeneralCool, you can drag and drop even!!! Pin
adonisv9-May-03 9:20
adonisv9-May-03 9:20 
GeneralRead form serial port Pin
K. Shaffer9-May-03 8:46
K. Shaffer9-May-03 8:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.