public override void Draw() { // Test.Debug("cube draw"); IGraphicsHelper graphics = GraphicsHelperFactory.GetInstance(); graphics.PushMatrix(); // Test.Debug( this.ToString() ); graphics.SetMaterialColor(facecolors[0]); graphics.Translate(pos); graphics.Rotate(rot); graphics.Scale(scale); graphics.DrawCone(); graphics.PopMatrix(); }
void DrawSingleEditHandle(Vector3 entityscale, Vector3 handlescale, Axis handleaxis) { graphics.PushMatrix(); graphics.SetMaterialColor(editing3d.GetEditHandleColor(handleaxis)); RendererFactory.GetPicker3dModel().AddHitTarget(new HitTargetEditHandle(new Axis(handleaxis))); double fTranslateAmount = (handleaxis.GetAxisComponentIgnoreAxisDirection(entityscale) + handleaxis.GetAxisComponentIgnoreAxisDirection(handlescale)) / 2; graphics.Translate(fTranslateAmount * handleaxis.ToVector()); graphics.Scale(handlescale); graphics.Rotate(handleaxis.ToRot()); graphics.Rotate(90, 0, 1, 0); graphics.DrawCone(); RendererFactory.GetPicker3dModel().EndHitTarget(); graphics.PopMatrix(); }