#include "stdafx.h" #include "SEnvPrimitive.h" #include "SGameWeather.h" using namespace env_fx; // SParticle -------------------------------------------------------------------------------------- SParticle::SParticle( ) : position ( 0, 0, 0 ) , velocity ( 0, 0, -1 ) , color ( 0x00ffffff ) , uvLT ( 0, 0 ) , uvRB ( 1, 1 ) , normal ( 0, 0, 0 ) , birth ( 0 ) , life ( 2000 ) , rotationUnit ( 0.0f ) , rotationUnitX ( 0.0f ) , rotationSpeed ( 0.0f ) , visibility ( 0.0f ) , collidable ( false ) , collided ( false ) , alive ( false ) , width ( 0 ) , height ( 0 ) { } void SParticle::Reset( ) { velocity = K3DVector( 0, 0, -1 ) ; color = K3DColor( 0x00ffffff ) ; visibility = 0.0f ; uvLT = K3DPoint( 0, 0 ) ; uvRB = K3DPoint( 1, 1 ) ; normal = K3DVector( 0, 0, 0 ) ; birth = 0 ; life = 0 ; rotationUnit = 0 ; rotationUnitX = 0 ; rotationSpeed = 0 ; collidable = false ; collided = false ; alive = false ; width = 0 ; height = 0 ; } bool SParticle::IsCollidableCollided( ) const { return collidable && collided; }