# Clone method for 3D point class

**URL:** <https://forum.kirupa.com/t/clone-method-for-3d-point-class/180289>\
**Category:** Uncategorized\
**Created:** [February 27, 2006, 4:49pm UTC](https://forum.kirupa.com/t/clone-method-for-3d-point-class/180289 "2006-02-27T16:49:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marky](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@marky](https://forum.kirupa.com/u/marky)\
**Post date:** [February 27, 2006, 4:49pm UTC](https://forum.kirupa.com/t/clone-method-for-3d-point-class/180289/1 "2006-02-27T16:49:21Z")

</div>

Hello, I can’t work out how to create a temporary copy of a 3D point class on which I’ll perform some calculations which I don’t want to effect the original.

In C++ it’s called deep copying. How do you do it in actionscript?

Any help would be greatly appreciated. I’m going crazy over here!

Here’s the class:

```auto
 class Point3D {
	
	var origin_x:Number;
	var origin_y:Number;
	
	var x_pos:Number;
	var y_pos:Number;
	var z_pos:Number;

	//constructor
	function Point3D(a, b, c){
		origin_x = 150;
		origin_y = 150;
		
		x_pos = a + origin_x;
			y_pos = b + origin_y;
				z_pos = c;
	
				
					}

				}

```
