package Graphics @ISA = qw() sub IdentityMatrix sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub Initialize my ($this, $DisplayMode, $x0, $y0, $w, $h, $WindowTitle, $IsFullScreen) = @_; sub Clear my ($this, $mode) = @_; sub ClearColor my ($this, @color) = @_; sub GenLists my ($this, $n) = @_; return $this->{pObjectLists} = $objects; sub DrawListObject my ($this, $i) = @_; sub NewList my ($this, $i, $mode) = @_; sub EndList sub InitNames sub LoadName my ($this, $i) = @_; sub ExitSelectionMode my ($this) = @_; return $hits; sub EnterSelectionMode my ($this, $x, $y, $dx, $dy) = @_; sub PushMatrix sub PopMatrix sub ReadPixels my ($this, $x, $y, $dx, $dy, $mode, $type) = @_; return glReadPixels_p($x, $y, $dx, $dy, $mode, $type); sub UnProject my ($this, $x, $y, $z, @matrix) = @_; return gluUnProject_p($x, $y, $z, @matrix); sub Get3DPosition my ($this, $x, $y, $z) = @_; return ($ox, $oy, $oz); sub GetDoublev my ($this, $name) = @_; return glGetDoublev_p($name); sub GetIntegerv my ($this, $name) = @_; return glGetIntegerv_p($name); sub GetModelviewMatrix my ($this) = @_; return glGetDoublev_p(GL_MODELVIEW_MATRIX); sub GetProjectionMatrix my ($this) = @_; return glGetDoublev_p(GL_PROJECTION_MATRIX); sub GetViewport my ($this) = @_; return glGetIntegerv_p(GL_VIEWPORT); sub PickMatrix_p my ($this, $x, $y, $dx, $dy, @viewport) = @_; sub RenderMode my ($this, $mode) = @_; sub SelectBuffer my ($this, $n) = @_; sub GetSelectionList my ($this) = @_; return $this->{pSelectionBuffer}->retrieve(0, $len-1); sub GetSelectedObjects my ($this) = @_; return @pObjects; sub CreateSelectionBuffer my ($this, $n) = @_; return $array; sub CallList my ($this, $i) = @_; sub Flush sub Enable my ($this, @a) = @_; sub ShadeModel my ($this, $model) = @_; sub MatrixMode my ($this, $mode) = @_; sub InitializeMatrix my ($this) = @_; sub Run my ($OGL) = @_; sub Show my ($this) = @_; sub Redraw my ($OGL) = @_; sub PostRedisplay my ($OGL) = @_; sub LookAt my ($this, $EyeX, $EyeY, $EyeZ, $TargetX, $TargetY, $TargetZ, $UpvectorX, $UpvectorY, $UpvectorZ) = @_; sub Perspective my ($this, $ViewAngle, $AspectRatioWdivH, $zNear, $zFar) = @_; sub Viewport my ($this, @a) = @_; sub Rotated my ($this, $angle, $vx, $vy, $vz) = @_; sub Translated my ($this, $x, $y, $z) = @_; sub glLight my ($this, $object, $action, $p) = @_; sub SetLight my ($this, $object, $material) = @_; sub glMaterial my ($this, $object, $action, $p) = @_; sub SetMaterial my ($this, $material, $side) = @_; return if(!defined $material); sub CalTransform my ($this, $x0, $y0, $z0, $x1, $y1, $z1) = @_; sub DrawCube my ($this, $x, $y, $z, $size, $material) = @_; sub DrawSphere my ($this, $x, $y, $z, $radius, $material, $nsides) = @_; sub DrawCylinder my ($this, $x0, $y0, $z0, $x1, $y1, $z1, $radius, $material, $nsides) = @_; sub DrawCylinder0 my ($this, $x, $y, $z, $radius, $height, $material, $nsides) = @_; sub DrawGround my ($this, $height) = @_; sub SetOffset my ($this, $cx, $cy, $cz) = @_; sub SetFunctions my ($this, @a) = @_; sub CreateWindow my ($this, $x0, $y0, $w, $h, $WindowTitle, $IsFullScreen) = @_; sub display my ($this) = @_; sub errCallBack my ($this, $errCode) = @_; sub glDrawCylinder my ($this, $radius, $height, $nsides) = @_; sub IsFuncPressed my ($this, $num) = @_; return glutGetModifiers() == eval("GLUT_KEY_F$num"); sub IsShiftPressed return glutGetModifiers() == GLUT_ACTIVE_SHIFT; sub IsCtrlPressed return glutGetModifiers() == GLUT_ACTIVE_CTRL; sub GetModifiers return glutGetModifiers(); sub keyboard my ($this, $key, $x, $y) = @_; sub mouse my ($this, $button, $state, $x, $y) = @_; sub OnInitializeForMouseZoom my ($this, $EyeZ, $ViewAngle) = @_; sub OnDisplayForMouseZoom my ($this) = @_; sub OnResizeForMouseZoom my ($this, $w, $h) = @_; sub OnDrawForMouseZoom my ($this) = @_; sub OnMotionForMouseZoom my ($this, $x, $y) = @_; sub OnMouseDownForMouseZoom my ($this, $x, $y) = @_; sub OnMouseUpForMouseZoom my ($this, $x, $y) = @_; sub OnInitializeForMouseTranslation my ($this) = @_; sub OnDisplayForMouseTranslation my ($this) = @_; sub OnResizeForMouseTranslation my ($this, $w, $h, $k) = @_; sub OnDrawForMouseTranslation my ($this) = @_; sub OnMotionForMouseTranslation my ($this, $x, $y) = @_; sub OnMouseDownForMouseTranslation my ($this, $x, $y) = @_; sub OnMouseUpForMouseTranslation my ($this, $x, $y) = @_; sub OnInitializeForMouseRotation my ($this) = @_; sub OnDisplayForMouseRotation my ($this) = @_; sub OnResizeForMouseRotation my ($this, $w, $h) = @_; sub OnDrawForMouseRotation my ($this) = @_; sub OnMouseDownForMouseRotation my ($this, $x, $y) = @_; sub OnMouseUpForMouseRotation my ($this, $x, $y) = @_; sub OnMotionForMouseRotation my ($this, $x, $y) = @_;