Page principale Liste des namespaces Hiérarchie des classes Liste par ordre alphabétique Liste des composants Liste des fichiers Membres des namespaces Composants Déclarations

# ExCSDKParticule.h

Aller à la documentation de ce fichier.

    00001 #pragma once
    00002
    00003 #ifndef __EXCPARTICULE_H__
    00004 #define __EXCPARTICULE_H__
    00005
    00006 #include "ExDefine.h"
    00007 #include "ExCVec3D.h"
    00008 #include "cos.h"
    00009 #include "sin.h"
    00010 //--------------------------------
    00011 #define PARTICULE_POINT         1
    00012 #define PARTICULE_LINE          2
    00013 #define PARTICULE_TEXTURE       3
    00014 //--------------------------------
    00015 class ExCSDKParticule
    00016 {
    00017 protected:
    00018         //--------------------------------
    00019         // Variable
    00020         //--------------------------------
    00021         ExCVec3D                m_Position;
    00022         ExCVec3D                m_Velocity;
    00023         ExCVec3D                m_Acceleration;
    00024         ExCVec3D                m_Gravity;
    00025     float                       m_Size;
    00026         float                   m_Mass;
    00027         int                             m_LifeSpan;
    00028         int                             m_TotalLife;
    00029         int                             m_Weight;
    00030         int                             m_Type;
    00031         int                             m_ColorR;
    00032         int                             m_ColorG;
    00033         int                             m_ColorB;
    00034         int                             m_Blending;
    00035         int                             m_Texture;
    00036
    00037         std::vector<ExCVec3D>                   m_VecPosition;
    00038         std::vector<ExCVec3D>::iterator m_ItVecPosition;
    00039 public:
    00040         ExCSDKParticule(void);
    00041         ~ExCSDKParticule(void);
    00042                 //--------------------------------
    00043         // Methode
    00044         //--------------------------------
    00045         void PrecalculeParticuleTrajectory(int start,int end);
    00046         void ApplyForceToParitcule(ExCVec3D force);
    00047
    00048         void Draw(void);
    00049         void SetParticuleType(int type);
    00050         void SetParticuleTexture(int texture);
    00051
    00052         inline void SetParticuleSize(float Size) {m_Size=Size;}
    00053         inline float    GetParticuleSize(void)  {return m_Size;}
    00054
    00055         inline void SetParticuleMass(float Mass) {m_Mass=Mass;}
    00056         inline float    GetParticuleMass(void)  {return m_Mass;}
    00057
    00058         inline void SetParticuleLife(int life) {m_LifeSpan=life;m_TotalLife=life;}
    00059         inline int      GetParticuleLife(void)  {return m_LifeSpan;}
    00060
    00061         inline void SetParticuleWeight(int Weight) {m_Weight=Weight;}
    00062         inline int      GetParticuleWeight(void)        {return m_Weight;}
    00063
    00064         inline void SetParticuleColorR(int ColorR) {m_ColorR=ColorR;}
    00065         inline int      GetParticuleColorR(void)        {return m_ColorR;}
    00066
    00067         inline void SetParticuleColorG(int ColorG) {m_ColorG=ColorG;}
    00068         inline int      GetParticuleColorG(void)        {return m_ColorG;}
    00069
    00070         inline void SetParticuleColorB(int ColorB) {m_ColorB=ColorB;}
    00071         inline int      GetParticuleColorB(void)        {return m_ColorB;}
    00072
    00073         inline void SetParticuleBlending(int Blending) {m_Blending=Blending;}
    00074         inline int      GetParticuleBlending(void)      {return m_Blending;}
    00075
    00076         inline void SetParticuleVelocity(ExCVec3D Velocity) {m_Velocity=Velocity;}
    00077         inline ExCVec3D GetParticuleVelocity(void)      {return m_Velocity;}
    00078
    00079         inline void SetParticuleAcceleration(ExCVec3D Acceleration) {m_Acceleration=Acceleration;}
    00080         inline ExCVec3D GetParticuleAcceleration(void)  {return m_Acceleration;}
    00081
    00082         inline void SetParticuleGravity(ExCVec3D Gravity){m_Gravity=Gravity;}
    00083         inline ExCVec3D GetParticuleGravity(void)       {return m_Gravity;}
    00084
    00085         inline void SetParticulePosition(ExCVec3D Position){m_Position=Position;}
    00086         inline ExCVec3D GetParticulePosition(void)      {return m_Position;}
    00087
    00088         inline void DecreaseLifeSpan(void){m_LifeSpan--;}
    00089 };
    00090 #endif