private static bool CreateLights(V3dViewer viewer) { var ambientLight = new V3dAmbientLight(viewer, QuantityNameOfColor.Quantity_NOC_GRAY50); Debug.Assert(ambientLight != null); var directionalLight = new V3dDirectionalLight(viewer, V3dTypeOfOrientation.V3d_XnegYnegZneg, QuantityNameOfColor.Quantity_NOC_GRAY75, false); Debug.Assert(directionalLight != null); var directionalLight1 = new V3dDirectionalLight(viewer, V3dTypeOfOrientation.V3d_Xpos, QuantityNameOfColor.Quantity_NOC_GRAY25, false); Debug.Assert(directionalLight1 != null); var directionalLight2 = new V3dDirectionalLight(viewer, V3dTypeOfOrientation.V3d_Ypos, QuantityNameOfColor.Quantity_NOC_GRAY25, false); Debug.Assert(directionalLight2 != null); var directionalLight3 = new V3dDirectionalLight(viewer, V3dTypeOfOrientation.V3d_Zpos, QuantityNameOfColor.Quantity_NOC_GRAY25, false); Debug.Assert(directionalLight3 != null); return(true); }
private bool CreateLights() { var ambientLight = new V3dAmbientLight(this.viewer3d, QuantityNameOfColor.Quantity_NOC_GRAY75); Debug.Assert(ambientLight != null); var directionalLight = new V3dDirectionalLight(this.viewer3d, V3dTypeOfOrientation.V3d_XnegYnegZneg, QuantityNameOfColor.Quantity_NOC_GRAY75, false); Debug.Assert(directionalLight != null); var directionalLight1 = new V3dDirectionalLight(this.viewer3d, V3dTypeOfOrientation.V3d_Xpos, QuantityNameOfColor.Quantity_NOC_GRAY25, false); Debug.Assert(directionalLight1 != null); var directionalLight2 = new V3dDirectionalLight(this.viewer3d, V3dTypeOfOrientation.V3d_Ypos, QuantityNameOfColor.Quantity_NOC_GRAY25, false); Debug.Assert(directionalLight2 != null); var directionalLight3 = new V3dDirectionalLight(this.viewer3d, V3dTypeOfOrientation.V3d_Zpos, QuantityNameOfColor.Quantity_NOC_GRAY25, false); Debug.Assert(directionalLight3 != null); if ((ambientLight != null) && (directionalLight != null)) { return(true); } return(false); }