public void Render(PickableObjectRenderType rendertype) { if (rendertype == PickableObjectRenderType.Picking) { GL.Color3(PickColor); GL.Begin(PrimitiveType.Triangles); foreach (Vector3d v in Vertices) { GL.Vertex3(v); } GL.End(); } else { if (rendertype != PickableObjectRenderType.NoColor) { GL.Color4(ParentCollisionHeader.PolygonTypes[PolygonType].RenderColor); } foreach (Vector3d v in Vertices) { GL.Vertex3(v); } } }
public void Render(PickableObjectRenderType rendertype) { GL.PushAttrib(AttribMask.AllAttribBits); if (rendertype == PickableObjectRenderType.Picking) { GL.Color3(PickColor); GL.CallList(PickGLID); } GL.PopAttrib(); }
public void Render(PickableObjectRenderType rendertype) { if (rendertype == PickableObjectRenderType.Picking) { GL.Color3(PickColor); GL.Begin(PrimitiveType.Quads); RenderVertices(); GL.End(); } else { RenderVertices(); } }
public void Render(PickableObjectRenderType rendertype) { GL.PushAttrib(AttribMask.AllAttribBits); GL.PushMatrix(); GL.Translate(X, Y, Z); GL.Scale(12.0, 12.0, 12.0); if (rendertype != PickableObjectRenderType.Picking) { GL.Color3(0.25, 0.5, 1.0); StockObjects.DownArrow.Render(); if (rendertype == PickableObjectRenderType.Selected) { StockObjects.SimpleAxisMarker.Render(); GL.Color3(1.0, 0.5, 0.0); } else { GL.Color3(0.0, 0.0, 0.0); } GL.LineWidth(4.0f); GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Line); StockObjects.DownArrow.Render(); } else { GL.Color3(PickColor); StockObjects.DownArrow.Render(); } GL.PopMatrix(); GL.PopAttrib(); }
public void Render(PickableObjectRenderType rendertype) { GL.PushAttrib(AttribMask.AllAttribBits); GL.PushMatrix(); GL.Translate(Position); GL.Rotate(Rotation.Z / 182.0444444, 0.0, 0.0, 1.0); GL.Rotate(Rotation.Y / 182.0444444, 0.0, 1.0, 0.0); GL.Rotate(Rotation.X / 182.0444444, 1.0, 0.0, 0.0); GL.Scale(12.0, 12.0, 12.0); /* Determine render mode */ if (rendertype == PickableObjectRenderType.Picking) { /* Picking, so set color to PickColor and render the PickModel */ GL.Color3(PickColor); Definition.PickModel.Render(); } else { /* Not picking, so first render the DisplayModel */ Definition.DisplayModel.Render(); GL.LineWidth(4.0f); /* Now determine outline color */ if (rendertype == PickableObjectRenderType.Normal) { /* Outline depends on actor type */ if (IsSpawnPoint) { GL.Color4(Color4.Green); } else if (IsTransitionActor) { GL.Color4(Color4.Purple); } else { GL.Color4(Color4.Black); } } else { /* Orange outline */ GL.Color3(1.0, 0.5, 0.0); } /* Set line mode, then render PickModel (as that's more likely to not have colors baked in) */ GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Line); Definition.PickModel.Render(); /* When rendering selected actor, make sure to render axis marker too */ if (rendertype == PickableObjectRenderType.Selected) { /* And if a FrontOffset is given in definition, rotate before rendering the marker */ if (Definition.FrontOffset != 0.0) { GL.Rotate(Definition.FrontOffset, 0.0, 1.0, 0.0); } StockObjects.AxisMarker.Render(); } } GL.PopMatrix(); GL.PopAttrib(); }
public void Render(PickableObjectRenderType rendertype) { if (rendertype == PickableObjectRenderType.Picking) { GL.Color3(PickColor); GL.Begin(PrimitiveType.Quads); RenderVertices(); GL.End(); } else RenderVertices(); }
public void Render(PickableObjectRenderType rendertype) { if (rendertype == PickableObjectRenderType.Picking) { GL.Color3(PickColor); GL.Begin(PrimitiveType.Triangles); foreach (Vector3d v in Vertices) GL.Vertex3(v); GL.End(); } else { if (rendertype != PickableObjectRenderType.NoColor) GL.Color4(ParentCollisionHeader.PolygonTypes[PolygonType].RenderColor); foreach (Vector3d v in Vertices) GL.Vertex3(v); } }
public void Render(PickableObjectRenderType rendertype) { GL.PushAttrib(AttribMask.AllAttribBits); GL.PushMatrix(); GL.Translate(X, Y, Z); GL.Scale(12.0, 12.0, 12.0); if (rendertype != PickableObjectRenderType.Picking) { GL.Color3(0.25, 0.5, 1.0); StockObjects.DownArrow.Render(); if (rendertype == PickableObjectRenderType.Selected) { StockObjects.SimpleAxisMarker.Render(); GL.Color3(1.0, 0.5, 0.0); } else GL.Color3(0.0, 0.0, 0.0); GL.LineWidth(4.0f); GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Line); StockObjects.DownArrow.Render(); } else { GL.Color3(PickColor); StockObjects.DownArrow.Render(); } GL.PopMatrix(); GL.PopAttrib(); }
public void Render(PickableObjectRenderType rendertype) { GL.PushAttrib(AttribMask.AllAttribBits); GL.PushMatrix(); GL.Translate(Position); GL.Rotate(Rotation.Z / 182.0444444, 0.0, 0.0, 1.0); GL.Rotate(Rotation.Y / 182.0444444, 0.0, 1.0, 0.0); GL.Rotate(Rotation.X / 182.0444444, 1.0, 0.0, 0.0); GL.Scale(12.0, 12.0, 12.0); /* Determine render mode */ if (rendertype == PickableObjectRenderType.Picking) { /* Picking, so set color to PickColor and render the PickModel */ GL.Color3(PickColor); Definition.PickModel.Render(); } else { /* Not picking, so first render the DisplayModel */ Definition.DisplayModel.Render(); GL.LineWidth(4.0f); /* Now determine outline color */ if (rendertype == PickableObjectRenderType.Normal) { /* Outline depends on actor type */ if (IsSpawnPoint) GL.Color4(Color4.Green); else if (IsTransitionActor) GL.Color4(Color4.Purple); else GL.Color4(Color4.Black); } else { /* Orange outline */ GL.Color3(1.0, 0.5, 0.0); } /* Set line mode, then render PickModel (as that's more likely to not have colors baked in) */ GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Line); Definition.PickModel.Render(); /* When rendering selected actor, make sure to render axis marker too */ if (rendertype == PickableObjectRenderType.Selected) { /* And if a FrontOffset is given in definition, rotate before rendering the marker */ if (Definition.FrontOffset != 0.0) GL.Rotate(Definition.FrontOffset, 0.0, 1.0, 0.0); StockObjects.AxisMarker.Render(); } } GL.PopMatrix(); GL.PopAttrib(); }