THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/04/2010 at 08:34, xxxxxxxx wrote:
Here's my Draw().
Do you see anything that is not correct using the Draw().
Bool Emitter::Draw(PluginObject *op, LONG type, BaseDraw *bd, BaseDrawHelp *bh)
{
//DECLARATIONS & DEFINITIONS
//=============================================================================================
BaseContainer * bc = op->GetDataInstance();
BaseDocument *doc = op->GetDocument();
if (!doc) return FALSE;
BaseObject * prnt = doc->GetActiveObject();
if (!prnt) return FALSE;
Real fps = doc->GetFps(); //Get the current Frames Per Second
BaseTime bt = doc->GetTime();
LONG lngCurrentFrame = bt.GetFrame(fps); //Set a variable that represents the current selected frame
LONG time = GeGetTimer(); //Get the current Time in milliseconds
//CREATE EMITTER SURFACE VISUAL AIDE
//================================================================================================
/*
bd->SetPen(bc->GetVector(EMITTER_COLOR));
bd->Line3D(Vector(prnt->GetPos().x - bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y + bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z),
Vector(prnt->GetPos().x + bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y + bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z));
bd->Line3D(Vector(prnt->GetPos().x - bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y - bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z),
Vector(prnt->GetPos().x + bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y - bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z));
bd->Line3D(Vector(prnt->GetPos().x - bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y - bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z),
Vector(prnt->GetPos().x - bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y + bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z));
bd->Line3D(Vector(prnt->GetPos().x + bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y - bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z),
Vector(prnt->GetPos().x + bc->GetReal(EMITTER_SIZE_X),
prnt->GetPos().y + bc->GetReal(EMITTER_SIZE_Y), prnt->GetPos().z));
//================================================================================================
*/
//Begin Emission Loop
if (lngCurrentFrame > 0)
{
emitter->Update(time, bd, op);
}
return TRUE;
}