Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 |
class StereoP2AT extends P2AT; var config vector stereoSpacing; //(eye to eye)/2 spacing in UU var vector uuStereoSpacing; simulated function ConvertParam(USARConverter converter) { Super.ConvertParam(converter); if (converter!=None) { uuStereoSpacing = converter.LengthVectorToUU(stereoSpacing); } else { uuStereoSpacing = stereoSpacing; } } simulated function DrawHud(Canvas C) { local int halfSizeX; local vector stereoRotated; halfSizeX = C.SizeX/2.0; stereoRotated = uuStereoSpacing >> myCamera.Rotation; C.Reset(); C.Clear(); //Clears frame & Z buffers //left Eye: C.DrawPortal(0, 0, halfSizeX, C.SizeY, myCamera, myCamera.Location - stereoRotated, myCamera.Rotation, CameraZoom); //Right Eye: C.DrawPortal(halfSizeX, 0, halfSizeX, C.SizeY, myCamera, myCamera.Location + stereoRotated, myCamera.Rotation, CameraZoom); super.DrawHud(C); } defaultproperties { stereoSpacing=(Y=0.04) //4 cm: (eye to eye)/2 spacing in meter } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |