SpriteParticleRenderer
from panda3d.physics import SpriteParticleRenderer
- class SpriteParticleRenderer
Bases:
BaseParticleRenderer
Renders a particle system with high-speed nasty trick sprites.
Inheritance diagram
- __init__(*args, **kwargs)
- addFromNode()
C++ Interface: add_from_node(const SpriteParticleRenderer self, const NodePath node_path) add_from_node(const SpriteParticleRenderer self, const NodePath node_path, bool size_from_texels) add_from_node(const SpriteParticleRenderer self, const NodePath node_path, str model, str node, bool size_from_texels, bool resize) add_from_node(const SpriteParticleRenderer self, const NodePath node_path, bool size_from_texels, bool resize)
- /**
This will allow the renderer to randomly choose from more than one texture
or sequence at particle birth.
If the source type is important, use this one.
model and node should lead to node_path like this: node_path =
loader.loadModel(model).find(node)
If resize is true, or if there are no textures currently on the renderer,
it will force the renderer to use the size information from this node from
now on. (Default is false)
*/
- /**
This will allow the renderer to randomly choose from more than one texture
or sequence at particle birth.
If resize is true, or if there are no textures currently on the renderer,
it will force the renderer to use the size information from this node from
now on. (Default is false)
*/
- addTexture()
C++ Interface: add_texture(const SpriteParticleRenderer self, Texture tex, float texels_per_unit, bool resize)
- /**
Adds texture to image pool, effectively creating a single frame animation
that can be selected at particle birth. This should only be called after a
previous call to set_texture().
*/
- add_from_node()
C++ Interface: add_from_node(const SpriteParticleRenderer self, const NodePath node_path) add_from_node(const SpriteParticleRenderer self, const NodePath node_path, bool size_from_texels) add_from_node(const SpriteParticleRenderer self, const NodePath node_path, str model, str node, bool size_from_texels, bool resize) add_from_node(const SpriteParticleRenderer self, const NodePath node_path, bool size_from_texels, bool resize)
- /**
This will allow the renderer to randomly choose from more than one texture
or sequence at particle birth.
If the source type is important, use this one.
model and node should lead to node_path like this: node_path =
loader.loadModel(model).find(node)
If resize is true, or if there are no textures currently on the renderer,
it will force the renderer to use the size information from this node from
now on. (Default is false)
*/
- /**
This will allow the renderer to randomly choose from more than one texture
or sequence at particle birth.
If resize is true, or if there are no textures currently on the renderer,
it will force the renderer to use the size information from this node from
now on. (Default is false)
*/
- add_texture()
C++ Interface: add_texture(const SpriteParticleRenderer self, Texture tex, float texels_per_unit, bool resize)
- /**
Adds texture to image pool, effectively creating a single frame animation
that can be selected at particle birth. This should only be called after a
previous call to set_texture().
*/
- getAnim()
C++ Interface: get_anim(SpriteParticleRenderer self, int n)
- getAnimateFramesEnable()
C++ Interface: get_animate_frames_enable(SpriteParticleRenderer self)
/**
*/
- getAnimateFramesIndex()
C++ Interface: get_animate_frames_index(SpriteParticleRenderer self)
/**
*/
- getAnims()
- getColorInterpolationManager()
C++ Interface: get_color_interpolation_manager(SpriteParticleRenderer self)
/**
*/
- getHeight()
C++ Interface: get_height(SpriteParticleRenderer self)
- /**
Returns the height of each particle in world units.
*/
- getLastAnim()
C++ Interface: get_last_anim(SpriteParticleRenderer self)
- getLlUv()
C++ Interface: get_ll_uv(SpriteParticleRenderer self) get_ll_uv(SpriteParticleRenderer self, int anim, int frame)
- getNumAnims()
C++ Interface: get_num_anims(SpriteParticleRenderer self)
- getTexture()
C++ Interface: get_texture(SpriteParticleRenderer self) get_texture(SpriteParticleRenderer self, int anim, int frame)
/**
*/
/**
*/
- getUrUv()
C++ Interface: get_ur_uv(SpriteParticleRenderer self) get_ur_uv(SpriteParticleRenderer self, int anim, int frame)
- getWidth()
C++ Interface: get_width(SpriteParticleRenderer self)
- /**
Returns the width of each particle in world units.
*/
- get_anim()
C++ Interface: get_anim(SpriteParticleRenderer self, int n)
- get_animate_frames_enable()
C++ Interface: get_animate_frames_enable(SpriteParticleRenderer self)
/**
*/
- get_animate_frames_index()
C++ Interface: get_animate_frames_index(SpriteParticleRenderer self)
/**
*/
- get_animate_frames_rate()
C++ Interface: get_animate_frames_rate(SpriteParticleRenderer self)
/**
*/
- get_anims()
- get_color_interpolation_manager()
C++ Interface: get_color_interpolation_manager(SpriteParticleRenderer self)
/**
*/
- get_height()
C++ Interface: get_height(SpriteParticleRenderer self)
- /**
Returns the height of each particle in world units.
*/
- get_last_anim()
C++ Interface: get_last_anim(SpriteParticleRenderer self)
- get_ll_uv()
C++ Interface: get_ll_uv(SpriteParticleRenderer self) get_ll_uv(SpriteParticleRenderer self, int anim, int frame)
- get_num_anims()
C++ Interface: get_num_anims(SpriteParticleRenderer self)
- get_texture()
C++ Interface: get_texture(SpriteParticleRenderer self) get_texture(SpriteParticleRenderer self, int anim, int frame)
/**
*/
/**
*/
- get_ur_uv()
C++ Interface: get_ur_uv(SpriteParticleRenderer self) get_ur_uv(SpriteParticleRenderer self, int anim, int frame)
- get_width()
C++ Interface: get_width(SpriteParticleRenderer self)
- /**
Returns the width of each particle in world units.
*/
- removeAnimation()
C++ Interface: remove_animation(const SpriteParticleRenderer self, int n)
- /**
Removes an animation texture set from the renderer.
*/
- remove_animation()
C++ Interface: remove_animation(const SpriteParticleRenderer self, int n)
- /**
Removes an animation texture set from the renderer.
*/
- setAlphaBlendMethod()
C++ Interface: set_alpha_blend_method(const SpriteParticleRenderer self, int bm)
/**
*/
- setAlphaDisable()
C++ Interface: set_alpha_disable(const SpriteParticleRenderer self, bool ad)
/**
*/
- setAnimAngleFlag()
C++ Interface: set_anim_angle_flag(const SpriteParticleRenderer self, bool animate_theta)
/**
*/
- setAnimateFramesEnable()
C++ Interface: set_animate_frames_enable(const SpriteParticleRenderer self, bool an)
/**
*/
- setAnimateFramesIndex()
C++ Interface: set_animate_frames_index(const SpriteParticleRenderer self, int i)
/**
*/
- setAnimateFramesRate()
C++ Interface: set_animate_frames_rate(const SpriteParticleRenderer self, float r)
/**
*/
- setColor()
C++ Interface: set_color(const SpriteParticleRenderer self, const LVecBase4f color)
/**
*/
- setFinalXScale()
C++ Interface: set_final_x_scale(const SpriteParticleRenderer self, float final_x_scale)
/**
*/
- setFinalYScale()
C++ Interface: set_final_y_scale(const SpriteParticleRenderer self, float final_y_scale)
/**
*/
- setFromNode()
C++ Interface: set_from_node(const SpriteParticleRenderer self, const NodePath node_path) set_from_node(const SpriteParticleRenderer self, const NodePath node_path, bool size_from_texels) set_from_node(const SpriteParticleRenderer self, const NodePath node_path, str model, str node, bool size_from_texels)
- /**
If the source type is important, use this one.
model and node should lead to node_path like this: node_path =
loader.loadModel(model).find(node)
This will remove all previously add textures and resize the renderer to
match the new geometry.
*/
- /**
Sets the properties on this renderer from the geometry referenced by the
indicated NodePath. This should be a reference to a GeomNode or a
SequenceNode; it extracts out the texture and UV range from the node.
This will remove all previously added textures and animations. It will
also resize the renderer to match this new geometry.
If node_path refers to a GeomNode(or has one beneath it) the texture, its
size, and UV data will be extracted from that.
If node_path references a SequenceNode(or has one beneath it) with multiple
GeomNodes beneath it, the size data will correspond only to the first
GeomNode found with a valid texture, while the texture and UV information
will be stored for each individual node.
If size_from_texels is true, the particle size is based on the number of
texels in the source image; otherwise, it is based on the size of the first
polygon found in the node.
model and node are the two items used to construct node_path. If the
source type is important, use set_from_node(NodePath,string,string,bool)
instead.
*/
- setInitialXScale()
C++ Interface: set_initial_x_scale(const SpriteParticleRenderer self, float initial_x_scale)
/**
*/
- setInitialYScale()
C++ Interface: set_initial_y_scale(const SpriteParticleRenderer self, float initial_y_scale)
/**
*/
- setLlUv()
C++ Interface: set_ll_uv(const SpriteParticleRenderer self, const LPoint2f ll_uv) set_ll_uv(const SpriteParticleRenderer self, const LPoint2f ll_uv, int anim, int frame)
- /**
Sets the UV coordinate of the lower-left corner of all the sprites
generated by this renderer. Normally this is (0, 0), but it might be set
to something else to use only a portion of the texture.
*/
- /**
Sets the UV coordinate of the lower-left corner of all the sprites
generated by this renderer. Normally this is (0, 0), but it might be set
to something else to use only a portion of the texture.
*/
- setNonanimatedTheta()
C++ Interface: set_nonanimated_theta(const SpriteParticleRenderer self, float theta)
/**
*/
- setSize()
C++ Interface: set_size(const SpriteParticleRenderer self, float width, float height)
- /**
Sets the size of each particle in world units.
*/
- setTexture()
C++ Interface: set_texture(const SpriteParticleRenderer self, Texture tex, float texels_per_unit)
- /**
Sets the renderer up to render the entire texture image. The scale of each
particle is based on the size of the texture in each dimension, modified by
texels_per_unit.
Used to set the size of the particles. Will clear all previously loaded
textures and animations.
*/
- setUrUv()
C++ Interface: set_ur_uv(const SpriteParticleRenderer self, const LPoint2f ur_uv) set_ur_uv(const SpriteParticleRenderer self, const LPoint2f ur_uv, int anim, int frame)
- /**
Sets the UV coordinate of the upper-right corner of all the sprites
generated by this renderer. Normally this is (1, 1), but it might be set
to something else to use only a portion of the texture.
*/
- /**
Sets the UV coordinate of the upper-right corner of all the sprites
generated by this renderer. Normally this is (1, 1), but it might be set
to something else to use only a portion of the texture.
*/
- setXScaleFlag()
C++ Interface: set_x_scale_flag(const SpriteParticleRenderer self, bool animate_x_ratio)
/**
*/
- setYScaleFlag()
C++ Interface: set_y_scale_flag(const SpriteParticleRenderer self, bool animate_y_ratio)
/**
*/
- set_alpha_blend_method()
C++ Interface: set_alpha_blend_method(const SpriteParticleRenderer self, int bm)
/**
*/
- set_alpha_disable()
C++ Interface: set_alpha_disable(const SpriteParticleRenderer self, bool ad)
/**
*/
- set_anim_angle_flag()
C++ Interface: set_anim_angle_flag(const SpriteParticleRenderer self, bool animate_theta)
/**
*/
- set_animate_frames_enable()
C++ Interface: set_animate_frames_enable(const SpriteParticleRenderer self, bool an)
/**
*/
- set_animate_frames_index()
C++ Interface: set_animate_frames_index(const SpriteParticleRenderer self, int i)
/**
*/
- set_animate_frames_rate()
C++ Interface: set_animate_frames_rate(const SpriteParticleRenderer self, float r)
/**
*/
- set_color()
C++ Interface: set_color(const SpriteParticleRenderer self, const LVecBase4f color)
/**
*/
- set_final_x_scale()
C++ Interface: set_final_x_scale(const SpriteParticleRenderer self, float final_x_scale)
/**
*/
- set_final_y_scale()
C++ Interface: set_final_y_scale(const SpriteParticleRenderer self, float final_y_scale)
/**
*/
- set_from_node()
C++ Interface: set_from_node(const SpriteParticleRenderer self, const NodePath node_path) set_from_node(const SpriteParticleRenderer self, const NodePath node_path, bool size_from_texels) set_from_node(const SpriteParticleRenderer self, const NodePath node_path, str model, str node, bool size_from_texels)
- /**
If the source type is important, use this one.
model and node should lead to node_path like this: node_path =
loader.loadModel(model).find(node)
This will remove all previously add textures and resize the renderer to
match the new geometry.
*/
- /**
Sets the properties on this renderer from the geometry referenced by the
indicated NodePath. This should be a reference to a GeomNode or a
SequenceNode; it extracts out the texture and UV range from the node.
This will remove all previously added textures and animations. It will
also resize the renderer to match this new geometry.
If node_path refers to a GeomNode(or has one beneath it) the texture, its
size, and UV data will be extracted from that.
If node_path references a SequenceNode(or has one beneath it) with multiple
GeomNodes beneath it, the size data will correspond only to the first
GeomNode found with a valid texture, while the texture and UV information
will be stored for each individual node.
If size_from_texels is true, the particle size is based on the number of
texels in the source image; otherwise, it is based on the size of the first
polygon found in the node.
model and node are the two items used to construct node_path. If the
source type is important, use set_from_node(NodePath,string,string,bool)
instead.
*/
- set_initial_x_scale()
C++ Interface: set_initial_x_scale(const SpriteParticleRenderer self, float initial_x_scale)
/**
*/
- set_initial_y_scale()
C++ Interface: set_initial_y_scale(const SpriteParticleRenderer self, float initial_y_scale)
/**
*/
- set_ll_uv()
C++ Interface: set_ll_uv(const SpriteParticleRenderer self, const LPoint2f ll_uv) set_ll_uv(const SpriteParticleRenderer self, const LPoint2f ll_uv, int anim, int frame)
- /**
Sets the UV coordinate of the lower-left corner of all the sprites
generated by this renderer. Normally this is (0, 0), but it might be set
to something else to use only a portion of the texture.
*/
- /**
Sets the UV coordinate of the lower-left corner of all the sprites
generated by this renderer. Normally this is (0, 0), but it might be set
to something else to use only a portion of the texture.
*/
- set_nonanimated_theta()
C++ Interface: set_nonanimated_theta(const SpriteParticleRenderer self, float theta)
/**
*/
- set_size()
C++ Interface: set_size(const SpriteParticleRenderer self, float width, float height)
- /**
Sets the size of each particle in world units.
*/
- set_texture()
C++ Interface: set_texture(const SpriteParticleRenderer self, Texture tex, float texels_per_unit)
- /**
Sets the renderer up to render the entire texture image. The scale of each
particle is based on the size of the texture in each dimension, modified by
texels_per_unit.
Used to set the size of the particles. Will clear all previously loaded
textures and animations.
*/
- set_ur_uv()
C++ Interface: set_ur_uv(const SpriteParticleRenderer self, const LPoint2f ur_uv) set_ur_uv(const SpriteParticleRenderer self, const LPoint2f ur_uv, int anim, int frame)
- /**
Sets the UV coordinate of the upper-right corner of all the sprites
generated by this renderer. Normally this is (1, 1), but it might be set
to something else to use only a portion of the texture.
*/
- /**
Sets the UV coordinate of the upper-right corner of all the sprites
generated by this renderer. Normally this is (1, 1), but it might be set
to something else to use only a portion of the texture.
*/