Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Request #14925 - PHPCS

git-svn-id: https://svn.php.net/repository/pear/packages/Image_3D/trunk@270293 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit 841c60a0f40dfc0e0c1ff58b99da113f49001eff 1 parent 8e0f28b
@CloCkWeRX CloCkWeRX authored
View
16 Image/3D/Paintable/Light/Ambient.php
@@ -36,14 +36,14 @@
/**
* Image_3D_Light
*
- * @category Image
- * @package Image_3D
- * @author Kore Nordmann <3d@kore-nordmann.de>
- * @copyright 1997-2005 Kore Nordmann
- * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PackageName
- * @since Class available since Release 0.1.0
+ * @category Image
+ * @package Image_3D
+ * @author Kore Nordmann <3d@kore-nordmann.de>
+ * @copyright 1997-2005 Kore Nordmann
+ * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/PackageName
+ * @since Class available since Release 0.1.0
*/
class Image_3D_Light_Ambient extends Image_3D_Light {
View
16 Image/3D/Paintable/Light/Point.php
@@ -36,14 +36,14 @@
/**
* Image_3D_Light_Point
*
- * @category Image
- * @package Image_3D
- * @author Kore Nordmann <3d@kore-nordmann.de>
- * @copyright 1997-2005 Kore Nordmann
- * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PackageName
- * @since Class available since Release 0.1.0
+ * @category Image
+ * @package Image_3D
+ * @author Kore Nordmann <3d@kore-nordmann.de>
+ * @copyright 1997-2005 Kore Nordmann
+ * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/PackageName
+ * @since Class available since Release 0.1.0
*/
class Image_3D_Light_Point extends Image_3D_Light {
View
16 Image/3D/Paintable/Light/Spotlight.php
@@ -36,14 +36,14 @@
/**
* Image_3D_Light
*
- * @category Image
- * @package Image_3D
- * @author Kore Nordmann <3d@kore-nordmann.de>
- * @copyright 1997-2005 Kore Nordmann
- * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PackageName
- * @since Class available since Release 0.1.0
+ * @category Image
+ * @package Image_3D
+ * @author Kore Nordmann <3d@kore-nordmann.de>
+ * @copyright 1997-2005 Kore Nordmann
+ * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/PackageName
+ * @since Class available since Release 0.1.0
*/
class Image_3D_Light_Spotlight extends Image_3D_Light {
View
101 Image/3D/Paintable/Object.php
@@ -36,16 +36,17 @@
/**
* Image_3D_Object
*
- * @category Image
- * @package Image_3D
- * @author Kore Nordmann <3d@kore-nordmann.de>
- * @copyright 1997-2005 Kore Nordmann
- * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PackageName
- * @since Class available since Release 0.1.0
+ * @category Image
+ * @package Image_3D
+ * @author Kore Nordmann <3d@kore-nordmann.de>
+ * @copyright 1997-2005 Kore Nordmann
+ * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/PackageName
+ * @since Class available since Release 0.1.0
*/
-class Image_3D_Object implements Image_3D_Interface_Paintable {
+class Image_3D_Object implements Image_3D_Interface_Paintable
+{
protected $_polygones;
@@ -54,25 +55,39 @@ public function __construct()
$this->_polygones = array();
}
- public function getPolygonCount() {
+ public function getPolygonCount()
+ {
return count($this->_polygones);
}
- public function setColor(Image_3D_Color $color) {
- foreach ($this->_polygones as $polygon) $polygon->setColor($color);
+ public function setColor(Image_3D_Color $color)
+ {
+ foreach ($this->_polygones as $polygon) {
+ $polygon->setColor($color);
+ }
}
- public function setOption($option, $value) {
- foreach ($this->_polygones as $polygon) $polygon->setOption($option, $value);
+ public function setOption($option, $value)
+ {
+ foreach ($this->_polygones as $polygon) {
+ $polygon->setOption($option, $value);
+ }
}
- public function transform(Image_3D_Matrix $matrix, $id = null) {
+ public function transform(Image_3D_Matrix $matrix, $id = null)
+ {
- if ($id === null) $id = substr(md5(microtime()), 0, 8);
- foreach ($this->_polygones as $polygon) $polygon->transform($matrix, $id);
+ if ($id === null) {
+ $id = substr(md5(microtime()), 0, 8);
+ }
+
+ foreach ($this->_polygones as $polygon) {
+ $polygon->transform($matrix, $id);
+ }
}
- public function getPolygones() {
+ public function getPolygones()
+ {
return $this->_polygones;
}
@@ -86,16 +101,16 @@ protected function _buildInzidenzGraph()
$polygons = $this->getPolygones();
$surfaces = array();
- $edges = array();
- $points = array();
+ $edges = array();
+ $points = array();
$point_hash = array();
- $edge_hash = array();
+ $edge_hash = array();
foreach ($polygons as $nr => $polygon) {
$p_points = $polygon->getPoints();
- $last_index = false;
+ $last_index = false;
$first_index = false;
foreach ($p_points as $point) {
// Add point to edge
@@ -103,8 +118,9 @@ protected function _buildInzidenzGraph()
if (isset($point_hash[$p_p_hash])) {
$p_p_index = $point_hash[$p_p_hash];
} else {
- $points[] = $point;
+ $points[] = $point;
$p_p_index = count($points) - 1;
+
$point_hash[$p_p_hash] = $p_p_index;
}
@@ -117,7 +133,9 @@ protected function _buildInzidenzGraph()
$surfaces[$nr][] = $edge_hash[$p_e_hash];
} else {
$edges[] = $e_points;
+
$edge_hash[$p_e_hash] = count($edges) - 1;
+
$surfaces[$nr][] = $edge_hash[$p_e_hash];
}
} else {
@@ -135,9 +153,9 @@ protected function _buildInzidenzGraph()
if (isset($edge_hash[$p_e_hash])) {
$surfaces[$nr][] = $edge_hash[$p_e_hash];
} else {
- $edges[] = $e_points;
+ $edges[] = $e_points;
$edge_hash[$p_e_hash] = count($edges) - 1;
- $surfaces[$nr][] = $edge_hash[$p_e_hash];
+ $surfaces[$nr][] = $edge_hash[$p_e_hash];
}
}
@@ -148,19 +166,20 @@ protected function _buildInzidenzGraph()
);
}
- public function subdivideSurfaces($factor = 1) {
+ public function subdivideSurfaces($factor = 1)
+ {
for ($i = 0; $i < $factor; ++$i) {
$data = $this->_buildInzidenzGraph();
// Additional hash maps
$edge_surfaces = array();
- $edge_middles = array();
- $point_edges = array();
+ $edge_middles = array();
+ $point_edges = array();
// New calculated points
$face_points = array();
$edge_points = array();
- $old_points = array();
+ $old_points = array();
// Calculate "face points"
foreach ($data['surfaces'] as $surface => $edges) {
@@ -168,12 +187,13 @@ public function subdivideSurfaces($factor = 1) {
$points = array();
foreach ($edges as $edge) {
$points = array_merge($points, $data['edges'][$edge]);
+
$edge_surfaces[$edge][] = $surface;
}
$points = array_unique($points);
// Calculate average
- $face_point = array(0, 0, 0);
+ $face_point = array(0, 0, 0);
$point_count = count($points);
foreach ($points as $point) {
$face_point[0] += $data['points'][$point]->getX() / $point_count;
@@ -195,6 +215,7 @@ public function subdivideSurfaces($factor = 1) {
$point_count = count($points);
foreach ($points as $point) {
$point_edges[$point][] = $edge;
+
$edge_middle[0] += $data['points'][$point]->getX() / $point_count;
$edge_middle[1] += $data['points'][$point]->getY() / $point_count;
$edge_middle[2] += $data['points'][$point]->getZ() / $point_count;
@@ -204,7 +225,7 @@ public function subdivideSurfaces($factor = 1) {
// Calculate average of the adjacent faces
$average_face = array(0, 0, 0);
- $point_count = count($edge_surfaces[$edge]);
+ $point_count = count($edge_surfaces[$edge]);
foreach ($edge_surfaces[$edge] as $surface) {
$average_face[0] += $face_points[$surface]->getX() / $point_count;
$average_face[1] += $face_points[$surface]->getY() / $point_count;
@@ -219,18 +240,23 @@ public function subdivideSurfaces($factor = 1) {
foreach ($data['points'] as $point => $value) {
// Calculate average of midpoints of adjacent edges
$r = array(0, 0, 0);
+
$surfaces = array();
+
$point_count = count($point_edges[$point]);
+
foreach ($point_edges[$point] as $edge) {
$r[0] += $edge_middles[$edge][0] / $point_count;
$r[1] += $edge_middles[$edge][1] / $point_count;
$r[2] += $edge_middles[$edge][2] / $point_count;
+
$surfaces = array_merge($surfaces, $edge_surfaces[$edge]);
}
- $surfaces= array_unique($surfaces);
+ $surfaces = array_unique($surfaces);
// Calculate average of surrounding face points
$q = array(0, 0, 0);
+
$surface_count = count($surfaces);
foreach ($surfaces as $surface) {
$q[0] += $face_points[$surface]->getX() / $surface_count;
@@ -240,6 +266,7 @@ public function subdivideSurfaces($factor = 1) {
// Create new edge point
$n = count($point_edges[$point]);
+
$old_points[$point] = new Image_3D_Point(
($q[0] / $n) + ((2 * $r[0]) / $n) + (($value->getX() * ($n - 3)) / $n),
($q[1] / $n) + ((2 * $r[1]) / $n) + (($value->getY() * ($n - 3)) / $n),
@@ -260,12 +287,10 @@ public function subdivideSurfaces($factor = 1) {
// Create new polygones
foreach ($points as $point) {
$edges = array_values(array_intersect($point_edges[$point], $data['surfaces'][$surface]));
- $this->_addPolygon(new Image_3D_Polygon(
- $old_points[$point],
- $edge_points[$edges[0]],
- $face_point,
- $edge_points[$edges[1]]
- ));
+ $this->_addPolygon(new Image_3D_Polygon($old_points[$point],
+ $edge_points[$edges[0]],
+ $face_point,
+ $edge_points[$edges[1]]));
}
}
View
16 Image/3D/Paintable/Object/3ds.php
@@ -38,14 +38,14 @@
/**
* Image_3D_Object_3ds
*
- * @category Image
- * @package Image_3D
- * @author Kore Nordmann <3d@kore-nordmann.de>
- * @copyright 1997-2005 Kore Nordmann
- * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PackageName
- * @since Class available since Release 0.1.0
+ * @category Image
+ * @package Image_3D
+ * @author Kore Nordmann <3d@kore-nordmann.de>
+ * @copyright 1997-2005 Kore Nordmann
+ * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/PackageName
+ * @since Class available since Release 0.1.0
*/
class Image_3D_Object_3ds extends Image_3D_Object {
View
16 Image/3D/Paintable/Object/Cube.php
@@ -37,14 +37,14 @@
/**
* Image_3D_Object_Cube
*
- * @category Image
- * @package Image_3D
- * @author Kore Nordmann <3d@kore-nordmann.de>
- * @copyright 1997-2005 Kore Nordmann
- * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PackageName
- * @since Class available since Release 0.1.0
+ * @category Image
+ * @package Image_3D
+ * @author Kore Nordmann <3d@kore-nordmann.de>
+ * @copyright 1997-2005 Kore Nordmann
+ * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/PackageName
+ * @since Class available since Release 0.1.0
*/
class Image_3D_Object_Cube extends Image_3D_Object {
View
186 Image/3D/Paintable/Polygon.php
@@ -36,16 +36,17 @@
/**
* Image_3D_Polygon
*
- * @category Image
- * @package Image_3D
- * @author Kore Nordmann <3d@kore-nordmann.de>
- * @copyright 1997-2005 Kore Nordmann
- * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PackageName
- * @since Class available since Release 0.1.0
+ * @category Image
+ * @package Image_3D
+ * @author Kore Nordmann <3d@kore-nordmann.de>
+ * @copyright 1997-2005 Kore Nordmann
+ * @license http://www.gnu.org/licenses/lgpl.txt lgpl 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/PackageName
+ * @since Class available since Release 0.1.0
*/
-class Image_3D_Polygon implements Image_3D_Interface_Paintable, Image_3D_Interface_Enlightenable {
+class Image_3D_Polygon implements Image_3D_Interface_Paintable, Image_3D_Interface_Enlightenable
+{
protected $_color;
protected $_colorCalculated;
@@ -64,11 +65,14 @@ public function __construct()
{
$this->_points = array();
$this->_option = array();
- $this->_color = null;
+ $this->_color = null;
+
$this->_colorCalculated = false;
- $this->_visible = true;
- $this->_normale = null;
+
+ $this->_visible = true;
+ $this->_normale = null;
$this->_position = null;
+
$this->_boundingRect = array(null, null, null, null, null, null);
if (func_num_args()) {
@@ -81,16 +85,21 @@ public function __construct()
}
}
- public function calculateColor($lights) {
- foreach ($lights as $light) $this->_color = $light->getColor($this);
+ public function calculateColor($lights)
+ {
+ foreach ($lights as $light) {
+ $this->_color = $light->getColor($this);
+ }
$this->_color->calculateColor();
}
- public function getColor() {
+ public function getColor()
+ {
return $this->_color;
}
- protected function _calcNormale() {
+ protected function _calcNormale()
+ {
if (count($this->_points) < 3) {
$this->_normale = new Image_3D_Vector(0, 0, 0);
return false;
@@ -102,14 +111,20 @@ protected function _calcNormale() {
$b1 = $this->_points[2]->getX() - $this->_points[1]->getX();
$b2 = $this->_points[2]->getY() - $this->_points[1]->getY();
$b3 = $this->_points[2]->getZ() - $this->_points[1]->getZ();
+
$this->_normale = new Image_3D_Vector($a2 * $b3 - $a3 * $b2, $a3 * $b1 - $a1 * $b3, $a1 * $b2 - $a2 * $b1);
// Backface Culling
- if (($this->_normale->getZ() <= 0) && (@$this->_option[Image_3D::IMAGE_3D_OPTION_BF_CULLING])) $this->setInvisible();
+ if (($this->_normale->getZ() <= 0) && (@$this->_option[Image_3D::IMAGE_3D_OPTION_BF_CULLING])) {
+ $this->setInvisible();
+ }
}
- public function getNormale() {
- if (!($this->_normale instanceof Image_3D_Vector)) $this->_calcNormale();
+ public function getNormale()
+ {
+ if (!($this->_normale instanceof Image_3D_Vector)) {
+ $this->_calcNormale();
+ }
return $this->_normale;
}
@@ -122,15 +137,20 @@ protected function _calcPosition()
$position[2] += $point->getZ();
}
$count = count($this->_points);
+
$this->_position = new Image_3D_Vector($position[0] / $count, $position[1] / $count, $position[2] / $count);
}
- public function getPosition() {
- if (!($this->_position instanceof Image_3D_Vector)) $this->_calcPosition();
+ public function getPosition()
+ {
+ if (!($this->_position instanceof Image_3D_Vector)) {
+ $this->_calcPosition();
+ }
return $this->_position;
}
- public function getPolygonCount() {
+ public function getPolygonCount()
+ {
return 1;
}
@@ -139,7 +159,8 @@ public function setColor(Image_3D_Color $color)
$this->_color = $color;
}
- public function isVisible() {
+ public function isVisible()
+ {
return $this->isVisible();
}
@@ -151,7 +172,9 @@ public function setInvisible()
public function setOption($option, $value)
{
$this->_option[$option] = $value;
- foreach ($this->_points as $point) $point->setOption($option, $value);
+ foreach ($this->_points as $point) {
+ $point->setOption($option, $value);
+ }
}
public function addPoint(Image_3D_Point $point)
@@ -159,15 +182,33 @@ public function addPoint(Image_3D_Point $point)
$this->_points[] = $point;
// Adjust bounding rectangle
- if (!isset($this->_boundingRect[0]) || ($point->getX() < $this->_boundingRect[0])) $this->_boundingRect[0] = $point->getX();
- if (!isset($this->_boundingRect[1]) || ($point->getY() < $this->_boundingRect[1])) $this->_boundingRect[1] = $point->getY();
- if (!isset($this->_boundingRect[2]) || ($point->getZ() < $this->_boundingRect[2])) $this->_boundingRect[2] = $point->getZ();
- if (!isset($this->_boundingRect[3]) || ($point->getX() > $this->_boundingRect[3])) $this->_boundingRect[3] = $point->getX();
- if (!isset($this->_boundingRect[4]) || ($point->getY() > $this->_boundingRect[4])) $this->_boundingRect[4] = $point->getY();
- if (!isset($this->_boundingRect[5]) || ($point->getZ() > $this->_boundingRect[5])) $this->_boundingRect[5] = $point->getZ();
+ if (!isset($this->_boundingRect[0]) || ($point->getX() < $this->_boundingRect[0])) {
+ $this->_boundingRect[0] = $point->getX();
+ }
+
+ if (!isset($this->_boundingRect[1]) || ($point->getY() < $this->_boundingRect[1])) {
+ $this->_boundingRect[1] = $point->getY();
+ }
+
+ if (!isset($this->_boundingRect[2]) || ($point->getZ() < $this->_boundingRect[2])) {
+ $this->_boundingRect[2] = $point->getZ();
+ }
+
+ if (!isset($this->_boundingRect[3]) || ($point->getX() > $this->_boundingRect[3])) {
+ $this->_boundingRect[3] = $point->getX();
+ }
+
+ if (!isset($this->_boundingRect[4]) || ($point->getY() > $this->_boundingRect[4])) {
+ $this->_boundingRect[4] = $point->getY();
+ }
+
+ if (!isset($this->_boundingRect[5]) || ($point->getZ() > $this->_boundingRect[5])) {
+ $this->_boundingRect[5] = $point->getZ();
+ }
}
- public function getPoints() {
+ public function getPoints()
+ {
return $this->_points;
}
@@ -176,33 +217,61 @@ protected function _recalcBoundings()
$this->_boundingRect = array(null, null, null, null, null, null);
foreach ($this->_points as $point) {
- if (!isset($this->_boundingRect[0]) || ($point->getX() < $this->_boundingRect[0])) $this->_boundingRect[0] = $point->getX();
- if (!isset($this->_boundingRect[1]) || ($point->getY() < $this->_boundingRect[1])) $this->_boundingRect[1] = $point->getY();
- if (!isset($this->_boundingRect[2]) || ($point->getZ() < $this->_boundingRect[2])) $this->_boundingRect[2] = $point->getZ();
- if (!isset($this->_boundingRect[3]) || ($point->getX() > $this->_boundingRect[3])) $this->_boundingRect[3] = $point->getX();
- if (!isset($this->_boundingRect[4]) || ($point->getY() > $this->_boundingRect[4])) $this->_boundingRect[4] = $point->getY();
- if (!isset($this->_boundingRect[5]) || ($point->getZ() > $this->_boundingRect[5])) $this->_boundingRect[5] = $point->getZ();
+ if (!isset($this->_boundingRect[0]) || ($point->getX() < $this->_boundingRect[0])) {
+ $this->_boundingRect[0] = $point->getX();
+ }
+
+ if (!isset($this->_boundingRect[1]) || ($point->getY() < $this->_boundingRect[1])) {
+ $this->_boundingRect[1] = $point->getY();
+ }
+
+ if (!isset($this->_boundingRect[2]) || ($point->getZ() < $this->_boundingRect[2])) {
+ $this->_boundingRect[2] = $point->getZ();
+ }
+
+ if (!isset($this->_boundingRect[3]) || ($point->getX() > $this->_boundingRect[3])) {
+ $this->_boundingRect[3] = $point->getX();
+ }
+
+ if (!isset($this->_boundingRect[4]) || ($point->getY() > $this->_boundingRect[4])) {
+ $this->_boundingRect[4] = $point->getY();
+ }
+
+ if (!isset($this->_boundingRect[5]) || ($point->getZ() > $this->_boundingRect[5])) {
+ $this->_boundingRect[5] = $point->getZ();
+ }
}
}
- public function transform(Image_3D_Matrix $matrix, $id = null) {
+ public function transform(Image_3D_Matrix $matrix, $id = null)
+ {
- if ($id === null) $id = substr(md5(microtime()), 0, 8);
- foreach ($this->_points as $point) $point->transform($matrix, $id);
+ if ($id === null) {
+ $id = substr(md5(microtime()), 0, 8);
+ }
+
+ foreach ($this->_points as $point) {
+ $point->transform($matrix, $id);
+ }
+
$this->_recalcBoundings();
}
public function getMidZ()
{
$z = 0;
- foreach ($this->_points as $point) $z += $point->getZ();
+ foreach ($this->_points as $point) {
+ $z += $point->getZ();
+ }
return $z / count($this->_points);
}
public function getMaxZ()
{
$z = -500;
- foreach ($this->_points as $point) $z = max($point->getZ(), $z);
+ foreach ($this->_points as $point) {
+ $z = max($point->getZ(), $z);
+ }
return $z;
}
@@ -215,7 +284,8 @@ public function __toString()
return $string;
}
- public function distance(Image_3D_Line $line) {
+ public function distance(Image_3D_Line $line)
+ {
// Calculate parameters for plane
$normale = $this->getNormale();
@@ -229,22 +299,31 @@ public function distance(Image_3D_Line $line) {
// Calculate wheather and where line cuts the polygons plane
$lineDirection = $line->getDirection();
+
$denominator = -( $A * $line->getX() +
$B * $line->getY() +
$C * $line->getZ() +
$D);
+
$numerator = ( $A * $lineDirection->getX() +
$B * $lineDirection->getY() +
$C * $lineDirection->getZ());
// Nu cut, when denomintor equals 0 (parallel plane)
- if ((int) ($denominator * 100000) === 0) return false;
- if ((int) ($numerator * 100000) === 0) return false;
+ if ((int) ($denominator * 100000) === 0) {
+ return false;
+ }
+
+ if ((int) ($numerator * 100000) === 0) {
+ return false;
+ }
$t = $denominator / $numerator;
// No cut, when $t < 0 (plane is behind the camera)
- if ($t <= 0) return false;
+ if ($t <= 0) {
+ return false;
+ }
// TODO: Perhaps add max distance check with unified normale vector
@@ -266,14 +345,13 @@ public function distance(Image_3D_Line $line) {
foreach ($this->_points as $nr => $point) {
$nextPoint = $this->_points[($nr + 1) % count($this->_points)];
- $edge = new Image_3D_Vector(
- $nextPoint->getX() - $point->getX(),
- $nextPoint->getY() - $point->getY(),
- $nextPoint->getZ() - $point->getZ());
- $v = new Image_3D_Vector(
- $cuttingPoint->getX() - $point->getX(),
- $cuttingPoint->getY() - $point->getY(),
- $cuttingPoint->getZ() - $point->getZ());
+ $edge = new Image_3D_Vector($nextPoint->getX() - $point->getX(),
+ $nextPoint->getY() - $point->getY(),
+ $nextPoint->getZ() - $point->getZ());
+
+ $v = new Image_3D_Vector($cuttingPoint->getX() - $point->getX(),
+ $cuttingPoint->getY() - $point->getY(),
+ $cuttingPoint->getZ() - $point->getZ());
$scalar = $edge->crossProduct($v)->scalar($normale);
Please sign in to comment.
Something went wrong with that request. Please try again.