⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 super3dlib_tlb.pas

📁 GIS开发源代码。 SuperMax5.0+Delphi,用Delphi编写的控件工具包
💻 PAS
📖 第 1 页 / 共 4 页
字号:
    procedure AboutBox;
    function SaveMap3DAs(const strMapName: WideString): WordBool;
    function Rotate(dAngle: Double; NormalX: Double; NormalY: Double; NormalZ: Double): WordBool;
    function RouteFly(const obj3DPoints: IsoPoint3Ds; dPeriod: Double): WordBool;
    procedure RestoreScene;
    procedure Fly(const objViewPoint: IsoPoint3D; fVisAngle: Single; dRoll: Double; dPitch: Double; 
                  dHeading: Double);
    function SaveSceneAs(const strName: WideString): WordBool;
    function HitTestEx(X: Double; Y: Double): WordBool;
    function OpenScene(const strName: WideString): WordBool;
    function SaveScene: WordBool;
    procedure AddResourceLocation(const strPathName: WideString);
    procedure UnlockWindowUpdate;
    function OpenMap3D(const strMapName: WideString): WordBool;
    function OutputToFile(const strPictureFile: WideString): WordBool; overload;
    function OutputToFile(const strPictureFile: WideString; nFileFormat: OleVariant): WordBool; overload;
    procedure LockWindowUpdate;
    function CreateSoObject(const strObjectName: WideString): IDispatch;
    function RegisterForRuntime(const strUser: WideString; const strCompany: WideString; 
                                const strSerialNo: WideString): WordBool;
    procedure Refresh;
    function Output(hDC: OLE_HANDLE): WordBool;
    procedure PanRotate(dX: Integer; dY: Integer);
    procedure Flood(dHeight: Double);
    procedure FloodEx(const ControlPoints: IDispatch);
    function CompileChunkLod(const objDataset: IDispatch): WordBool; overload;
    function CompileChunkLod(const objDataset: IDispatch; nTreeDepth: OleVariant): WordBool; overload;
    function CompileChunkLod(const objDataset: IDispatch; nTreeDepth: OleVariant; 
                             dMaxError: OleVariant): WordBool; overload;
    function CompileChunkLod(const objDataset: IDispatch; nTreeDepth: OleVariant; 
                             dMaxError: OleVariant; dResolution: OleVariant): WordBool; overload;
    function CompileChunkLod(const objDataset: IDispatch; nTreeDepth: OleVariant; 
                             dMaxError: OleVariant; dResolution: OleVariant; 
                             dVerticalScale: OleVariant): WordBool; overload;
    function CompileChunkLod(const objDataset: IDispatch; nTreeDepth: OleVariant; 
                             dMaxError: OleVariant; dResolution: OleVariant; 
                             dVerticalScale: OleVariant; dStoredScale: OleVariant): WordBool; overload;
    function SaveMap3D: WordBool;
    function Pan(dX: Double; dY: Double): WordBool;
    function LightSource(const objPosition: IsoPoint3D; bLocate: WordBool): WordBool;
    procedure Zoom(dRatio: Double);
    function HitTest(dWinX: Double; dWinY: Double): IsoPoint3D;
    property  ControlInterface: _DSuper3D read GetControlInterface;
    property  DefaultInterface: _DSuper3D read GetControlInterface;
    property Zscale: Double index 48 read GetDoubleProp write SetDoubleProp;
    property Yscale: Double index 47 read GetDoubleProp write SetDoubleProp;
    property Xscale: Double index 46 read GetDoubleProp write SetDoubleProp;
    property FlightControl: IsoFlightControl read Get_FlightControl write Set_FlightControl;
    property Layers: IsoLayers read Get_Layers write Set_Layers;
    property ClipRegion: IsoGeoRegion read Get_ClipRegion write Set_ClipRegion;
    property ActiveDataset: IsoDataset read Get_ActiveDataset write Set_ActiveDataset;
  published
    property Anchors;
    property  TabStop;
    property  Align;
    property  DragCursor;
    property  DragMode;
    property  ParentShowHint;
    property  PopupMenu;
    property  ShowHint;
    property  TabOrder;
    property  Visible;
    property  OnDragDrop;
    property  OnDragOver;
    property  OnEndDrag;
    property  OnEnter;
    property  OnExit;
    property  OnStartDrag;
    property  OnMouseUp;
    property  OnMouseMove;
    property  OnMouseDown;
    property  OnKeyDown;
    property RenderMode: TOleEnum index 49 read GetTOleEnumProp write SetTOleEnumProp stored False;
    property CenterPosition: IsoPoint3D read Get_CenterPosition write Set_CenterPosition stored False;
    property LightColor: TColor index 44 read GetTColorProp write SetTColorProp stored False;
    property Camera: IsoCamera read Get_Camera write Set_Camera stored False;
    property Lights: IsoLights read Get_Lights write Set_Lights stored False;
    property Fog: IsoFog read Get_Fog write Set_Fog stored False;
    property TrackingLayer3D: Iso3DTrackingLayer read Get_TrackingLayer3D write Set_TrackingLayer3D stored False;
    property Layer3Ds: Iso3DLayers read Get_Layer3Ds write Set_Layer3Ds stored False;
    property Action: TOleEnum index 38 read GetTOleEnumProp write SetTOleEnumProp stored False;
    property SelectionTolerance: Integer index 37 read GetIntegerProp write SetIntegerProp stored False;
    property Selection: IsoSelection read Get_Selection write Set_Selection stored False;
    property WaterColor: TColor index 35 read GetTColorProp write SetTColorProp stored False;
    property BackGroundTexture: WideString index 10 read GetWideStringProp write SetWideStringProp stored False;
    property Appearance: Smallint index -520 read GetSmallintProp write SetSmallintProp stored False;
    property AltitudeField: WideString index 9 read GetWideStringProp write SetWideStringProp stored False;
    property Texture: WideString index 8 read GetWideStringProp write SetWideStringProp stored False;
    property OverlayImage: IsoDatasetRaster read Get_OverlayImage write Set_OverlayImage stored False;
    property ScaleZ: Double index 5 read GetDoubleProp write SetDoubleProp stored False;
    property Colorset: IsoColors read Get_Colorset write Set_Colorset stored False;
    property FloodEnable: WordBool index 3 read GetWordBoolProp write SetWordBoolProp stored False;
    property BackColor: TColor index 2 read GetTColorProp write SetTColorProp stored False;
    property OnGeometrySelected: TSuper3DGeometrySelected read FOnGeometrySelected write FOnGeometrySelected;
  end;

// *********************************************************************//
// The Class Coso3DAnalyst provides a Create and CreateRemote method to          
// create instances of the default interface Iso3DAnalyst exposed by              
// the CoClass so3DAnalyst. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  Coso3DAnalyst = class
    class function Create: Iso3DAnalyst;
    class function CreateRemote(const MachineName: string): Iso3DAnalyst;
  end;

// *********************************************************************//
// The Class CosoFlightControl provides a Create and CreateRemote method to          
// create instances of the default interface IsoFlightControl exposed by              
// the CoClass soFlightControl. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CosoFlightControl = class
    class function Create: IsoFlightControl;
    class function CreateRemote(const MachineName: string): IsoFlightControl;
  end;

// *********************************************************************//
// The Class CosoCutFillResult provides a Create and CreateRemote method to          
// create instances of the default interface IsoCutFillResult exposed by              
// the CoClass soCutFillResult. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CosoCutFillResult = class
    class function Create: IsoCutFillResult;
    class function CreateRemote(const MachineName: string): IsoCutFillResult;
  end;

procedure Register;

resourcestring
  dtlServerPage = 'ActiveX';

  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

class function CosoGeoEvent3D.Create: IsoGeoEvent3D;
begin
  Result := CreateComObject(CLASS_soGeoEvent3D) as IsoGeoEvent3D;
end;

class function CosoGeoEvent3D.CreateRemote(const MachineName: string): IsoGeoEvent3D;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_soGeoEvent3D) as IsoGeoEvent3D;
end;

class function Coso3DLayer.Create: Iso3DLayer;
begin
  Result := CreateComObject(CLASS_so3DLayer) as Iso3DLayer;
end;

class function Coso3DLayer.CreateRemote(const MachineName: string): Iso3DLayer;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_so3DLayer) as Iso3DLayer;
end;

class function Coso3DLayers.Create: Iso3DLayers;
begin
  Result := CreateComObject(CLASS_so3DLayers) as Iso3DLayers;
end;

class function Coso3DLayers.CreateRemote(const MachineName: string): Iso3DLayers;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_so3DLayers) as Iso3DLayers;
end;

class function CosoStyle3D.Create: IsoStyle3D;
begin
  Result := CreateComObject(CLASS_soStyle3D) as IsoStyle3D;
end;

class function CosoStyle3D.CreateRemote(const MachineName: string): IsoStyle3D;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_soStyle3D) as IsoStyle3D;
end;

class function Coso3DTrackingLayer.Create: Iso3DTrackingLayer;
begin
  Result := CreateComObject(CLASS_so3DTrackingLayer) as Iso3DTrackingLayer;
end;

class function Coso3DTrackingLayer.CreateRemote(const MachineName: string): Iso3DTrackingLayer;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_so3DTrackingLayer) as Iso3DTrackingLayer;
end;

class function CosoFog.Create: IsoFog;
begin
  Result := CreateComObject(CLASS_soFog) as IsoFog;
end;

class function CosoFog.CreateRemote(const MachineName: string): IsoFog;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_soFog) as IsoFog;
end;

class function CosoLight.Create: IsoLight;
begin
  Result := CreateComObject(CLASS_soLight) as IsoLight;
end;

class function CosoLight.CreateRemote(const MachineName: string): IsoLight;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_soLight) as IsoLight;
end;

class function CosoLights.Create: IsoLights;
begin
  Result := CreateComObject(CLASS_soLights) as IsoLights;
end;

class function CosoLights.CreateRemote(const MachineName: string): IsoLights;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_soLights) as IsoLights;
end;

class function CosoCamera.Create: IsoCamera;
begin
  Result := CreateComObject(CLASS_soCamera) as IsoCamera;
end;

class function CosoCamera.CreateRemote(const MachineName: string): IsoCamera;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_soCamera) as IsoCamera;
end;

procedure TSuper3D.InitControlData;
const
  CEventDispIDs: array [0..0] of DWORD = (
    $00000001);
  CLicenseKey: array[0..39] of Word = ( $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020, $0028
    , $0063, $0029, $0020, $0032, $0030, $0030, $0030, $0020, $0053, $0075
    , $0070, $0065, $0072, $004D, $0061, $0070, $0020, $0043, $006F, $0072
    , $0070, $006F, $0072, $0061, $0074, $0069, $006F, $006E, $0000);
  CControlData: TControlData2 = (
    ClassID: '{09947CFE-F736-4E8E-BFFD-906FF5D6322C}';
    EventIID: '{3E86DE3E-20FE-47A2-90CA-7C3D91EDF7B4}';
    EventCount: 1;
    EventDispIDs: @CEventDispIDs;
    LicenseKey: @CLicenseKey;
    Flags: $00000000;
    Version: 401);
begin
  ControlData := @CControlData;
  TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnGeometrySelected) - Cardinal(Self);
end;

procedure TSuper3D.CreateControl;

  procedure DoCreate;
  begin
    FIntf := IUnknown(OleObject) as _DSuper3D;
  end;

begin
  if FIntf = nil then DoCreate;
end;

function TSuper3D.GetControlInterface: _DSuper3D;
begin
  CreateControl;
  Result := FIntf;
end;

function TSuper3D.Get_CenterPosition: IsoPoint3D;
begin
  Result := DefaultInterface.CenterPosition;
end;

procedure TSuper3D.Set_CenterPosition(const Value: IsoPoint3D);
begin
  DefaultInterface.CenterPosition := Value;
end;

function TSuper3D.Get_Camera: IsoCamera;
begin
  Result := DefaultInterface.Camera;
end;

procedure TSuper3D.Set_Camera(const Value: IsoCamera);
begin
  DefaultInterface.Camera := Value;
end;

function TSuper3D.Get_Lights: IsoLights;
begin
  Result := DefaultInterface.Lights;
end;

procedure TSuper3D.Set_Lights(const Value: IsoLights);
begin
  DefaultInterface.Lights := Value;
end;

function TSuper3D.Get_Fog: IsoFog;
begin
  Result := DefaultInterface.Fog;
end;

procedure TSuper3D.Set_Fog(const Value: IsoFog);
begin
  DefaultInterface.Fog := Value;
end;

function TSuper3D.Get_TrackingLayer3D: Iso3DTrackingLayer;
begin
  Result := DefaultInterface.TrackingLayer3D;
end;

procedure TSuper3D.Set_TrackingLayer3D(const Value: Iso3DTrackingLayer);
begin
  DefaultInterface.TrackingLayer3D := Value;
end;

function TSuper3D.Get_Layer3Ds: Iso3DLayers;
begin
  Result := DefaultInterface.Layer3Ds;
end;

procedure TSuper3D.Set_Layer3Ds(const Value: Iso3DLayers);
begin
  DefaultInterface.Layer3Ds := Value;
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -