LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
	:	LLAlphaObject(id, pcode, regionp),
		mViewerPartGroupp(NULL)
{
	setNumTEs(1);
	setTETexture(0, LLUUID::null);
	mbCanSelect = FALSE;			// users can't select particle systems
}
Exemplo n.º 2
0
void LLPrimitive::setTEArrays(const U8 size,
							  const LLUUID* image_ids,
							  const F32* scale_s,
							  const F32* scale_t)
{
	S32 cur_size = size;
	if (cur_size > getNumTEs())
	{
		llwarns << "Trying to set more TEs than exist!" << llendl;
		cur_size = getNumTEs();
	}

	S32 i;
	// Copy over image information
	for (i = 0; i < cur_size; i++)
	{
		// This is very BAD!!!!!!
		if (image_ids != NULL)
		{
			setTETexture(i,image_ids[i]);
		}
		if (scale_s && scale_t)
		{
			setTEScale(i, scale_s[i], scale_t[i]);
		}
 	}

	if (i < getNumTEs())
	{
		cur_size--;
		for (i=i; i < getNumTEs(); i++)		// the i=i removes a gcc warning
		{
			if (image_ids != NULL)
			{
				setTETexture(i, image_ids[cur_size]);
			}
			if (scale_s && scale_t)
			{
				setTEScale(i, scale_s[cur_size], scale_t[cur_size]);
			}
		}
	}
}
Exemplo n.º 3
0
LLVOTextBubble::LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
:	LLAlphaObject(id, pcode, regionp)
{
	setScale(LLVector3(1.5f, 1.5f, 0.25f));
	mbCanSelect = FALSE;
	mLOD = MIN_LOD;
	mVolumeChanged = TRUE;
	setVelocity(LLVector3(0.f, 0.f, 0.75f));
	LLVolumeParams volume_params;
	volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_LINE);
	volume_params.setBeginAndEndS(0.f, 1.f);
	volume_params.setBeginAndEndT(0.f, 1.f);
	volume_params.setRatio(0.25f, 0.25f);
	volume_params.setShear(0.f, 0.f);
	setVolume(volume_params, 0);
	mColor = LLColor4(1.0f, 0.0f, 0.0f, 1.f);
	S32 i;
	for (i = 0; i < getNumTEs(); i++)
	{
		setTEColor(i, mColor);
		setTETexture(i, LLUUID(IMG_DEFAULT));
	}
}
Exemplo n.º 4
0
void LLPrimitive::copyTEs(const LLPrimitive *primitivep)
{
	U32 i;
	if (primitivep->getNumTEs() != getNumTEs())
	{
		llwarns << "Primitives don't have same number of TE's" << llendl;
	}
	U32 num_tes = llmin(primitivep->getNumTEs(), getNumTEs());
	for (i = 0; i < num_tes; i++)
	{
		const LLTextureEntry *tep = primitivep->getTE(i);
		F32 s, t;
		setTETexture(i, tep->getID());
		setTEColor(i, tep->getColor());
		tep->getScale(&s, &t);
		setTEScale(i, s, t);
		tep->getOffset(&s, &t);
		setTEOffset(i, s, t);
		setTERotation(i, tep->getRotation());
		setTEBumpShinyFullbright(i, tep->getBumpShinyFullbright());
		setTEMediaTexGen(i, tep->getMediaTexGen());
		setTEGlow(i, tep->getGlow());
	}
}