DD::Image::ParticlesSprite Class Reference

Inherits DD::Image::Primitive.

List of all members.

Public Member Functions

const char * Class () const
 ParticlesSprite (Point::RenderMode render_mode, unsigned points=0, unsigned start=0)
 ParticlesSprite (const ParticlesSprite &)
Point::RenderMode render_mode () const
void render_mode (Point::RenderMode v)
ParticlesSpriteoperator= (const ParticlesSprite &b)
Primitiveduplicate () const
unsigned faces () const
bool tessellateSprite (unsigned int spriteIndex, Scene *scene, PrimitiveContext *ptx, PrimitiveContext *nptx, SpriteGenerator *spriteGenerator, MBSceneSpriteGenerator *mbSceneGenerator, ParticleSearchInfo &searchInfo) const
void tessellate (Scene *, PrimitiveContext *) const
void draw_wireframe (ViewerContext *, PrimitiveContext *, Primitive *prev_prim=0) const
void draw_solid (ViewerContext *, PrimitiveContext *, Primitive *prev_prim=0) const
void draw_primitive_num (ViewerContext *, PrimitiveContext *) const
PrimitiveType getPrimitiveType () const
 type identifier to avoid dynamic casts for any derived classes
Box3 get_bbox (const GeoInfo *info) const

Static Public Member Functions

static void draw_quad (const Vector3 &p, const Vector4 *cf, const Vector3 *vel, const float *size, const float *spin, const float ar, const Matrix4 &modelview, const Matrix4 &viewModel)
 draw a single particle quad
static void draw_loop (const Vector3 &p, const Vector4 *cf, const Vector3 *vel, const float *size, const float *spin, const float ar, const Matrix4 &modelview, const Matrix4 &viewModel)
 draw a single particle lineloop

Protected Member Functions

void copy (const ParticlesSprite *)

Protected Attributes

Point::RenderMode render_mode_

Detailed Description

ParticlesSprite primitive.


Member Function Documentation

void ParticlesSprite::copy ( const ParticlesSprite b) [protected]

Destructive copy.

Primitive * ParticlesSprite::duplicate ( ) const [virtual]

Copy this Particles into a new one, and return a pointer to it. Vertex data is duplicated, point indices are unchanged.

Implements DD::Image::Primitive.

bool ParticlesSprite::tessellateSprite ( unsigned int  spriteIndex,
Scene scene,
PrimitiveContext ptx,
PrimitiveContext nptx,
SpriteGenerator spriteGenerator,
MBSceneSpriteGenerator mbSceneGenerator,
ParticleSearchInfo &  searchInfo 
) const

Get the tessellation for an individual sprite, by index. This will return true if the sprite is visible, false if not.

Parameters:
nptxPrimitive context
spriteGeneratorPrimitive context with local transforms removed, to use for adding sprites into the scene

References DD::Image::Scene::add_render_primitive(), DD::Image::IopInfoOwner::channels(), DD::Image::rTriangle::edgesmask, DD::Image::SpriteGenerator::getHash(), DD::Image::SpriteGenerator::getSprite(), DD::Image::Vector4::set(), DD::Image::rTriangle::v, DD::Image::Iop::vertex_shader(), DD::Image::VertexContext::vP, and DD::Image::Matrix4::z_axis().

Referenced by tessellate().

void ParticlesSprite::tessellate ( Scene scene,
PrimitiveContext ptx 
) const [virtual]

Push a single rParticles primitive into the rendering stream.

Implements DD::Image::Primitive.

References DD::Image::MBSceneSpriteGenerator::resetSearchInfo(), DD::Image::MatrixArray::set_object_matrix(), and tessellateSprite().