private void AddHead() { Vector3 newheadvelocity; if (elementList.Count > 0) // set old head element color. { var oldeadelement = elementList[elementList.Count - 1]; oldeadelement.Color = color; newheadvelocity = objectToFollow.Velocity; } else { newheadvelocity = Vector3.Zero; } // add new white head element. var newelement = new BillboardChain.Element(); newelement.Position = objectToFollow.OldPosition; newelement.Width = maxwidth; newelement.Color = ColorEx.White; Chain.AddChainElement(0, newelement); elementList.Add(newelement); elementPositions.Add(new Ray(newelement.Position, newheadvelocity)); }
public virtual void updateChainElement(uint chainIndex, uint elementIndex, BillboardChain.Element billboardChainElement) { OgrePINVOKE.BillboardChain_updateChainElement(swigCPtr, chainIndex, elementIndex, BillboardChain.Element.getCPtr(billboardChainElement)); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } }
public virtual BillboardChain.Element getChainElement(uint chainIndex, uint elementIndex) { BillboardChain.Element ret = new BillboardChain.Element(OgrePINVOKE.BillboardChain_getChainElement(swigCPtr, chainIndex, elementIndex), false); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }