Minetest  5.4.0
Particle Class Reference

#include <particles.h>

+ Inheritance diagram for Particle:
+ Collaboration diagram for Particle:

Public Member Functions

 Particle (IGameDef *gamedef, LocalPlayer *player, ClientEnvironment *env, const ParticleParameters &p, video::ITexture *texture, v2f texpos, v2f texsize, video::SColor color)
 
 ~Particle ()=default
 
virtual const aabb3fgetBoundingBox () const
 
virtual u32 getMaterialCount () const
 
virtual video::SMaterial & getMaterial (u32 i)
 
virtual void OnRegisterSceneNode ()
 
virtual void render ()
 
void step (float dtime)
 
bool get_expired ()
 

Private Member Functions

void updateLight ()
 
void updateVertices ()
 

Private Attributes

video::S3DVertex m_vertices [4]
 
float m_time = 0.0f
 
float m_expiration
 
ClientEnvironmentm_env
 
IGameDefm_gamedef
 
aabb3f m_box
 
aabb3f m_collisionbox
 
video::SMaterial m_material
 
v2f m_texpos
 
v2f m_texsize
 
v3f m_pos
 
v3f m_velocity
 
v3f m_acceleration
 
LocalPlayerm_player
 
float m_size
 
video::SColor m_base_color
 Color without lighting. More...
 
video::SColor m_color
 Final rendered color. More...
 
bool m_collisiondetection
 
bool m_collision_removal
 
bool m_object_collision
 
bool m_vertical
 
v3s16 m_camera_offset
 
struct TileAnimationParams m_animation
 
float m_animation_time = 0.0f
 
int m_animation_frame = 0
 
u8 m_glow
 

Constructor & Destructor Documentation

◆ Particle()

Particle::Particle ( IGameDef gamedef,
LocalPlayer player,
ClientEnvironment env,
const ParticleParameters p,
video::ITexture *  texture,
v2f  texpos,
v2f  texsize,
video::SColor  color 
)

References m_acceleration, m_animation, m_base_color, m_collision_removal, m_collisionbox, m_collisiondetection, m_color, m_env, m_expiration, m_gamedef, m_glow, m_material, m_object_collision, m_player, m_pos, m_size, m_texpos, m_texsize, m_velocity, m_vertical, p(), updateLight(), and updateVertices().

+ Here is the call graph for this function:

◆ ~Particle()

Particle::~Particle ( )
default

Member Function Documentation

◆ get_expired()

bool Particle::get_expired ( )
inline

References m_expiration, and m_time.

◆ getBoundingBox()

virtual const aabb3f& Particle::getBoundingBox ( ) const
inlinevirtual

References m_box.

◆ getMaterial()

virtual video::SMaterial& Particle::getMaterial ( u32  i)
inlinevirtual

References m_material.

◆ getMaterialCount()

virtual u32 Particle::getMaterialCount ( ) const
inlinevirtual

◆ OnRegisterSceneNode()

void Particle::OnRegisterSceneNode ( )
virtual

◆ render()

void Particle::render ( )
virtual

References m_material, and m_vertices.

◆ step()

void Particle::step ( float  dtime)

◆ updateLight()

void Particle::updateLight ( )
private

References blend_light(), decode_light(), ClientEnvironment::getClientMap(), Environment::getDayNightRatio(), MapNode::getLightBlend(), Map::getNode(), LIGHT_SUN, m_base_color, m_color, m_env, m_gamedef, m_glow, m_pos, IGameDef::ndef(), and p().

Referenced by Particle(), and step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateVertices()

void Particle::updateVertices ( )
private

References BS, TileAnimationParams::determineParams(), ClientEnvironment::getCameraOffset(), LocalPlayer::getPitch(), LocalPlayer::getPosition(), TileAnimationParams::getTextureCoords(), LocalPlayer::getYaw(), intToFloat(), m_animation, m_animation_frame, m_box, m_color, m_env, m_material, m_player, m_pos, m_size, m_texpos, m_texsize, m_vertical, m_vertices, TAT_NONE, and TileAnimationParams::type.

Referenced by Particle(), and step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_acceleration

v3f Particle::m_acceleration
private

Referenced by Particle(), and step().

◆ m_animation

struct TileAnimationParams Particle::m_animation
private

Referenced by Particle(), step(), and updateVertices().

◆ m_animation_frame

int Particle::m_animation_frame = 0
private

Referenced by step(), and updateVertices().

◆ m_animation_time

float Particle::m_animation_time = 0.0f
private

Referenced by step().

◆ m_base_color

video::SColor Particle::m_base_color
private

Color without lighting.

Referenced by Particle(), and updateLight().

◆ m_box

aabb3f Particle::m_box
private

Referenced by getBoundingBox(), and updateVertices().

◆ m_camera_offset

v3s16 Particle::m_camera_offset
private

◆ m_collision_removal

bool Particle::m_collision_removal
private

Referenced by Particle(), and step().

◆ m_collisionbox

aabb3f Particle::m_collisionbox
private

Referenced by Particle(), and step().

◆ m_collisiondetection

bool Particle::m_collisiondetection
private

Referenced by Particle(), and step().

◆ m_color

video::SColor Particle::m_color
private

Final rendered color.

Referenced by Particle(), updateLight(), and updateVertices().

◆ m_env

ClientEnvironment* Particle::m_env
private

◆ m_expiration

float Particle::m_expiration
private

Referenced by Particle(), get_expired(), and step().

◆ m_gamedef

IGameDef* Particle::m_gamedef
private

Referenced by Particle(), step(), and updateLight().

◆ m_glow

u8 Particle::m_glow
private

Referenced by Particle(), and updateLight().

◆ m_material

video::SMaterial Particle::m_material
private

◆ m_object_collision

bool Particle::m_object_collision
private

Referenced by Particle(), and step().

◆ m_player

LocalPlayer* Particle::m_player
private

Referenced by Particle(), and updateVertices().

◆ m_pos

v3f Particle::m_pos
private

◆ m_size

float Particle::m_size
private

Referenced by Particle(), and updateVertices().

◆ m_texpos

v2f Particle::m_texpos
private

Referenced by Particle(), and updateVertices().

◆ m_texsize

v2f Particle::m_texsize
private

Referenced by Particle(), and updateVertices().

◆ m_time

float Particle::m_time = 0.0f
private

Referenced by get_expired(), and step().

◆ m_velocity

v3f Particle::m_velocity
private

Referenced by Particle(), and step().

◆ m_vertical

bool Particle::m_vertical
private

Referenced by Particle(), and updateVertices().

◆ m_vertices

video::S3DVertex Particle::m_vertices[4]
private

Referenced by render(), and updateVertices().


The documentation for this class was generated from the following files: