Lines Matching refs:cam

97     MyCameraObj   cam;  // for projection  member
113 MyCameraObj cam; member
132 static void GetTexProjMtx ( MyCameraObj* cam, Mtx mp );
134 static void SetCamera ( MyCameraObj* cam );
302 sc->cam.cfg = DefaultCamera; in DrawInit()
303 sc->cam.theta = 45; in DrawInit()
304 sc->cam.phi = 25; in DrawInit()
305 sc->cam.distance = 2000.0F; in DrawInit()
309 sc->light.cam.theta = 0; in DrawInit()
310 sc->light.cam.phi = 60; in DrawInit()
311 sc->light.cam.distance = 3000.0F; in DrawInit()
369 sc->light.cam.cfg = ( sc->projMode ) ? in DrawTick()
371 SetCamera(&sc->light.cam); in DrawTick()
382 DrawModels(sc->light.cam.view, mtg, adjf, &sc->anim); in DrawTick()
413 SetCamera(&sc->cam); in DrawTick()
414 SetLight(&sc->light, sc->cam.view); in DrawTick()
448 GetTexProjMtx(&sc->light.cam, mtg); in DrawTick()
451 DrawModels(sc->cam.view, mtg, 1.0F, &sc->anim); in DrawTick()
468 sc->cam.theta += ( DEMOPadGetStickX(0) / 24 ); in AnimTick()
469 sc->cam.theta = ( sc->cam.theta + 360 ) % 360; in AnimTick()
470 sc->cam.phi += ( DEMOPadGetStickY(0) / 24 ); in AnimTick()
471 Clamp(sc->cam.phi, 10, 60); in AnimTick()
474 sc->light.cam.theta += ( DEMOPadGetSubStickX(0) / 24 ); in AnimTick()
475 sc->light.cam.theta = ( sc->light.cam.theta + 360 ) % 360; in AnimTick()
476 sc->light.cam.phi += ( DEMOPadGetSubStickY(0) / 24 ); in AnimTick()
477 Clamp(sc->light.cam.phi, 15, 90); in AnimTick()
677 static void GetTexProjMtx( MyCameraObj* cam, Mtx mp ) in GetTexProjMtx() argument
681 if ( cam->cfg.type == GX_PERSPECTIVE ) in GetTexProjMtx()
685 - (cam->cfg.top), // t = -y in projected texture in GetTexProjMtx()
686 cam->cfg.top, in GetTexProjMtx()
687 cam->cfg.left, in GetTexProjMtx()
688 - (cam->cfg.left), in GetTexProjMtx()
689 cam->cfg.znear, in GetTexProjMtx()
699 - (cam->cfg.top), // t = -y in projected texture in GetTexProjMtx()
700 cam->cfg.top, in GetTexProjMtx()
701 cam->cfg.left, in GetTexProjMtx()
702 - (cam->cfg.left), in GetTexProjMtx()
709 MTXConcat(proj, cam->view, mp); in GetTexProjMtx()
742 static void SetCamera( MyCameraObj* cam ) in SetCamera() argument
746 r_theta = (f32)cam->theta * PI / 180.0F; in SetCamera()
747 r_phi = (f32)cam->phi * PI / 180.0F; in SetCamera()
749 cam->cfg.location.x = in SetCamera()
750 cam->distance * cosf(r_theta) * cosf(r_phi); in SetCamera()
751 cam->cfg.location.y = in SetCamera()
752 cam->distance * sinf(r_theta) * cosf(r_phi); in SetCamera()
753 cam->cfg.location.z = in SetCamera()
754 cam->distance * sinf(r_phi); in SetCamera()
757 cam->view, in SetCamera()
758 &cam->cfg.location, in SetCamera()
759 &cam->cfg.up, in SetCamera()
760 &cam->cfg.target ); in SetCamera()
762 if ( cam->cfg.type == GX_PERSPECTIVE ) in SetCamera()
765 cam->proj, in SetCamera()
766 cam->cfg.top, in SetCamera()
767 - (cam->cfg.top), in SetCamera()
768 cam->cfg.left, in SetCamera()
769 - (cam->cfg.left), in SetCamera()
770 cam->cfg.znear, in SetCamera()
771 cam->cfg.zfar ); in SetCamera()
776 cam->proj, in SetCamera()
777 cam->cfg.top, in SetCamera()
778 - (cam->cfg.top), in SetCamera()
779 cam->cfg.left, in SetCamera()
780 - (cam->cfg.left), in SetCamera()
781 cam->cfg.znear, in SetCamera()
782 cam->cfg.zfar ); in SetCamera()
785 GXSetProjection(cam->proj, cam->cfg.type); in SetCamera()
800 Vec lpos = light->cam.cfg.location; in SetLight()