Beispiel #1
0
 /**
  * Caclulate Screen Coordinates
  *
  * Calculate isometric screen coordinates for a point 
  *
  * @param Image_3D_Point $point Point to process
  *
  * @return  void
  */
 protected function _calculateScreenCoordiantes(Image_3D_Point $point)
 {
     $point->setScreenCoordinates($point->getX() - $point->getZ() * 0.35 + $this->_size[0], $point->getY() + $point->getZ() * 0.35 + $this->_size[1]);
 }
Beispiel #2
0
 /**
  * Caclulate Screen Coordinates
  *
  * Calculate perspectively screen coordinates for a point
  *
  * @param Image_3D_Point $point Point to process
  *
  * @return  void
  */
 protected function _calculateScreenCoordiantes(Image_3D_Point $point)
 {
     $viewpoint = 500.0;
     $distance = 500.0;
     $point->setScreenCoordinates($viewpoint * $point->getX() / ($point->getZ() + $distance) + $this->_size[0], $viewpoint * $point->getY() / ($point->getZ() + $distance) + $this->_size[1]);
 }