|
|
TObserver=class(TVAEObject)
private
protected
FDC,FRC,FHandle:THandle;
FVEye,FVFront,FVUp,FVRight:TPoint3D;
FSW,FSH:VInt;FSSL,FSN,FSF:VExtended;
procedure InitOpengl(DC:HDC);
published
constructor Create(hWnd:THandle);
procedure Free;override;
procedure SetScene;
//在离观察者StandardLength的平面绘图,显示出来的尺寸与真实尺寸一样
procedure InitScene(Width,Height:VInt;StandardLength,NearLen,FarLen:VExtended);
public
procedure SetObserver(Reset:Boolean=True);
procedure SetEye(X,Y,Z:VExtended);
procedure SetDirection(Direction:TObserverDirection;Angle:VExtended);overload;
procedure SetDirection(VFront,VUp:TPoint3D);overload;
function GetVector(Vector:TObserverVector):TPoint3D;
function OutOfSight(aX,aY,aZ:VExtended):Boolean;
procedure Walk(Len:VExtended);overload;
procedure Walk(Len:VExtended;UnitVector:TPoint3D);overload;
procedure Rotate(V:TPoint3D;Angle:VExtended);
procedure GetData(var W,H,Len,N,F:VExtended);
end;
=======================================
这样的设计行不行 |
|